test: Use shutdown test for pasta

For the passt and passt_in_ns tests we have a "shutdown" testcase that
checks for any errors from the passt process we were using (including
valgrind warnings).  Do the same for pasta tests, so that we catch any
error codes from the pasta process.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2022-08-18 16:13:56 +10:00 committed by Stefano Brivio
parent 9224af1494
commit 69126d4d48
3 changed files with 4 additions and 5 deletions

View file

@ -98,7 +98,7 @@ setup_pasta() {
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d" [ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
[ ${TRACE} -eq 1 ] && __opts="${__opts} --trace" [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
pane_run PASST "./pasta ${__opts} -f -t 10002 -T 10003 -u 10002 -U 10003 ${__target_pid}" pane_run PASST "./pasta ${__opts} -f -t 10002 -T 10003 -u 10002 -U 10003 -P passt.pid ${__target_pid}"
sleep 1 sleep 1
} }
@ -305,8 +305,6 @@ teardown_passt() {
# teardown_passt() - Exit namespace, kill pasta process # teardown_passt() - Exit namespace, kill pasta process
teardown_pasta() { teardown_pasta() {
tmux send-keys -t ${PANE_PASST} "C-c"
pane_wait PASST
tmux send-keys -t ${PANE_NS} "C-d" tmux send-keys -t ${PANE_NS} "C-d"
pane_wait NS pane_wait NS
} }

View file

@ -77,6 +77,7 @@ run() {
test dhcp/pasta test dhcp/pasta
test tcp/pasta test tcp/pasta
test udp/pasta test udp/pasta
test shutdown/passt
teardown pasta teardown pasta
setup passt setup passt

View file

@ -6,8 +6,8 @@
# PASTA - Pack A Subtle Tap Abstraction # PASTA - Pack A Subtle Tap Abstraction
# for network namespace/tap device mode # for network namespace/tap device mode
# #
# test/shutdown/passt - Shut down passt and check exit code (will detect # test/shutdown/passt - Shut down passt (or pasta) and check exit code (will
# valgrind errors amongst others) # detect valgrind errors amongst others)
# #
# Copyright (c) 2022 Red Hat GmbH # Copyright (c) 2022 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com> # Author: Stefano Brivio <sbrivio@redhat.com>