tests: add ifup test for bonded-bridge relationships
This commit is contained in:
parent
f0050e9a72
commit
8bc39aea7c
2 changed files with 31 additions and 1 deletions
16
tests/fixtures/bonded-bridge.interfaces
vendored
Normal file
16
tests/fixtures/bonded-bridge.interfaces
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
iface bond0
|
||||||
|
use bond
|
||||||
|
|
||||||
|
requires eth0 eth1
|
||||||
|
bond-mode 802.3ad
|
||||||
|
bond-xmit-hash-policy layer2+3
|
||||||
|
|
||||||
|
auto br0
|
||||||
|
iface br0
|
||||||
|
use bridge
|
||||||
|
|
||||||
|
requires bond0
|
||||||
|
address 203.0.113.2/24
|
||||||
|
address 2001:db8:1000:2::2/64
|
||||||
|
gateway 203.0.113.1
|
||||||
|
gateway 2001:db8:1000:2::1
|
|
@ -10,7 +10,8 @@ tests_init \
|
||||||
static_ipv6 \
|
static_ipv6 \
|
||||||
inet_dhcp \
|
inet_dhcp \
|
||||||
alias_eth0_home \
|
alias_eth0_home \
|
||||||
alias_eth0_work
|
alias_eth0_work \
|
||||||
|
bonded_bridge
|
||||||
|
|
||||||
noargs_body() {
|
noargs_body() {
|
||||||
atf_check -s exit:1 -e ignore ifup -S/dev/null
|
atf_check -s exit:1 -e ignore ifup -S/dev/null
|
||||||
|
@ -74,3 +75,16 @@ alias_eth0_work_body() {
|
||||||
-o match:'default via 2001:db8:1000:2::1' \
|
-o match:'default via 2001:db8:1000:2::1' \
|
||||||
ifup -S/dev/null -i $FIXTURES/alias-home-work.interfaces -n wlan0=work
|
ifup -S/dev/null -i $FIXTURES/alias-home-work.interfaces -n wlan0=work
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bonded_bridge_body() {
|
||||||
|
atf_check -s exit:0 -e ignore \
|
||||||
|
-o match:'ip link set up dev eth0' \
|
||||||
|
-o match:'ip link set up dev eth1' \
|
||||||
|
-o match:'ip link set up dev bond0' \
|
||||||
|
-o match:'ip link set up dev br0' \
|
||||||
|
-o match:'add 203.0.113.2/24 dev br0' \
|
||||||
|
-o match:'add 2001:db8:1000:2::2/64 dev br0' \
|
||||||
|
-o match:'default via 203.0.113.1' \
|
||||||
|
-o match:'default via 2001:db8:1000:2::1' \
|
||||||
|
ifup -S/dev/null -i $FIXTURES/bonded-bridge.interfaces -n br0
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue