Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: takis@issaris.org
Cc: git@vger.kernel.org
Subject: Re: [BUG] make test (t3600-rm.sh) fails
Date: Fri, 24 Mar 2006 03:08:08 -0800	[thread overview]
Message-ID: <7vy7z0yuav.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <df33fe7c0603240245o516095b5m@mail.gmail.com> (panagiotis.issaris@gmail.com's message of "Fri, 24 Mar 2006 11:45:39 +0100")

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.

  reply	other threads:[~2006-03-24 11:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-24 10:14 [BUG] make test (t3600-rm.sh) fails Panagiotis Issaris
2006-03-24 10:29 ` Junio C Hamano
2006-03-24 10:45   ` Takis
2006-03-24 11:08     ` Junio C Hamano [this message]
2006-03-24 12:05       ` Panagiotis Issaris
2006-03-24 13:51         ` Petr Baudis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vy7z0yuav.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=takis@issaris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox