mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-13 04:50:41 +01:00
squash: content-check
This commit is contained in:
parent
d051a9bdb6
commit
27cc298a3d
@ -27,17 +27,17 @@ cp -f $srcdir/testsuites/xlate_array.lkp_tbl xlate_array.lkp_tbl
|
||||
startup_vg
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_array_more.lkp_tbl xlate_array.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: bar_new"
|
||||
content_check "msgnum:00000002: baz"
|
||||
cp -f $srcdir/testsuites/xlate_array_more_with_duplicates_and_nomatch.lkp_tbl xlate_array.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -47,16 +47,16 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000005: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000006: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000007: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000008: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000009: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000010: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000011: quux"
|
||||
content_check "msgnum:00000000: quux"
|
||||
content_check "msgnum:00000001: quux"
|
||||
content_check "msgnum:00000002: foo_latest"
|
||||
content_check "msgnum:00000003: baz_latest"
|
||||
content_check "msgnum:00000004: foo_latest"
|
||||
content_check "msgnum:00000005: foo_latest"
|
||||
content_check "msgnum:00000006: baz_latest"
|
||||
content_check "msgnum:00000007: foo_latest"
|
||||
content_check "msgnum:00000008: baz_latest"
|
||||
content_check "msgnum:00000009: baz_latest"
|
||||
content_check "msgnum:00000010: quux"
|
||||
content_check "msgnum:00000011: quux"
|
||||
exit_test
|
||||
|
||||
@ -27,17 +27,17 @@ cp -f $srcdir/testsuites/xlate_array.lkp_tbl xlate_array.lkp_tbl
|
||||
startup
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_array_more.lkp_tbl xlate_array.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: bar_new"
|
||||
content_check "msgnum:00000002: baz"
|
||||
cp -f $srcdir/testsuites/xlate_array_more_with_duplicates_and_nomatch.lkp_tbl xlate_array.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -46,16 +46,16 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000005: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000006: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000007: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000008: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000009: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000010: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000011: quux"
|
||||
content_check "msgnum:00000000: quux"
|
||||
content_check "msgnum:00000001: quux"
|
||||
content_check "msgnum:00000002: foo_latest"
|
||||
content_check "msgnum:00000003: baz_latest"
|
||||
content_check "msgnum:00000004: foo_latest"
|
||||
content_check "msgnum:00000005: foo_latest"
|
||||
content_check "msgnum:00000006: baz_latest"
|
||||
content_check "msgnum:00000007: foo_latest"
|
||||
content_check "msgnum:00000008: baz_latest"
|
||||
content_check "msgnum:00000009: baz_latest"
|
||||
content_check "msgnum:00000010: quux"
|
||||
content_check "msgnum:00000011: quux"
|
||||
exit_test
|
||||
|
||||
@ -47,7 +47,7 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: bar_new"
|
||||
content_check "msgnum:00000002: baz"
|
||||
exit_test
|
||||
|
||||
@ -332,17 +332,63 @@ function injectmsg() {
|
||||
|
||||
# show the current main queue size. $1 is the instance.
|
||||
function get_mainqueuesize() {
|
||||
if [ "$2" == "2" ]; then
|
||||
if [ "$1" == "2" ]; then
|
||||
echo getmainmsgqueuesize | $TESTTOOL_DIR/diagtalker -p$IMDIAG_PORT2 || error_exit $?
|
||||
else
|
||||
echo getmainmsgqueuesize | $TESTTOOL_DIR/diagtalker -p$IMDIAG_PORT || error_exit $?
|
||||
fi
|
||||
}
|
||||
|
||||
# grep for (partial) content. $1 is the content to check for
|
||||
function content_check() {
|
||||
cat ${RSYSLOG_OUT_LOG} | grep -qF "$1"
|
||||
if [ "$?" -ne "0" ]; then
|
||||
printf "\n============================================================\n"
|
||||
echo FAIL: content-check failed to find "'$1'", content is
|
||||
cat -n ${RSYSLOG_OUT_LOG}
|
||||
error_exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function content_check_with_count() {
|
||||
# content check variables for Timeout
|
||||
if [ "x$3" == "x" ]; then
|
||||
timeoutend=1
|
||||
else
|
||||
timeoutend=$3
|
||||
fi
|
||||
timecounter=0
|
||||
|
||||
while [ $timecounter -lt $timeoutend ]; do
|
||||
let timecounter=timecounter+1
|
||||
|
||||
count=$(cat ${RSYSLOG_OUT_LOG} | grep -F "$1" | wc -l)
|
||||
|
||||
if [ $count -eq $2 ]; then
|
||||
echo content_check_with_count success, \"$1\" occured $2 times
|
||||
break
|
||||
else
|
||||
if [ "x$timecounter" == "x$timeoutend" ]; then
|
||||
shutdown_when_empty
|
||||
wait_shutdown
|
||||
|
||||
echo content_check_with_count failed, expected \"$1\" to occur $2 times, but found it $count times
|
||||
echo file ${RSYSLOG_OUT_LOG} content is:
|
||||
sort < ${RSYSLOG_OUT_LOG}
|
||||
error_exit 1
|
||||
else
|
||||
echo content_check_with_count have $count, wait for $2 times $1...
|
||||
$TESTTOOL_DIR/msleep 1000
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# wait for main message queue to be empty. $1 is the instance.
|
||||
function wait_queueempty() {
|
||||
if [ "$2" == "2" ]; then
|
||||
if [ "$1" == "2" ]; then
|
||||
echo WaitMainQueueEmpty | $TESTTOOL_DIR/diagtalker -p$IMDIAG_PORT2 || error_exit $?
|
||||
else
|
||||
echo WaitMainQueueEmpty | $TESTTOOL_DIR/diagtalker -p$IMDIAG_PORT || error_exit $?
|
||||
@ -416,8 +462,7 @@ function wait_shutdown_vg() {
|
||||
wait `cat $RSYSLOG_PIDBASE$1.pid`
|
||||
export RSYSLOGD_EXIT=$?
|
||||
echo rsyslogd run exited with $RSYSLOGD_EXIT
|
||||
if [ -e vgcore.* ]
|
||||
then
|
||||
if [ -e vgcore.* ]; then
|
||||
echo "ABORT! core file exists"
|
||||
error_exit 1
|
||||
fi
|
||||
@ -426,8 +471,7 @@ function wait_shutdown_vg() {
|
||||
|
||||
# check exit code for valgrind error
|
||||
function check_exit_vg(){
|
||||
if [ "$RSYSLOGD_EXIT" -eq "10" ]
|
||||
then
|
||||
if [ "$RSYSLOGD_EXIT" -eq "10" ]; then
|
||||
echo "valgrind run FAILED with exceptions - terminating"
|
||||
error_exit 1
|
||||
fi
|
||||
@ -919,39 +963,6 @@ case $1 in
|
||||
done
|
||||
unset count
|
||||
;;
|
||||
'content-check-with-count')
|
||||
# content check variables for Timeout
|
||||
if [ "x$4" == "x" ]; then
|
||||
timeoutend=1
|
||||
else
|
||||
timeoutend=$4
|
||||
fi
|
||||
timecounter=0
|
||||
|
||||
while [ $timecounter -lt $timeoutend ]; do
|
||||
let timecounter=timecounter+1
|
||||
|
||||
count=$(cat ${RSYSLOG_OUT_LOG} | grep -F "$2" | wc -l)
|
||||
|
||||
if [ $count -eq $3 ]; then
|
||||
echo content-check-with-count success, \"$2\" occured $3 times
|
||||
break
|
||||
else
|
||||
if [ "x$timecounter" == "x$timeoutend" ]; then
|
||||
shutdown_when_empty # shut down rsyslogd
|
||||
wait_shutdown # Shutdown rsyslog instance on error
|
||||
|
||||
echo content-check-with-count failed, expected \"$2\" to occur $3 times, but found it $count times
|
||||
echo file ${RSYSLOG_OUT_LOG} content is:
|
||||
sort < ${RSYSLOG_OUT_LOG}
|
||||
error_exit 1
|
||||
else
|
||||
echo content-check-with-count have $count, wait for $3 times $2...
|
||||
$TESTTOOL_DIR/msleep 1000
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
'block-stats-flush')
|
||||
echo blocking stats flush
|
||||
echo "blockStatsReporting" | $TESTTOOL_DIR/diagtalker -p$IMDIAG_PORT || error_exit $?
|
||||
|
||||
@ -33,12 +33,12 @@ startup_vg
|
||||
. $srcdir/diag.sh wait-for-stats-flush ${RSYSLOG_DYNNAME}.out.stats.log
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "bar 002 0"
|
||||
. $srcdir/diag.sh content-check "baz 003 0"
|
||||
. $srcdir/diag.sh content-check "foo 004 0"
|
||||
. $srcdir/diag.sh content-check "baz 005 0"
|
||||
. $srcdir/diag.sh content-check "foo 006 0"
|
||||
content_check "foo 001 0"
|
||||
content_check "bar 002 0"
|
||||
content_check "baz 003 0"
|
||||
content_check "foo 004 0"
|
||||
content_check "baz 005 0"
|
||||
content_check "foo 006 0"
|
||||
rst_msleep 1100 # wait for stats flush
|
||||
echo doing shutdown
|
||||
shutdown_when_empty
|
||||
|
||||
@ -31,12 +31,12 @@ startup
|
||||
. $srcdir/diag.sh wait-for-stats-flush ${RSYSLOG_DYNNAME}.out.stats.log
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "bar 002 0"
|
||||
. $srcdir/diag.sh content-check "baz 003 0"
|
||||
. $srcdir/diag.sh content-check "foo 004 0"
|
||||
. $srcdir/diag.sh content-check "baz 005 0"
|
||||
. $srcdir/diag.sh content-check "foo 006 0"
|
||||
content_check "foo 001 0"
|
||||
content_check "bar 002 0"
|
||||
content_check "baz 003 0"
|
||||
content_check "foo 004 0"
|
||||
content_check "baz 005 0"
|
||||
content_check "foo 006 0"
|
||||
rst_msleep 1100 # wait for stats flush
|
||||
echo doing shutdown
|
||||
shutdown_when_empty
|
||||
|
||||
@ -45,7 +45,7 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "foo 006"
|
||||
content_check "foo 006"
|
||||
. $srcdir/diag.sh custom-content-check 'bar=1' "${RSYSLOG_DYNNAME}.out.stats.log"
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*foo=\([0-9]\+\)/\1/g' 'msg_stats_resettable_on.\+foo=' "${RSYSLOG_DYNNAME}.out.stats.log" 3
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*bar=\([0-9]\+\)/\1/g' 'msg_stats_resettable_on.\+bar=' "${RSYSLOG_DYNNAME}.out.stats.log" 1
|
||||
|
||||
@ -69,24 +69,24 @@ rm ${RSYSLOG_DYNNAME}.out.stats.log
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh allow-single-stats-flush-after-block-and-wait-for-it
|
||||
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "bar 002 0"
|
||||
. $srcdir/diag.sh content-check "baz 003 0"
|
||||
. $srcdir/diag.sh content-check "foo 004 0"
|
||||
. $srcdir/diag.sh content-check "baz 005 0"
|
||||
. $srcdir/diag.sh content-check "foo 006 0"
|
||||
. $srcdir/diag.sh content-check "quux 007 -6"
|
||||
. $srcdir/diag.sh content-check "corge 008 -6"
|
||||
. $srcdir/diag.sh content-check "quux 009 -6"
|
||||
. $srcdir/diag.sh content-check "foo 010 0"
|
||||
. $srcdir/diag.sh content-check "corge 011 -6"
|
||||
. $srcdir/diag.sh content-check "grault 012 -6"
|
||||
. $srcdir/diag.sh content-check "foo 013 0"
|
||||
. $srcdir/diag.sh content-check "corge 014 0"
|
||||
. $srcdir/diag.sh content-check "grault 015 0"
|
||||
. $srcdir/diag.sh content-check "quux 016 0"
|
||||
. $srcdir/diag.sh content-check "foo 017 -6"
|
||||
. $srcdir/diag.sh content-check "corge 018 0"
|
||||
content_check "foo 001 0"
|
||||
content_check "bar 002 0"
|
||||
content_check "baz 003 0"
|
||||
content_check "foo 004 0"
|
||||
content_check "baz 005 0"
|
||||
content_check "foo 006 0"
|
||||
content_check "quux 007 -6"
|
||||
content_check "corge 008 -6"
|
||||
content_check "quux 009 -6"
|
||||
content_check "foo 010 0"
|
||||
content_check "corge 011 -6"
|
||||
content_check "grault 012 -6"
|
||||
content_check "foo 013 0"
|
||||
content_check "corge 014 0"
|
||||
content_check "grault 015 0"
|
||||
content_check "quux 016 0"
|
||||
content_check "foo 017 -6"
|
||||
content_check "corge 018 0"
|
||||
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*corge=\([0-9]\+\)/\1/g' 'corge=' "${RSYSLOG_DYNNAME}.out.stats.log" 2
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*grault=\([0-9]\+\)/\1/g' 'grault=' "${RSYSLOG_DYNNAME}.out.stats.log" 1
|
||||
|
||||
@ -67,24 +67,24 @@ rm ${RSYSLOG_DYNNAME}.out.stats.log
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh allow-single-stats-flush-after-block-and-wait-for-it
|
||||
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "bar 002 0"
|
||||
. $srcdir/diag.sh content-check "baz 003 0"
|
||||
. $srcdir/diag.sh content-check "foo 004 0"
|
||||
. $srcdir/diag.sh content-check "baz 005 0"
|
||||
. $srcdir/diag.sh content-check "foo 006 0"
|
||||
. $srcdir/diag.sh content-check "quux 007 -6"
|
||||
. $srcdir/diag.sh content-check "corge 008 -6"
|
||||
. $srcdir/diag.sh content-check "quux 009 -6"
|
||||
. $srcdir/diag.sh content-check "foo 010 0"
|
||||
. $srcdir/diag.sh content-check "corge 011 -6"
|
||||
. $srcdir/diag.sh content-check "grault 012 -6"
|
||||
. $srcdir/diag.sh content-check "foo 013 0"
|
||||
. $srcdir/diag.sh content-check "corge 014 0"
|
||||
. $srcdir/diag.sh content-check "grault 015 0"
|
||||
. $srcdir/diag.sh content-check "quux 016 0"
|
||||
. $srcdir/diag.sh content-check "foo 017 -6"
|
||||
. $srcdir/diag.sh content-check "corge 018 0"
|
||||
content_check "foo 001 0"
|
||||
content_check "bar 002 0"
|
||||
content_check "baz 003 0"
|
||||
content_check "foo 004 0"
|
||||
content_check "baz 005 0"
|
||||
content_check "foo 006 0"
|
||||
content_check "quux 007 -6"
|
||||
content_check "corge 008 -6"
|
||||
content_check "quux 009 -6"
|
||||
content_check "foo 010 0"
|
||||
content_check "corge 011 -6"
|
||||
content_check "grault 012 -6"
|
||||
content_check "foo 013 0"
|
||||
content_check "corge 014 0"
|
||||
content_check "grault 015 0"
|
||||
content_check "quux 016 0"
|
||||
content_check "foo 017 -6"
|
||||
content_check "corge 018 0"
|
||||
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*corge=\([0-9]\+\)/\1/g' 'corge=' "${RSYSLOG_DYNNAME}.out.stats.log" 2
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*grault=\([0-9]\+\)/\1/g' 'grault=' "${RSYSLOG_DYNNAME}.out.stats.log" 1
|
||||
|
||||
@ -44,8 +44,8 @@ startup_vg
|
||||
. $srcdir/diag.sh await-stats-flush-after-block
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh wait-for-stats-flush ${RSYSLOG_DYNNAME}.out.stats.log
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "foo 006 0"
|
||||
content_check "foo 001 0"
|
||||
content_check "foo 006 0"
|
||||
echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
|
||||
@ -43,8 +43,8 @@ rst_msleep 4000
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input_3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh wait-for-stats-flush ${RSYSLOG_DYNNAME}.out.stats.log
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "foo 006 0"
|
||||
content_check "foo 001 0"
|
||||
content_check "foo 006 0"
|
||||
echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
|
||||
@ -42,12 +42,12 @@ rst_msleep 8100
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input_3
|
||||
rst_msleep 8100
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "bar 002 0"
|
||||
. $srcdir/diag.sh content-check "baz 003 0"
|
||||
. $srcdir/diag.sh content-check "foo 004 0"
|
||||
. $srcdir/diag.sh content-check "baz 005 0"
|
||||
. $srcdir/diag.sh content-check "foo 006 0"
|
||||
content_check "foo 001 0"
|
||||
content_check "bar 002 0"
|
||||
content_check "baz 003 0"
|
||||
content_check "foo 004 0"
|
||||
content_check "baz 005 0"
|
||||
content_check "foo 006 0"
|
||||
echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
|
||||
@ -40,12 +40,12 @@ rst_msleep 8100
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input_3
|
||||
rst_msleep 8100
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "bar 002 0"
|
||||
. $srcdir/diag.sh content-check "baz 003 0"
|
||||
. $srcdir/diag.sh content-check "foo 004 0"
|
||||
. $srcdir/diag.sh content-check "baz 005 0"
|
||||
. $srcdir/diag.sh content-check "foo 006 0"
|
||||
content_check "foo 001 0"
|
||||
content_check "bar 002 0"
|
||||
content_check "baz 003 0"
|
||||
content_check "foo 004 0"
|
||||
content_check "baz 005 0"
|
||||
content_check "foo 006 0"
|
||||
shutdown_when_empty
|
||||
wait_shutdown
|
||||
# because dyn-metrics would be reset before it can accumulate and report high counts, sleep between msg-injection ensures that
|
||||
|
||||
@ -45,7 +45,7 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "foo 006"
|
||||
content_check "foo 006"
|
||||
. $srcdir/diag.sh custom-content-check 'foo=3' "${RSYSLOG_DYNNAME}.out.stats.log"
|
||||
. $srcdir/diag.sh custom-content-check 'bar=1' "${RSYSLOG_DYNNAME}.out.stats.log"
|
||||
. $srcdir/diag.sh custom-content-check 'baz=2' "${RSYSLOG_DYNNAME}.out.stats.log"
|
||||
|
||||
@ -66,7 +66,7 @@ do
|
||||
|
||||
# Check correct amount of input files each time
|
||||
let IMFILEINPUTFILESALL=$(($IMFILEINPUTFILES * $j))
|
||||
. $srcdir/diag.sh content-check-with-count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
content_check_with_count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
|
||||
# Delete all but first!
|
||||
for i in `seq 1 $IMFILEINPUTFILES`;
|
||||
|
||||
@ -68,7 +68,7 @@ do
|
||||
|
||||
# Check correct amount of input files each time
|
||||
let IMFILEINPUTFILESALL=$(($IMFILEINPUTFILES * $j))
|
||||
. $srcdir/diag.sh content-check-with-count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
content_check_with_count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
|
||||
# Delete all but first!
|
||||
for i in `seq 1 $IMFILEINPUTFILES`;
|
||||
|
||||
@ -73,7 +73,7 @@ do
|
||||
|
||||
# Check correct amount of input files each time
|
||||
let IMFILEINPUTFILESALL=$(($IMFILEINPUTFILES * $j))
|
||||
. $srcdir/diag.sh content-check-with-count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
content_check_with_count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
|
||||
# Delete all but first!
|
||||
for i in `seq 1 $IMFILEINPUTFILES`;
|
||||
|
||||
@ -72,7 +72,7 @@ do
|
||||
|
||||
# Check correct amount of input files each time
|
||||
let IMFILEINPUTFILESALL=$(($IMFILEINPUTFILES * $j))
|
||||
. $srcdir/diag.sh content-check-with-count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
content_check_with_count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
|
||||
# Delete all but first!
|
||||
for i in `seq 1 $IMFILEINPUTFILES`;
|
||||
|
||||
@ -61,7 +61,7 @@ do
|
||||
|
||||
# Check correct amount of input files each time
|
||||
let IMFILEINPUTFILESALL=$(($IMFILEINPUTFILES * $j))
|
||||
. $srcdir/diag.sh content-check-with-count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
content_check_with_count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
|
||||
# Delete all but first!
|
||||
for i in `seq 1 $IMFILEINPUTFILES`;
|
||||
|
||||
@ -60,7 +60,7 @@ do
|
||||
|
||||
# Check correct amount of input files each time
|
||||
let IMFILEINPUTFILESALL=$(($IMFILEINPUTFILES * $j))
|
||||
. $srcdir/diag.sh content-check-with-count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
content_check_with_count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
|
||||
# Delete all but first!
|
||||
for i in `seq 1 $IMFILEINPUTFILES`;
|
||||
|
||||
@ -56,5 +56,5 @@ ls -d $RSYSLOG_DYNNAME.input.*
|
||||
|
||||
shutdown_when_empty # shut down rsyslogd when done processing messages
|
||||
wait_shutdown # we need to wait until rsyslogd is finished!
|
||||
. $srcdir/diag.sh content-check-with-count "HEADER msgnum:00000000:" $IMFILEINPUTFILES
|
||||
content_check_with_count "HEADER msgnum:00000000:" $IMFILEINPUTFILES
|
||||
exit_test
|
||||
|
||||
@ -64,7 +64,7 @@ do
|
||||
|
||||
# Check correct amount of input files each time
|
||||
let IMFILEINPUTFILESALL=$(($IMFILEINPUTFILES * $j))
|
||||
. $srcdir/diag.sh content-check-with-count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
content_check_with_count "HEADER msgnum:00000000:" $IMFILEINPUTFILESALL $IMFILECHECKTIMEOUT
|
||||
|
||||
# Delete all but first!
|
||||
for i in `seq 1 $IMFILEINPUTFILES`;
|
||||
|
||||
@ -20,7 +20,7 @@ mv $RSYSLOG_OUT_LOG ${RSYSLOG2_OUT_LOG}
|
||||
shutdown_when_empty
|
||||
wait_shutdown
|
||||
echo checking pre-HUP file
|
||||
. $srcdir/diag.sh content-check 'global: origin=dynstats' ${RSYSLOG2_OUT_LOG}
|
||||
content_check 'global: origin=dynstats' ${RSYSLOG2_OUT_LOG}
|
||||
echo checking post-HUP file
|
||||
. $srcdir/diag.sh content-check 'global: origin=dynstats' $RSYSLOG_OUT_LOG
|
||||
content_check 'global: origin=dynstats' $RSYSLOG_OUT_LOG
|
||||
exit_test
|
||||
|
||||
@ -42,6 +42,6 @@ if [ ! $? -eq 0 ]; then
|
||||
cat $RSYSLOG_OUT_LOG
|
||||
error_exit 1
|
||||
fi;
|
||||
. $srcdir/diag.sh content-check-regex "assuming end of frame" ${RSYSLOG2_OUT_LOG}
|
||||
. $srcdir/diag.sh content-check-regex "message too long" ${RSYSLOG2_OUT_LOG}
|
||||
content_check-regex "assuming end of frame" ${RSYSLOG2_OUT_LOG}
|
||||
content_check-regex "message too long" ${RSYSLOG2_OUT_LOG}
|
||||
exit_test
|
||||
|
||||
@ -18,7 +18,7 @@ template(name="outfmt" type="string" string="%msg:%\n")
|
||||
startup
|
||||
shutdown_when_empty # shut down rsyslogd when done processing messages
|
||||
wait_shutdown # we need to wait until rsyslogd is finished!
|
||||
. $srcdir/diag.sh content-check "imptcp: error while binding unix socket: Address already in use"
|
||||
content_check "imptcp: error while binding unix socket: Address already in use"
|
||||
exit_test
|
||||
|
||||
# Now make sure we unlink if asked to
|
||||
@ -41,5 +41,5 @@ logger -Tu "$srcdir/testbench_socket" "hello from imptcp uds"
|
||||
|
||||
shutdown_when_empty # shut down rsyslogd when done processing messages
|
||||
wait_shutdown # we need to wait until rsyslogd is finished!
|
||||
. $srcdir/diag.sh content-check "hello from imptcp uds"
|
||||
content_check "hello from imptcp uds"
|
||||
exit_test
|
||||
|
||||
@ -35,5 +35,5 @@ sleep 5 # due to large messages, we need this time for the tcp receiver to settl
|
||||
shutdown_when_empty # shut down rsyslogd when done processing messages
|
||||
wait_shutdown # and wait for it to terminate
|
||||
seq_check 0 49999 -E
|
||||
# . $srcdir/diag.sh content-check 'XXXXX' # Not really a check if it worked, but in TLS stuff in unfished TLS Packets gets lost, so we can't use seq-check.
|
||||
# content_check 'XXXXX' # Not really a check if it worked, but in TLS stuff in unfished TLS Packets gets lost, so we can't use seq-check.
|
||||
exit_test
|
||||
|
||||
@ -49,13 +49,13 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check 'quux: abc0'
|
||||
. $srcdir/diag.sh content-check 'quux: def1'
|
||||
. $srcdir/diag.sh content-check 'quux: ghi2'
|
||||
. $srcdir/diag.sh content-check 'quux: { "bar": [ { "baz": "important_msg" }, { "baz": "other_msg" } ] }'
|
||||
content_check 'quux: abc0'
|
||||
content_check 'quux: def1'
|
||||
content_check 'quux: ghi2'
|
||||
content_check 'quux: { "bar": [ { "baz": "important_msg" }, { "baz": "other_msg" } ] }'
|
||||
. $srcdir/diag.sh custom-content-check 'grault: { "baz": "important_msg" }' $RSYSLOG_DYNNAME.out.async.log
|
||||
. $srcdir/diag.sh custom-content-check 'grault: { "baz": "other_msg" }' $RSYSLOG_DYNNAME.out.async.log
|
||||
. $srcdir/diag.sh custom-content-check 'prefixed_grault: { "baz": "important_msg" }' $RSYSLOG_DYNNAME.out.prefixed.log
|
||||
. $srcdir/diag.sh custom-content-check 'prefixed_grault: { "baz": "other_msg" }' $RSYSLOG_DYNNAME.out.prefixed.log
|
||||
. $srcdir/diag.sh content-check 'garply: important_msg, other_msg'
|
||||
content_check 'garply: important_msg, other_msg'
|
||||
exit_test
|
||||
|
||||
@ -40,13 +40,13 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check 'quux: abc0'
|
||||
. $srcdir/diag.sh content-check 'quux: def1'
|
||||
. $srcdir/diag.sh content-check 'quux: ghi2'
|
||||
. $srcdir/diag.sh content-check 'quux: { "bar": [ { "baz": "important_msg" }, { "baz": "other_msg" } ] }'
|
||||
content_check 'quux: abc0'
|
||||
content_check 'quux: def1'
|
||||
content_check 'quux: ghi2'
|
||||
content_check 'quux: { "bar": [ { "baz": "important_msg" }, { "baz": "other_msg" } ] }'
|
||||
. $srcdir/diag.sh custom-content-check 'grault: { "baz": "important_msg" }' $RSYSLOG_DYNNAME.out.async.log
|
||||
. $srcdir/diag.sh custom-content-check 'grault: { "baz": "other_msg" }' $RSYSLOG_DYNNAME.out.async.log
|
||||
. $srcdir/diag.sh custom-content-check 'prefixed_grault: { "baz": "important_msg" }' $RSYSLOG_DYNNAME.out.prefixed.log
|
||||
. $srcdir/diag.sh custom-content-check 'prefixed_grault: { "baz": "other_msg" }' $RSYSLOG_DYNNAME.out.prefixed.log
|
||||
. $srcdir/diag.sh content-check 'garply: important_msg, other_msg'
|
||||
content_check 'garply: important_msg, other_msg'
|
||||
exit_test
|
||||
|
||||
@ -24,5 +24,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check 'msg: def1 | ghi2 | important_msg | { "baz": "other_msg" } | other_msg'
|
||||
content_check 'msg: def1 | ghi2 | important_msg | { "baz": "other_msg" } | other_msg'
|
||||
exit_test
|
||||
|
||||
@ -58,14 +58,14 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "str1", "value": "abc0" }'
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "str2", "value": "def1", "random_key": "str2" }'
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "str3", "value": "ghi2" }'
|
||||
content_check 'quux: { "key": "str1", "value": "abc0" }'
|
||||
content_check 'quux: { "key": "str2", "value": "def1", "random_key": "str2" }'
|
||||
content_check 'quux: { "key": "str3", "value": "ghi2" }'
|
||||
. $srcdir/diag.sh assert-content-missing 'quux: { "key": "str4", "value": "jkl3" }'
|
||||
. $srcdir/diag.sh content-check 'new: jkl3'
|
||||
content_check 'new: jkl3'
|
||||
. $srcdir/diag.sh assert-content-missing 'deleted: ghi2'
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "obj", "value": { "bar": { "k1": "important_msg", "k2": "other_msg" } } }'
|
||||
content_check 'quux: { "key": "obj", "value": { "bar": { "k1": "important_msg", "k2": "other_msg" } } }'
|
||||
. $srcdir/diag.sh custom-content-check 'corge: key: bar val: { "k1": "important_msg", "k2": "other_msg" }' $RSYSLOG_DYNNAME.out.async.log
|
||||
. $srcdir/diag.sh custom-content-check 'prefixed_corge: { "key": "bar", "value": { "k1": "important_msg", "k2": "other_msg" } }' $RSYSLOG_DYNNAME.out.prefixed.log
|
||||
. $srcdir/diag.sh content-check 'garply: k1=important_msg, k2=other_msg'
|
||||
content_check 'garply: k1=important_msg, k2=other_msg'
|
||||
exit_test
|
||||
|
||||
@ -50,14 +50,14 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "str1", "value": "abc0" }'
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "str2", "value": "def1", "random_key": "str2" }'
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "str3", "value": "ghi2" }'
|
||||
content_check 'quux: { "key": "str1", "value": "abc0" }'
|
||||
content_check 'quux: { "key": "str2", "value": "def1", "random_key": "str2" }'
|
||||
content_check 'quux: { "key": "str3", "value": "ghi2" }'
|
||||
. $srcdir/diag.sh assert-content-missing 'quux: { "key": "str4", "value": "jkl3" }'
|
||||
. $srcdir/diag.sh content-check 'new: jkl3'
|
||||
content_check 'new: jkl3'
|
||||
. $srcdir/diag.sh assert-content-missing 'deleted: ghi2'
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "obj", "value": { "bar": { "k1": "important_msg", "k2": "other_msg" } } }'
|
||||
content_check 'quux: { "key": "obj", "value": { "bar": { "k1": "important_msg", "k2": "other_msg" } } }'
|
||||
. $srcdir/diag.sh custom-content-check 'corge: key: bar val: { "k1": "important_msg", "k2": "other_msg" }' $RSYSLOG_DYNNAME.out.async.log
|
||||
. $srcdir/diag.sh custom-content-check 'prefixed_corge: { "key": "bar", "value": { "k1": "important_msg", "k2": "other_msg" } }' $RSYSLOG_DYNNAME.out.prefixed.log
|
||||
. $srcdir/diag.sh content-check 'garply: k1=important_msg, k2=other_msg'
|
||||
content_check 'garply: k1=important_msg, k2=other_msg'
|
||||
exit_test
|
||||
|
||||
@ -43,11 +43,11 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "str1", "value": "abc0" }'
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "str2", "value": "def1", "random_key": "str2" }'
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "str3", "value": "ghi2" }'
|
||||
content_check 'quux: { "key": "str1", "value": "abc0" }'
|
||||
content_check 'quux: { "key": "str2", "value": "def1", "random_key": "str2" }'
|
||||
content_check 'quux: { "key": "str3", "value": "ghi2" }'
|
||||
. $srcdir/diag.sh assert-content-missing 'quux: { "key": "str4", "value": "jkl3" }'
|
||||
. $srcdir/diag.sh content-check 'quux: { "key": "obj", "value": { "bar": { "k1": "important_msg", "k2": "other_msg" } } }'
|
||||
content_check 'quux: { "key": "obj", "value": { "bar": { "k1": "important_msg", "k2": "other_msg" } } }'
|
||||
. $srcdir/diag.sh custom-content-check 'corge: key: bar val: { "k1": "important_msg", "k2": "other_msg" }' $RSYSLOG_DYNNAME.out.async.log
|
||||
. $srcdir/diag.sh content-check "post_suicide_foo: ''"
|
||||
content_check "post_suicide_foo: ''"
|
||||
exit_test
|
||||
|
||||
@ -28,5 +28,5 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
# NOTE: conf file updates _aBc to "7"
|
||||
. $srcdir/diag.sh content-check "abc:1 ABC:2 aBc:3 _abc:4 _ABC:5 _aBc:7"
|
||||
content_check "abc:1 ABC:2 aBc:3 _abc:4 _ABC:5 _aBc:7"
|
||||
exit_test
|
||||
|
||||
@ -34,5 +34,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "json prop:abc local prop:def global prop:ghi"
|
||||
content_check "json prop:abc local prop:def global prop:ghi"
|
||||
exit_test
|
||||
|
||||
@ -27,5 +27,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check 'cee:'
|
||||
content_check 'cee:'
|
||||
exit_test
|
||||
|
||||
@ -25,17 +25,17 @@ cp -f $srcdir/testsuites/xlate.lkp_tbl xlate.lkp_tbl
|
||||
startup_vg
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: bar_new"
|
||||
content_check "msgnum:00000002: baz"
|
||||
cp -f $srcdir/testsuites/xlate_more_with_duplicates_and_nomatch.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -45,14 +45,14 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000005: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000006: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000007: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000008: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000009: quux"
|
||||
content_check "msgnum:00000000: foo_latest"
|
||||
content_check "msgnum:00000001: quux"
|
||||
content_check "msgnum:00000002: baz_latest"
|
||||
content_check "msgnum:00000003: foo_latest"
|
||||
content_check "msgnum:00000004: foo_latest"
|
||||
content_check "msgnum:00000005: baz_latest"
|
||||
content_check "msgnum:00000006: foo_latest"
|
||||
content_check "msgnum:00000007: baz_latest"
|
||||
content_check "msgnum:00000008: baz_latest"
|
||||
content_check "msgnum:00000009: quux"
|
||||
exit_test
|
||||
|
||||
@ -25,17 +25,17 @@ cp -f $srcdir/testsuites/xlate.lkp_tbl xlate.lkp_tbl
|
||||
startup
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: bar_new"
|
||||
content_check "msgnum:00000002: baz"
|
||||
cp -f $srcdir/testsuites/xlate_more_with_duplicates_and_nomatch.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -44,14 +44,14 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000005: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000006: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000007: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000008: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000009: quux"
|
||||
content_check "msgnum:00000000: foo_latest"
|
||||
content_check "msgnum:00000001: quux"
|
||||
content_check "msgnum:00000002: baz_latest"
|
||||
content_check "msgnum:00000003: foo_latest"
|
||||
content_check "msgnum:00000004: foo_latest"
|
||||
content_check "msgnum:00000005: baz_latest"
|
||||
content_check "msgnum:00000006: foo_latest"
|
||||
content_check "msgnum:00000007: baz_latest"
|
||||
content_check "msgnum:00000008: baz_latest"
|
||||
content_check "msgnum:00000009: quux"
|
||||
exit_test
|
||||
|
||||
@ -141,8 +141,8 @@ cp -f $srcdir/testsuites/xlate_string_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 2
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: baz_str"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: baz_str"
|
||||
content_check "msgnum:00000000: baz_str"
|
||||
content_check "msgnum:00000001: baz_str"
|
||||
|
||||
echo "array-table with empty table..."
|
||||
cp -f $srcdir/testsuites/xlate_array_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
@ -150,8 +150,8 @@ cp -f $srcdir/testsuites/xlate_array_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 2
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: baz_arr"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: baz_arr"
|
||||
content_check "msgnum:00000000: baz_arr"
|
||||
content_check "msgnum:00000001: baz_arr"
|
||||
|
||||
echo "sparse-array-table with empty table..."
|
||||
cp -f $srcdir/testsuites/xlate_sparseArray_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
@ -159,8 +159,8 @@ cp -f $srcdir/testsuites/xlate_sparseArray_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 2
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: baz_sparse_arr"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: baz_sparse_arr"
|
||||
content_check "msgnum:00000000: baz_sparse_arr"
|
||||
content_check "msgnum:00000001: baz_sparse_arr"
|
||||
|
||||
echo doing shutdown
|
||||
shutdown_when_empty
|
||||
|
||||
@ -141,8 +141,8 @@ cp -f $srcdir/testsuites/xlate_string_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 2
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: baz_str"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: baz_str"
|
||||
content_check "msgnum:00000000: baz_str"
|
||||
content_check "msgnum:00000001: baz_str"
|
||||
|
||||
echo "array-table with empty table..."
|
||||
cp -f $srcdir/testsuites/xlate_array_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
@ -150,8 +150,8 @@ cp -f $srcdir/testsuites/xlate_array_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 2
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: baz_arr"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: baz_arr"
|
||||
content_check "msgnum:00000000: baz_arr"
|
||||
content_check "msgnum:00000001: baz_arr"
|
||||
|
||||
echo "sparse-array-table with empty table..."
|
||||
cp -f $srcdir/testsuites/xlate_sparseArray_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
@ -159,8 +159,8 @@ cp -f $srcdir/testsuites/xlate_sparseArray_empty_table.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 2
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: baz_sparse_arr"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: baz_sparse_arr"
|
||||
content_check "msgnum:00000000: baz_sparse_arr"
|
||||
content_check "msgnum:00000001: baz_sparse_arr"
|
||||
|
||||
echo doing shutdown
|
||||
shutdown_when_empty
|
||||
|
||||
@ -25,8 +25,8 @@ cp -f $srcdir/testsuites/xlate.lkp_tbl xlate.lkp_tbl
|
||||
startup_vg
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
|
||||
@ -25,8 +25,8 @@ cp -f $srcdir/testsuites/xlate.lkp_tbl xlate.lkp_tbl
|
||||
startup
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
|
||||
@ -32,16 +32,16 @@ cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more_with_duplicates_and_nomatch.lkp_tbl xlate.lkp_tbl
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: bar_new"
|
||||
content_check "msgnum:00000002: baz"
|
||||
rm -f xlate.lkp_tbl # this should lead to unsuccessful reload
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -52,10 +52,10 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: reload_failed"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: reload_failed"
|
||||
content_check "msgnum:00000000: foo_latest"
|
||||
content_check "msgnum:00000001: quux"
|
||||
content_check "msgnum:00000002: baz_latest"
|
||||
content_check "msgnum:00000000: reload_failed"
|
||||
content_check "msgnum:00000000: reload_failed"
|
||||
|
||||
exit_test
|
||||
|
||||
@ -32,16 +32,16 @@ cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more_with_duplicates_and_nomatch.lkp_tbl xlate.lkp_tbl
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: bar_new"
|
||||
content_check "msgnum:00000002: baz"
|
||||
rm -f xlate.lkp_tbl # this should lead to unsuccessful reload
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -51,10 +51,10 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: reload_failed"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: reload_failed"
|
||||
content_check "msgnum:00000000: foo_latest"
|
||||
content_check "msgnum:00000001: quux"
|
||||
content_check "msgnum:00000002: baz_latest"
|
||||
content_check "msgnum:00000000: reload_failed"
|
||||
content_check "msgnum:00000000: reload_failed"
|
||||
|
||||
exit_test
|
||||
|
||||
@ -32,16 +32,16 @@ cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more_with_duplicates_and_nomatch.lkp_tbl xlate.lkp_tbl
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: bar_new"
|
||||
content_check "msgnum:00000002: baz"
|
||||
rm -f xlate.lkp_tbl # this should lead to unsuccessful reload
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -52,8 +52,8 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check-with-count "msgnum:00000000: foo_latest" 2
|
||||
. $srcdir/diag.sh content-check-with-count "msgnum:00000001: quux" 2
|
||||
. $srcdir/diag.sh content-check-with-count "msgnum:00000002: baz_latest" 1
|
||||
content_check_with_count "msgnum:00000000: foo_latest" 2
|
||||
content_check_with_count "msgnum:00000001: quux" 2
|
||||
content_check_with_count "msgnum:00000002: baz_latest" 1
|
||||
|
||||
exit_test
|
||||
|
||||
@ -32,16 +32,16 @@ cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_old"
|
||||
content_check "msgnum:00000000: foo_old"
|
||||
content_check "msgnum:00000001: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more_with_duplicates_and_nomatch.lkp_tbl xlate.lkp_tbl
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: bar_new"
|
||||
content_check "msgnum:00000002: baz"
|
||||
rm -f xlate.lkp_tbl # this should lead to unsuccessful reload
|
||||
injectmsg 0 3
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -51,8 +51,8 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check-with-count "msgnum:00000000: foo_latest" 2
|
||||
. $srcdir/diag.sh content-check-with-count "msgnum:00000001: quux" 2
|
||||
. $srcdir/diag.sh content-check-with-count "msgnum:00000002: baz_latest" 1
|
||||
content_check_with_count "msgnum:00000000: foo_latest" 2
|
||||
content_check_with_count "msgnum:00000001: quux" 2
|
||||
content_check_with_count "msgnum:00000002: baz_latest" 1
|
||||
|
||||
exit_test
|
||||
|
||||
@ -19,5 +19,5 @@ startup
|
||||
tcpflood -m 1 -j "202.106.0.20\ "
|
||||
shutdown_when_empty
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check '{ "city_name": "Beijing" }'
|
||||
content_check '{ "city_name": "Beijing" }'
|
||||
exit_test
|
||||
|
||||
@ -19,5 +19,5 @@ startup
|
||||
tcpflood -m 1 -j "202.106.0.20\ "
|
||||
shutdown_when_empty
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check '{ "city": "Beijing" }'
|
||||
content_check '{ "city": "Beijing" }'
|
||||
exit_test
|
||||
|
||||
@ -28,5 +28,5 @@ tcpflood -m 100 -j "202.106.0.20\ "
|
||||
shutdown_when_empty
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check '{ "city_name": "Beijing" }'
|
||||
content_check '{ "city_name": "Beijing" }'
|
||||
exit_test
|
||||
|
||||
@ -25,5 +25,5 @@ tcpflood -m 100 -j "202.106.0.20\ "
|
||||
shutdown_when_empty
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check '{ "city": "Beijing" }'
|
||||
content_check '{ "city": "Beijing" }'
|
||||
exit_test
|
||||
|
||||
@ -25,5 +25,5 @@ startup
|
||||
tcpflood -m 1 -j "202.106.0.20\ "
|
||||
shutdown_when_empty
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check '{ "city": "Beijing" }'
|
||||
content_check '{ "city": "Beijing" }'
|
||||
exit_test
|
||||
|
||||
@ -24,5 +24,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check 'host and port list: 192.168.1.2:80, 192.168.1.3, 192.168.1.4:443, 192.168.1.5'
|
||||
content_check 'host and port list: 192.168.1.2:80, 192.168.1.3, 192.168.1.4:443, 192.168.1.5'
|
||||
exit_test
|
||||
|
||||
@ -38,9 +38,9 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
cp $RSYSLOG_OUT_LOG /tmp/
|
||||
. $srcdir/diag.sh content-check '[ "10.20.30.40", "50.60.70.80", "90.100.110.120", "130.140.150.160" ]'
|
||||
. $srcdir/diag.sh content-check '[ "192.168.1.2", "192.168.1.3", "192.168.1.4" ]'
|
||||
. $srcdir/diag.sh content-check '[ "10.20.30.40", "50.60.70.80", "190.200.210.220" ]'
|
||||
. $srcdir/diag.sh content-check '[ "\/bin", "\/usr\/local\/bin", "\/usr\/bin" ] foo'
|
||||
. $srcdir/diag.sh content-check '[ [ [ "10" ] ], [ [ "20" ], [ "30", "40", "50" ], [ "60", "70", "80" ] ], [ [ "90" ], [ "100" ] ] ]'
|
||||
content_check '[ "10.20.30.40", "50.60.70.80", "90.100.110.120", "130.140.150.160" ]'
|
||||
content_check '[ "192.168.1.2", "192.168.1.3", "192.168.1.4" ]'
|
||||
content_check '[ "10.20.30.40", "50.60.70.80", "190.200.210.220" ]'
|
||||
content_check '[ "\/bin", "\/usr\/local\/bin", "\/usr\/bin" ] foo'
|
||||
content_check '[ [ [ "10" ] ], [ [ "20" ], [ "30", "40", "50" ], [ "60", "70", "80" ] ], [ [ "90" ], [ "100" ] ] ]'
|
||||
exit_test
|
||||
|
||||
@ -27,5 +27,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "h:13 m:20 s:18"
|
||||
content_check "h:13 m:20 s:18"
|
||||
exit_test
|
||||
|
||||
@ -29,5 +29,5 @@ wait_startup
|
||||
tcpflood -m100 -M "\"<161>1 2003-03-01T01:00:00.000Z mymachine.example.com tcpflood - tag [tcpflood@32473 eventID=\\\"1011\\\"] valid structured data\""
|
||||
shutdown_when_empty
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check-with-count eventID 100
|
||||
content_check_with_count eventID 100
|
||||
exit_test
|
||||
|
||||
@ -28,17 +28,17 @@ cp -f $srcdir/testsuites/xlate.lkp_tbl xlate_1.lkp_tbl
|
||||
startup_vg
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: 0_foo_old 1_foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: 0_bar_old 1_bar_old"
|
||||
content_check "msgnum:00000000: 0_foo_old 1_foo_old"
|
||||
content_check "msgnum:00000001: 0_bar_old 1_bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: 0_foo_new 1_foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: 0_bar_new 1_bar_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: 0_baz"
|
||||
content_check "msgnum:00000000: 0_foo_new 1_foo_old"
|
||||
content_check "msgnum:00000001: 0_bar_new 1_bar_old"
|
||||
content_check "msgnum:00000002: 0_baz"
|
||||
. $srcdir/diag.sh assert-content-missing "1_baz"
|
||||
cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate_1.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
@ -49,7 +49,7 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: 0_foo_new 1_foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: 0_bar_new 1_bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: 0_baz 1_baz"
|
||||
content_check "msgnum:00000000: 0_foo_new 1_foo_new"
|
||||
content_check "msgnum:00000001: 0_bar_new 1_bar_new"
|
||||
content_check "msgnum:00000002: 0_baz 1_baz"
|
||||
exit_test
|
||||
|
||||
@ -28,17 +28,17 @@ cp -f $srcdir/testsuites/xlate.lkp_tbl xlate_1.lkp_tbl
|
||||
startup
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: 0_foo_old 1_foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: 0_bar_old 1_bar_old"
|
||||
content_check "msgnum:00000000: 0_foo_old 1_foo_old"
|
||||
content_check "msgnum:00000001: 0_bar_old 1_bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 3
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: 0_foo_new 1_foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: 0_bar_new 1_bar_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: 0_baz"
|
||||
content_check "msgnum:00000000: 0_foo_new 1_foo_old"
|
||||
content_check "msgnum:00000001: 0_bar_new 1_bar_old"
|
||||
content_check "msgnum:00000002: 0_baz"
|
||||
. $srcdir/diag.sh assert-content-missing "1_baz"
|
||||
cp -f $srcdir/testsuites/xlate_more.lkp_tbl xlate_1.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
@ -48,7 +48,7 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: 0_foo_new 1_foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: 0_bar_new 1_bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: 0_baz 1_baz"
|
||||
content_check "msgnum:00000000: 0_foo_new 1_foo_new"
|
||||
content_check "msgnum:00000001: 0_bar_new 1_bar_new"
|
||||
content_check "msgnum:00000002: 0_baz 1_baz"
|
||||
exit_test
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
# lines in line-buffered mode. In this test, the 'stdbuf' utility of GNU
|
||||
# Coreutils is used to force line buffering in a Python program (see
|
||||
# 'omprog-output-capture-mt-bin.py' for alternatives).
|
||||
|
||||
. $srcdir/diag.sh init
|
||||
uname
|
||||
if [ `uname` = "SunOS" ] ; then
|
||||
echo "This test currently does not work on all flavors of Solaris (problems with Python?)."
|
||||
@ -26,7 +26,6 @@ fi
|
||||
|
||||
export command_line="/usr/bin/stdbuf -oL -eL $srcdir/testsuites/omprog-output-capture-mt-bin.py $LINE_LENGTH"
|
||||
|
||||
. $srcdir/diag.sh init
|
||||
. $srcdir/diag.sh check-command-available stdbuf
|
||||
generate_conf
|
||||
add_conf '
|
||||
|
||||
@ -23,7 +23,7 @@ template(name="outfmt" type="string" string="%msg%\n")
|
||||
}
|
||||
'
|
||||
startup_vg
|
||||
. $srcdir/diag.sh injectmsg 0 10
|
||||
injectmsg 0 10
|
||||
shutdown_when_empty
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
|
||||
# This test tests the 'output' setting of omprog when the feedback
|
||||
# feature is not used (confirmMessages=off).
|
||||
|
||||
. $srcdir/diag.sh init
|
||||
generate_conf
|
||||
add_conf '
|
||||
@ -23,7 +22,7 @@ template(name="outfmt" type="string" string="%msg%\n")
|
||||
}
|
||||
'
|
||||
startup
|
||||
. $srcdir/diag.sh injectmsg 0 10
|
||||
injectmsg 0 10
|
||||
shutdown_when_empty
|
||||
wait_shutdown
|
||||
|
||||
|
||||
@ -14,6 +14,6 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check 'HELLO WORLD'
|
||||
content_check 'HELLO WORLD'
|
||||
cat $RSYSLOG_OUT_LOG
|
||||
exit_test
|
||||
|
||||
@ -21,5 +21,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "*Number is 19597*"
|
||||
content_check "*Number is 19597*"
|
||||
exit_test
|
||||
|
||||
@ -22,5 +22,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "*Matched*"
|
||||
content_check "*Matched*"
|
||||
exit_test
|
||||
|
||||
@ -25,5 +25,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "date time: Thu 0ct0ber 30 13:20:18 IST 2014"
|
||||
content_check "date time: Thu 0ct0ber 30 13:20:18 IST 2014"
|
||||
exit_test
|
||||
|
||||
@ -24,8 +24,8 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "try to replace rsyslog and syrsyslog with rrsyslog"
|
||||
. $srcdir/diag.sh content-check "try to replace hello_world in hello_worldlo and helhello_world with hello_world_world"
|
||||
. $srcdir/diag.sh content-check "try to FBB in FBB_quux and quux_FBB with FBB"
|
||||
. $srcdir/diag.sh content-check "in the end of msg; try to not lose as_longer_this_string_as_more_probability_to_catch_the_bu"
|
||||
content_check "try to replace rsyslog and syrsyslog with rrsyslog"
|
||||
content_check "try to replace hello_world in hello_worldlo and helhello_world with hello_world_world"
|
||||
content_check "try to FBB in FBB_quux and quux_FBB with FBB"
|
||||
content_check "in the end of msg; try to not lose as_longer_this_string_as_more_probability_to_catch_the_bu"
|
||||
exit_test
|
||||
|
||||
@ -21,5 +21,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "**foo says at Thu Oct 30 13:20:18 IST 2014 random number is 19597**"
|
||||
content_check "**foo says at Thu Oct 30 13:20:18 IST 2014 random number is 19597**"
|
||||
exit_test
|
||||
|
||||
@ -21,5 +21,5 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "bcdefbcfoo says a abcESCdefb has ESCbcdefbc"
|
||||
content_check "bcdefbcfoo says a abcESCdefb has ESCbcdefbc"
|
||||
exit_test
|
||||
|
||||
@ -141,7 +141,7 @@ wait_shutdown
|
||||
|
||||
# Do the final sequence check
|
||||
seq_check 1 $TESTMESSAGES -d
|
||||
. $srcdir/diag.sh content-check-with-count "000" $TESTMESSAGESFULL
|
||||
content_check_with_count "000" $TESTMESSAGESFULL
|
||||
|
||||
echo \[sndrcv_kafka.sh\]: delete kafka topics
|
||||
. $srcdir/diag.sh delete-kafka-topic 'static1' '.dep_wrk' '22181'
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
# added 2013-12-10 by Rgerhards
|
||||
# testing sending and receiving via relp with TLS enabled
|
||||
# This file is part of the rsyslog project, released under ASL 2.0
|
||||
echo ===============================================================================
|
||||
echo \[sndrcv_relp_tls.sh\]: testing sending and receiving via relp with TLS enabled
|
||||
# uncomment for debugging support:
|
||||
. $srcdir/diag.sh init
|
||||
# start up the instances
|
||||
|
||||
@ -30,22 +30,22 @@ wait_queueempty
|
||||
. $srcdir/diag.sh assert-content-missing "foo"
|
||||
injectmsg 0 5
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: bar_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: bar_old"
|
||||
content_check "msgnum:00000001: foo_old"
|
||||
content_check "msgnum:00000002: foo_old"
|
||||
content_check "msgnum:00000003: bar_old"
|
||||
content_check "msgnum:00000004: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_sparse_array_more.lkp_tbl xlate_array.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 6
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: baz"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000005: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: foo_new"
|
||||
content_check "msgnum:00000002: bar_new"
|
||||
content_check "msgnum:00000003: bar_new"
|
||||
content_check "msgnum:00000004: baz"
|
||||
content_check "msgnum:00000005: baz"
|
||||
cp -f $srcdir/testsuites/xlate_sparse_array_more_with_duplicates_and_nomatch.lkp_tbl xlate_array.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -55,19 +55,19 @@ shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000005: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000006: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000007: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000008: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000009: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000010: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000011: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000012: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000013: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000014: foo_latest"
|
||||
content_check "msgnum:00000000: quux"
|
||||
content_check "msgnum:00000001: quux"
|
||||
content_check "msgnum:00000002: foo_latest"
|
||||
content_check "msgnum:00000003: baz_latest"
|
||||
content_check "msgnum:00000004: foo_latest"
|
||||
content_check "msgnum:00000005: foo_latest"
|
||||
content_check "msgnum:00000006: foo_latest"
|
||||
content_check "msgnum:00000007: foo_latest"
|
||||
content_check "msgnum:00000008: baz_latest"
|
||||
content_check "msgnum:00000009: baz_latest"
|
||||
content_check "msgnum:00000010: baz_latest"
|
||||
content_check "msgnum:00000011: baz_latest"
|
||||
content_check "msgnum:00000012: foo_latest"
|
||||
content_check "msgnum:00000013: foo_latest"
|
||||
content_check "msgnum:00000014: foo_latest"
|
||||
exit_test
|
||||
|
||||
@ -30,22 +30,22 @@ wait_queueempty
|
||||
. $srcdir/diag.sh assert-content-missing "foo"
|
||||
injectmsg 0 5
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: foo_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: bar_old"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: bar_old"
|
||||
content_check "msgnum:00000001: foo_old"
|
||||
content_check "msgnum:00000002: foo_old"
|
||||
content_check "msgnum:00000003: bar_old"
|
||||
content_check "msgnum:00000004: bar_old"
|
||||
. $srcdir/diag.sh assert-content-missing "baz"
|
||||
cp -f $srcdir/testsuites/xlate_sparse_array_more.lkp_tbl xlate_array.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
injectmsg 0 6
|
||||
wait_queueempty
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: foo_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: bar_new"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: baz"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000005: baz"
|
||||
content_check "msgnum:00000000: foo_new"
|
||||
content_check "msgnum:00000001: foo_new"
|
||||
content_check "msgnum:00000002: bar_new"
|
||||
content_check "msgnum:00000003: bar_new"
|
||||
content_check "msgnum:00000004: baz"
|
||||
content_check "msgnum:00000005: baz"
|
||||
cp -f $srcdir/testsuites/xlate_sparse_array_more_with_duplicates_and_nomatch.lkp_tbl xlate_array.lkp_tbl
|
||||
. $srcdir/diag.sh issue-HUP
|
||||
. $srcdir/diag.sh await-lookup-table-reload
|
||||
@ -54,19 +54,19 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000001: quux"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000002: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000003: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000004: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000005: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000006: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000007: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000008: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000009: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000010: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000011: baz_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000012: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000013: foo_latest"
|
||||
. $srcdir/diag.sh content-check "msgnum:00000014: foo_latest"
|
||||
content_check "msgnum:00000000: quux"
|
||||
content_check "msgnum:00000001: quux"
|
||||
content_check "msgnum:00000002: foo_latest"
|
||||
content_check "msgnum:00000003: baz_latest"
|
||||
content_check "msgnum:00000004: foo_latest"
|
||||
content_check "msgnum:00000005: foo_latest"
|
||||
content_check "msgnum:00000006: foo_latest"
|
||||
content_check "msgnum:00000007: foo_latest"
|
||||
content_check "msgnum:00000008: baz_latest"
|
||||
content_check "msgnum:00000009: baz_latest"
|
||||
content_check "msgnum:00000010: baz_latest"
|
||||
content_check "msgnum:00000011: baz_latest"
|
||||
content_check "msgnum:00000012: foo_latest"
|
||||
content_check "msgnum:00000013: foo_latest"
|
||||
content_check "msgnum:00000014: foo_latest"
|
||||
exit_test
|
||||
|
||||
@ -25,7 +25,7 @@ echo doing shutdown
|
||||
shutdown_when_empty
|
||||
echo wait on shutdown
|
||||
wait_shutdown
|
||||
. $srcdir/diag.sh content-check '"abc0"'
|
||||
. $srcdir/diag.sh content-check '"abc2"'
|
||||
content_check '"abc0"'
|
||||
content_check '"abc2"'
|
||||
. $srcdir/diag.sh assert-content-missing 'xyz0'
|
||||
exit_test
|
||||
|
||||
@ -25,7 +25,7 @@ injectmsg 0 1
|
||||
shutdown_when_empty
|
||||
wait_shutdown_vg
|
||||
. $srcdir/diag.sh check_exit_vg
|
||||
. $srcdir/diag.sh content-check "msgnum:00000000:"
|
||||
content_check "msgnum:00000000:"
|
||||
exit_test
|
||||
|
||||
# the test actually expects clean destruction of lookup_table
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user