Skip to contentSkip to conversation

mkfs.xfs: test that shipped config files work properly

PATCH Superseded Eric Sandeen 2 participants 3 messages Jun 5, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mkfs.xfs: test that shipped config files work properly

Sanity check the shipped mkfs.xfs config files by using them to format the scratch device.

---
 tests/xfs/569     | 32 ++++++++++++++++++++++++++++++++
 tests/xfs/569.out |  2 ++
 2 files changed, 34 insertions(+)
 create mode 100755 tests/xfs/569
 create mode 100644 tests/xfs/569.out
tests/xfs/569 new file +32 -0
new file mode 100755
index 0000000..ebcaaab
@@ -0,0 +1,32 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2023 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 569
+#
+# Check for any installed example mkfs config files and validate that
+# mkfs.xfs can properly use them.
+#
+. ./common/preamble
+_begin_fstest mkfs
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_require_scratch
+
+ls /usr/share/xfsprogs/mkfs/*.conf &>/dev/null || \
+	_notrun "No mkfs.xfs config files installed"
+
+# We only fail if mkfs.xfs fails outright, ignoring warnings etc
+echo "Silence is golden"
+
+for CONFIG in /usr/share/xfsprogs/mkfs/*.conf; do
+	$MKFS_XFS_PROG -c options=$CONFIG -f $SCRATCH_DEV &>>$seqres.full || \
+		_fail "mkfs.xfs config file $CONFIG failed"
+done
+
+# success, all done
+status=0
+exit
tests/xfs/569.out new file +2 -0
new file mode 100644
index 0000000..c7aaf10
@@ -0,0 +1,2 @@
+QA output created by 569
+Silence is golden
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v3 1/1 mkfs.xfs: test that shipped config files work properly

Sanity check the shipped mkfs.xfs config files by using them to format the scratch device.

---
 tests/xfs/569     | 32 ++++++++++++++++++++++++++++++++
 tests/xfs/569.out |  2 ++
 2 files changed, 34 insertions(+)
 create mode 100755 tests/xfs/569
 create mode 100644 tests/xfs/569.out
tests/xfs/569 new file +32 -0
new file mode 100755
index 0000000..e890270
@@ -0,0 +1,32 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2023 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 569
+#
+# Check for any installed example mkfs config files and validate that
+# mkfs.xfs can properly use them.
+#
+. ./common/preamble
+_begin_fstest mkfs
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_require_scratch
+
+ls /usr/share/xfsprogs/mkfs/*.conf &>/dev/null || \
+	_notrun "No mkfs.xfs config files installed"
+
+# We only fail if mkfs.xfs fails outright, ignoring warnings etc
+echo "Silence is golden"
+
+for CONFIG in /usr/share/xfsprogs/mkfs/*.conf; do
+	$MKFS_XFS_PROG -c options=$CONFIG -f $SCRATCH_DEV &>>$seqres.full || \
+		echo "mkfs.xfs config file $CONFIG failed"
+done
+
+# success, all done
+status=0
+exit
tests/xfs/569.out new file +2 -0
new file mode 100644
index 0000000..c7aaf10
@@ -0,0 +1,2 @@
+QA output created by 569
+Silence is golden
Signature · 1 line
1.8.3.1
Reviewed-by on v3 1/1
#2 lore raw
Quoted 4 lines · Eric Sandeen

Sanity check the shipped mkfs.xfs config files by using them to format the scratch device.

Looks good,

--D

Quoted 56 lines
---
 tests/xfs/569     | 32 ++++++++++++++++++++++++++++++++
 tests/xfs/569.out |  2 ++
 2 files changed, 34 insertions(+)
 create mode 100755 tests/xfs/569
 create mode 100644 tests/xfs/569.out
tests/xfs/569 new file +32 -0
new file mode 100755
index 0000000..e890270
@@ -0,0 +1,32 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2023 Red Hat, Inc.  All Rights Reserved.
+#
+# FS QA Test 569
+#
+# Check for any installed example mkfs config files and validate that
+# mkfs.xfs can properly use them.
+#
+. ./common/preamble
+_begin_fstest mkfs
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_require_scratch
+
+ls /usr/share/xfsprogs/mkfs/*.conf &>/dev/null || \
+	_notrun "No mkfs.xfs config files installed"
+
+# We only fail if mkfs.xfs fails outright, ignoring warnings etc
+echo "Silence is golden"
+
+for CONFIG in /usr/share/xfsprogs/mkfs/*.conf; do
+	$MKFS_XFS_PROG -c options=$CONFIG -f $SCRATCH_DEV &>>$seqres.full || \
+		echo "mkfs.xfs config file $CONFIG failed"
+done
+
+# success, all done
+status=0
+exit
tests/xfs/569.out new file +2 -0
new file mode 100644
index 0000000..c7aaf10
@@ -0,0 +1,2 @@
+QA output created by 569
+Silence is golden
Signature · 1 line
1.8.3.1