Test renaming a link name in setlink_test.sh

PiperOrigin-RevId: 648834200
This commit is contained in:
Jing Chen
2024-07-02 14:01:51 -07:00
committed by gVisor bot
parent 0b09d4928f
commit 5e89d40761
2 changed files with 10 additions and 11 deletions
+10
View File
@@ -28,3 +28,13 @@ if ! wait_for ! ip link show test_veth02; then
exit 1
fi
# Create a new veth pair in the current namespace and rename the link.
ip link add name test_veth01 type veth peer name test_veth02
ip link set test_veth01 name test_veth03
ip link show test_veth03
ip link del name test_veth03
# Check that test_veth02 has been destroyed.
if ! wait_for ! ip link show test_veth02; then
fail "test_veth02 hasn't been destroyed"
exit 1
fi
-11
View File
@@ -30,17 +30,6 @@ if ! wait_for ! ip link show test_veth02; then
exit 1
fi
# Create a new veth pair in the current namespace and rename the link.
ip link add name test_veth01 type veth peer name test_veth02
ip link set test_veth01 name test_veth03
ip link show test_veth03
ip link del name test_veth03
# Check that test_veth02 has been destroyed.
if ! wait_for ! ip link show test_veth02; then
fail "test_veth02 hasn't been destroyed"
exit 1
fi
ip netns add test
ip link add test_veth01 type veth peer name test_veth02 netns test
ip link show test_veth01