mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
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:
parent
09d7f7a2ec
commit
9777d2cf09
1 changed files with 15 additions and 0 deletions
15
test/zdtm/static/socket_udplite.checkskip
Executable file
15
test/zdtm/static/socket_udplite.checkskip
Executable 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue