[ABRT PATCH] testsuite: added test for abrt-harvest-vmcore
Petr Kubat
pkubat at redhat.com
Thu Aug 8 14:37:46 UTC 2013
Signed-off-by: Petr Kubat <pkubat at redhat.com>
---
tests/runtests/aux/test_order | 1 +
tests/runtests/aux/test_order.rhel7 | 1 +
tests/runtests/kernel-vmcore-harvest/PURPOSE | 3 ++
tests/runtests/kernel-vmcore-harvest/runtest.sh | 61 +++++++++++++++++++++++++
4 files changed, 66 insertions(+)
create mode 100644 tests/runtests/kernel-vmcore-harvest/PURPOSE
create mode 100755 tests/runtests/kernel-vmcore-harvest/runtest.sh
diff --git a/tests/runtests/aux/test_order b/tests/runtests/aux/test_order
index 8c1880e..fd7a4c7 100644
--- a/tests/runtests/aux/test_order
+++ b/tests/runtests/aux/test_order
@@ -33,6 +33,7 @@ dbus-elements-handling
bodhi
oops-processing
abrt-python
+kernel-vmcore-harvest
# - reporting tests
bugzilla-bt-reattach
diff --git a/tests/runtests/aux/test_order.rhel7 b/tests/runtests/aux/test_order.rhel7
index 4d6ccb0..283ea55 100644
--- a/tests/runtests/aux/test_order.rhel7
+++ b/tests/runtests/aux/test_order.rhel7
@@ -33,6 +33,7 @@ dbus-elements-handling
#bodhi
oops-processing
abrt-python
+kernel-vmcore-harvest
# - reporting tests
bugzilla-bt-reattach
diff --git a/tests/runtests/kernel-vmcore-harvest/PURPOSE b/tests/runtests/kernel-vmcore-harvest/PURPOSE
new file mode 100644
index 0000000..378259a
--- /dev/null
+++ b/tests/runtests/kernel-vmcore-harvest/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of kernel-vmcore-harvest
+Description: Tests moving kernel core dumps at startup
+Author: Petr Kubat <pkubat at redhat.com>
diff --git a/tests/runtests/kernel-vmcore-harvest/runtest.sh b/tests/runtests/kernel-vmcore-harvest/runtest.sh
new file mode 100755
index 0000000..cbc029b
--- /dev/null
+++ b/tests/runtests/kernel-vmcore-harvest/runtest.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# runtest.sh of kernel-vmcore-harvest
+# Description: Tests moving kernel core dumps at startup
+# Author: Petr Kubat <pkubat at redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see http://www.gnu.org/licenses/.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+. /usr/share/beakerlib/beakerlib.sh
+. ../aux/lib.sh
+
+TEST="kernel-vmcore-harvest"
+PACKAGE="abrt"
+REQUIRED_FILES="analyzer architecture component
+last_occurrence os_info os_release time type uid uuid vmcore"
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlShowRunningKernel
+ load_abrt_conf
+ rlPhaseEnd
+
+ rlPhaseStartTest
+ rlRun "mkdir /var/crash/test" 0 "Creating vmcore dir"
+ rlRun "echo testing > /var/crash/test/vmcore" 0 "Creating vmcore"
+ rlLogInfo "Restarting abrtd"
+ systemctl restart abrtd.service
+ rlLogInfo "Wait 1s for abrtd to finish checking vmcores"
+ sleep 1s
+ rlAssertExists "${ABRT_CONF_DUMP_LOCATION}/vmcore-test"
+ rlAssertExists "${ABRT_CONF_DUMP_LOCATION}/vmcore-test/analyzer"
+ for f in $REQUIRED_FILES; do
+ rlAssertExists "${ABRT_CONF_DUMP_LOCATION}/vmcore-test/$f"
+ done
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlRun "rm -rf /var/crash/test" 0 "Removing vmcore from /var/crash/"
+ rlRun "rm -rf ${ABRT_CONF_DUMP_LOCATION}/vmcore-test" 0 "Removing vmcore from the abrt dump location"
+ rlPhaseEnd
+ rlJournalPrintText
+rlJournalEnd
--
1.8.3.1
More information about the Crash-catcher
mailing list