On Tue, Mar 15, 2022 at 02:16:30AM +0000, Eric Biggers wrote: > On Mon, Feb 14, 2022 at 04:09:58PM -0800, Boris Burkov wrote: > > diff --git a/tests/generic/690 b/tests/generic/690 > > new file mode 100755 > > index 00000000..77906dd8 > > --- /dev/null > > +++ b/tests/generic/690 > > @@ -0,0 +1,66 @@ > > +#! /bin/bash > > +# SPDX-License-Identifier: GPL-2.0 > > +# Copyright (c) 2021 Facebook, Inc. All Rights Reserved. > > +# > > +# FS QA Test 690 > > +# > > +# fs-verity requires the filesystem to decide how it stores the Merkle tree, > > +# which can be quite large. > > +# It is convenient to treat the Merkle tree as past EOF, and ext4, f2fs, and > > +# btrfs do so in at least some fashion. This leads to an edge case where a > > +# large file can be under the file system file size limit, but trigger EFBIG > > +# on enabling fs-verity. Test enabling verity on some large files to exercise > > +# EFBIG logic for filesystems with fs-verity specific limits. > > +# > > +. ./common/preamble > > +_begin_fstest auto quick verity > > + > > + > > +# Import common functions. > > +. ./common/filter > > +. ./common/verity > > + > > +# real QA test starts here > > +_supported_fs generic > > +_require_test > > +_require_math > > +_require_scratch_verity > > +_require_fsverity_max_file_size_limit > > +_require_scratch_nocheck > > Why is _require_scratch_nocheck() needed? _require_scratch_verity() already > does _require_scratch(), and I don't see why skipping fsck would be needed. > > > +# have to go back by 4096 from max to not hit the fsverity MAX_LEVELS check. > > +truncate -s $max_sz $fsv_file > > The above comment should be removed. > Thanks for catching these oversights, will fix them. The nocheck thing was left over from mixing/copy-pasting with btrfs/290 during this test's evolution. Works fine without it on ext4 and btrfs. > - Eric