5 # exercise xfs_db bug #784078
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
9 #-----------------------------------------------------------------------
15 echo "QA output created by $seq"
17 # get standard environment, filters and checks
23 status=0 # success is the default!
24 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
28 # real QA test starts here
30 _supported_os IRIX Linux
32 [ -f core ] && rm -f core
33 [ -f core ] && echo "Warning: can't nuke existing core file!"
38 [ -f core ] && echo "FAILED - core file"
39 [ ! -f core -a $sts != 0 ] && echo "FAILED - non-zero exit status"
43 # real QA test starts here
46 xfs_db -r -c 'pop' -c 'type sb' $TEST_DEV
50 xfs_db -r -c 'push sb' $TEST_DEV
54 xfs_db -r -c 'pop' -c 'push sb' $TEST_DEV
58 xfs_db -r -c 'type sb' -c 'print' $TEST_DEV
62 xfs_db -r -c 'inode 128' -c 'push' -c 'type' $TEST_DEV >$tmp.out 2>&1
64 # On IRIX we lose state after a "push" operation and don't
65 # know the type is still inode
66 # Probably not worth changing xfs_db on IRIX for this.
67 if [ "$HOSTOS" != "IRIX" ]; then
68 if ! grep -q "current type is \"inode\"" $tmp.out
75 xfs_db -r -c 'sb' -c 'a' $TEST_DEV >$tmp.out 2>&1 # don't care about output
79 xfs_db -r -c 'ring' $TEST_DEV