diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-20 14:31:35 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-20 14:31:35 +0100 |
commit | 4a857f4629d5ca4ff4c59875bc798e70b1811ba9 (patch) | |
tree | d5ed999b663d9411fc163b5ff5669ac140a104c2 /tests | |
parent | 9c25e344f2734c7f82fdad43c2fd88e91b27c315 (diff) | |
download | rsyslog-4a857f4629d5ca4ff4c59875bc798e70b1811ba9.tar.gz rsyslog-4a857f4629d5ca4ff4c59875bc798e70b1811ba9.tar.bz2 rsyslog-4a857f4629d5ca4ff4c59875bc798e70b1811ba9.zip |
improve $IncludeConfig error messages
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/incltest_dir_empty_wildcard.sh | 13 | ||||
-rw-r--r-- | tests/testsuites/incltest_dir_empty_wildcard.conf | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/incltest_dir_empty_wildcard.sh b/tests/incltest_dir_empty_wildcard.sh new file mode 100755 index 00000000..6cdb3b21 --- /dev/null +++ b/tests/incltest_dir_empty_wildcard.sh @@ -0,0 +1,13 @@ +# This test checks if an empty includeConfig directory causes problems. It +# should not, as this is a valid situation that by default exists on many +# distros. +echo =============================================================================== +echo \[incltest_dir_empty_wildcard.sh\]: test $IncludeConfig for \"empty\" wildcard +source $srcdir/diag.sh init +source $srcdir/diag.sh startup incltest_dir_empty_wildcard.conf +# 100 messages are enough - the question is if the include is read ;) +source $srcdir/diag.sh injectmsg 0 100 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh wait-shutdown +source $srcdir/diag.sh seq-check 0 99 +source $srcdir/diag.sh exit diff --git a/tests/testsuites/incltest_dir_empty_wildcard.conf b/tests/testsuites/incltest_dir_empty_wildcard.conf new file mode 100644 index 00000000..5e750c5b --- /dev/null +++ b/tests/testsuites/incltest_dir_empty_wildcard.conf @@ -0,0 +1,11 @@ +# see .sh file for description +# rgerhards, 2009-11-30 +$IncludeConfig diag-common.conf + +# the following include leads to no files actually being included +# but MUST NOT abort rsyslog's startup sequence. No files matching +# the wildcard is valid (as long as the path exists)! +$IncludeConfig testsuites/incltest.d/*.conf-not-there + +$template outfmt,"%msg:F,58:2%\n" +:msg, contains, "msgnum:" ./rsyslog.out.log;outfmt |