httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRun.pm
Date Sun, 26 Oct 2003 20:35:01 GMT
stas        2003/10/26 12:35:01

  Modified:    perl-framework/Apache-Test Changes
               perl-framework/Apache-Test/lib/Apache TestRun.pm
  Log:
  sudo and su -u aren't portable, therefore use a simple setuid/setguid
  perl program instead, to check whether the root directory of the test
  suite is rwx by the user/group apache is going to run under (when
  running 'make test' as root).
  also update the explanations of what to do in case the current dir is not
  suitable for 'make test' as root.
  
  Revision  Changes    Path
  1.58      +5 -0      httpd-test/perl-framework/Apache-Test/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -u -r1.57 -r1.58
  --- Changes	23 Oct 2003 23:42:11 -0000	1.57
  +++ Changes	26 Oct 2003 20:35:00 -0000	1.58
  @@ -8,6 +8,11 @@
   
   =item 1.06-dev
   
  +sudo and su -u aren't portable, therefore use a simple setuid/setguid
  +perl program instead, to check whether the root directory of the test
  +suite is rwx by the user/group apache is going to run under (when
  +running 'make test' as root). [Stas]
  +
   =item 1.05 - October 23, 2003
   
   core scanning changes [Stas]
  
  
  
  1.120     +19 -7     httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm
  
  Index: TestRun.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -u -r1.119 -r1.120
  --- TestRun.pm	21 Oct 2003 01:24:24 -0000	1.119
  +++ TestRun.pm	26 Oct 2003 20:35:01 -0000	1.120
  @@ -800,10 +800,19 @@
       my $vars = $self->{test_config}->{vars};
       my $dir  = $vars->{t_dir};
       my $perl = $vars->{perl};
  -    my $check = qq[su -m $user -c '$perl -e ] .
  -        qq["print -r q{$dir} &&  -w _ && -x _ ? q{OK} : q{NOK}"'];
  +
  +    my $check = <<"EOC";
  +$perl -e '
  +    require POSIX;
  +    POSIX::setuid($uid);
  +    POSIX::setgid($gid);
  +    print -r q{$dir} &&  -w _ && -x _ ? q{OK} : q{NOK};
  +'
  +EOC
  +    $check =~ s/\n/ /g;
       warning "$check\n";
  -    my $res   = qx[$check] || '';
  +
  +    my $res = qx[$check] || '';
       warning "result: $res";
       unless ($res eq 'OK') {
           #$self->restore_t_perms;
  @@ -811,16 +820,19 @@
   You are running the test suite under user 'root'.
   Apache cannot spawn child processes as 'root', therefore
   we attempt to run the test suite with user '$user' ($uid:$gid).
  -The problem is that the path:
  +The problem is that the path (including all parent directories):
     $dir
   must be 'rwx' by user '$user', so Apache can read and write under that
   path.
   
  -There several ways to resolve this issue. For example move 
  -'$dir' to '/tmp/' and repeat the 'make test' phase. 
  +There are several ways to resolve this issue. One is to move '$dir' to
  +'/tmp/' and repeat the 'make test' phase. The other is not to run
  +'make test' as root.
   
  -You can test whether the location is good by running the following test:
  +You can test whether some directory is suitable for 'make test' under
  +'root', by running the following test:
     % $check
  +from that directory.
   EOI
       }
   }
  
  
  

Mime
View raw message