summaryrefslogtreecommitdiffstats
path: root/tests/tcpflood_wrong_option_output.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:28:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:28:20 +0000
commitdcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch)
tree66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/tcpflood_wrong_option_output.sh
parentInitial commit. (diff)
downloadrsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.tar.xz
rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.zip
Adding upstream version 8.2402.0.upstream/8.2402.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/tcpflood_wrong_option_output.sh')
-rwxr-xr-xtests/tcpflood_wrong_option_output.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/tcpflood_wrong_option_output.sh b/tests/tcpflood_wrong_option_output.sh
new file mode 100755
index 0000000..308074b
--- /dev/null
+++ b/tests/tcpflood_wrong_option_output.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# add 2016-11-22 by Jan Gerhards, released under ASL 2.0
+. ${srcdir:=.}/diag.sh init
+
+options=-t
+./tcpflood $options &> $RSYSLOG_OUT_LOG
+content_check 'invalid option'
+
+options=-Ttls
+valgrind --error-exitcode=10 ./tcpflood $options &> $RSYSLOG_OUT_LOG
+if [ $? -eq 10 ]; then
+ cat "$RSYSLOG_OUT_LOG"
+ printf 'FAIL: valgrind failed with options: %s\n' "$options"
+ error_exit 1
+fi
+content_check '-z and -Z must also be specified'
+
+exit_test