]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: test mkfs.xfs whether terminate getsubopt arrays properly
authorYang Xu <xuyang2018.jy@fujitsu.com>
Fri, 22 Jul 2022 03:43:04 +0000 (11:43 +0800)
committerZorro Lang <zlang@kernel.org>
Sun, 31 Jul 2022 14:06:05 +0000 (22:06 +0800)
When I run xfs/144 manually, the step as below:
mkfs.xfs -f -d agcount=3200,size=6366g -d file,n

I accidentally pressed the Enter key, it triggers Segmentation fault.
Then I found Darrick has fixed this one week ago. So add this test.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/549 [new file with mode: 0755]
tests/xfs/549.out [new file with mode: 0644]

diff --git a/tests/xfs/549 b/tests/xfs/549
new file mode 100755 (executable)
index 0000000..925ca99
--- /dev/null
@@ -0,0 +1,29 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022 FUJITSU LIMITED. All rights reserved.
+#
+# FS QA Test No. 549
+#
+# Regression test for xfsprogs commit
+# 50dba8189b1f ("mkfs: terminate getsubopt arrays properly")
+#
+# This case test mkfs.xfs whether can terminate getsubopt arrays properly.
+# If not, it will trigger segmentation fault.
+#
+
+. ./common/preamble
+_begin_fstest auto quick mkfs
+
+# real QA test starts here
+_supported_fs xfs
+_fixed_by_git_commit xfsprogs 50dba8189b1f \
+       "mkfs: terminate getsubopt arrays properly"
+_require_test
+
+$MKFS_XFS_PROG -f -d agcount=4 -d garbage=0 >> $seqres.full  2>&1
+
+echo "Silence is golden"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/549.out b/tests/xfs/549.out
new file mode 100644 (file)
index 0000000..4e3acd3
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 549
+Silence is golden