Re: t4111 fails under valgrind

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

 



Jonathan Nieder wrote:
> -- 8< --
> Subject: t4111 (apply): refresh index before applying patches to it
> 
> "git apply", like most plumbing, does not automatically refresh the
> index file even if it is only stat-dirty.  So unless the two "cp"
> commands in reset_preimage() for a given file happen to have the same
> time stamp, there will be a spurious
> 
> 	error: sub/dir/file: does not match index
> 
> Refresh the index to eliminate this timing dependency.  Noticed by
> running the test with --valgrind (which slows things down a lot).
> 
> Reported-by: Thomas Rast <trast@xxxxxxxxxxxxxxx>
> Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
> ---
> diff --git a/t/t4111-apply-subdir.sh b/t/t4111-apply-subdir.sh
> index 57cae50..a52d94a 100755
> --- a/t/t4111-apply-subdir.sh
> +++ b/t/t4111-apply-subdir.sh
> @@ -36,7 +36,8 @@ test_expect_success 'setup: subdir' '
>  		cp "$2" file &&
>  		cp "$2" sub/dir/file &&
>  		cp "$2" sub/dir/b/file &&
> -		cp "$2" objects/file
> +		cp "$2" objects/file &&
> +		test_might_fail git update-index --refresh -q
>  	}
>  '

Junio, can you pick this up?  t4111 consistently fails for me without
it.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
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]