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(); } From patchwork Sun Jun 2 13:25:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 13682840 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 83CFFC25B74 for ; Sun, 2 Jun 2024 13:27:10 +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:References:In-Reply-To: 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: List-Owner; bh=mR5gQH4iTNezkv9r3Ru7bVYD6yPUKKYwA9L8hGYS+h4=; b=1BwWcusehvCeLw cFdY3CsugGxWZIsGvHEhVqpW9sUABKZ2HtWD32rY3azw5PBd+LOJ0EXDdGaoSuE+ekzZSmBdZ1JWp VF8yAcgXFJvmEEjem1s4MGao52oEeQXBN8EOKiTP4XWSuMSHKS19WJpSu+YkVI3SALsvxu+YcTsOu H5o5sJmnhbexG49FbSiOs1DLMxTV1S7iJ3iMnmEbN5enW7SbNwQLvfPKKsGdN376pqDc2T4AFKxiM WjlGD4Tk3QIBQDjxIVhaj2dnmHcL/EdzeljeW0CAc4U/3fUNuC+DwJ+EOQz28YCn56I0Qklomm+fE NahzbvWLeEVBzywJY+OQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDlEh-0000000EIvR-1rwd; Sun, 02 Jun 2024 13:26:59 +0000 Received: from madrid.collaboradmins.com ([2a00:1098:ed:100::25]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDlEd-0000000EItq-2Wgg for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 13:26:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1717334812; bh=xqCuHdkNJJZ+XxhEQFOwzwjBF076dyDkCFfFETjSEyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rSjuDaiEAPCXLgGNdb0WuwJilAZdssYHLFhpWaDrAEGsjNsxsp77osVvBUAWPh2rq UJalw9wrvJhk/K721fSPyDGXMQcAX/UPgQSdJCcHUtQL5rmaoIo2R0WFbsYWTB4nrR XzrBTFEvulpOeKPkTQdt4I7ZdIkwU78LkP95DHBStQ5GR+0ZS/9biATgEvfKW2QMns CpcagRFkftL1ku/0TdVrhZT4TTJq2xVaNeYLy5hrAKhqLeEfLUYlldwYEN+DYd65xr 4v9hueaTWaE5eEStnCUMm4KnWLu3UgTS96URq1nz9+OA03vsy8I8yaTozKnZ19AOQS fLIthTxEMQUGw== 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 657E6378213B; Sun, 2 Jun 2024 13:26:26 +0000 (UTC) From: Muhammad Usama Anjum To: Catalin Marinas , Will Deacon , Shuah Khan , Muhammad Usama Anjum Cc: kernel@collabora.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH 2/2] selftests: arm64: tags: remove the result script Date: Sun, 2 Jun 2024 18:25:00 +0500 Message-Id: <20240602132502.4186771-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240602132502.4186771-1-usama.anjum@collabora.com> References: <20240602132502.4186771-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_062655_800318_6AB03231 X-CRM114-Status: GOOD ( 10.19 ) 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 The run_tags_test.sh script is used to run tags_test and print out if the test succeeded or failed. As tags_test has been TAP conformed, this script is unneeded and hence can be removed. Signed-off-by: Muhammad Usama Anjum --- make run_tests TARGETS="arm64/tags" Before: ➜ selftests make run_tests TARGETS="arm64/tags" TAP version 13 1..2 # timeout set to 45 # selftests: arm64/tags: tags_test # TAP version 13 # 1..1 # ok 1 Syscall successful # # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0 ok 1 selftests: arm64/tags: tags_test # timeout set to 45 # selftests: arm64/tags: run_tags_test.sh # -------------------- # running tags test # -------------------- # TAP version 13 # 1..1 # ok 1 Syscall successful # # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0 # [PASS] ok 2 selftests: arm64/tags: run_tags_test.sh After: ➜ selftests make run_tests TARGETS="arm64/tags" TAP version 13 1..1 # timeout set to 45 # selftests: arm64/tags: tags_test # TAP version 13 # 1..1 # ok 1 Syscall successful # # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0 ok 1 selftests: arm64/tags: tags_test make[1]: Leaving directory '/home/ubuntu/repos/kernel/linux_mainline/tools/testing/selftests/arm64/tags' --- tools/testing/selftests/arm64/tags/Makefile | 1 - tools/testing/selftests/arm64/tags/run_tags_test.sh | 12 ------------ 2 files changed, 13 deletions(-) delete mode 100755 tools/testing/selftests/arm64/tags/run_tags_test.sh diff --git a/tools/testing/selftests/arm64/tags/Makefile b/tools/testing/selftests/arm64/tags/Makefile index 6d29cfde43a21..0a77f35295fb6 100644 --- a/tools/testing/selftests/arm64/tags/Makefile +++ b/tools/testing/selftests/arm64/tags/Makefile @@ -2,6 +2,5 @@ CFLAGS += $(KHDR_INCLUDES) TEST_GEN_PROGS := tags_test -TEST_PROGS := run_tags_test.sh include ../../lib.mk diff --git a/tools/testing/selftests/arm64/tags/run_tags_test.sh b/tools/testing/selftests/arm64/tags/run_tags_test.sh deleted file mode 100755 index 745f113799303..0000000000000 --- a/tools/testing/selftests/arm64/tags/run_tags_test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 - -echo "--------------------" -echo "running tags test" -echo "--------------------" -./tags_test -if [ $? -ne 0 ]; then - echo "[FAIL]" -else - echo "[PASS]" -fi