From patchwork Thu Dec 28 01:36:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhihao Cheng X-Patchwork-Id: 183604 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1756395dyb; Wed, 27 Dec 2023 17:36:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRW+y1qH0e+TTQIshUafbK5xGJOyuCR46lhI2X9HPVnfp7lzAU5W56fZxsAT5bBGB04LEa X-Received: by 2002:a05:6214:19e1:b0:67a:d70d:71b8 with SMTP id q1-20020a05621419e100b0067ad70d71b8mr13512899qvc.34.1703727381307; Wed, 27 Dec 2023 17:36:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703727381; cv=none; d=google.com; s=arc-20160816; b=vq2Ubzzrxg/vADFtltLI9rTlWsZT2SsMkXWtA2xivdtsANocnFAM//ALIFh21cwNM1 9ypF7ZPu89s/rRGIAh1ZgjzWgZYaMmmW9drOchR29WrjReawNRdT1BM1steEhSIRTxUB JuyjaWhEnWOCGlKN6iA43cZCShPQq7lROfQd2/SimohEV0KNAz1t9Rb7AMiyDlY4qorD eIiM2M3925xfEdrDWfd4DbNXoeRxuiujgcevCVIhPJeu/PGDxTXPE2J51C/xTYGQwJh0 aR32gL53tPUnTuWm2aGQ4tDQMHqnwIGA9ZUlJ+vl4M4y04UOGT7yi4w+e5VDsvRflBD0 W59A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=t3Hye4NzUp+Gdzkn53ers7mf+Cjk+o10UDdFw7sVAlQ=; fh=3kaVOPShTC55oj708yh1yJALapWuogKx6Yvc3sQq9zY=; b=JOqegMC0aqFUHWXjsmmGRiBnqq/ZNRDZzlXbLSxIuVDcghBrZdUb6WFj1F+/90ctqL 3pbN9tdEbbjwpQywfRuTUaDi7KzIR2Dp6dqD2772LU5CBknrSsXbLQFNO+8BW1i5wYUY WSv789Hibp5ly11IYQZdEkRWZhuoeIec45KeJGUVbXxa/DSIizkqHGEGC0BpYD1Gw+cv Z6FDxCzV2QG6QgmSHDPtcbgTk3tP973Mycyjd1IpJWwAlKVu8tcG80BXr9QKT5L3I9Cb /CsfB9lrSSn45xsYdm7a/m2Aa0Ou1hqfvFXMx6oMmDQcqy9xbvqfuyA4qhn9RvFYHthK 0ndQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12346-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12346-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b12-20020a0ccd0c000000b0067ec2d04818si15451340qvm.131.2023.12.27.17.36.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 17:36:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12346-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12346-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12346-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 195A11C20CAD for ; Thu, 28 Dec 2023 01:36:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C47BE63DA; Thu, 28 Dec 2023 01:35:11 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F7CF6129 for ; Thu, 28 Dec 2023 01:35:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4T0rd630Bnz1g0DD; Thu, 28 Dec 2023 09:33:46 +0800 (CST) Received: from kwepemm000013.china.huawei.com (unknown [7.193.23.81]) by mail.maildlp.com (Postfix) with ESMTPS id 7323C1A01A3; Thu, 28 Dec 2023 09:34:51 +0800 (CST) Received: from huawei.com (10.175.127.227) by kwepemm000013.china.huawei.com (7.193.23.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 28 Dec 2023 09:33:38 +0800 From: Zhihao Cheng To: , , , , CC: , Subject: [PATCH mtd-utils 10/11] tests: ubifs_repair: Add run_all script Date: Thu, 28 Dec 2023 09:36:38 +0800 Message-ID: <20231228013639.2827205-11-chengzhihao1@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231228013639.2827205-1-chengzhihao1@huawei.com> References: <20231228013639.2827205-1-chengzhihao1@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm000013.china.huawei.com (7.193.23.81) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786487642434450870 X-GMAIL-MSGID: 1786487642434450870 Add run_all script to run all UBIFS repair testcases. Signed-off-by: Zhihao Cheng --- .gitignore | 1 + configure.ac | 1 + tests/ubifs_repair-tests/Makemodule.am | 1 + .../ubifs_repair-tests/ubifs_repair_run_all.sh.in | 59 ++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100755 tests/ubifs_repair-tests/ubifs_repair_run_all.sh.in diff --git a/.gitignore b/.gitignore index 89bca58..0d9be34 100644 --- a/.gitignore +++ b/.gitignore @@ -113,6 +113,7 @@ tests/fs-tests/stress/fs_stress01.sh tests/ubi-tests/runubitests.sh tests/ubi-tests/ubi-stress-test.sh tests/ubifs_repair-tests/lib/common.sh +tests/ubifs_repair-tests/ubifs_repair_run_all.sh tests/ubifs_repair-tests/tests/authentication_refuse.sh tests/ubifs_repair-tests/tests/cycle_mount_repair_check.sh tests/ubifs_repair-tests/tests/powercut_repair_mount.sh diff --git a/configure.ac b/configure.ac index 1c1c95b..94b60c0 100644 --- a/configure.ac +++ b/configure.ac @@ -356,6 +356,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_repair-tests/lib/common.sh + tests/ubifs_repair-tests/ubifs_repair_run_all.sh tests/ubifs_repair-tests/tests/authentication_refuse.sh tests/ubifs_repair-tests/tests/cycle_mount_repair_check.sh tests/ubifs_repair-tests/tests/powercut_repair_mount.sh diff --git a/tests/ubifs_repair-tests/Makemodule.am b/tests/ubifs_repair-tests/Makemodule.am index f728823..6030a1f 100644 --- a/tests/ubifs_repair-tests/Makemodule.am +++ b/tests/ubifs_repair-tests/Makemodule.am @@ -1,5 +1,6 @@ test_SCRIPTS += \ tests/ubifs_repair-tests/lib/common.sh \ + tests/ubifs_repair-tests/ubifs_repair_run_all.sh \ tests/ubifs_repair-tests/tests/authentication_refuse.sh \ tests/ubifs_repair-tests/tests/cycle_mount_repair_check.sh \ tests/ubifs_repair-tests/tests/powercut_repair_mount.sh \ diff --git a/tests/ubifs_repair-tests/ubifs_repair_run_all.sh.in b/tests/ubifs_repair-tests/ubifs_repair_run_all.sh.in new file mode 100755 index 0000000..bb95369 --- /dev/null +++ b/tests/ubifs_repair-tests/ubifs_repair_run_all.sh.in @@ -0,0 +1,59 @@ +#!/bin/sh +# Copyright (c), 2023-2024, Huawei Technologies Co, Ltd. +# Author: Zhihao Cheng +# +# Test Description: +# Run all testcases under 'tests' directory + +function print_line() +{ + echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" +} + +TESTBINDIR=@TESTBINDIR@ + +print_line +$TESTBINDIR/authentication_refuse.sh +if [[ $? != 0 ]]; then + echo "authentication_refuse failed" + exit 1 +fi +print_line +$TESTBINDIR/powercut_repair_mount.sh +if [[ $? != 0 ]]; then + echo "powercut_repair_mount failed" + exit 1 +fi +print_line +$TESTBINDIR/cycle_corrupted_repair_fault_inject.sh +if [[ $? != 0 ]]; then + echo "cycle_corrupted_repair_fault_inject failed" + exit 1 +fi +print_line +$TESTBINDIR/repair_bad_image.sh +if [[ $? != 0 ]]; then + echo "repair_bad_image failed" + exit 1 +fi +print_line +$TESTBINDIR/random_corrupted_repair.sh +if [[ $? != 0 ]]; then + echo "random_corrupted_repair failed" + exit 1 +fi +print_line +$TESTBINDIR/cycle_powercut_mount_repair.sh +if [[ $? != 0 ]]; then + echo "cycle_powercut_mount_repair failed" + exit 1 +fi +print_line +$TESTBINDIR/cycle_mount_repair_check.sh +if [[ $? != 0 ]]; then + echo "cycle_mount_repair_check failed" + exit 1 +fi + +exit 0