Re: [BUG] make test (t3600-rm.sh) fails

From: Junio C Hamano <junkio@cox.net>
Date: 2006-03-24 22:08:08
Takis <panagiotis.issaris@gmail.com> writes:

> I am running it as fakeroot, as part of the "dpkg-buildpackage
> -rfakeroot -uc -us -b"
> command for building Debian packages. Would this be the problem (the fakeroot)?

That is what is causing this, yes.

	$ mkdir /var/tmp/junk && cd /var/tmp/junk
        $ chmod u+w .
	$ fakeroot sh -c 'date >foo; chmod u-w .; rm foo; ls -l foo'
        $ chmod u+w .
	$ sh -c 'date >foo; chmod u-w .; rm foo; ls -l foo'

The one under fakeroot happily ignores the directory being
unwritable because it mimics to be root.

But that does not mean fakeroot is buggy.  Fakeroot is doing
what it is designed to do.

That does not mean running our tests under fakeroot is stupidity
on your part.  We do not advertise that the tests should not be
run as root.

The test is buggy -- it tries to make sure the command fails
when underlying rm fails, but is not aware that "chmod u-w ."
is not a good way to make ./foo undeletable if you run it as
root.  At least it should skip those two tests if it is run by
root.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Mar 24 22:08:47 2006

This archive was generated by hypermail 2.1.8 : 2006-03-24 22:09:01 EST