Changeset View
Changeset View
Standalone View
Standalone View
sbin/ping/tests/ping_test.sh
Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | |||||
inject_pip_head() | inject_pip_head() | ||||
{ | { | ||||
atf_set "descr" "Inject an ICMP error with a quoted packet with IP options" | atf_set "descr" "Inject an ICMP error with a quoted packet with IP options" | ||||
atf_set "require.user" "root" | atf_set "require.user" "root" | ||||
atf_set "require.progs" "python3" "scapy" | atf_set "require.progs" "python3" "scapy" | ||||
} | } | ||||
inject_pip_body() | inject_pip_body() | ||||
{ | { | ||||
atf_check -s exit:2 -o match:"Destination Host Unreachable" -o not-match:"01010101" python3 $(atf_get_srcdir)/injection.py pip | atf_check -s exit:2 -o match:"Destination Host Unreachable" -o match:"(01){40}" python3 $(atf_get_srcdir)/injection.py pip | ||||
} | } | ||||
inject_pip_cleanup() | inject_pip_cleanup() | ||||
{ | { | ||||
ifconfig `cat tun.txt` destroy | ifconfig `cat tun.txt` destroy | ||||
} | } | ||||
# This is redundant with the ping_ tests, but it serves to ensure that scapy.py | # This is redundant with the ping_ tests, but it serves to ensure that scapy.py | ||||
# is working correctly. | # is working correctly. | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |