From test-dev-return-1775-apmail-httpd-test-dev-archive=httpd.apache.org@httpd.apache.org Wed Jul 30 01:09:12 2003 Return-Path: Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 45114 invoked by uid 500); 30 Jul 2003 01:09:11 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 44981 invoked from network); 30 Jul 2003 01:09:10 -0000 Message-ID: <3F271ABD.40508@modperlcookbook.org> Date: Tue, 29 Jul 2003 21:09:17 -0400 From: Geoffrey Young User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: test-dev@httpd.apache.org Subject: Re: Apache::Test oustanding issues References: <3F25A296.3020500@stason.org> <3F26AFF4.9020009@modperlcookbook.org> <3F270F07.5070207@stason.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N >> the way I handled this was to add the following to my TEST.PL >> >> # override root blocks >> local *Apache::TestConfig::default_user = sub { return 'root' }; >> local *Apache::TestConfig::default_group = sub { return 'root' }; > > > why do you need to run tests as root? well, it was a web services interface, and some of the services required root permission to manipulate certain backend elements. > >> # and that nasty chown stuff >> local *Apache::TestRun::adjust_t_perms = sub { 1 }; > > > root can still work with files owned by 'nobody', but of course... I forget why I did that. I think it was to enable files added by root-run tests to be removed by normal users, but I'm not sure - it was something like that :) > > let me repeat what the problem is: > > cd /root ; mkdir t ; chmod 0777 t ; > sudo -u 'nobody' perl -le 'print -r "t" && -w _ && -x _ ? "OK" : "NOK"' > > if you can make it return 'OK', than the problem is solved. yeah, ok, I get it now. well, perhaps the /tmp copy isn't so bad (I misread it :) the issue that we will have, though, is for people whose tests need to get back to the base directory, ../. so, I'd also suggest some function or package global that can be used in place of ../, making my $lib = catfile($Apache::Test::basedir, 'lib'); equivalent to (from t/) my $lib= catfile('../', 'lib'); and my $lib = catfile('/src/Apache-Foo', 'lib'); --Geoff