blob: 5374bf2f859144ac3e1a73dd5723db115d84ef30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2018 Oracle, Inc.
#
# FS QA Test No. 449
#
# Make sure pretty printed XFS geometry is the same across all programs.
#
. ./common/preamble
_begin_fstest auto quick
# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs xfs
_require_scratch_nocheck
# Geometry printing wasn't unified until xfs_spaceman grew an 'info'
# command, so skip this test if there is no spaceman or it doesn't
# know what 'info' is.
_require_xfs_spaceman_command "info"
_require_command "$XFS_GROWFS_PROG" xfs_growfs
_scratch_mkfs | sed -e '/Discarding/d' -e '/deprecated/d' > $tmp.mkfs
echo MKFS >> $seqres.full
cat $tmp.mkfs >> $seqres.full
_scratch_xfs_db -c "info" > $tmp.dbinfo
echo DB >> $seqres.full
cat $tmp.dbinfo >> $seqres.full
# xfs_db doesn't take a rtdev argument, so it reports "realtime=external".
# mkfs does, so make a quick substitution
diff -u <(cat $tmp.mkfs | sed -e 's/realtime =\/.*extsz=/realtime =external extsz=/g') $tmp.dbinfo
_scratch_mount
$XFS_SPACEMAN_PROG -c "info" $SCRATCH_MNT > $tmp.spaceman
echo SPACEMAN >> $seqres.full
cat $tmp.spaceman >> $seqres.full
diff -u $tmp.mkfs $tmp.spaceman
$XFS_GROWFS_PROG -n $SCRATCH_MNT > $tmp.growfs
echo GROWFS >> $seqres.full
cat $tmp.growfs >> $seqres.full
diff -u $tmp.mkfs $tmp.growfs
$XFS_INFO_PROG $SCRATCH_MNT > $tmp.info.mnt
echo INFO_MNT >> $seqres.full
cat $tmp.info.mnt >> $seqres.full
diff -u $tmp.mkfs $tmp.info.mnt
$XFS_INFO_PROG $SCRATCH_DEV > $tmp.info.dev
echo INFO_DEV >> $seqres.full
cat $tmp.info.dev >> $seqres.full
diff -u $tmp.mkfs $tmp.info.dev
echo "Silence is golden."
status=0
exit 0
|