blob: c5c5f9b1acbb90368d2a7bdfad85765e616767ee (
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
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2020 Oracle. All Rights Reserved.
#
# FS QA Test No. 526
#
# Test formatting with conflicts between the config file and the cli.
#
. ./common/preamble
_begin_fstest auto quick mkfs
# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $def_cfgfile
}
# Import common functions.
. ./common/filter
# real QA test starts here
# Modify as appropriate.
_supported_fs xfs
_require_test
_require_scratch_nocheck
_require_xfs_mkfs_cfgfile
# Currently the only conflicting options are v4 specific
_require_xfs_nocrc
cfgfile=$TEST_DIR/a
rm -rf $cfgfile
# disable crc in config file, enable rmapbt (which requires crc=1) in cli
cat > $cfgfile << ENDL
[metadata]
crc = 0
ENDL
$MKFS_XFS_PROG -c options=$cfgfile -f -m rmapbt=1 $SCRATCH_DEV > $tmp.mkfs 2>&1
cat $tmp.mkfs >> $seqres.full
grep 'rmapbt not supported without CRC support' $tmp.mkfs
# enable rmapbt (which requires crc=1) in config file, disable crc in cli
cat > $cfgfile << ENDL
[metadata]
rmapbt = 1
ENDL
$MKFS_XFS_PROG -c options=$cfgfile -f -m crc=0 $SCRATCH_DEV > $tmp.mkfs 2>&1
cat $tmp.mkfs >> $seqres.full
grep 'rmapbt not supported without CRC support' $tmp.mkfs
# success, all done
status=0
exit
|