2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017, Oracle and/or its affiliates. All Rights Reserved.
7 # Populate filesystem, check that fsmap -n10000 matches fsmap -n1.
10 seqres="$RESULT_DIR/$seq"
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
21 rm -f "$tmp".* $TEST_DIR/a $TEST_DIR/b
24 # get standard environment, filters and checks
29 # real QA test starts here
33 _require_populate_commands
34 _require_xfs_io_command "fsmap"
38 echo "Format and mount"
39 _scratch_populate_cached nofill > $seqres.full 2>&1
41 echo "Compare fsmap" | tee -a $seqres.full
43 $XFS_IO_PROG -c 'fsmap -n 65536' $SCRATCH_MNT | grep -v 'EXT:' > $TEST_DIR/a
44 $XFS_IO_PROG -c 'fsmap -n 1' $SCRATCH_MNT | grep -v 'EXT:' > $TEST_DIR/b
45 cat $TEST_DIR/a $TEST_DIR/b >> $seqres.full
47 diff -uw $TEST_DIR/a $TEST_DIR/b