]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: btrfs: testcase for sysfs chunk_size attribute validation v2025.04.13
authorAnand Jain <anand.jain@oracle.com>
Wed, 5 Feb 2025 10:04:37 +0000 (18:04 +0800)
committerZorro Lang <zlang@kernel.org>
Fri, 11 Apr 2025 04:25:08 +0000 (12:25 +0800)
Checks if the sysfs attribute sanitizes arguments and verifies
input syntax allocation/data/chunk_size.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/334 [new file with mode: 0755]
tests/btrfs/334.out [new file with mode: 0644]

diff --git a/tests/btrfs/334 b/tests/btrfs/334
new file mode 100755 (executable)
index 0000000..d81ec92
--- /dev/null
@@ -0,0 +1,21 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test 334
+#
+# Verify sysfs knob input syntax for allocation/data/chunk_size
+#
+. ./common/preamble
+_begin_fstest auto quick
+
+. ./common/sysfs
+. ./common/filter
+
+_require_test
+_require_fs_sysfs_attr $TEST_DEV allocation/data/chunk_size
+
+_verify_sysfs_syntax $TEST_DEV allocation/data/chunk_size 256m
+
+status=0
+exit
diff --git a/tests/btrfs/334.out b/tests/btrfs/334.out
new file mode 100644 (file)
index 0000000..f64f9ac
--- /dev/null
@@ -0,0 +1,14 @@
+QA output created by 334
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument