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
26 [ -f core ] && rm -f core
27 [ -f core ] && echo "Warning: can't nuke existing core file!"
32 [ -f core ] && echo "FAILED - core file"
33 [ ! -f core -a $sts != 0 ] && echo "FAILED - non-zero exit status"
37 # real QA test starts here
40 _test_xfs_db -r -c 'pop' -c 'type sb'
44 _test_xfs_db -r -c 'push sb'
48 _test_xfs_db -r -c 'pop' -c 'push sb'
52 _test_xfs_db -r -c 'type sb' -c 'print'
56 _test_xfs_db -r -c 'inode 128' -c 'push' -c 'type' >$tmp.out 2>&1
58 if ! grep -q "current type is \"inode\"" $tmp.out; then
63 _test_xfs_db -r -c 'sb' -c 'a' >$tmp.out 2>&1 # don't care about output
67 _test_xfs_db -r -c 'ring'