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, 10:29 UTC
Message-ID
<7v7j6k16g2.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<4423C681.3000302@issaris.org>
Panagiotis Issaris <takis@issaris.org> writes:
Show 6 quoted lines
> * FAIL 9: Test that "git-rm -f" fails if its rm fails
>        git-rm -f baz
>...
> My system:
> Ubuntu 5.10 aka Breezy
> Linux issaris 2.6.15.060103 #1 Tue Jan 3 14:27:55 CET 2006 i686 GNU/Linux
I wonder what your system shows if you run:
	$ cd t && sh -x t3600-rm.sh -i -v

The test #9 makes the test directory unwritable before trying to unlink a file there, and git-rm runs rm without -f which should make it fail. So either your "chmod u-w ." is broken, you are running it as root and defeating "chmod u-w .", or you have a broken rm that does not report failure with its exit status.

The relevant part on my machine looks like this:
$ cd t
$ sh -x t3600-rm.sh -i -v
...
*   ok 8: Test that "git-rm -f" succeeds with embedded space, tab, or newline characters.
+ test y = y
+ chmod u-w .
+ test_expect_failure 'Test that "git-rm -f" fails if its rm fails' 'git-rm -f baz'
+ test 2 = 2
+ say 'expecting failure: git-rm -f baz'
+ echo '* expecting failure: git-rm -f baz'
* expecting failure: git-rm -f baz
+ test_run_ 'git-rm -f baz'
+ eval 'git-rm -f baz'
++ git-rm -f baz
rm: cannot remove `baz': Permission denied
+ eval_ret=123
+ return 0
+ '[' 0 = 0 -a 123 '!=' 0 ']'
+ test_ok_ 'Test that "git-rm -f" fails if its rm fails'
++ expr 8 + 1
+ test_count=9
+ say '  ok 9: Test that "git-rm -f" fails if its rm fails'
+ echo '*   ok 9: Test that "git-rm -f" fails if its rm fails'
*   ok 9: Test that "git-rm -f" fails if its rm fails
...
Previous: Panagiotis IssarisNext: Takis
Message 2 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.