Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1136575pxb; Wed, 10 Feb 2021 00:32:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwG2ZIsCm/1rFwZmXc8Jgwa+0pVAcMFzyHGSsBnJNRyPw2LKKqupoD+gbMuzexPOQGq6+b1 X-Received: by 2002:a17:906:a1c2:: with SMTP id bx2mr1970924ejb.138.1612945958558; Wed, 10 Feb 2021 00:32:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612945958; cv=none; d=google.com; s=arc-20160816; b=ha7+herLahUzledA8wTK//axNeLZkIeucItJIkaQygM3dRVrxUqeKZqJP58PYy7v0V sReJCr4bheUOQqy8Fkv97H2YD0tLDapBZkb6a7t7itLucVREl7SJGs9bWUrH22MWFmqi WIpVMdLhjuEE/1zStabjcgiNHDxbmMRhRMHD1c4Kc1W1etCaBmyAQFC50jLNboD1FDmK ghVoX9UK+lKsxD4rmlrf37mMf0JOt7KE5zegRg92Mj66cXJPiuA3P7lFDx/RHIwjeVLz /ITA8XBwOkWJnvvW1a4rdygAVA+PD7kLWGNoU6eGGVKNmW6FkdWLLyy8hsO47P8TYYJE bX1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=zziyNFNlmhSW3q56XQBsPtG1JAzI0NtMX6ixBkt95eQ=; b=HynF3VVRq3QBCd28EadGYR7Fxp77g7NyslklIGQ+y825/uFZ/nVdAxeAOZWOew8Llr azQTZx+GkSm/QSQNmzJYghWiauqGASTL+xbEr/9SHTNTHXCP1b3EavL9mP3U2X247LaY Mh2tzNccHnbolvHcBF2zhaWnlCEU9MbB0lvDHeoa6eZ4Yc/tqW9gI9wOSHGXvD8HTflq vWvernHOC+ubmc7yFlW0noHPZcb44d0Ur66KYdn5aX8D98o1TQ6IM7mRyeFdBVh3QDnw x19sRfcwM/0mAHOxfPqyBfoXt0axI+hKSV+y/yDW0mYQN9qV1AXPa+yzjaomcoStZKEj 8qAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="WuvKaTC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si837222ejg.646.2021.02.10.00.32.15; Wed, 10 Feb 2021 00:32:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="WuvKaTC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229880AbhBJFHJ (ORCPT + 99 others); Wed, 10 Feb 2021 00:07:09 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:15211 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229768AbhBJFGk (ORCPT ); Wed, 10 Feb 2021 00:06:40 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 09 Feb 2021 21:05:59 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 05:05:55 +0000 Received: from ubuntu.vdiclient.nvidia.com (172.20.145.6) by mail.nvidia.com (172.20.187.18) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Wed, 10 Feb 2021 05:05:53 +0000 From: Timur Tabi To: Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Vlastimil Babka , Andy Shevchenko , Matthew Wilcox , , "Linus Torvalds" , , "Kees Cook" , John Ogness , , , Andrey Konovalov , Marco Elver , Rasmus Villemoes , Pavel Machek , , Subject: [PATCH 2/3] kselftest: add support for skipped tests Date: Tue, 9 Feb 2021 23:05:28 -0600 Message-ID: <20210210050529.843005-3-ttabi@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210210050529.843005-1-ttabi@nvidia.com> References: <20210210050529.843005-1-ttabi@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: quoted-printable Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612933559; bh=zziyNFNlmhSW3q56XQBsPtG1JAzI0NtMX6ixBkt95eQ=; h=From:To:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:X-NVConfidentiality:Content-Transfer-Encoding: Content-Type; b=WuvKaTC/TNCklMdz1K6fO9lcupEAM8iorDm0grzyrVo1mbY49/SVyPj5vGk6daZ4J rRliDzP37cebsuJALnMxasmn2wBY1WDF1B9amiof1HqKKZ66KFSri+L/lkUHT7P0Rc Q8BYd8ockVYDukRfdLgHlgaAZiKDajU9Sl6t3C/4H/gnMnuSxNY9F6L/yvIl2ioc0/ 343SsdMWuSJxoarnaxNMDriDATmjtCIDLX+5/7toogK5q87jCYHW9IbUYV3a7aRMND QSdjyudXOnFz0V/hrcO3TbcntXS+iaO5EGmLMSVX+tgdIvKRVro7pvqhtGw6wmZKM4 pwVlPM7v9v30Q== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update the kselftest framework to all testing clients to specify that some tests were skipped. Signed-off-by: Timur Tabi --- tools/testing/selftests/kselftest_module.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/kselftest_module.h b/tools/testing/sel= ftests/kselftest_module.h index e8eafaf0941a..e2ea41de3f35 100644 --- a/tools/testing/selftests/kselftest_module.h +++ b/tools/testing/selftests/kselftest_module.h @@ -11,7 +11,8 @@ =20 #define KSTM_MODULE_GLOBALS() \ static unsigned int total_tests __initdata; \ -static unsigned int failed_tests __initdata +static unsigned int failed_tests __initdata; \ +static unsigned int skipped_tests __initdata =20 #define KSTM_CHECK_ZERO(x) do { \ total_tests++; \ @@ -21,11 +22,16 @@ static unsigned int failed_tests __initdata } \ } while (0) =20 -static inline int kstm_report(unsigned int total_tests, unsigned int faile= d_tests) +static inline int kstm_report(unsigned int total_tests, unsigned int faile= d_tests, + unsigned int skipped_tests) { - if (failed_tests =3D=3D 0) - pr_info("all %u tests passed\n", total_tests); - else + if (failed_tests =3D=3D 0) { + if (skipped_tests) { + pr_info("skipped %u tests\n", skipped_tests); + pr_info("remaining %u tests passed\n", total_tests); + } else + pr_info("all %u tests passed\n", total_tests); + } else pr_warn("failed %u out of %u tests\n", failed_tests, total_tests); =20 return failed_tests ? -EINVAL : 0; @@ -36,7 +42,7 @@ static int __init __module##_init(void) \ { \ pr_info("loaded.\n"); \ selftest(); \ - return kstm_report(total_tests, failed_tests); \ + return kstm_report(total_tests, failed_tests, skipped_tests); \ } \ static void __exit __module##_exit(void) \ { \ --=20 2.25.1