]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: btrfs: testcase for sysfs policy syntax verification
authorAnand Jain <anand.jain@oracle.com>
Wed, 29 Jan 2025 07:56:56 +0000 (15:56 +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.

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/329 [new file with mode: 0755]
tests/btrfs/329.out [new file with mode: 0644]

diff --git a/tests/btrfs/329 b/tests/btrfs/329
new file mode 100755 (executable)
index 0000000..f4fadde
--- /dev/null
@@ -0,0 +1,21 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test 329
+#
+# Verify sysfs knob input syntax for read_policy round-robin
+#
+. ./common/preamble
+_begin_fstest auto quick
+
+. ./common/sysfs
+. ./common/filter
+
+_require_test
+_require_fs_sysfs_attr_policy $TEST_DEV read_policy round-robin
+
+_verify_sysfs_syntax $TEST_DEV read_policy round-robin 4096
+
+status=0
+exit
diff --git a/tests/btrfs/329.out b/tests/btrfs/329.out
new file mode 100644 (file)
index 0000000..eff7573
--- /dev/null
@@ -0,0 +1,19 @@
+QA output created by 329
+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
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument
+Invalid argument