fstests: move test group info to test files
[xfstests-dev.git] / tests / xfs / 003
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 003
6 #
7 # exercise xfs_db bug #784078
8 #
9 . ./common/preamble
10 _begin_fstest db auto quick
11
12 # Import common functions.
13 . ./common/filter
14
15 status=0        # success is the default!
16
17 # real QA test starts here
18 _supported_fs xfs
19 _require_test
20
21 [ -f core ] && rm -f core
22 [ -f core ] && echo "Warning: can't nuke existing core file!"
23
24 test_done()
25 {
26         sts=$?
27         [ -f core ] && echo "FAILED - core file"
28         [ ! -f core -a $sts != 0 ] && echo "FAILED - non-zero exit status"
29         rm -f core
30 }
31
32 # real QA test starts here
33
34 echo "=== TEST 1 ==="
35 _test_xfs_db -r -c 'pop' -c 'type sb'
36 test_done
37
38 echo "=== TEST 2 ==="
39 _test_xfs_db -r -c 'push sb'
40 test_done
41
42 echo "=== TEST 3 ==="
43 _test_xfs_db -r -c 'pop' -c 'push sb'
44 test_done
45
46 echo "=== TEST 4 ==="
47 _test_xfs_db -r -c 'type sb' -c 'print'
48 test_done
49
50 echo "=== TEST 5 ==="
51 _test_xfs_db -r -c 'inode 128' -c 'push' -c 'type' >$tmp.out 2>&1
52 test_done
53 if ! grep -q "current type is \"inode\"" $tmp.out; then
54     cat $tmp.out
55 fi
56
57 echo "=== TEST 6 ==="
58 _test_xfs_db -r -c 'sb' -c 'a' >$tmp.out 2>&1 # don't care about output
59 test_done
60
61 echo "=== TEST 7 ==="
62 _test_xfs_db -r -c 'ring'
63 test_done