From patchwork Sun Jun 2 13:24:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 13682839 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 951D0C25B74 for ; Sun, 2 Jun 2024 13:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NylDKE8f1fQW953oz25hbgavzo4E604+0maHS4LxNX8=; b=HMbc5Z4pw0UOVw 4SiE6gsuZTtnvAc6cZolnzYmdYGdCNqDvR6vpyeJLwc8H6fPnTmpiBBdtaC/8ajE2MuqeYhANcihK O2ACg7E0223UhwFeS8cmm9BTrI4kTeSuJKYVs7DuKbAf95UTqn2UI29Mm1vct77Nx2tA6Vo2BeukD K2h7/xCLDq3Cpzi+ECXf94LUEIdXfUyxIg1IZsb5UiEyAbShvZMxvK976AuklYIUqelIpvvDI90hE QYPkKV3QbdBK28kWGHIBELaX2slCQ88yqXIS/MTftjef8GYG1k4jDd2Kbmy/RF9qOQw0KAVmCDFZ4 ZGpa2LRDz6OAwRedrKag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDlEA-0000000EIoI-2sr6; Sun, 02 Jun 2024 13:26:26 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDlE7-0000000EInt-0z4e for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 13:26:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1717334777; bh=iWRwIfh5UR3rNfLHd715boOG38Dp5ZMz8BiZ8y0AUTY=; h=From:To:Cc:Subject:Date:From; b=JJkBIEqcpisTcy0xjoakuO+LS/obIe4u0lqhpPICAKbmi+fAV0sfM0/dONY8N3kW4 d1hVJb6wd1SO/YmNnix7+ILFP8Cs7WeyQleOGgJtyqtoDRJNg06raGSa8SspEsHNlp BLqU7qvxRT7qcQPUen/yfLup4DVN2O7daMRvctEK29mwIzjuoyyJtNTx738ivjBn8j 55XGwsrXo/o8O4po9BpMtJJxoCxe+yLtyAHdCwaGhTxGlDOIkVTro6uPB1Thhj8POw uP2htmce4/b+zt2k7UcMatNv/ioRL1BAqNQ2LesoqBPe+LvdDu/XeDC4YhgDdgskhm iFlufY5NiUscw== Received: from localhost.localdomain (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 8160B37813DA; Sun, 2 Jun 2024 13:25:54 +0000 (UTC) From: Muhammad Usama Anjum To: Catalin Marinas , Will Deacon , Shuah Khan , Muhammad Usama Anjum , Kunwu Chan Cc: kernel@collabora.com, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] selftests: arm64: tags_test: conform test to TAP output Date: Sun, 2 Jun 2024 18:24:59 +0500 Message-Id: <20240602132502.4186771-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_062623_651658_C29E8037 X-CRM114-Status: UNSURE ( 9.99 ) X-CRM114-Notice: Please train this message. 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 Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/arm64/tags/tags_test.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/arm64/tags/tags_test.c b/tools/testing/selftests/arm64/tags/tags_test.c index 955f87c1170d7..8ae26e496c89c 100644 --- a/tools/testing/selftests/arm64/tags/tags_test.c +++ b/tools/testing/selftests/arm64/tags/tags_test.c @@ -17,19 +17,21 @@ int main(void) static int tbi_enabled = 0; unsigned long tag = 0; struct utsname *ptr; - int err; + + ksft_print_header(); + ksft_set_plan(1); if (prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0) == 0) tbi_enabled = 1; ptr = (struct utsname *)malloc(sizeof(*ptr)); if (!ptr) - ksft_exit_fail_msg("Failed to allocate utsname buffer\n"); + ksft_exit_fail_perror("Failed to allocate utsname buffer"); if (tbi_enabled) tag = 0x42; ptr = (struct utsname *)SET_TAG(ptr, tag); - err = uname(ptr); + ksft_test_result(!uname(ptr), "Syscall successful with tagged address\n"); free(ptr); - return err; + ksft_finished(); }