From dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 18:28:20 +0200 Subject: Adding upstream version 8.2402.0. Signed-off-by: Daniel Baumann --- tests/stats-cee-vg.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 tests/stats-cee-vg.sh (limited to 'tests/stats-cee-vg.sh') diff --git a/tests/stats-cee-vg.sh b/tests/stats-cee-vg.sh new file mode 100755 index 0000000..2807da5 --- /dev/null +++ b/tests/stats-cee-vg.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# added 2016-03-30 by singh.janmejay +# This file is part of the rsyslog project, released under ASL 2.0 + +uname +if [ $(uname) = "FreeBSD" ] ; then + echo "This test currently does not work on FreeBSD." + exit 77 +fi + +echo =============================================================================== +echo \[stats-cee-vg.sh\]: test for verifying stats are reported correctly cee format with valgrind +. ${srcdir:=.}/diag.sh init +generate_conf +add_conf ' +ruleset(name="stats") { + action(type="omfile" file="'${RSYSLOG_DYNNAME}'.out.stats.log") +} + +module(load="../plugins/impstats/.libs/impstats" interval="1" severity="7" resetCounters="on" Ruleset="stats" bracketing="on" format="cee") + +if ($msg == "this condition will never match") then { + action(name="an_action_that_is_never_called" type="omfile" file=`echo $RSYSLOG_OUT_LOG`) +} +' +startup_vg +injectmsg_file $srcdir/testsuites/dynstats_input_1 +wait_queueempty +wait_for_stats_flush ${RSYSLOG_DYNNAME}.out.stats.log +echo doing shutdown +shutdown_when_empty +echo wait on shutdown +wait_shutdown_vg +check_exit_vg +custom_content_check '@cee: { "name": "an_action_that_is_never_called", "origin": "core.action", "processed": 0, "failed": 0, "suspended": 0, "suspended.duration": 0, "resumed": 0 }' "${RSYSLOG_DYNNAME}.out.stats.log" +exit_test -- cgit v1.2.3