xfs: no excessive warnings about dprecated mount options on remount
[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 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 # get standard environment, filters and checks
14 . ./common/rc
15 . ./common/filter
16
17 tmp=/tmp/$$
18 here=`pwd`
19 status=0        # success is the default!
20 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21
22 # real QA test starts here
23 _supported_fs xfs
24 _require_test
25
26 [ -f core ] && rm -f core
27 [ -f core ] && echo "Warning: can't nuke existing core file!"
28
29 test_done()
30 {
31         sts=$?
32         [ -f core ] && echo "FAILED - core file"
33         [ ! -f core -a $sts != 0 ] && echo "FAILED - non-zero exit status"
34         rm -f core
35 }
36
37 # real QA test starts here
38
39 echo "=== TEST 1 ==="
40 _test_xfs_db -r -c 'pop' -c 'type sb'
41 test_done
42
43 echo "=== TEST 2 ==="
44 _test_xfs_db -r -c 'push sb'
45 test_done
46
47 echo "=== TEST 3 ==="
48 _test_xfs_db -r -c 'pop' -c 'push sb'
49 test_done
50
51 echo "=== TEST 4 ==="
52 _test_xfs_db -r -c 'type sb' -c 'print'
53 test_done
54
55 echo "=== TEST 5 ==="
56 _test_xfs_db -r -c 'inode 128' -c 'push' -c 'type' >$tmp.out 2>&1
57 test_done
58 if ! grep -q "current type is \"inode\"" $tmp.out; then
59     cat $tmp.out
60 fi
61
62 echo "=== TEST 6 ==="
63 _test_xfs_db -r -c 'sb' -c 'a' >$tmp.out 2>&1 # don't care about output
64 test_done
65
66 echo "=== TEST 7 ==="
67 _test_xfs_db -r -c 'ring'
68 test_done