2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
7 # exercise xfs_db bug #784078
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
13 # get standard environment, filters and checks
19 status=0 # success is the default!
20 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
22 # real QA test starts here
27 [ -f core ] && rm -f core
28 [ -f core ] && echo "Warning: can't nuke existing core file!"
33 [ -f core ] && echo "FAILED - core file"
34 [ ! -f core -a $sts != 0 ] && echo "FAILED - non-zero exit status"
38 # real QA test starts here
41 xfs_db -r -c 'pop' -c 'type sb' $TEST_DEV
45 xfs_db -r -c 'push sb' $TEST_DEV
49 xfs_db -r -c 'pop' -c 'push sb' $TEST_DEV
53 xfs_db -r -c 'type sb' -c 'print' $TEST_DEV
57 xfs_db -r -c 'inode 128' -c 'push' -c 'type' $TEST_DEV >$tmp.out 2>&1
59 if ! grep -q "current type is \"inode\"" $tmp.out; then
64 xfs_db -r -c 'sb' -c 'a' $TEST_DEV >$tmp.out 2>&1 # don't care about output
68 xfs_db -r -c 'ring' $TEST_DEV