]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs/254: fix test failure due to already unmounted scratch device
authorFilipe Manana <fdmanana@suse.com>
Thu, 27 Feb 2025 13:25:18 +0000 (13:25 +0000)
committerZorro Lang <zlang@kernel.org>
Thu, 6 Mar 2025 10:12:36 +0000 (18:12 +0800)
commit8d273a3f296429680b9cc888f4c0e84cddaaa2d6
treeee8f812ea4e94028dffc26aa293234ed6388eb71
parent4acec85f99bc2b928f7375c87586a23ba09242d8
btrfs/254: fix test failure due to already unmounted scratch device

If there are no failures in the middle of test while the 3rd scratch
device is mounted (at $seq_mnt), the unmount call in the _cleanup
function will result in a test failure since the unmount already
happened, making the test fail:

  $ ./check btrfs/254
  FSTYP         -- btrfs
  PLATFORM      -- Linux/x86_64 debian0 6.14.0-rc4-btrfs-next-188+ #1 SMP PREEMPT_DYNAMIC Wed Feb 26 17:38:41 WET 2025
  MKFS_OPTIONS  -- /dev/sdc
  MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1

  btrfs/254 2s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/254.out.bad)
      --- tests/btrfs/254.out 2024-10-07 12:36:15.532225987 +0100
      +++ /home/fdmanana/git/hub/xfstests/results//btrfs/254.out.bad 2025-02-27 12:53:30.848728429 +0000
      @@ -3,3 +3,4 @@
        Total devices <NUM> FS bytes used <SIZE>
        devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
        *** Some devices missing
      +umount: /home/fdmanana/btrfs-tests/dev/254.mnt: not mounted.
      ...
      (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/254.out /home/fdmanana/git/hub/xfstests/results//btrfs/254.out.bad'  to see the entire diff)

  HINT: You _MAY_ be missing kernel fix:
        770c79fb6550 btrfs: harden identification of a stale device

  Ran: btrfs/254
  Failures: btrfs/254
  Failed 1 of 1 tests

This is a recent regression because the _unmount function used to redirect
stdout and stderr to $seqres.full, but not anymore since the recent commit
identified in the Fixes tag below. So redirect stdout and stderr of the
call to _unmount in the _cleanup function to /dev/null.

Fixes: f43da58ef936 ("unmount: resume logging of stdout and stderr for filtering")
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/254