From patchwork Fri Aug 16 15:32:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 13766571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6432C531DC for ; Fri, 16 Aug 2024 15:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kO9zQNOerF7tnytle43iUI9iG4ri7bmMXXVpMz8e9dY=; b=PmFQ6ObrbhaKFY35scqjxe1hfw gi2QpyMnOw8wLcXtwKyNDxxpd0glnlyKtmZxCTpltpq7lXWr/kCdaSM6a551m4XXrWeynJCULkylE v0D7/VkaSvSXF2Dnr4XHhfDv+7zFUnPt4aXVcIoFOcR601/JC5eOrJbkr1JzlmGJfLGNAxi2D+0N5 h5lPrf33Ky12QxYjkkcsY9ZvpTguWArIZ+ENFxr8A5PdshymfnjsnDBfdPQnRyHd2c0ZVy7VFyuui SZ/xfSd9eF2VqnGJAa/36SFtEyV6wpbUp0EEeCmJQH6VGXjYk6DATb3EgKrcuLFwHVrIR2RxwGYzE V+CpuldQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sezC3-0000000DSdx-355P; Fri, 16 Aug 2024 15:48:47 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seyww-0000000DP2a-0GBZ for linux-arm-kernel@bombadil.infradead.org; Fri, 16 Aug 2024 15:33:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=kO9zQNOerF7tnytle43iUI9iG4ri7bmMXXVpMz8e9dY=; b=fzYUPeJjLdhCfT5Z3fScehgrZ2 uNLxH3murVtLx296Ra0O++80ecRk3Ad6+jmgS4bWFEITM1ko7WDH7/gz2elhe9t3XcupeTuQmKn9g xcpXF38Xr6oAWSuBF1k72hhbtyDFqHnYFClaadeAcqemfwwPAdfywniuZcvJIKG9lxo/SU4b3Jiom wdcieEe+mUO/sMAmy0Zzkwmu98uI3wPeNsrxbAaWXZVG2/ZmvqWVTjw0RlETTfkbv891iAVNq40Du 5Rj7w7suRJpJwDkhFaXU9iQxyOvkfNfBnuNsPK4+Y9EV81/V6usv1Pw48wOB9rjPn05DQojFFWZKw 7z99w+lQ==; Received: from foss.arm.com ([217.140.110.172]) by desiato.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seyws-00000008hZW-2cO9 for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 15:33:08 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 92B75143D; Fri, 16 Aug 2024 08:33:29 -0700 (PDT) Received: from donnerap.arm.com (donnerap.manchester.arm.com [10.32.100.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4F6DB3F6A8; Fri, 16 Aug 2024 08:33:02 -0700 (PDT) From: Andre Przywara To: Catalin Marinas , Will Deacon , Shuah Khan Cc: Mark Brown , Amit Daniel Kachhap , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH 3/8] kselftest/arm64: mte: use proper SKIP syntax Date: Fri, 16 Aug 2024 16:32:46 +0100 Message-Id: <20240816153251.2833702-4-andre.przywara@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240816153251.2833702-1-andre.przywara@arm.com> References: <20240816153251.2833702-1-andre.przywara@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240816_163306_884539_54A4C237 X-CRM114-Status: GOOD ( 11.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org If MTE is not available on a system, we detect this early and skip all the MTE selftests. However this happens before we print the TAP plan, so tools parsing the TAP output get confused and report an error. Use the existing ksft_exit_skip() function to handle this, which uses a dummy plan to work with tools expecting proper TAP syntax, as described in the TAP specification. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown --- tools/testing/selftests/arm64/mte/mte_common_util.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/arm64/mte/mte_common_util.c b/tools/testing/selftests/arm64/mte/mte_common_util.c index 00ffd34c66d30..69e4a67853c40 100644 --- a/tools/testing/selftests/arm64/mte/mte_common_util.c +++ b/tools/testing/selftests/arm64/mte/mte_common_util.c @@ -319,10 +319,9 @@ int mte_default_setup(void) unsigned long en = 0; int ret; - if (!(hwcaps2 & HWCAP2_MTE)) { - ksft_print_msg("SKIP: MTE features unavailable\n"); - return KSFT_SKIP; - } + if (!(hwcaps2 & HWCAP2_MTE)) + ksft_exit_skip("MTE features unavailable\n"); + /* Get current mte mode */ ret = prctl(PR_GET_TAGGED_ADDR_CTRL, en, 0, 0, 0); if (ret < 0) {