Skip to content

Commit

Permalink
Test renaming a link name in setlink_test.sh
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 648834200
  • Loading branch information
milantracy authored and gvisor-bot committed Jul 2, 2024
1 parent 0b09d49 commit 5e89d40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
10 changes: 10 additions & 0 deletions test/rtnetlink/linux/setlink_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 0 additions & 11 deletions test/rtnetlink/linux/veth_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e89d40

Please sign in to comment.