Commit 5c7e49be authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

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: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
Fixes: d87d67fd ("selftests: tls: test splicing cmsgs")
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 33b5bc9e
...@@ -683,6 +683,9 @@ TEST_F(tls, splice_cmsg_to_pipe) ...@@ -683,6 +683,9 @@ TEST_F(tls, splice_cmsg_to_pipe)
char buf[10]; char buf[10];
int p[2]; int p[2];
if (self->notls)
SKIP(return, "no TLS support");
ASSERT_GE(pipe(p), 0); ASSERT_GE(pipe(p), 0);
EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10); 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); 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) ...@@ -703,6 +706,9 @@ TEST_F(tls, splice_dec_cmsg_to_pipe)
char buf[10]; char buf[10];
int p[2]; int p[2];
if (self->notls)
SKIP(return, "no TLS support");
ASSERT_GE(pipe(p), 0); ASSERT_GE(pipe(p), 0);
EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10); EXPECT_EQ(tls_send_cmsg(self->fd, 100, test_str, send_len, 0), 10);
EXPECT_EQ(recv(self->cfd, buf, send_len, 0), -1); EXPECT_EQ(recv(self->cfd, buf, send_len, 0), -1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment