summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-16 15:53:45 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-16 15:53:45 +0100
commit4a80242ffcfa93348453ff716f7f1abda417a416 (patch)
tree5a8f92777d557be5670b79ded40b19ccdc861cc7 /tests
parent2fc70320e303fd02b29469416a709a1f8ee4374d (diff)
downloadrsyslog-4a80242ffcfa93348453ff716f7f1abda417a416.tar.gz
rsyslog-4a80242ffcfa93348453ff716f7f1abda417a416.tar.xz
rsyslog-4a80242ffcfa93348453ff716f7f1abda417a416.zip
added some more valgrind-based tests
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am8
-rwxr-xr-xtests/failover-basic-vg.sh13
-rwxr-xr-xtests/failover-no-basic-vg.sh20
-rwxr-xr-xtests/failover-no-rptd-vg.sh20
-rwxr-xr-xtests/failover-rptd-vg.sh13
5 files changed, 74 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c1818f36..ebbe0cf6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -65,6 +65,10 @@ if HAVE_VALGRIND
TESTS += \
discard-rptdmsg-vg.sh \
discard-allmark-vg.sh \
+ failover-basic-vg.sh \
+ failover-rptd-vg.sh \
+ failover-no-basic-vg.sh \
+ failover-no-rptd-vg.sh \
tcp-msgreduc-vg.sh
endif
@@ -265,12 +269,16 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
discard.sh \
testsuites/discard.conf \
failover-no-rptd.sh \
+ failover-no-rptd-vg.sh \
testsuites/failover-no-rptd.conf \
failover-no-basic.sh \
+ failover-no-basic-vg.sh \
testsuites/failover-no-basic.conf \
failover-rptd.sh \
+ failover-rptd-vg.sh \
testsuites/failover-rptd.conf \
failover-basic.sh \
+ failover-basic-vg.sh \
testsuites/failover-basic.conf \
discard-rptdmsg.sh \
discard-rptdmsg-vg.sh \
diff --git a/tests/failover-basic-vg.sh b/tests/failover-basic-vg.sh
new file mode 100755
index 00000000..0eb77caa
--- /dev/null
+++ b/tests/failover-basic-vg.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-basic.sh\]: basic test for failover functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg failover-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/failover-no-basic-vg.sh b/tests/failover-no-basic-vg.sh
new file mode 100755
index 00000000..266163d4
--- /dev/null
+++ b/tests/failover-no-basic-vg.sh
@@ -0,0 +1,20 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-no-basic.sh\]: basic test for failover functionality - no failover
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg failover-no-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+# now we need our custom logic to see if the result file is empty
+# (what it should be!)
+cmp rsyslog.out.log /dev/null
+if [ $? -eq 1 ]
+then
+ echo "ERROR, output file not empty"
+ exit 1
+fi
+source $srcdir/diag.sh exit
diff --git a/tests/failover-no-rptd-vg.sh b/tests/failover-no-rptd-vg.sh
new file mode 100755
index 00000000..3b77a0a4
--- /dev/null
+++ b/tests/failover-no-rptd-vg.sh
@@ -0,0 +1,20 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-no-rptd.sh\]: rptd test for failover functionality - no failover
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg failover-no-rptd.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+# now we need our custom logic to see if the result file is empty
+# (what it should be!)
+cmp rsyslog.out.log /dev/null
+if [ $? -eq 1 ]
+then
+ echo "ERROR, output file not empty"
+ exit 1
+fi
+source $srcdir/diag.sh exit
diff --git a/tests/failover-rptd-vg.sh b/tests/failover-rptd-vg.sh
new file mode 100755
index 00000000..d208003b
--- /dev/null
+++ b/tests/failover-rptd-vg.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-rptd.sh\]: rptd test for failover functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg failover-rptd.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit