2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016, Oracle and/or its affiliates. All Rights Reserved.
7 # Populate filesystem, check that fsmap -n10000 matches fsmap -n1.
10 _begin_fstest auto rmap fsmap
12 # Override the default cleanup function.
16 rm -rf "$tmp".* $TEST_DIR/a $TEST_DIR/b
19 # Import common functions.
23 # real QA test starts here
26 _require_populate_commands
27 _require_xfs_io_command "fsmap"
31 echo "Format and mount"
32 _scratch_populate_cached nofill > $seqres.full 2>&1
34 echo "Compare fsmap" | tee -a $seqres.full
36 $XFS_IO_PROG -c 'fsmap -v -n 65536' $SCRATCH_MNT | grep -v 'EXT:' > $TEST_DIR/a
37 $XFS_IO_PROG -c 'fsmap -v -n 1' $SCRATCH_MNT | grep -v 'EXT:' > $TEST_DIR/b
38 cat $TEST_DIR/a $TEST_DIR/b >> $seqres.full
40 diff -uw $TEST_DIR/a $TEST_DIR/b