xfs: test mkfs.xfs config files

Simple tests of the upcoming mkfs.xfs config file feature.  First we
have some simple tests of properly formatted config files, then
improperly formatted config files, and finally we try to spot
conflicts between config file options and the cli.

[dchinner: updated for new libinih-based implementation.]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Darrick J. Wong
2020-10-28 07:54:50 +11:00
committed by Eryu Guan
parent 0e195a4ca9
commit 3ba859629d
12 changed files with 656 additions and 0 deletions
+10
View File
@@ -720,6 +720,16 @@ _require_xfs_mkfs_ciname()
|| _notrun "need case-insensitive naming support in mkfs.xfs"
}
# this test requires mkfs.xfs have configuration file support
_require_xfs_mkfs_cfgfile()
{
echo > /tmp/a
_scratch_mkfs_xfs_supported -c options=/tmp/a >/dev/null 2>&1
res=$?
rm -rf /tmp/a
test $res -eq 0 || _notrun "need configuration file support in mkfs.xfs"
}
# XFS_DEBUG requirements
_require_xfs_debug()
{