diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2024-01-06 19:32:47 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2024-01-06 19:32:47 +0100 |
commit | a007a907daebbf78dc3fead8fa2ad23d1156f732 (patch) | |
tree | 875e7d55a931ed146d6ca47b94370e7ec24faf6c /test/run_tests.sh | |
parent | 876aef98e10073b26bdd54fd996e4675b36e19c1 (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-x | test/run_tests.sh | 11 |
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}" |