aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.sh
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2024-01-06 19:32:47 +0100
committerToni Uhlig <matzeton@googlemail.com>2024-01-06 19:32:47 +0100
commita007a907daebbf78dc3fead8fa2ad23d1156f732 (patch)
tree875e7d55a931ed146d6ca47b94370e7ec24faf6c /test/run_tests.sh
parent876aef98e10073b26bdd54fd996e4675b36e19c1 (diff)
Fixed invalid flow risk aggregation in collectd/influxd examples.
* CI: build single nDPId executable with `-Wall -Wextra -std=gnu99` * fixed missing error events in influxd example * added additional test cases for collectd * extended grafana dashboard Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'test/run_tests.sh')
-rwxr-xr-xtest/run_tests.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/run_tests.sh b/test/run_tests.sh
index 0e749fc04..56f6914b9 100755
--- a/test/run_tests.sh
+++ b/test/run_tests.sh
@@ -438,7 +438,16 @@ if [ -x "${NDPISRVD_COLLECTD}" ]; then
kill -SIGTERM ${nc_pid} 2>/dev/null
wait ${nc_pid} 2>/dev/null
while ss -x -t -n -l | grep -q "${NETCAT_SOCK}"; do sleep 0.1; printf '%s\n' "Waiting until socket ${NETCAT_SOCK} is not available anymore.." >>"${stderr_file}"; done
- if [ ! -r "${result_file}" ]; then
+
+ unknown_count="$(cat "${stdout_file}" | grep -E 'flow_.*_unknown' | wc -l || printf '%s' '0')"
+ if [ "${unknown_count}" -ne 5 ]; then
+ printf '%s: Unknown count: %s\n' '[INTERNAL]' "${unknown_count}"
+ TESTS_FAILED=$((TESTS_FAILED + 1))
+ elif cat "${stdout_file}" | grep -E 'flow_.*_unknown' | grep -qvE 'N:0'; then
+ printf '%s\n' '[INTERNAL]'
+ cat "${stdout_file}" | grep -E 'flow_.*_unknown' | grep -vE 'N:0' || true
+ TESTS_FAILED=$((TESTS_FAILED + 1))
+ elif [ ! -r "${result_file}" ]; then
printf '%s\n' '[NEW]'
test ${IS_GIT} -eq 1 && \
mv "${stdout_file}" "${result_file}"