common: kill _supported_os
[xfstests-dev.git] / tests / xfs / 452
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Red Hat Inc.  All Rights Reserved.
4 #
5 # FS QA Test 452
6 #
7 # Test xfs_db by bad character in field list selector string. The issue
8 # has been fixed by xfsprogs 945e47e2.
9 #
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
15 tmp=/tmp/$$
16 status=1        # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
18
19 _cleanup()
20 {
21         cd /
22         rm -f $tmp.*
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/filter
28
29 # remove previous $seqres.full before test
30 rm -f $seqres.full
31
32 # Modify as appropriate.
33 _supported_fs xfs
34 _require_scratch
35
36 _scratch_mkfs_xfs >> $seqres.full 2>&1
37 inum=`_scratch_xfs_get_metadata_field rootino "sb 0"`
38
39 echo "= check bad character * ="
40 _scratch_xfs_db -c "inode $inum" -c "print core.*"
41 echo "= check bad character trailing slash ="
42 _scratch_xfs_db -c "inode $inum" -c "print core.\\"
43 echo "= check missing closing quote ="
44 _scratch_xfs_db -c "inode $inum" -c "print core.\""
45
46 # success, all done
47 status=0
48 exit