File: ithreads3.t

package info (click to toggle)
libapache2-mod-perl2 2.0.9~1624218-2%2Bdeb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 11,912 kB
  • ctags: 4,588
  • sloc: perl: 95,064; ansic: 14,527; makefile: 49; sh: 18
file content (36 lines) | stat: -rw-r--r-- 979 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# please insert nothing before this line: -*- mode: cperl; cperl-indent-level: 4; cperl-continued-statement-offset: 4; indent-tabs-mode: nil -*-
use strict;
use warnings FATAL => 'all';

use Apache::Test;
use Apache::TestUtil;
use Apache::TestRequest 'GET_BODY';

plan tests => 6, todo => [3, 4, 5],  need_apache_mpm('worker') && need_perl('ithreads');

my $module = 'TestPerl::ithreads3';

sub u {Apache::TestRequest::module2url($module, {path=>$_[0]})}
sub t {
    my $rc;
    eval {
        local $SIG{ALRM}=sub {die "Timeout\n"};
        alarm 2;
        eval {
            $rc=GET_BODY u(shift);
        };
        alarm 0;
    };
    alarm 0;
    return $rc;
}

t_debug("connecting to ".u(''));
ok t_cmp t('/perl-script?1'), 2, 'perl-script 1';
ok t_cmp t('/modperl?1'), 2, 'modperl 1';

ok t_cmp t('/perl-script?2'), 5, 'perl-script 2';
ok t_cmp t('/modperl?2'), 5, 'modperl 2';

ok t_cmp t('/perl-script?3'), 3, 'perl-script 3';
ok t_cmp t('/modperl?3'), 3, 'modperl 3';