summaryrefslogtreecommitdiffstats
path: root/debian/tests/stonith-suicide
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests/stonith-suicide')
-rwxr-xr-xdebian/tests/stonith-suicide22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/tests/stonith-suicide b/debian/tests/stonith-suicide
new file mode 100755
index 0000000..616d362
--- /dev/null
+++ b/debian/tests/stonith-suicide
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if [ "$AUTOPKGTEST_REBOOT_MARK" = fenced ]; then
+ echo "fence was successfull"
+ exit 0
+fi
+
+echo "=== list ==="
+stonith -L
+
+printf "\n=== metadata ===\n"
+stonith -t suicide -m
+
+printf "\n=== status ===\n"
+stonith -d -t suicide -S -l 2>&1
+
+printf "\n=== reset ===\n"
+/tmp/autopkgtest-reboot-prepare fenced
+sync
+stonith -d -t suicide -T reset $(hostname)