aboutgitcodebugslistschat
path: root/test/lib/setup
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-03-15 00:59:09 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-03-25 13:21:13 +0100
commitd2e40bb8d98763e33c3eeac4f5f1b7c53465009f (patch)
treef2eb7812c96b418bbfe93dfc238afd466b78a946 /test/lib/setup
parent14c4c0253c51506caddb380c65fd56e0cf1060ab (diff)
downloadpasst-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.gz
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.bz2
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.lz
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.xz
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.zst
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.zip
conf, util, tap: Implement --trace option for extra verbose logging
--debug can be a bit too noisy, especially as single packets or socket messages are logged: implement a new option, --trace, implying --debug, that enables all debug messages. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib/setup')
-rwxr-xr-xtest/lib/setup10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lib/setup b/test/lib/setup
index f04949e..a39eb80 100755
--- a/test/lib/setup
+++ b/test/lib/setup
@@ -49,6 +49,8 @@ setup_passt() {
__opts=
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/passt.pcap"
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
+ [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
+
pane_run PASST "./passt ${__opts} -f -t 10001 -u 10001"
sleep 1
@@ -90,6 +92,7 @@ setup_pasta() {
__opts=
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/pasta.pcap"
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
+ [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
pane_run PASST "./pasta ${__opts} -f -t 10002 -T 10003 -u 10002 -U 10003 ${__target_pid}"
sleep 1
@@ -118,6 +121,7 @@ setup_passt_in_ns() {
__opts=
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/pasta_with_passt.pcap"
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
+ [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
__pid_file="$(mktemp)"
pane_run PASST "./pasta ${__opts} -t 10001,10002,10011,10012 -T 10003,10013 -u 10001,10002,10011,10012 -U 10003,10013 -P ${__pid_file}"
@@ -145,6 +149,7 @@ setup_passt_in_ns() {
__opts=
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/passt_in_pasta.pcap"
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
+ [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
#pane_run PASST "valgrind --max-stackframe=3000000 ./passt -f ${__opts} -t 10001,10011,10021,10031 -u 10001,10011,10021,10031"
pane_run PASST "./passt -f ${__opts} -t 10001,10011,10021,10031 -u 10001,10011,10021,10031"
@@ -183,11 +188,13 @@ setup_two_guests() {
__opts=
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/pasta_1.pcap"
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
+ [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
pane_run PASST_1 "./pasta ${__opts} -P ${__pid1_file} -t 10001,10002 -T 10003,10004 -u 10001,10002 -U 10003,10004"
__opts=
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/pasta_2.pcap"
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
+ [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
pane_run PASST_2 "./pasta ${__opts} -P ${__pid2_file} -t 10004,10005 -T 10003,10001 -u 10004,10005 -U 10003,10001"
sleep 1
@@ -223,12 +230,15 @@ setup_two_guests() {
__opts=
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/passt_1.pcap"
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
+ [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
+
pane_run PASST_1 "./passt -f ${__opts} -t 10001 -u 10001"
sleep 1
__opts=
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/passt_2.pcap"
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
+ [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
pane_run PASST_2 "./passt -f ${__opts} -t 10004 -u 10004"
pane_run GUEST_2 'cp mbuto.img mbuto_2.img'