generic/574: fix sporadic failure with test_dummy_encryption
authorEric Biggers <ebiggers@google.com>
Tue, 18 Aug 2020 06:30:23 +0000 (23:30 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 30 Aug 2020 16:26:44 +0000 (00:26 +0800)
commitcfea24abcf9a78a7ab78d92af0b9b8422ab340ba
treed3827702b0956fde983939663a5d1f7cafe907de
parentb9d1dcd13516bd04e7d629eaf09254c4d4b4df1f
generic/574: fix sporadic failure with test_dummy_encryption

When the "test_dummy_encryption" mount option is specified, the
fs-verity file corruption test generic/574 is flaky; it fails about 1%
of the time.  This happens because in the three test cases where a
single byte of the test file is corrupted, sometimes the new byte
happens to be the same as the original.  This is specific to
test_dummy_encryption because the encrypted data is nondeterministic
(and appears random), unlike the unencrypted data.

Fix this by corrupting 5 bytes instead of 1, so that the probability of
failure becomes effectively zero.

Signed-off-by: Eric Biggers <ebiggers@google.com>
tests/generic/574
tests/generic/574.out