On 3/8/24 00:50, Zorro Lang wrote:
On Thu, Mar 07, 2024 at 06:20:24PM +0530, Anand Jain wrote:
When a flakey device is configured, we have access to both the physical
device and the DM flaky device. Ensure that when the flakey device is
configured, the physical device mount fails.
Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
tests/btrfs/318 | 45 +++++++++++++++++++++++++++++++++++++++++++++
tests/btrfs/318.out | 3 +++
2 files changed, 48 insertions(+)
create mode 100755 tests/btrfs/318
create mode 100644 tests/btrfs/318.out
diff --git a/tests/btrfs/318 b/tests/btrfs/318
new file mode 100755
index 000000000000..015950fbd93c
--- /dev/null
+++ b/tests/btrfs/318
@@ -0,0 +1,45 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024 Oracle. All Rights Reserved.
+#
+# FS QA Test 318
+#
+# Create multiple device nodes with the same device try mount
+#
+. ./common/preamble
+_begin_fstest auto volume tempfsid
+
+# Override the default cleanup function.
+_cleanup()
+{
+ umount $extra_mnt &> /dev/null
+ rm -rf $extra_mnt &> /dev/null
+ _unmount_flakey
+ _cleanup_flakey
+ cd /
+ rm -r -f $tmp.*
+}
+
+# Import common functions.
+. ./common/filter
+. ./common/dmflakey
+
+# real QA test starts here
+_supported_fs btrfs
BTW, what cause it have to be a btrfs specific test case? I didn't any
btrfs specific operations below, can you explain the reason?
Right. Now I notice it can be made generic. I have converted this
into a generic test case. I'll send it when the kernel patch is
ready. For now, I have to withdraw this patch.
Thanks for the suggestion.
Anand