pf tests: Make pass_block:noalias more robust

Send several ICMPv6 echo requests. We've seen occasional failures with a
single request.
This commit is contained in:
Kristof Provost 2018-12-01 09:57:29 +00:00
parent e4c7371cef
commit db785060cb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341358

View File

@ -107,21 +107,21 @@ noalias_body()
| cut -d % -f 1)
# Sanity check
atf_check -s exit:0 -o ignore ping6 -c 1 -x 1 2001:db8:42::2
atf_check -s exit:0 -o ignore ping6 -c 1 -x 1 ${linklocaladdr}%${epair}a
atf_check -s exit:0 -o ignore ping6 -c 3 -x 1 2001:db8:42::2
atf_check -s exit:0 -o ignore ping6 -c 3 -x 1 ${linklocaladdr}%${epair}a
jexec alcatraz pfctl -e
pft_set_rules alcatraz "block out inet6 from (${epair}b:0) to any"
atf_check -s exit:2 -o ignore ping6 -c 1 -x 1 2001:db8:42::2
atf_check -s exit:2 -o ignore ping6 -c 3 -x 1 2001:db8:42::2
# We should still be able to ping the link-local address
atf_check -s exit:0 -o ignore ping6 -c 1 -x 1 ${linklocaladdr}%${epair}a
atf_check -s exit:0 -o ignore ping6 -c 3 -x 1 ${linklocaladdr}%${epair}a
pft_set_rules alcatraz "block out inet6 from (${epair}b) to any"
# We cannot ping to the link-local address
atf_check -s exit:2 -o ignore ping6 -c 1 -x 1 ${linklocaladdr}%${epair}a
atf_check -s exit:2 -o ignore ping6 -c 3 -x 1 ${linklocaladdr}%${epair}a
}
noalias_cleanup()