-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New hardlinks test failed - false positive? #735
Comments
I dont have this kind of issues building rsync on FreeBSD, |
in case it was not clear, this is not always reproducible, you have to be pretty unlucky (ie. run the testsuite a bunch of times, enough, until you hit it). And yet I reproduced it yesterday during a build on my machine -- I must be the unlucky type 😢
I was not entirely correct, now I realize that what makes the test flaky is the delay between the moment the directories are created, and the moment the test runs (ie. the To clarify, here's a patch that makes the test fails 100% of the times for me:
And here are a few lines of script that I use to reproduce the test manually:
Output:
Above we can see that the mtime for the destination directory is updated by the rsync run, so if there's a delay between the moment the directories are created, and the moment rsync runs, it will mismatch and fail the test. As for a fix, changing the line:
To:
Is enough to fix it. But I don't know if, after changing it this way, it still tests for the regression that it's meant to test.
I tried:
Is it specific to BSD? I'm on Linux. |
The test was added in dc34990, it turns out that it's flaky. It failed once on the Debian build infra, cf. [1]. The problem is that the command `rsync -aH '$fromdir/sym' '$todir'` updates the mod time of `$todir`, so there might be a diff between the output of `rsync_ls_lR $fromdir` and `rsync_ls_lR $todir`, if ever rsync runs 1 second (or more) after the directories were created. To clarify: it's easy to make the test fails 100% of the times with this change: ``` makepath "$fromdir/sym" "$todir" +sleep 5 checkit "$RSYNC -aH '$fromdir/sym' '$todir'" "$fromdir" "$todir" ``` The fix proposed here is in line with other tests in hardlinks.test, as far as I can see all the tests use a trailing slash for the `$fromdir` and `$todir` arguments. I tested that, after this commit, the test still catches the regression in rsync 3.4.0. Fixes: RsyncProject#735 [1]: https://buildd.debian.org/status/fetch.php?pkg=rsync&arch=ppc64el&ver=3.4.1%2Bds1-1&stamp=1741147156&raw=0
Answering myself: I grabbed a
Then I applied #736, and I can confirm that the test still catches the regression:
|
[....]
It's not completely clear for me, but according with the discussion pointed bellow, on linux, userland does not have write access to inode ctime/crtime. So this option is probably disabled in your build system. |
Excellent, I will do the same test to see if it still working on my side. |
Hi, I'm sorry but doing the test on rsync-3.4.0 with #376 patch, the breakage with -H is not tested properly and the test pass.
And my scratch directories has the following content :
Reverting the patch, the test breaks and scratch has the following content
Edit: fix typo |
You mean #736 I think, not #376 :) In any case: you're right... I tested again, I can confirm, after the patch #736 the test on rsync-3.4.0 passes, the -H regression is not detected. Sorry about that, something went wrong on my side... Thank you for testing it. I'm testing another approach. |
The test was added in dc34990, it turns out that it's flaky. It failed once on the Debian build infra, cf. [1]. The problem is that the command `rsync -aH '$fromdir/sym' '$todir'` updates the mod time of `$todir`, so there might be a diff between the output of `rsync_ls_lR $fromdir` and `rsync_ls_lR $todir`, if ever rsync runs 1 second (or more) after the directories were created. To clarify: it's easy to make the test fails 100% of the times with this change: ``` makepath "$fromdir/sym" "$todir" +sleep 5 checkit "$RSYNC -aH '$fromdir/sym' '$todir'" "$fromdir" "$todir" ``` With the fix proposed here, we don't use `checkit` anymore, instead we just run the rsync command, then a simple `diff` to compare the two directories. This is exactly what the other `-H` test just above does. In case there's some doubts, `diff` fails if `sym` is missing: ``` $ mkdir -p foo/sym bar $ diff foo bar || echo KO! Only in foo: sym KO! ``` I tested that, after this commit, the test still catches the `-H` regression in rsync 3.4.0. Fixes: RsyncProject#735 [1]: https://buildd.debian.org/status/fetch.php?pkg=rsync&arch=ppc64el&ver=3.4.1%2Bds1-1&stamp=1741147156&raw=0
Hi again, I opened #737. This time it should be good. |
During the build of latest rsync version 3.4.1 on the Debian builders, there was one failure on the architecture
ppc64el
: https://buildd.debian.org/status/fetch.php?pkg=rsync&arch=ppc64el&ver=3.4.1%2Bds1-1&stamp=1741147156&raw=0The test that failed was added a short while ago in commit dc34990 (hence CC @rosorio)
I'll reproduce the interesting part of the logs below:
My understanding is that it's a false positive: makepath created
from/sym
at03:58:54
, andto
at03:58:55
, and so it necessarily shows in the ls diff?Thanks
The text was updated successfully, but these errors were encountered: