new file mode 100755
@@ -0,0 +1,29 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0+
+# Copyright (C) 2024 Western Digital Corporation or its affiliates.
+#
+# Test repeated test() run with set_conditions()
+
+. tests/meta/rc
+
+DESCRIPTION="repeat test()"
+
+declare cond_set_index
+
+set_conditions() {
+ local index=$1
+
+ if [[ -z $index ]]; then
+ echo 2
+ return
+ fi
+
+ cond_set_index=$index
+ COND_DESC="condition set $index"
+}
+
+test() {
+ echo "Running ${TEST_NAME}"
+ echo "condition set $cond_set_index" >> "$FULL"
+ echo "Test complete"
+}
new file mode 100644
@@ -0,0 +1,2 @@
+Running meta/016
+Test complete
new file mode 100755
@@ -0,0 +1,29 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0+
+# Copyright (C) 2024 Western Digital Corporation or its affiliates.
+#
+# Test repeated test_device() run with set_conditions()
+
+. tests/meta/rc
+
+DESCRIPTION="repeat test_device()"
+
+declare cond_set_index
+
+set_conditions() {
+ local index=$1
+
+ if [[ -z $index ]]; then
+ echo 2
+ return
+ fi
+
+ cond_set_index=$index
+ COND_DESC="condition set $index"
+}
+
+test_device() {
+ echo "Running ${TEST_NAME}"
+ echo "condition set $cond_set_index" >> "$FULL"
+ echo "Test complete"
+}
new file mode 100644
@@ -0,0 +1,2 @@
+Running meta/017
+Test complete
Add test cases to confirm the feature to repeat test case runs with different conditions is working. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> --- tests/meta/016 | 29 +++++++++++++++++++++++++++++ tests/meta/016.out | 2 ++ tests/meta/017 | 29 +++++++++++++++++++++++++++++ tests/meta/017.out | 2 ++ 4 files changed, 62 insertions(+) create mode 100755 tests/meta/016 create mode 100644 tests/meta/016.out create mode 100755 tests/meta/017 create mode 100644 tests/meta/017.out