mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-15 10:30:40 +01:00
When gcc coverage instrumentation is used, these tests hang. They work with clang coverage instrumentation, but for some reason clang does not give us full reports (at least not when used together with CodeCov.io). We have tried to troubleshoot this for hours and hours - now is time to give up until someone comes up with a bright idea. So we make the affected tests skip themselves when they detect gcc with coverage instrumentation.
54 lines
1.8 KiB
Bash
Executable File
54 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# This file is part of the rsyslog project, released under ASL 2.0
|
|
|
|
# Similar to the 'omprog-feedback.sh' test, with multiple worker threads
|
|
# on high load, and a given error rate (percentage of failed messages, i.e.
|
|
# confirmed as failed by the program). Note: the action retry interval
|
|
# (1 second) causes a very low throughput; we need to set a very low error
|
|
# rate to avoid the test lasting too much.
|
|
. ${srcdir:=.}/diag.sh init
|
|
skip_platform "SunOS" "On Solaris, this test causes rsyslog to hang for unknown reasons"
|
|
if [ "$CC" == "gcc" ] && [[ "$CFLAGS" == *"-coverage"* ]]; then
|
|
printf 'This test does not work with gcc coverage instrumentation\n'
|
|
printf 'It will hang, but we do not know why. See\n'
|
|
printf 'https://github.com/rsyslog/rsyslog/issues/3361\n'
|
|
exit 77
|
|
fi
|
|
|
|
NUMMESSAGES=10000 # number of logs to send
|
|
ERROR_RATE_PERCENT=1 # percentage of logs to be retried
|
|
|
|
export command_line="$srcdir/testsuites/omprog-feedback-mt-bin.sh $ERROR_RATE_PERCENT"
|
|
|
|
generate_conf
|
|
add_conf '
|
|
module(load="../plugins/omprog/.libs/omprog")
|
|
|
|
template(name="outfmt" type="string" string="%msg%\n")
|
|
|
|
main_queue(
|
|
queue.timeoutShutdown="30000" # long shutdown timeout for the main queue
|
|
)
|
|
|
|
:msg, contains, "msgnum:" {
|
|
action(
|
|
type="omprog"
|
|
binary=`echo $command_line`
|
|
template="outfmt"
|
|
name="omprog_action"
|
|
confirmMessages="on"
|
|
queue.type="LinkedList" # use a dedicated queue
|
|
queue.workerThreads="10" # ...with multiple workers
|
|
queue.size="10000" # ...high capacity (default is 1000)
|
|
queue.timeoutShutdown="60000" # ...and a long shutdown timeout
|
|
action.resumeInterval="1" # retry interval: 1 second
|
|
)
|
|
}
|
|
'
|
|
startup
|
|
injectmsg 0 $NUMMESSAGES
|
|
wait_file_lines --abort-on-oversize "$RSYSLOG_OUT_LOG" $NUMMESSAGES
|
|
shutdown_when_empty
|
|
wait_shutdown
|
|
exit_test
|