autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autotest: make test dir writable before removing


From: Ralf Wildenhues
Subject: Re: Autotest: make test dir writable before removing
Date: Mon, 3 Oct 2005 09:22:48 +0200
User-agent: Mutt/1.5.9i

Hi Paul,

* Paul Eggert wrote on Sun, Oct 02, 2005 at 11:46:06PM CEST:
> Ralf Wildenhues <address@hidden> writes:
> 
> >     * lib/autotest/general.m4 (AT_INIT): Make test dir content
> >     writable before removing.
> 
> I have a few qualms about invoking "chmod u+w" as I worry it might run
> afoul of people who have deliberately set up their directories in
> weird ways.

Erm, the setup of the test directories (testsuite.dir/NNN) is pretty
irrelevant _before_ the test run: it is supposed to be erased.  I'm not
arguing for changing the modes of any file outside of this.

Maybe I haven't understood what you are thinking of here?

> coreutils addresses this problem by putting traps in its test cases,
> so that the traps can do a chmod u+w; does that work for you?

That would change the mode _after_ running the test; at the time, the
innocent user goes and tries to explore the test directory to find out
what went wrong.  If I wouldn't have known before what magic `make
distcheck' does with tree writability, in this case such a trap would
have left me out in the cold, with no clue.  So no, I don't think that
is a very good idea -- on the contrary, Autotest should leave the test
dir alone after the test, so as to preserve as much evidence as
possible.

In the interest of other situations -- it may be necessary to change
some extended attributes or such to be able to clean up the test dir --
maybe Autotest should provide a macro to the developer to be executed
before cleaning the test dir?  That way no authority is given up
lightly.

I guess we have to put in the trap in order to provide backward
compatibility with 2.59, but only for that reason.

> chmod -R is portable these days, by the way.

Ah, thanks.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]