ifupdown-ng/tests/linux/ipv6-ra_test
2020-07-26 03:54:06 -06:00

18 lines
462 B
Text
Executable file

#!/usr/bin/env atf-sh
. $(atf_get_srcdir)/../test_env.sh
EXECUTOR="$(atf_get_srcdir)/../../executor-scripts/linux/ipv6-ra"
tests_init up down
up_body() {
export IFACE=lo PHASE=up MOCK=echo MOCK_ESC=\\
atf_check -s exit:0 -o match:'echo 1 > /proc/sys/net/ipv6/conf/lo/accept_ra' \
${EXECUTOR}
}
down_body() {
export IFACE=lo PHASE=down MOCK=echo MOCK_ESC=\\
atf_check -s exit:0 -o match:'echo 0 > /proc/sys/net/ipv6/conf/lo/accept_ra' \
${EXECUTOR}
}