]> git.ipfire.org Git - thirdparty/zstd.git/commit
[rsyncable] Fix test failures 2777/head
authorNick Terrell <terrelln@fb.com>
Tue, 14 Sep 2021 18:57:26 +0000 (11:57 -0700)
committerNick Terrell <terrelln@fb.com>
Tue, 14 Sep 2021 19:28:53 +0000 (12:28 -0700)
commit9d9e2ed00baa70652c1b8255b3ff16057a702f2e
tree885b29118e29d71da3af8a1d3284156845753616
parenta418b4e4787f495abcc1f2e7768bd52a8d5ffc82
[rsyncable] Fix test failures

Test failures showed up on the daily cron job. They didn't show up
in CI because the condition is somewhat rare, and didn't trigger
during the CI tests.

This PR fixes up the logic in `findSynchronizationPoint()` to correctly
handle the edge case. It also un-comments an assert that helps catch the
issue, and verify that rsyncable mode is calculating the correct hash.

After the fix, the test that failed passes:

```
./zstreamtest --newapi -t1 --no-big-tests -s9680
```
lib/compress/zstdmt_compress.c