fence-agents: master - testing: fence_zvm agent is tested for working delay function

Marek GrĂ¡c marx at fedoraproject.org
Wed May 21 13:38:18 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=1d1838f4d8da8a59a9b7ad29030b3d69bc4ac07d
Commit:        1d1838f4d8da8a59a9b7ad29030b3d69bc4ac07d
Parent:        260bc9c02dd7f46271dc0df438194d20656a6a5a
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Wed May 21 15:35:53 2014 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Wed May 21 15:35:53 2014 +0200

testing: fence_zvm agent is tested for working delay function

also adds support for checking --delay for every C-based fence agent
---
 fence/agents/zvm/Makefile.am |    4 +++-
 make/agentccheck.mk          |    8 ++++++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/fence/agents/zvm/Makefile.am b/fence/agents/zvm/Makefile.am
index 01d551f..2439985 100644
--- a/fence/agents/zvm/Makefile.am
+++ b/fence/agents/zvm/Makefile.am
@@ -12,7 +12,9 @@ fence_zvmip_CFLAGS	= -D_GNU_SOURCE
 
 dist_man_MANS		= fence_zvm.8 fence_zvmip.8
 
+FENCE_TEST_ARGS		= -n test -a test -p test -u test
+
 include $(top_srcdir)/make/agentccheck.mk
 
 # we do not test fence_zvm because it can be compiled only on specific architecture
-check: xml-check.fence_zvmip
\ No newline at end of file
+check: xml-check.fence_zvmip delay-check.fence_zvmip
\ No newline at end of file
diff --git a/make/agentccheck.mk b/make/agentccheck.mk
index 2de9b7a..32dc160 100644
--- a/make/agentccheck.mk
+++ b/make/agentccheck.mk
@@ -12,3 +12,11 @@ xml-check.%: %
 xml-upload.%: %
 	$(eval INPUT=$(subst xml-upload.,,$@))
 	./$(INPUT) -o metadata > $(DATADIR)/$(INPUT).xml
+
+# If test will fail, rerun fence agents to show problems
+delay-check.%: %
+	$(eval INPUT=$(subst delay-check.,,$@))
+	test `/usr/bin/time -f "%e" ./$(INPUT) --delay 10 $(FENCE_TEST_ARGS) -- 2>&1 |\
+	sed 's/\.//' | tail -n 1` -ge 1000 || \
+	/usr/bin/time -f "%e" ./$(INPUT) --delay 0 $(FENCE_TEST_ARGS) --
+


More information about the cluster-commits mailing list