diff options
Diffstat (limited to 'debian/tests')
-rw-r--r-- | debian/tests/control | 7 | ||||
-rwxr-xr-x | debian/tests/pacemaker | 19 | ||||
-rwxr-xr-x | debian/tests/pkg-config | 10 |
3 files changed, 36 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..29df4dc --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,7 @@ +Tests: pacemaker +Depends: pacemaker, pacemaker-cli-utils +Restrictions: needs-root, isolation-container, skippable + +Tests: pkg-config +Depends: pacemaker-dev, pkg-config +Restrictions: superficial diff --git a/debian/tests/pacemaker b/debian/tests/pacemaker new file mode 100755 index 0000000..04354f2 --- /dev/null +++ b/debian/tests/pacemaker @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +OUTPUT="${AUTOPKGTEST_ARTIFACTS:-.}/crm_mon.txt" + +journalctl -u corosync | fgrep 'knet_handle_new failed: File name too long' && { + journalctl -u corosync + echo 'This is expected in unprivileged containers, skipping the test.' + echo 'Avoid by sysctl -w net.core.{r,w}mem_max=8388608 (KNET_RING_RCVBUFF) before dropping privileges.' + exit 77 +} + +# Wait more than dc-deadtime (20s by default) +sleep 25 + +crm_mon -1 >"$OUTPUT" +cat "$OUTPUT" +fgrep -q "Online: [ node1 ]" "$OUTPUT" diff --git a/debian/tests/pkg-config b/debian/tests/pkg-config new file mode 100755 index 0000000..771a9e7 --- /dev/null +++ b/debian/tests/pkg-config @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +status=0 +for file in $(dpkg -L pacemaker-dev | grep \\.pc); do + pkg-config --print-errors "$(basename $file .pc)" || status=1 +done + +exit "$status" |