[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240607042615.2069840-110-chengzhihao1@huawei.com>
Date: Fri, 7 Jun 2024 12:26:14 +0800
From: Zhihao Cheng <chengzhihao1@...wei.com>
To: <richard@....at>, <david.oberhollenzer@...ma-star.at>,
<miquel.raynal@...tlin.com>, <yi.zhang@...wei.com>, <xiangyang3@...wei.com>,
<huangxiaojia2@...wei.com>
CC: <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: [RFC PATCH mtd-utils 109/110] tests: ubifs_tools: Add run_all script
Add run_all script to run all UBIFS fsck & mkfs testcases.
Signed-off-by: Zhihao Cheng <chengzhihao1@...wei.com>
---
.gitignore | 1 +
configure.ac | 1 +
tests/ubifs_tools-tests/Makemodule.am | 1 +
tests/ubifs_tools-tests/ubifs_tools_run_all.sh.in | 65 +++++++++++++++++++++++
4 files changed, 68 insertions(+)
create mode 100755 tests/ubifs_tools-tests/ubifs_tools_run_all.sh.in
diff --git a/.gitignore b/.gitignore
index ffbde6e5..673536e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -114,6 +114,7 @@ tests/fs-tests/stress/fs_stress01.sh
tests/ubi-tests/runubitests.sh
tests/ubi-tests/ubi-stress-test.sh
tests/ubifs_tools-tests/lib/common.sh
+tests/ubifs_tools-tests/ubifs_tools_run_all.sh
tests/ubifs_tools-tests/fsck_tests/authentication_refuse.sh
tests/ubifs_tools-tests/fsck_tests/cycle_mount_fsck_check.sh
tests/ubifs_tools-tests/fsck_tests/powercut_fsck_mount.sh
diff --git a/configure.ac b/configure.ac
index 13974090..da1b0cfc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -291,6 +291,7 @@ AC_CONFIG_FILES([tests/fs-tests/fs_help_all.sh
tests/ubi-tests/runubitests.sh
tests/ubi-tests/ubi-stress-test.sh
tests/ubifs_tools-tests/lib/common.sh
+ tests/ubifs_tools-tests/ubifs_tools_run_all.sh
tests/ubifs_tools-tests/fsck_tests/authentication_refuse.sh
tests/ubifs_tools-tests/fsck_tests/cycle_mount_fsck_check.sh
tests/ubifs_tools-tests/fsck_tests/powercut_fsck_mount.sh
diff --git a/tests/ubifs_tools-tests/Makemodule.am b/tests/ubifs_tools-tests/Makemodule.am
index f4d8a073..1715757e 100644
--- a/tests/ubifs_tools-tests/Makemodule.am
+++ b/tests/ubifs_tools-tests/Makemodule.am
@@ -1,5 +1,6 @@
test_SCRIPTS += \
tests/ubifs_tools-tests/lib/common.sh \
+ tests/ubifs_tools-tests/ubifs_tools_run_all.sh \
tests/ubifs_tools-tests/fsck_tests/authentication_refuse.sh \
tests/ubifs_tools-tests/fsck_tests/cycle_mount_fsck_check.sh \
tests/ubifs_tools-tests/fsck_tests/powercut_fsck_mount.sh \
diff --git a/tests/ubifs_tools-tests/ubifs_tools_run_all.sh.in b/tests/ubifs_tools-tests/ubifs_tools_run_all.sh.in
new file mode 100755
index 00000000..a7caad04
--- /dev/null
+++ b/tests/ubifs_tools-tests/ubifs_tools_run_all.sh.in
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Copyright (c), 2024, Huawei Technologies Co, Ltd.
+# Author: Zhihao Cheng <chengzhihao1@...wei.com>
+#
+# Test Description:
+# Run all testcases under 'tests' directory
+
+function print_line()
+{
+ echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
+ echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
+}
+
+TESTBINDIR=@...TBINDIR@
+
+print_line
+$TESTBINDIR/authentication_refuse.sh
+if [[ $? != 0 ]]; then
+ echo "authentication_refuse failed"
+ exit 1
+fi
+print_line
+$TESTBINDIR/powercut_fsck_mount.sh
+if [[ $? != 0 ]]; then
+ echo "powercut_fsck_mount failed"
+ exit 1
+fi
+print_line
+$TESTBINDIR/cycle_corrupted_fsck_fault_inject.sh
+if [[ $? != 0 ]]; then
+ echo "cycle_corrupted_fsck_fault_inject failed"
+ exit 1
+fi
+print_line
+$TESTBINDIR/fsck_bad_image.sh
+if [[ $? != 0 ]]; then
+ echo "fsck_bad_image failed"
+ exit 1
+fi
+print_line
+$TESTBINDIR/random_corrupted_fsck.sh
+if [[ $? != 0 ]]; then
+ echo "random_corrupted_fsck failed"
+ exit 1
+fi
+print_line
+$TESTBINDIR/cycle_powercut_mount_fsck.sh
+if [[ $? != 0 ]]; then
+ echo "cycle_powercut_mount_fsck failed"
+ exit 1
+fi
+print_line
+$TESTBINDIR/cycle_mount_fsck_check.sh
+if [[ $? != 0 ]]; then
+ echo "cycle_mount_fsck_check failed"
+ exit 1
+fi
+print_line
+$TESTBINDIR/build_fs_from_dir.sh
+if [[ $? != 0 ]]; then
+ echo "build_fs_from_dir failed"
+ exit 1
+fi
+
+exit 0
--
2.13.6
Powered by blists - more mailing lists