common: kill _supported_os
[xfstests-dev.git] / tests / xfs / 449
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Oracle, Inc.
4 #
5 # FS QA Test No. 449
6 #
7 # Make sure pretty printed XFS geometry is the same across all programs.
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20         cd /
21         rm -f $tmp.*
22 }
23
24 rm -f $seqres.full
25
26 # get standard environment, filters and checks
27 . ./common/rc
28 . ./common/filter
29
30 # real QA test starts here
31 _supported_fs xfs
32
33 _require_scratch_nocheck
34
35 # Geometry printing wasn't unified until xfs_spaceman grew an 'info'
36 # command, so skip this test if there is no spaceman or it doesn't
37 # know what 'info' is.
38 _require_xfs_spaceman_command "info"
39 _require_command "$XFS_GROWFS_PROG" xfs_growfs
40
41 _scratch_mkfs | sed -e '/Discarding/d' > $tmp.mkfs
42 echo MKFS >> $seqres.full
43 cat $tmp.mkfs >> $seqres.full
44
45 _scratch_xfs_db -c "info" > $tmp.dbinfo
46 echo DB >> $seqres.full
47 cat $tmp.dbinfo >> $seqres.full
48 # xfs_db doesn't take a rtdev argument, so it reports "realtime=external".
49 # mkfs does, so make a quick substitution
50 diff -u <(cat $tmp.mkfs | sed -e 's/realtime =\/.*extsz=/realtime =external               extsz=/g') $tmp.dbinfo
51
52 _scratch_mount
53
54 $XFS_SPACEMAN_PROG -c "info" $SCRATCH_MNT > $tmp.spaceman
55 echo SPACEMAN >> $seqres.full
56 cat $tmp.spaceman >> $seqres.full
57 diff -u $tmp.mkfs $tmp.spaceman
58
59 $XFS_GROWFS_PROG -n $SCRATCH_MNT > $tmp.growfs
60 echo GROWFS >> $seqres.full
61 cat $tmp.growfs >> $seqres.full
62 diff -u $tmp.mkfs $tmp.growfs
63
64 $XFS_INFO_PROG $SCRATCH_MNT > $tmp.info.mnt
65 echo INFO_MNT >> $seqres.full
66 cat $tmp.info.mnt >> $seqres.full
67 diff -u $tmp.mkfs $tmp.info.mnt
68
69 $XFS_INFO_PROG $SCRATCH_DEV > $tmp.info.dev
70 echo INFO_DEV >> $seqres.full
71 cat $tmp.info.dev >> $seqres.full
72 diff -u $tmp.mkfs $tmp.info.dev
73
74 echo "Silence is golden."
75 status=0
76 exit 0