fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] generic/604: fix test to actually create dirty inodes
@ 2023-02-16 16:21 fdmanana
  2023-02-16 17:55 ` Bill O'Donnell
  2023-02-17  8:15 ` Zorro Lang
  0 siblings, 2 replies; 3+ messages in thread
From: fdmanana @ 2023-02-16 16:21 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, Filipe Manana

From: Filipe Manana <fdmanana@suse.com>

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>
---
 tests/generic/604 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/604 b/tests/generic/604
index 3c6b76a4..9c53fd57 100755
--- a/tests/generic/604
+++ b/tests/generic/604
@@ -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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-17  8:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 16:21 [PATCH] generic/604: fix test to actually create dirty inodes fdmanana
2023-02-16 17:55 ` Bill O'Donnell
2023-02-17  8:15 ` Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).