]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (lsfd::mkfds_vsock) skip if diag socket for AF_VSOCK is unavailable
authorMasatake YAMATO <yamato@redhat.com>
Mon, 6 Jan 2025 12:04:09 +0000 (21:04 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Mon, 6 Jan 2025 18:19:14 +0000 (03:19 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/ts/lsfd/lsfd-functions.bash
tests/ts/lsfd/mkfds-vsock

index 8bbe31ab1b3ba55abba3a97f923220fb463e269f..7aa384c1c7cf675d586079f97baed92e3c5afed1 100644 (file)
@@ -105,13 +105,14 @@ function lsfd_check_mkfds_factory
 function lsfd_check_sockdiag
 {
        local family=$1
+       local type=${2:-dgram}
 
        ts_check_test_command "$TS_HELPER_MKFDS"
 
        local msg
        local err
 
-       msg=$("$TS_HELPER_MKFDS" -c sockdiag 9 family=$family 2>&1)
+       msg=$("$TS_HELPER_MKFDS" -c sockdiag 9 family=$family type=$type 2>&1)
        err=$?
 
        case $err in
index 7b740aca06b9a5be1bcd08450fb8fdc7d9110dba..fb926c999407fafaf927424667cd7eab98a958fa 100755 (executable)
@@ -48,7 +48,10 @@ modprobe --quiet hv_vsock ||:
 # VMADDR_CID_LOCAL requires this.
 modprobe --quiet vsock_loopback        ||:
 
+modprobe --quiet vsock_diag || :
+
 lsfd_check_vsock
+lsfd_check_sockdiag vsock raw
 
 {