Skip to content

Commit 5c7e49b

Browse files
kuba-moodavem330
authored andcommitted
selftests: tls: skip cmsg_to_pipe tests with TLS=n
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@linaro.org> Fixes: d87d67f ("selftests: tls: test splicing cmsgs") Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 33b5bc9 commit 5c7e49b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • tools/testing/selftests/net

tools/testing/selftests/net/tls.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,9 @@ TEST_F(tls, splice_cmsg_to_pipe)
683683
char buf[10];
684684
int p[2];
685685

686+
if (self->notls)
687+
SKIP(return, "no TLS support");
688+
686689
ASSERT_GE(pipe(p), 0);
687690
EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10);
688691
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)
703706
char buf[10];
704707
int p[2];
705708

709+
if (self->notls)
710+
SKIP(return, "no TLS support");
711+
706712
ASSERT_GE(pipe(p), 0);
707713
EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10);
708714
EXPECT_EQ(recv(self->cfd, buf, send_len, 0), -1);

0 commit comments

Comments
 (0)