You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2004/09/27 22:45:31 UTC

Re: Apache::Test and OpenBSD

Seth, please always post any A-T related questions to the httpd-test list:
http://perl.apache.org/maillist/test-dev.html#Subscription_Information

Seth Gordon wrote:
> OK, if I make the following change to Apache::TestServer....
> 
> sub args {
>     my $self = shift;
>     my $vars = $self->{config}->{vars};
>     my $dversion = $self->dversion; #for .conf version conditionals
>     my $defines = $self->config_defines;
> 
>     ## the version of Apache distributed with OpenBSD will run
>     ## chrooted unless given the '-u' flag
>     my $openbsd_flag = '';
>     if (`uname` eq "OpenBSD\n" && $vars->{httpd} eq '/usr/sbin/httpd') {
>         $openbsd_flag = '-u';
>     }
> 
>     "$openbsd_flag -d $vars->{serverroot} -f $vars->{t_conf_file} 
> $dversion $defines";
> }
> 
> ...and run "make test" in an Apache-Test distribution that I unpack 
> myself, then it works fine.  If I run "make test" in the directory that 
> CPANPLUS unpacks for me, I get this...

It's because your CPANPLUS shell is running under root and in the 
directory that's accessible only under root, so

> # make test
> /usr/bin/perl -Iblib/arch -Iblib/lib  t/TEST  -clean
> APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= 
> APACHE_TEST_USER= APACHE_TEST_APXS=  /usr/bin/perl -Iblib/arch 
> -Iblib/lib  t/TEST  -bugreport -verbose=0
> [warning] root mode: changing the files ownership to 'nobody' (32767:32767)
> [warning] testing whether 'nobody' is able to -rwx 
> /var/perl/cpanplus/5.8.2/build/Apache-Test-1.13/t
> "/usr/bin/perl" -Mlib=lib -MApache::TestRun -e 'eval { 
> Apache::TestRun::run_root_fs_test(32767, 32767, 
> q[/var/perl/cpanplus/5.8.2/build/Apache-Test-1.13/t]) }';
> 
> 
> [warning] result: OK
> [warning] the client side drops 'root' permissions and becomes 'nobody'
> /usr/sbin/httpd -u -d /var/perl/cpanplus/5.8.2/build/Apache-Test-1.13/t 
> -f /var/perl/cpanplus/5.8.2/build/Apache-Test-1.13/t/conf/httpd.conf -D 
> APACHE1

What are the permissions on this directory?
% ls -l /var/perl/cpanplus/5.8.2/build/Apache-Test-1.13

> using Apache/1.3.29
> *** About to run command from start: /usr/sbin/httpd -u -d 
> /var/perl/cpanplus/5.8.2/build/Apache-Test-1.13/t -f 
> /var/perl/cpanplus/5.8.2/build/Apache-Test-1.13/t/conf/httpd.conf -D 
> APACHE1
> 
> waiting 60 seconds for server to start: .
> waiting 60 seconds for server to start: ok (waited 0 secs)
> server localhost.ropine.com:8529 started
> t/bad_coding....ok
> t/ping..........NOK 3# Failed test 3 in t/ping.t at line 16
> t/ping..........FAILED test 3
>         Failed 1/3 tests, 66.67% okay
> t/redirect......NOK 4# Failed test 4 in t/redirect.t at line 17
> t/redirect......NOK 6# Failed test 6 in t/redirect.t at line 23
> t/redirect......FAILED tests 4, 6
>         Failed 2/6 tests, 66.67% okay
> t/request.......NOK 1# Failed test 1 in t/request.t at line 11
> t/request.......NOK 5# Failed test 5 in t/request.t at line 16
> t/request.......NOK 8# Failed test 8 in t/request.t at line 20
> t/request.......NOK 9# Failed test 9 in t/request.t at line 22
> t/request.......FAILED tests 1, 5, 8-9
>         Failed 4/9 tests, 55.56% okay
> Failed Test  Stat Wstat Total Fail  Failed  List of Failed
> ------------------------------------------------------------------------------- 
> 
> t/ping.t                    3    1  33.33%  3
> t/redirect.t                6    2  33.33%  4 6
> t/request.t                 9    4  44.44%  1 5 8-9
> Failed 3/4 test scripts, 25.00% okay. 7/19 subtests failed, 63.16% okay.
> [  error] error running tests (please examine t/logs/error_log)
> +-----------------------------------------------------+
> | To report problems please refer to the SUPPORT file |
> +-----------------------------------------------------+
> *** Error code 1
> 
> Stop in /var/perl/cpanplus/5.8.2/build/Apache-Test-1.13 (line 831 of 
> Makefile).
> # cat t/logs/error_log
> [Mon Sep 27 12:55:47 2004] [notice] Initializing etag from 
> /var/perl/cpanplus/5.8.2/build/Apache-Test-1.13/t/logs/etag-state
> [Mon Sep 27 12:55:47 2004] [crit] (1)Operation not permitted: could not 
> chown /var/perl/cpanplus/5.8.2/build/Apache-Test-1.13/t/logs/etag-state
> 
> If I try running the test under GDB, I get this...

There is no need to run it under GDB. Instead you need send the verbose 
output of the test suite, which is:

t/TEST -verbose

Thanks.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com