From 3be0233fbbcfc4a8919eae08330af7831fe03a70 Mon Sep 17 00:00:00 2001 From: Anju T Sudhakar Date: Mon, 28 Jun 2021 14:22:57 +0530 Subject: [PATCH 1/1] xfs/504: Add scratch_mount before checking for xfs_scrub unicode support We may not detect the error `Inappropriate ioctl for device`, while running `$XFS_IO_PROG -c "scrub probe" "$mountpoint"`, if scratch device is not mounted before invoking _check_xfs_scrub_does_unicode(). So do _scratch_mount before checking for xfs_scrub support. Signed-off-by: Anju T Sudhakar Reviewed-by: Darrick J. Wong Signed-off-by: Eryu Guan --- tests/xfs/504 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/xfs/504 b/tests/xfs/504 index 40318314..291ee4e4 100755 --- a/tests/xfs/504 +++ b/tests/xfs/504 @@ -21,8 +21,11 @@ _require_xfs_io_command 'label' echo "Silence is golden." +_scratch_mkfs > /dev/null +_scratch_mount want_scrub= _check_xfs_scrub_does_unicode "$SCRATCH_MNT" "$SCRATCH_DEV" && want_scrub=yes +_scratch_unmount filter_scrub() { grep 'Unicode' | sed -e 's/^.*Duplicate/Duplicate/g' -- 2.30.2