Re: Intermittent Failures in t1450-fsck (Bisected)

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

 



On May 5, 2011, at 5:58 PM, Brian Gernhardt wrote:

> I've actually nailed it down to something even more specific than "OS X".  It's failing when I run it on a ramdisk.
>> 

I've tried to narrow it down even further.  I cut the test down to just the setup and failing test. Then I removed all "test_when_finished" and replaced the "test_must_fail" with "!" so I can directly copy/paste the test into a window.  When the test runs, it fails.  When I run it manually, even with using /bin/sh and eval, it succeeds.  Can anybody else think of what difference there might be between a shell and the test script that I should test?  (I did remember to set GIT_EXEC_PATH and my PATH to run the same version as the script is.)

There's some _very_ weird triggering condition involved here and I'm hoping to narrow it down so I can set some useful breakpoints in gdb and see what's going on inside.

Output follows:

t$ dev=`hdiutil attach -nomount ram://200000`
t$ diskutil erasevolume HFS+ Git_Test $dev
Started erase on disk1
Unmounting disk
Erasing
Initialized /dev/rdisk1 as a 100 MB HFS Plus volume
Mounting disk
Finished erase on disk1 Git_Test
t$ ./t1450-fsck.sh -i -v --root=/Volumes/Git_Test
Initialized empty Git repository in /Volumes/Git_Test/trash directory.t1450-fsck/.git/
expecting success: 
	git config gc.auto 0 &&
	git config i18n.commitencoding ISO-8859-1 &&
	test_commit A fileA one &&
	git config --unset i18n.commitencoding &&
	git checkout HEAD^0 &&
	test_commit B fileB two &&
	git tag -d A B &&
	git reflog expire --expire=now --all &&
	>empty

[master (root-commit) 1347563] A
 Author: A U Thor <author@xxxxxxxxxxx>
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileA
Note: checking out 'HEAD^0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 1347563... A
[detached HEAD c9145d6] B
 Author: A U Thor <author@xxxxxxxxxxx>
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileB
Deleted tag 'A' (was 1347563)
Deleted tag 'B' (was c9145d6)
ok 1 - setup

expecting success: 
	sha1_file() {
		echo "$*" | sed "s#..#.git/objects/&/#"
	} &&

	remove_object() {
		file=$(sha1_file "$*") &&
		test -e "$file" &&
		rm -f "$file"
	}

ok 2 - setup: helpers for corruption tests

expecting success: 
	sha=$(echo blob | git hash-object -w --stdin) &&
	cat >wrong-tag <<-EOF &&
	object $sha
	type commit
	tag wrong
	tagger T A Gger <tagger@xxxxxxxxxxx> 1234567890 -0000

	This is an invalid tag.
	EOF

	tag=$(git hash-object -t tag -w --stdin <wrong-tag) &&
	echo $tag >.git/refs/tags/wrong &&
	! git fsck --tags 2>out &&
	cat out &&
	grep "error in tag.*broken links" out

tagged commit 63499e4ea8e096b831515ceb1d5a7593e4d87ae5 (wrong) in 66f6581d549f70e05ca586bc2df5c15a95662c36
missing commit 63499e4ea8e096b831515ceb1d5a7593e4d87ae5
error: Object 63499e4ea8e096b831515ceb1d5a7593e4d87ae5 is a commit, not a blob
error: 63499e4ea8e096b831515ceb1d5a7593e4d87ae5: object corrupt or missing
not ok - 3 tag pointing to something else than its type
#	
#		sha=$(echo blob | git hash-object -w --stdin) &&
#		cat >wrong-tag <<-EOF &&
#		object $sha
#		type commit
#		tag wrong
#		tagger T A Gger <tagger@xxxxxxxxxxx> 1234567890 -0000
#	
#		This is an invalid tag.
#		EOF
#	
#		tag=$(git hash-object -t tag -w --stdin <wrong-tag) &&
#		echo $tag >.git/refs/tags/wrong &&
#		! git fsck --tags 2>out &&
#		cat out &&
#		grep "error in tag.*broken links" out
#	
t$ /bin/sh
sh-3.2$ cd /Volumes/Git_Test/trash\ directory.t1450-fsck
sh-3.2$ rm .git/objects/63/499e4ea8e096b831515ceb1d5a7593e4d87ae5 .git/objects/66/f6581d549f70e05ca586bc2df5c15a95662c36 
override r--r--r--  brian/brian for .git/objects/63/499e4ea8e096b831515ceb1d5a7593e4d87ae5? y
override r--r--r--  brian/brian for .git/objects/66/f6581d549f70e05ca586bc2df5c15a95662c36? y
sh-3.2$ export GIT_EXEC_PATH=$HOME/dev/git
sh-3.2$ export PATH=$HOME/dev/git:$PATH
sh-3.2$ eval '
> sha=$(echo blob | git hash-object -w --stdin) &&
> cat >wrong-tag <<-EOF &&
> object $sha
> type commit
> tag wrong
> tagger T A Gger <tagger@xxxxxxxxxxx> 1234567890 -0000
> 
> This is an invalid tag.
> EOF
> 
> tag=$(git hash-object -t tag -w --stdin <wrong-tag) &&
> echo $tag >.git/refs/tags/wrong &&
> ! $HOME/dev/git/git fsck --tags 2>out &&
> cat out &&
> grep "error in tag.*broken links" out
> '
broken link from     tag 66f6581d549f70e05ca586bc2df5c15a95662c36
broken link from unknown unknown
dangling blob 63499e4ea8e096b831515ceb1d5a7593e4d87ae5
error: Object 63499e4ea8e096b831515ceb1d5a7593e4d87ae5 is a blob, not a commit
error in tag 66f6581d549f70e05ca586bc2df5c15a95662c36: broken links
error in tag 66f6581d549f70e05ca586bc2df5c15a95662c36: could not load tagged object
error in tag 66f6581d549f70e05ca586bc2df5c15a95662c36: broken links
sh-3.2$ 


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]