From: Dave Chinner <david@fromorbit.com>
To: fdmanana@kernel.org
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
dchinner@redhat.com, Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH] generic/590: fix test failure when running against fs other than xfs
Date: Thu, 12 Dec 2024 13:19:56 +1100 [thread overview]
Message-ID: <Z1pITJWBnXvj9DeB@dread.disaster.area> (raw)
In-Reply-To: <bcb3d3adeb36c732e807d876b82219c3c1350e2e.1733914512.git.fdmanana@suse.com>
On Wed, Dec 11, 2024 at 10:55:25AM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> With commit ce79de11337e ("fstests: clean up loop device instantiation")
> we started to always call _destroy_loop_device at the very end of the
> test, but we only create a loop device if we are running against xfs,
> so the call to _destroy_loop_device results in an error since no loop
> device was setup.
>
> For example running this test against btrfs or ext4 results in this
> failure:
>
> $ ./check generic/590
> FSTYP -- btrfs
> PLATFORM -- Linux/x86_64 debian0 6.13.0-rc1-btrfs-next-181+ #1 SMP PREEMPT_DYNAMIC Tue Dec 3 13:03:23 WET 2024
> MKFS_OPTIONS -- /dev/sdc
> MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1
>
> generic/590 29s ... [failed, exit status 1]- output mismatch (see /home/fdmanana/git/hub/xfstests/results//generic/590.out.bad)
> --- tests/generic/590.out 2020-06-10 19:29:03.858520038 +0100
> +++ /home/fdmanana/git/hub/xfstests/results//generic/590.out.bad 2024-12-11 10:48:43.946205346 +0000
> @@ -1,2 +1,5 @@
> QA output created by 590
> -Silence is golden
> +losetup: option requires an argument -- 'd'
> +Try 'losetup --help' for more information.
> +Cannot destroy loop device
> +(see /home/fdmanana/git/hub/xfstests/results//generic/590.full for details)
> ...
> (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/generic/590.out /home/fdmanana/git/hub/xfstests/results//generic/590.out.bad' to see the entire diff)
> Ran: generic/590
> Failures: generic/590
> Failed 1 of 1 tests
>
> Fix this by removing the call to _destroy_loop_device at the end of the
> test, as it's unnecessary because we call it in the _cleanup function if
> we have setup a loop device.
>
> Fixes: ce79de11337e ("fstests: clean up loop device instantiation")
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> ---
> tests/generic/590 | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/tests/generic/590 b/tests/generic/590
> index 04d86e78..1adeef4c 100755
> --- a/tests/generic/590
> +++ b/tests/generic/590
> @@ -115,8 +115,6 @@ $XFS_IO_PROG -c "truncate 0" -c fsync "$SCRATCH_MNT/file"
> # We need to do this before the loop device gets torn down.
> _scratch_unmount
> _check_scratch_fs
> -_destroy_loop_device $loop_dev
> -unset loop_dev
>
> echo "Silence is golden"
> status=0
> --
Looks fine.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2024-12-12 2:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 10:55 [PATCH] generic/590: fix test failure when running against fs other than xfs fdmanana
2024-12-12 2:19 ` Dave Chinner [this message]
2024-12-17 8:13 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z1pITJWBnXvj9DeB@dread.disaster.area \
--to=david@fromorbit.com \
--cc=dchinner@redhat.com \
--cc=fdmanana@kernel.org \
--cc=fdmanana@suse.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox