zdtm: Skip socket_udplite test when kernel lacks UDPLITE

Kernel 7.1 removed IPPROTO_UDPLITE support. Add a checkskip
script that probes for a UDPLITE socket and skips the test
with EPROTONOSUPPORT instead of failing.

Assisted-by: Claude Code (claude-opus-4-6):claude-opus-4-6@default
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2026-04-21 07:58:00 +00:00 committed by Radostin Stoyanov
parent 09d7f7a2ec
commit 9777d2cf09

View file

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# IPPROTO_UDPLITE was removed in kernel 7.1, skip the test if the
# protocol is not available.
import socket
import errno
try:
socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE).close()
except OSError as e:
if e.errno == errno.EPROTONOSUPPORT:
print("UDPLITE is not supported by this kernel.")
exit(1)
raise
exit(0)