]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/604: fix test to actually create dirty inodes
authorFilipe Manana <fdmanana@suse.com>
Thu, 16 Feb 2023 16:21:50 +0000 (16:21 +0000)
committerZorro Lang <zlang@kernel.org>
Sat, 18 Feb 2023 05:55:27 +0000 (13:55 +0800)
The test case generic/604 aims to test a scenario where at unmount time we
have many dirty inodes, however the test does not actually creates any
files, because it calls xfs_io without the -f argument, so xfs_io fails
but any error is ignored because stderr is redirected to /dev/null.

Fix this by passing -f to xfs_io and also stop redirecting stderr to
/dev/null, so that in case of any unexpected failure creating files, the
test fails.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/604

index 3c6b76a4b604b9c0dbe5903f66cae5b397a6afeb..9c53fd57846c7bfbe0a73cfdd221fb5acdaa5c9b 100755 (executable)
@@ -22,7 +22,7 @@ _require_scratch
 _scratch_mkfs > /dev/null 2>&1
 _scratch_mount
 for i in $(seq 0 500); do
-       $XFS_IO_PROG -c "pwrite 0 4K" $SCRATCH_MNT/$i >/dev/null 2>&1
+       $XFS_IO_PROG -f -c "pwrite 0 4K" $SCRATCH_MNT/$i >/dev/null
 done
 _scratch_unmount &
 _scratch_mount