File: imfile-basic-vgthread.sh

package info (click to toggle)
rsyslog 8.2512.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 30,464 kB
  • sloc: ansic: 123,809; sh: 42,109; makefile: 5,962; javascript: 1,842; python: 1,222; lex: 607; yacc: 193; perl: 162; sql: 103; tcl: 9; ruby: 2
file content (39 lines) | stat: -rwxr-xr-x 1,109 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# This is part of the rsyslog testbench, licensed under ASL 2.0
. ${srcdir:=.}/diag.sh init
skip_platform "FreeBSD" "This test currently does not work on FreeBSD."
export NUMMESSAGES=50000
if grep -q 'release 6\.' <<< "$(cat /etc/redhat-release 2>/dev/null)"; then
	echo "RHEL/CentOS 6 detected, adding valgrind suppressions"
	export RS_TEST_VALGRIND_EXTRA_OPTS="--suppressions=${srcdir}/imfile-basic-vgthread.supp"
fi

exit
generate_conf
add_conf '
$ModLoad ../plugins/imfile/.libs/imfile
$InputFileName ./'$RSYSLOG_DYNNAME'.input
$InputFileTag file:
$InputFileStateFile stat-file1
$InputFileSeverity error
$InputFileFacility local7
$InputFileMaxLinesAtOnce 100000
$InputRunFileMonitor

$template outfmt,"%msg:F,58:2%\n"
:msg, contains, "msgnum:" ./'$RSYSLOG_OUT_LOG';outfmt
'

# generate input file first. Note that rsyslog processes it as
# soon as it start up (so the file should exist at that point).
./inputfilegen -m $NUMMESSAGES > $RSYSLOG_DYNNAME.input
ls -l $RSYSLOG_DYNNAME.input

startup_vgthread
wait_file_lines
shutdown_when_empty
wait_shutdown_vg
check_exit_vg

seq_check
exit_test