🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3323

[PATCH net-next v5 07/10] selftests: tls: Skip the zero_len tests when TLS is unavailable

#3323
From: Chuck Lever
Date: Wed, 14 Oct 2026 18:28
35 lines
7665 bytes
FIXTURE_SETUP(zero_len) returns early when ulp_sock_pair() reports
that the TCP_ULP setsockopt failed, so on a kernel built without
CONFIG_TLS the TLS_RX setsockopt never runs. TEST_F(zero_len, test)
then sends its raw records over a plain TCP socket, which returns
the ciphertext verbatim. All eight variants FAIL on a machine that
lacks TLS, and those failures mask any real regression in the same
run.

Skip the test when the fixture recorded notls, as the other
fixtures in this file do.

Fixes: a61a3e961baf ("selftests: tls: add tests for zero-length records")
Signed-off-by: Chuck Lever <cel@kernel.org>
---
 tools/testing/selftests/net/tls.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
index 9d3cd4fff062..0bc43728262e 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -2639,6 +2639,9 @@ TEST_F(zero_len, test)
 	int rec_off;
 	int i;
 
+	if (self->notls)
+		SKIP(return, "no TLS support");
+
 	for (i = 0; i < 4 && variant->recs[i]; i++)
 		EXPECT_EQ(send(self->fd, variant->recs[i]->cipher_data,
 			       variant->recs[i]->cipher_len, 0),

-- 
2.55.0
Technical Details
Message-ID: <20261014-tls-follow-on-v5-7-e76c301d4f05@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346397-linux-kernel-netdev=dewy.ru
References: <20261014-tls-follow-on-v5-0-e76c301d4f05@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346397-linux-kernel-netdev=dewy.ru
From: cel@kernel.org (Chuck Lever)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v5 07/10] selftests: tls: Skip the zero_len tests when TLS is unavailable
Date: Wed, 14 Oct 2026 14:28:37 -0400
Organization: Usenet Network
Message-ID: <20261014-tls-follow-on-v5-7-e76c301d4f05@kernel.org>
References: <20261014-tls-follow-on-v5-0-e76c301d4f05@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network; logging-data="2360235"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:92Sgf8dDlO0YOgBCQLaGCnTnxD0= sha256:HOv4vcWpf8rI6A3Xhq1ODrHLPkxQ1VkTxGLBKLqMR7w= sha1:rEuaCYXoV5BOGreKha6ZyZ3ew8E= sha256:HxLzKvv7niNs8apJjDky0EE8ThTPYAad3WGicwPcLDE=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id F02BC11019F; Wed, 14 Oct 2026 21:30:48 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.34
X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ouO3UdbRatcQ; Wed, 14 Oct 2026 21:30:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-346397-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 06FB611019C; Wed, 14 Oct 2026 21:30:38 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 39ABF37610; Wed, 14 Oct 2026 18:29:26 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED88256E055; Wed, 14 Oct 2026 18:28:59 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UvVMbTXf"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D2FF550EBF7; Wed, 14 Oct 2026 18:28:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792002539; cv=none; b=hDaEhtK7F+QCdVNYJcKKnMwaGJx6RDxcFKxUAWr4NyM5acBWwP9QSPsgB8uKvP2wm0iBtIOZSObXf0u+/LDTlhF0LpiI0Jx53UORTKDeywWLE7Yjf7OMa/lTQ1BV3F7K9dcCFdaRChqk01cFcrEofN3XtrjP0tuR2JSdUUKEiGg=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792002539; c=relaxed/simple; bh=wqxT4pxVpI2WjHbBcnA9gBITBl3U0Fhzz/JQdT0Rqpg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BxCa4Gje3DyyupKGuevqqBSg//ndPSw6wOqh1kTXr4ZUR68xXxv4HIMHYebmXiQ3mO/Ef0OOB49h70DBuyTznSvwa4gr4gcTM+awdwEIwRT3jnMhtk8rhz2UhQhQOiKaK3y8ATh5lWf3rMNQxni6VWzKNHX1AW4+vCK5lMogAF8=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UvVMbTXf; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5F181F000C9; Wed, 14 Oct 2026 18:28:55 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792002536; bh=rFCMxCD79vEB4iyMWGtxNJDVMBMGuW8tGz3ncBlH5DE=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=UvVMbTXfyUkRMRQYdb/0vL7+JARslCgcOkzwsUTDtZVf45qxR+fEcLmVfn42rVNuc 7WsIqo6nBXuFW7Z7MdKA5fmBCsIFB/rMJy3EpX47mwWy7NsMsBY+gzdFWDgWhDU0qZ 8QJZU1wnG05lha/9jL9Pl01Tc0e1Ik5c7OkG+e2oXezI93RpnUeadTrAePuZiGpPdY Qzi2o6gMRqCcq/6WvHTjY52uAeEaRLXsGUyHo4PfKRPGdxKLR4TZ9iSeeww9ppRY7D UJKelp8ik7rXlOscGjSdBw/gjXrNA7We03fAYtd1JTx2eY6a/9iLkHSKD3F8ktZwIV Gn72sHZyo1YDg==
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261014-tls-follow-on-v5-0-e76c301d4f05@kernel.org>
X-Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org
X-Mailer: b4 0.17-dev-9c833
X-Developer-Signature: v=1; a=openpgp-sha256; l=1218; i=cel@kernel.org; h=from:subject:message-id; bh=wqxT4pxVpI2WjHbBcnA9gBITBl3U0Fhzz/JQdT0Rqpg=; b=owEBbQKS/ZANAwAKATNqszNvZn+XAcsmYgBqz8ndkGHP4pFP517rtjuj6Hc6TaZndU9z8bBOz oAUwi/8mWuJAjMEAAEKAB0WIQQosuWwEobfJDzyPv4zarMzb2Z/lwUCas/J3QAKCRAzarMzb2Z/ l9fwEACYDurtPXijZy00byNnC+rHw5+Ai3nt0orb/HAy6Z3G4bfS6S4Twpi1sWH0QnTTk5pbeDZ F3VsWi41oTOyQ6a8oN/6rPx4JDDzO6Oi+w18ZlmSbVe1VnPTlOtK2WMIbBUJq5/Om59u2HDa3dJ E26K5j6isnlke4pVKObiJ6PCKVGS+Wpo61Qc9jIOfBH+4cOdyNxFheVqACGpw1V78hLgJtO1IV0 YK/tQXTFAkDu+gWSIQ4xJxr6sO1ep0qAmZmibnWKTu3ZpZkE+UXmRYW2xto7xdPt0uom/FYDJ/z 0Opmf49YlHi9C1bk/TOcoUjnJqMuzQBTWkD72PTaqalGUFPse1e635XglFgrJoUmx0imjAS6j57 x5XUvAgEuIih27Ck1D787W0PiGMuyNU3glkDRYfm+DYSJRGa0QzdCRm8NCo5zA+sJ0ZRy6fwtGq 68fpuctf4rka4XznWOmJHyCXsxOVEv2oQlxvr45WZ8fetJtKw+1lHNuwZlQljFiSe5Yhcyf37ME wHBSgZKh3b1Xq460PP6d9DxFZpSLpovmwn/5LEqSzQsL+3+wtFdEXxmYdqZnJLNkgtNPq3ITnAV oU7NUwtbJocEePxtMEd61evQybSd5mN4cRObkqWslYpyBTV+rf8uw4sICsz/OBLjln/pM7ocdB4 /jGnusynbejxkoA==
X-Developer-Key: i=cel@kernel.org; a=openpgp; fpr=28B2E5B01286DF243CF23EFE336AB3336F667F97
X-Received-Bytes: 7459