Re: [PATCH v2] t7063: work around FreeBSD's lazy mtime update feature

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

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

>  v2 goes with Junio's suggestion (good one!).

Ehh, have you even read what you copied and pasted?  "this and that"
and "blah" are meant to be placeholders for you to fill in.

I am not sure if "-exec ls -ld" is a good idea.  Doesn't "find" by
itself does enough lstat(2) call to work already?  Even if it were
necessary to trigger a separate stat(2) call, wouldn't "-ls" be
sufficient?

> +# On some filesystems (e.g. FreeBSD's ext2 and ufs) this and that
> +# happens when we do blah, which forces the untracked cache code to
> +# take the slow path.  A test that wants to make sure the fast path
> +# works correctly should call this helper to make mtime of the
> +# containing directory in sync with the reality after doing blah and
> +# before checking the fast path behaviour
> +sync_mtime () {
> +	find . -type d -exec ls -ld {} \; >/dev/null
> +}
> +
>  avoid_racy() {
>  	sleep 1
>  }
> @@ -416,7 +426,8 @@ test_expect_success 'create/modify files, some of which are gitignored' '
>  	echo four >done/four && # four is gitignored at a higher level
>  	echo five >done/five && # five is not gitignored
>  	echo test >base && #we need to ensure that the root dir is touched
> -	rm base
> +	rm base &&
> +	sync_mtime
>  '
>  
>  test_expect_success 'test sparse status with untracked cache' '
--
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]