From patchwork Fri Mar 25 23:27:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 554147 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A182C433EF for ; Fri, 25 Mar 2022 23:27:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234199AbiCYX2t (ORCPT ); Fri, 25 Mar 2022 19:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234184AbiCYX2t (ORCPT ); Fri, 25 Mar 2022 19:28:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 301FD5BE48; Fri, 25 Mar 2022 16:27:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B515A61766; Fri, 25 Mar 2022 23:27:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC647C2BBE4; Fri, 25 Mar 2022 23:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648250833; bh=4ft5GjKOjv9kZGAeVQsrpTPr9lF5wIbiYZa/m8JLetc=; h=From:To:Cc:Subject:Date:From; b=h30HZwZ4d5GNDL7PX0e4TkktbrZgXpEfV/2+a6bmyG5Oijzept3Qgqh6imeqZOfZE P+5SPC3jbQgnY2pGWIQ5zCOBC3TmXHLEBxhH6GOzoUuL89GTS4MTK4/vD/BNr2va9o 11QsOCLntExH2+0ePSp0iF6YOOfP7OkttcfGSGiyR8xWGKEgdxZXu84zWs66gaX4N2 IoHUi0vWho7VQpQyxwca+cHlxNSapK7aFaTthzhs6xt9qOTB51jwNDDBpsOf8GrtGA BRgZzsn1he+z/RPXdg9erfFYOkV3hM7ZX1Z3Rs7/wO2zNJX5l5Tkx2fQ4UAwPapHk+ 8Bsc3ESmgI/DQ== From: Jakub Kicinski To: davem@davemloft.net Cc: pabeni@redhat.com, netdev@vger.kernel.org, shuah@kernel.org, linux-kselftest@vger.kernel.org, Jakub Kicinski , Linux Kernel Functional Testing Subject: [PATCH net] selftests: tls: skip cmsg_to_pipe tests with TLS=n Date: Fri, 25 Mar 2022 16:27:09 -0700 Message-Id: <20220325232709.2358965-1-kuba@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org These are negative tests, testing TLS code rejects certain operations. They won't pass without TLS enabled, pure TCP accepts those operations. Reported-by: Linux Kernel Functional Testing Fixes: d87d67fd61ef ("selftests: tls: test splicing cmsgs") Signed-off-by: Jakub Kicinski --- tools/testing/selftests/net/tls.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c index 6e468e0f42f7..5d70b04c482c 100644 --- a/tools/testing/selftests/net/tls.c +++ b/tools/testing/selftests/net/tls.c @@ -683,6 +683,9 @@ TEST_F(tls, splice_cmsg_to_pipe) char buf[10]; int p[2]; + if (self->notls) + SKIP(return, "no TLS support"); + ASSERT_GE(pipe(p), 0); EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10); EXPECT_EQ(splice(self->cfd, NULL, p[1], NULL, send_len, 0), -1); @@ -703,6 +706,9 @@ TEST_F(tls, splice_dec_cmsg_to_pipe) char buf[10]; int p[2]; + if (self->notls) + SKIP(return, "no TLS support"); + ASSERT_GE(pipe(p), 0); EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10); EXPECT_EQ(recv(self->cfd, buf, send_len, 0), -1);