tests: add dependency loop breaking test for ifdown
This commit is contained in:
parent
0cade539f8
commit
959617df88
2 changed files with 11 additions and 1 deletions
3
tests/fixtures/dependency-loop.ifstate
vendored
Normal file
3
tests/fixtures/dependency-loop.ifstate
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
lo=lo
|
||||||
|
a=a
|
||||||
|
b=b
|
|
@ -23,7 +23,8 @@ tests_init \
|
||||||
deferred_teardown_2 \
|
deferred_teardown_2 \
|
||||||
deferred_teardown_3 \
|
deferred_teardown_3 \
|
||||||
teardown_dep_ordering \
|
teardown_dep_ordering \
|
||||||
regress_opt_f
|
regress_opt_f \
|
||||||
|
dependency_loop_breaking
|
||||||
|
|
||||||
noargs_body() {
|
noargs_body() {
|
||||||
atf_check -s exit:1 -e ignore ifdown -S/dev/null
|
atf_check -s exit:1 -e ignore ifdown -S/dev/null
|
||||||
|
@ -185,3 +186,9 @@ regress_opt_f_body() {
|
||||||
atf_check -s exit:0 -o ignore -e ignore \
|
atf_check -s exit:0 -o ignore -e ignore \
|
||||||
ifdown -n -S $FIXTURES/vlan.ifstate -E $EXECUTORS -i $FIXTURES/vlan.interfaces -f eth0.8
|
ifdown -n -S $FIXTURES/vlan.ifstate -E $EXECUTORS -i $FIXTURES/vlan.interfaces -f eth0.8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependency_loop_breaking_body() {
|
||||||
|
atf_check -s exit:0 -o ignore \
|
||||||
|
-e match:"ifdown: skipping auto interface a \\(already deconfigured\\), use --force to force deconfiguration" \
|
||||||
|
ifdown -n -i $FIXTURES/dependency-loop.interfaces -E $EXECUTORS -a
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue