From: Thomas Weißschuh Date: Sat, 6 May 2023 21:19:03 +0000 (+0200) Subject: lsns: (tests) skip test if rtnetlin is nonfunctional X-Git-Tag: v2.39~27^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d0bf25091bb4ab2689a11c91cdf0d7fb655db0f;p=thirdparty%2Futil-linux.git lsns: (tests) skip test if rtnetlin is nonfunctional Signed-off-by: Thomas Weißschuh --- diff --git a/tests/ts/lsns/netnsid b/tests/ts/lsns/netnsid index 719b064d98..80ccd9b543 100755 --- a/tests/ts/lsns/netnsid +++ b/tests/ts/lsns/netnsid @@ -53,7 +53,8 @@ mkfifo $FIFO echo "==Netns ADD" >> $LOG if ip netns add $NS && ip link add name $vetha type veth peer name $vethb && - ip link set $vethb netns $NS; then + ip link set $vethb netns $NS && + ! (ip -o link show dev $vetha 2>&1 >$NULL | grep 'Cannot talk to rtnetlink' > $NULL); then echo "===Netns EXEC" >> $LOG ip netns exec $NS dd if=$FIFO bs=1 count=2 of=$NULL 2> $NULL & PID=$!