Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2430326lqb; Mon, 27 May 2024 22:06:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX4OzNFnfLMPVMzM4VrQxyGbCGusqHcBqGJJcn/A/66140gzGQ++TUtbddumlNNU6fjfOTmhRGULxl5oY7XCT6BzYy6YodFq7n4EZ4wxA== X-Google-Smtp-Source: AGHT+IH82qwc1SN6kYUifz4c0qeKiuPXnKLBILZ8MizY0WPEIN94Epm+0mmTMpjACm0bKikH6HII X-Received: by 2002:a05:6e02:1567:b0:374:62d1:1472 with SMTP id e9e14a558f8ab-37462d1175fmr19734555ab.2.1716872813811; Mon, 27 May 2024 22:06:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716872813; cv=pass; d=google.com; s=arc-20160816; b=wieB6WCp55yZPcC0ok21gasxAgN+BRh2TAqIp40HxKy/rQHE+7RHTYBwPfMR0gRJAz zbUS3d6Vl26BziCQd1Br8ruLShpdlV99YkFbZgRx/+VcWD02m+qkx+WNiMfRv9K7c6Xj OEESJx9eLWv6VSres2oK7Qiw5q3j23Kz1Gv0aEW9pkK0qlxqBNCxffk22cMd8yOOBIQr 4SUyJjZbto9eUXAIrh6caK4J1MyY5ZefyTJsPbEZieehrknETav/FD5rR6DLWRucYa3j CyKvzqPztoDnRssf2M8Be1eXxtYGKTj0xxTc/KLFZ6IT1ou/bSOeUT2eaa2su6dg7G7T zb8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:cc:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=9VRlQpBj5QnT6mYaSMOtGKQEq9aNJoiWa0o+AZZGGrk=; fh=YNCYP2ai98Kv9ZtrV0uqaO4V/liEx1YNKpj9OcOpS2I=; b=pMlOGa9nPjHEo/qtM1liRwSTXlIEL/oClP96bZ2Lry37GQZbrAB/XZaWts6IpIS6YW 6TX7bhw+KbSWKRIQc9UnkGManiNwS2tQBQaJLTRo7t06kNOf1dWTTUvZXocmwU4WV+Jb hD27Zrq0UnK0CL/BZq1KeBx++D2ezU3DVbdlm7edYd4xj6rgoqjug6S97pNhwGrvvFc4 w+p/kAOFWgPSRk98fQ1jiIe4y3gomSnH9A8ZF6+EKxWaRP6Y+3NfGGh7Y6pSuRCyptr7 8HVJqJ/rHAPRD7y5i9RHbqOvMv/0RnJ+WxicepeLJa4opJlBxr86+x31Kfqs30Ogu2ov c8xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=q9Z752OA; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-191750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-68221b756e7si7447567a12.84.2024.05.27.22.06.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 22:06:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=q9Z752OA; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-191750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8F715282855 for ; Tue, 28 May 2024 05:05:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 688723F9C5; Tue, 28 May 2024 05:05:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="q9Z752OA" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 32DD344C73; Tue, 28 May 2024 05:05:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716872740; cv=none; b=eyByA1YgzRbA4ueY9bbItTxa3u0qrC7qL9MtH4hs3CPyjc/UvLS4/two6nGwkn7jIghG85eZ/Oxrmi5ZIK5hqtTvj+wv3gsoqrfoknEE6KWbHnX98aXVf+mF+kZFMT1rKL8hVdfsmV2bIdZySJQqYxTMmkMU4uWb4fOI3iEWsAM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716872740; c=relaxed/simple; bh=k5ll/nM2IIC5lplIaSJSkKFW3Qcb3N9buBv04W4TY+E=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=BKjm4FbL3RoLZDsjgu4TGCDctzPUGAJM/uwkY6IZa+vWa8lwEzYdI6t6XddDV1Rbx8wu0g0nbEbt1un4crBayuAC69DJrBJZAdWf3gDY1BsSHxLerfWhm6iH3Q59v52iWQLgMgjSRkOz5BvdDff95HKiHGcT+OoO/Q1Nn8G3A4E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=q9Z752OA; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1716872737; bh=k5ll/nM2IIC5lplIaSJSkKFW3Qcb3N9buBv04W4TY+E=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=q9Z752OAPY2GLkqp5UX5xfm9Xt7iyAX2FnIFXlSpeBlkyNmWUj56FHqWYa40X6L76 J7lPETB10xUbDzTd3MnA8ym6sZWi3g8W3MkCZH1e1eHngyepQVSEK3m/TMPFZbLsdJ q1DSX6XKXlIbkeUCqge+JZIAWnBAcRq9pgpbgWZ0WyiaTiLFFhbgtL0V6tw0U4j+iz uRysO82/fgZgDuH15sJkUwkYbijEfJqaRQlYhDU4aNj7AO+OLeTOdLiQ/46Scdb2+b y1HVPmaxrhDB8wJGkfxU8fGT/viMiYZL62UB+zvMJ73dDeVoIsDb4m4xSy1vI5XL6y lbbevRSIQSRJg== Received: from [100.113.15.66] (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 C65213782137; Tue, 28 May 2024 05:05:32 +0000 (UTC) Message-ID: Date: Tue, 28 May 2024 10:05:03 +0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Muhammad Usama Anjum , "Chang S . Bae" , "Kirill A . Shutemov" , Binbin Wu , kernel@collabora.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] selftests: x86: conform test to TAP format output To: Shuah Khan References: <20240426101824.2894574-1-usama.anjum@collabora.com> Content-Language: en-US From: Muhammad Usama Anjum In-Reply-To: <20240426101824.2894574-1-usama.anjum@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Kind reminder On 4/26/24 3:18 PM, Muhammad Usama Anjum wrote: > 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 > --- > Changes since v1: > - No changes, sending it again as got no response on v1 even after weeks > --- > tools/testing/selftests/x86/vdso_restorer.c | 29 +++++++++------------ > 1 file changed, 12 insertions(+), 17 deletions(-) > > diff --git a/tools/testing/selftests/x86/vdso_restorer.c b/tools/testing/selftests/x86/vdso_restorer.c > index fe99f24341554..f621167424a9c 100644 > --- a/tools/testing/selftests/x86/vdso_restorer.c > +++ b/tools/testing/selftests/x86/vdso_restorer.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include "../kselftest.h" > > /* Open-code this -- the headers are too messy to easily use them. */ > struct real_sigaction { > @@ -44,17 +45,19 @@ static void handler_without_siginfo(int sig) > > int main() > { > - int nerrs = 0; > struct real_sigaction sa; > > + ksft_print_header(); > + ksft_set_plan(2); > + > void *vdso = dlopen("linux-vdso.so.1", > RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD); > if (!vdso) > vdso = dlopen("linux-gate.so.1", > RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD); > if (!vdso) { > - printf("[SKIP]\tFailed to find vDSO. Tests are not expected to work.\n"); > - return 0; > + ksft_print_msg("[SKIP]\tFailed to find vDSO. Tests are not expected to work.\n"); > + return KSFT_SKIP; > } > > memset(&sa, 0, sizeof(sa)); > @@ -62,21 +65,16 @@ int main() > sa.flags = SA_SIGINFO; > sa.restorer = NULL; /* request kernel-provided restorer */ > > - printf("[RUN]\tRaise a signal, SA_SIGINFO, sa.restorer == NULL\n"); > + ksft_print_msg("Raise a signal, SA_SIGINFO, sa.restorer == NULL\n"); > > if (syscall(SYS_rt_sigaction, SIGUSR1, &sa, NULL, 8) != 0) > err(1, "raw rt_sigaction syscall"); > > raise(SIGUSR1); > > - if (handler_called) { > - printf("[OK]\tSA_SIGINFO handler returned successfully\n"); > - } else { > - printf("[FAIL]\tSA_SIGINFO handler was not called\n"); > - nerrs++; > - } > + ksft_test_result(handler_called, "SA_SIGINFO handler returned\n"); > > - printf("[RUN]\tRaise a signal, !SA_SIGINFO, sa.restorer == NULL\n"); > + ksft_print_msg("Raise a signal, !SA_SIGINFO, sa.restorer == NULL\n"); > > sa.flags = 0; > sa.handler = handler_without_siginfo; > @@ -86,10 +84,7 @@ int main() > > raise(SIGUSR1); > > - if (handler_called) { > - printf("[OK]\t!SA_SIGINFO handler returned successfully\n"); > - } else { > - printf("[FAIL]\t!SA_SIGINFO handler was not called\n"); > - nerrs++; > - } > + ksft_test_result(handler_called, "SA_SIGINFO handler returned\n"); > + > + ksft_finished(); > } -- BR, Muhammad Usama Anjum