Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: af_unix: don't use SKIP for expected failures

netdev CI reserves SKIP in selftests for cases which can't be executed
due to setup issues, like missing or old commands. Tests which are
expected to fail must use XFAIL.

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20251123021601.158709-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+6 -2
+6 -2
tools/testing/selftests/net/af_unix/unix_connreset.c
··· 161 161 char buf[16] = {}; 162 162 ssize_t n; 163 163 164 - if (variant->socket_type == SOCK_DGRAM) 165 - SKIP(return, "This test only applies to SOCK_STREAM and SOCK_SEQPACKET"); 164 + if (variant->socket_type == SOCK_DGRAM) { 165 + snprintf(_metadata->results->reason, 166 + sizeof(_metadata->results->reason), 167 + "Test only applies to SOCK_STREAM and SOCK_SEQPACKET"); 168 + exit(KSFT_XFAIL); 169 + } 166 170 167 171 /* Close server without accept()ing */ 168 172 close(self->server);