From patchwork Wed Jan 31 22:02:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 194985 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp52011dyc; Wed, 31 Jan 2024 14:05:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEE+ERqLzRJTD/HcDNm4hEKYw2bK73QIZGMmrCIBSccDVr8UUkXXD8e0FFwbpVpIn0j/fuX X-Received: by 2002:a05:620a:628f:b0:783:f6d9:b94a with SMTP id ov15-20020a05620a628f00b00783f6d9b94amr917778qkn.13.1706738755803; Wed, 31 Jan 2024 14:05:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706738755; cv=pass; d=google.com; s=arc-20160816; b=rMi0Kji92kEF0NdJAOfd0VdI+ibhq06YagcZ2/vKMf0RKRtv3h3HGaW3RWzASJlWaH h1w8w2mQRaiBLQTSytsDU0UIPVUJudWEDdRsWUtqXtpaUll5xG9PLSpW7QQ23f8F1SPv 2d2EmXEFuC216AmA1PaKbxexr1floA+qrrt0SRY0NsppKg8OQAsLcvpMHMVfkwR0J6Z1 ZZUu2khYgH0sjLbU3IS5pBgvcLonQSgy7+mu3lQVOyaCq8W4EHzn6D2lyeRpsxCzAQnp /GU9yRQoS+tLDu9rtGSX2Daw0o64ntHJlqhJltL0vORRwHu01NGHKdUbQ3IAIzaGoHEE /5Ww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=AKF/ICoyH8xf6/xhhSJuonppFXGq/dawu7fmVUNchnI=; fh=e6hE0lBx4Zf1Q6WoZv4zj/bPRR4pQm0TbHUWXzbuZdI=; b=iIKyRU9LHhc59UDElSmFUZ/EslcR7wufoda1yRjm/d/r1JEPpVACpLuUZA/SjOVhxq blsBs7ZSt9gA+xQy3nCmUmYnjFbnfcKQ71ZHGKXiFT57WJrltQSAurwE+fQEe5BXplYu i/5ww+sEHPSrwDrhXxAvEdzv3o9nn3YqApmzLPMN/GQmXedmN5ipmvJgMSx8PyKeRKbR YgmTsNYE4ID0uctnQVRPhDjyG7270jyVLG5qdXUa1fS2nncZxEsbhr0CVGrd1qjpjErI 6qnw91u79Fttwu9Bpb/U3HbSj5goqfYmJoqBddzDw2lVkvzoucG+BTSy4qFifwRZ+qoG 1MfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=1Yd2X8KM; 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-47227-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47227-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com X-Forwarded-Encrypted: i=1; AJvYcCXsLYneS4T4ROOTlb+qZetwpGDuczVTk6k/Q8cYScg4VOi4vroZ+iyKAL2uTCZ3Q68JhCsMjgLqUxj/0tyaYFLVMk7nZA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z11-20020a05620a260b00b00785346d8124si3822120qko.595.2024.01.31.14.05.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:05:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47227-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=1Yd2X8KM; 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-47227-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47227-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7003A1C23A48 for ; Wed, 31 Jan 2024 22:05:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CDCF3A262; Wed, 31 Jan 2024 22:04:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="1Yd2X8KM" 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 2E91639FDA; Wed, 31 Jan 2024 22:04:46 +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=1706738688; cv=none; b=GmNzCFyNM7RLXD0crhmLQC0MaOLOvKzII4QmDI/DTYwRo4xo2Gt2YZSxteT4me+jUI4tEddGRVF5lMGHTvqzOXZ//Djm2Ddt8s7qP4XTvdEA2H9xUeVnA83QfvuVIcALDOHREx4uRX4fh4+NVpUXAOTeSyTqUqB8q2tBHaW6kac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706738688; c=relaxed/simple; bh=HbsXRGtiyi3ELSqaY6WtU/YJy+Gt0wI2oltVvs97Qqo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s8mkDK4/vAD3SBUj2rtYgH8n/MGdGh90Pc94r/N/XiT+SZVSvIqUbCE++g3Pd0v2ENDmKW7+owGccgLfx1zDwqHUX9roJTzrq3pwcnjVZ1pl7eaiBiOoLWYr0w12IBYiCx+H2xEwc0bzLv5o/pFBIue2sZOEMgrMnpHyp1tmM4o= 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=1Yd2X8KM; 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=1706738685; bh=HbsXRGtiyi3ELSqaY6WtU/YJy+Gt0wI2oltVvs97Qqo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=1Yd2X8KMheYZZSLs3DvbOYoyRERViAlV050nb0292K+2NBfP1VkoX6cxCz7ZfAPHG h3612R3SVAmQNm9Eun7sY4vWlD7ssLWWYt4BmuGWsBap7p91RDoZsVQxyzc7zB0mMn 0TrZmND1+B4IZqppCM8WA1JBnvzt5xjwaYqCqHMVQi16NXDmppyb4ATCfYa5xxAHks UM5AbPWafILt4NSiEKT7NM9Q3PB2JknDFx/qs4mEtioi0ZCx4AXDJvlVCU+WI96yw8 Hhp0YheQ6IxFOyYOWC/ZkXXfwypMvMgwSkYp92sJAcozoeiqMELREWkvulnpyEUzKv w99qTwnM+rkCA== Received: from [192.168.1.211] (zone.collabora.co.uk [167.235.23.81]) (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: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 77272378206C; Wed, 31 Jan 2024 22:04:44 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Date: Wed, 31 Jan 2024 17:02:40 -0500 Subject: [PATCH 1/4] selftests: ktap_helpers: Add helper to print diagnostic messages Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-ktap-sh-helpers-extend-v1-1-98ffb468712c@collabora.com> References: <20240131-ktap-sh-helpers-extend-v1-0-98ffb468712c@collabora.com> In-Reply-To: <20240131-ktap-sh-helpers-extend-v1-0-98ffb468712c@collabora.com> To: Shuah Khan Cc: kernel@collabora.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Laura Nao , =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Mailer: b4 0.12.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789645297446276518 X-GMAIL-MSGID: 1789645297446276518 Similar to the C counterpart, add a helper to print a diagnostic message. Signed-off-by: NĂ­colas F. R. A. Prado --- tools/testing/selftests/kselftest/ktap_helpers.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/kselftest/ktap_helpers.sh b/tools/testing/selftests/kselftest/ktap_helpers.sh index dd79d96f3b5a..ecc1413c22cd 100644 --- a/tools/testing/selftests/kselftest/ktap_helpers.sh +++ b/tools/testing/selftests/kselftest/ktap_helpers.sh @@ -19,6 +19,11 @@ ktap_print_header() { echo "TAP version 13" } +ktap_print_msg() +{ + echo "#" $@ +} + ktap_set_plan() { num_tests="$1"