Re: [PATCH v2 7/6] t7814: do not generate same commits in different repos

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

 



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

> t7814 has repo tree like this
>
>   initial-repo
>     submodule
>       sub
>
> In each repo 'submodule' and 'sub', a commit is made to add the same
> initial file 'a' with the same message 'add a'. If tests run fast
> enough, the two commits are made in the same second, resulting
> identical commits.
>
> There is nothing wrong with that per-se. But it could make the test
> flaky. Currently all submodule odbs are merged back in the main
> one (because we can't, or couldn't, access separate submodule repos
> otherwise). But eventually we need to access objects from the right
> repo.
>
> Because the same commit could sometimes be present in both 'submodule'
> and 'sub', if there is a bug looking up objects in the wrong repo,
> sometimes it will go unnoticed because it finds the needed object in the
> wrong repo anyway.
>
> Fix this by changing commit time after every commit. This makes all
> commits unique. Of course there are still identical blobs in different
> repos, but because we often lookup commit first, then tree and blob,
> unique commits are already quite safe.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---
>  > And I can't quite understand how t7814 sometimes passed.
>
>  I do now. This patch makes it fail consistently for me.

Well analysed.  Very well done.  Thanks.




[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]

  Powered by Linux