summaryrefslogtreecommitdiff
path: root/test/run_tests.sh
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-11-22 01:21:20 +0100
committerToni Uhlig <matzeton@googlemail.com>2022-12-03 01:21:20 +0100
commit60741d5649ea08bf62c6e895515dc2625925fea0 (patch)
tree4064bca9f71656a15e65647fb93bc67c1e4e3638 /test/run_tests.sh
parent8b81b170d3b5406e3203e5bd23026d828fd1fa36 (diff)
Strace support for diff tests.
* tiny README update Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'test/run_tests.sh')
-rwxr-xr-xtest/run_tests.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/run_tests.sh b/test/run_tests.sh
index 988b96417..b2b11f556 100755
--- a/test/run_tests.sh
+++ b/test/run_tests.sh
@@ -3,6 +3,7 @@
set -e
LINE_SPACES=${LINE_SPACES:-48}
+STRACE_EXEC="${STRACE_EXEC}"
MYDIR="$(realpath "$(dirname ${0})")"
nDPId_test_EXEC="$(realpath "${2:-"${MYDIR}/../nDPId-test"}")"
NETCAT_EXEC="$(which nc) -q 0 -l 127.0.0.1 9000"
@@ -111,7 +112,12 @@ for pcap_file in *.pcap *.pcapng *.cap; do
printf "%-${LINE_SPACES}s\t" "${pcap_file}"
- ${nDPId_test_EXEC} "${pcap_file}" \
+ if [ ! -z "${STRACE_EXEC}" ]; then
+ STRACE_CMD="${STRACE_EXEC} -f -e decode-fds=path,socket,dev,pidfd -s 1024 -o /tmp/nDPId-test-stderr/${pcap_file}.strace.out"
+ else
+ STRACE_CMD=""
+ fi
+ ${STRACE_CMD} ${nDPId_test_EXEC} "${pcap_file}" \
>"/tmp/nDPId-test-stdout/${pcap_file}.out.new" \
2>>"/tmp/nDPId-test-stderr/${pcap_file}.out"
nDPId_test_RETVAL=$?