tests: add dependency loop breaking test for ifdown

This commit is contained in:
Ariadne Conill 2020-10-08 02:09:30 -06:00
parent 0cade539f8
commit 959617df88
2 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,3 @@
lo=lo
a=a
b=b

View file

@ -23,7 +23,8 @@ tests_init \
deferred_teardown_2 \
deferred_teardown_3 \
teardown_dep_ordering \
regress_opt_f
regress_opt_f \
dependency_loop_breaking
noargs_body() {
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 \
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
}