Message ID | 20240131-ktap-sh-helpers-extend-v1-3-98ffb468712c@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-47229-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp59508dyc; Wed, 31 Jan 2024 14:21:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhXquxBRIUBj4T1FyYwZ8xhG8cCwo2SNvSRuakfZKXMl3dP79t3Ln4RNG6y2ikfdFGWKe8 X-Received: by 2002:a05:6a20:4c27:b0:19c:2a8d:8b75 with SMTP id fm39-20020a056a204c2700b0019c2a8d8b75mr327447pzb.28.1706739686401; Wed, 31 Jan 2024 14:21:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706739686; cv=pass; d=google.com; s=arc-20160816; b=E4d1fu7wcUZEmWj/geunro0DSHg5yxwBs0hCFxBzh4NZ+zMbfI2Kg6naRDHEZNX5Am ViDwkFKsAAzMYUxUGQFqEEPlUwzj8zq67T6YLmoB3MZj43QwepktNf8Of10KP3Mr46kf P2t3TsK42tOoEi9tnTyfng4ufHFClPiNEUF7PX9EYRototZgf9LpAy7SwbQY98L8CMoL PsonnSrE3jw1hRYhA5fOz+U+ew/VuDU375i1gEV5hWE4LKa+9fHgqrvrlBHgzfWqbwwj BXX3Hyk6+K3hUrYpbYrW4dd9kb1DX3g+5PAfDj030aDHzpFUwjuhs3ku8iImKYBQfSuN c3lA== 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=qBxx+/qSHlX73p2ExbQpYc2eXgqbksKGLMsLqfDLPR4=; fh=b/Vb9A6gzmpv/f+HM3cL4eTMq8yvpqrtgaJ1HbubhTM=; b=BLthQzsbIH7QN33bBfqCFMXnbeoa1evVgkOqvROwNv8XDUxdzA5fYbbLVmJAXksnRr GtgIbESlytbkWH6srml4rtT/C4Et6VDCMsrtYcjM9PVr1jtrqoiZ8D7ZbsvvRStHcUIB v/Snc4UtGwgDDKvpbcPsVLQ/gUOneP2kz4dJ1yrRnrXEIaPZX3pItxW8oDAijYnWM+oR ms/wl4I5B2CItZxZ1Z+G8QVurpK2DuiH+p6+QtXs8erF40+X9qrkxAhG7/YIvySVp7bP Xan3sf8jKrtx4s6Hf95pYYV8MzXGLDPfSdbT8bBuWCOGF+XI0D2gwBd62s7mCaJt3Aya lX8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=aImREWYd; 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-47229-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47229-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com X-Forwarded-Encrypted: i=1; AJvYcCVh3gjXp8BCrOEE8ATt8iZRWoQcgD632rrFNijn8qaRwx6UqfRF6C7B0ZJmog32JKghk8NasfTa3M+rMCQl7hweXCSmDg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v15-20020aa7850f000000b006dd984fcea1si10463256pfn.337.2024.01.31.14.21.26 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:21:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47229-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=aImREWYd; 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-47229-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47229-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id F10F5B261F6 for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 22:06:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 80B593A8EC; Wed, 31 Jan 2024 22:04:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="aImREWYd" 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 3BA9C3A1AB; Wed, 31 Jan 2024 22:04:49 +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=1706738691; cv=none; b=pNXlYhkL8lSrPA37GJV+YJBRW+VZytUp9bRXIaet+XAjy9U/JfCIDA/pRHQAtDZRFAK5JUlL3354Yy2QyPqPY/PX7Q7jnFVxIqYd6Mr73o/r6Z5IUQkJTakG8JWVRG8Mi6g6oSCiZLmHcL4y12HnXjPnIrrIIbLI7m2nYDaLsNM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706738691; c=relaxed/simple; bh=ppHfbf9qGqvGLoKdV8hXyPGwjYwRrEFpDWQkMI0RS/Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dtw8PWEM+51yc0XbFsaKWHAq9uUiJww6S7wBZMknu88v1LnNnGfh1LdbO12XSPjyAOZKwsL5XrHcjeF7rCeoLoFFYO9Rig6vh5MrHbapXXwaA09680V3Fv6kqgeIGax5w8KVgxndDyymK3hdSHMK9o1e7F67X5QhLjwoESLA37Y= 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=aImREWYd; 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=1706738688; bh=ppHfbf9qGqvGLoKdV8hXyPGwjYwRrEFpDWQkMI0RS/Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aImREWYd/iXeOoZvTIRwYZeAqDtmwpg/dRn+p8kBsTwKT64NB3moS/b79jXi+cQk0 OdwQdJSEUFX2MM/USzRpnkw0t/RuShOOIXmakPI4qPqpKoWdTaZoE6/4CtafaRHFds rDSVbWoooMZh6WkqbM1zNYHFdp6xQ18iHXRZ/8JbYm2z4ojCx8EVme7V7DVhjEfQKZ hN6N0n6o0/mOSe+kcEtrV6WHEawuozYdrwKH8HGFQy+uFjfgt0t1AN+nsAZkY4kZ6+ dh+0KsYRaB7vOeb0DoV/NZpri1Qj28qt3AaRlaRH6zzx6FTe9Ew8DfYtc391cMMBcI +pt66XoatbaYw== 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 2961C3782074; Wed, 31 Jan 2024 22:04:47 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com> Date: Wed, 31 Jan 2024 17:02:42 -0500 Subject: [PATCH 3/4] selftests: ktap_helpers: Add a helper to abort the test Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240131-ktap-sh-helpers-extend-v1-3-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 <shuah@kernel.org> Cc: kernel@collabora.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Laura Nao <laura.nao@collabora.com>, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com> X-Mailer: b4 0.12.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789646272898318275 X-GMAIL-MSGID: 1789646272898318275 |
Series |
selftests: ktap_helpers: Add some missing helpers
|
|
Commit Message
NĂcolas F. R. A. Prado
Jan. 31, 2024, 10:02 p.m. UTC
Similar to the C counterpart, add a helper function to abort the
remainder of the test.
Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
---
tools/testing/selftests/kselftest/ktap_helpers.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/kselftest/ktap_helpers.sh b/tools/testing/selftests/kselftest/ktap_helpers.sh index 29107924f5c2..87f93c6900c5 100644 --- a/tools/testing/selftests/kselftest/ktap_helpers.sh +++ b/tools/testing/selftests/kselftest/ktap_helpers.sh @@ -87,6 +87,13 @@ ktap_test_result() { fi } +ktap_exit_fail_msg() { + echo "Bail out! " $@ + ktap_print_totals + + exit "$KSFT_FAIL" +} + ktap_print_totals() { echo "# Totals: pass:$KTAP_CNT_PASS fail:$KTAP_CNT_FAIL xfail:0 xpass:0 skip:$KTAP_CNT_SKIP error:0" }