summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2025-09-03 15:46:45 +0200
committerPhil Sutter <phil@nwl.cc>2025-09-04 17:07:18 +0200
commit9c1474a97da3d7f0d71c61c85e0a8fc77c9577a7 (patch)
tree24fc6fda626d8a315f71d94eed6cf6e7825cc897
parent4a179d991b025a2a55762a6fe1e6c1a58fb5a677 (diff)
tests: monitor: Extend debug output a bit
Dump echo output and output file, surrounded by markers to highlight empty files and extra newlines. Signed-off-by: Phil Sutter <phil@nwl.cc>
-rwxr-xr-xtests/monitor/run-tests.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/monitor/run-tests.sh b/tests/monitor/run-tests.sh
index 38c20adb..b09b72ae 100755
--- a/tests/monitor/run-tests.sh
+++ b/tests/monitor/run-tests.sh
@@ -101,8 +101,9 @@ echo_run_test() {
local rc=0
$debug && {
- echo "command file:"
+ echo ">>> command file"
cat $command_file
+ echo "<<< command file"
}
$nft $echo_args -f - <$command_file >$echo_output || {
err "nft command failed!"
@@ -122,6 +123,15 @@ echo_run_test() {
done >$output_file
[ $i -gt 0 ] && echo "" >>$output_file
fi
+ $debug && {
+ echo ">>> output file"
+ cat $output_file
+ echo "<<< output file"
+ echo ">>> echo output"
+ cat $echo_output
+ echo "<<< echo output"
+ }
+
mydiff -q $echo_output $output_file >/dev/null 2>&1
if [[ $rc == 0 && $? != 0 ]]; then
err "echo output differs!"