Re: [PATCH net] selftests: tls: skip cmsg_to_pipe tests with TLS=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/25/22 5:27 PM, Jakub Kicinski wrote:
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 <lkft@xxxxxxxxxx>
Fixes: d87d67fd61ef ("selftests: tls: test splicing cmsgs")
Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
---
  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);


Looks good to me. Thanks for the fix.

Reviewed-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>

thanks,
-- Shuah



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux