git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <junkio@cox.net>
Date
Mar 24, 2006, 11:08 UTC
Message-ID
<7vy7z0yuav.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<df33fe7c0603240245o516095b5m@mail.gmail.com>
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.

Previous: TakisNext: Panagiotis Issaris
Message 4 of 6 in “[BUG] make test (t3600-rm.sh) fails”
  1. Panagiotis IssarisMar 24, 2006
  2. Junio C HamanoMar 24, 2006
  3. TakisMar 24, 2006
  4. Junio C HamanoMar 24, 2006
  5. Panagiotis IssarisMar 24, 2006
  6. Petr BaudisMar 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.