summaryrefslogtreecommitdiffstats
path: root/lrm/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:40:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:40:13 +0000
commite9be59e1502a41bab9891d96d753102a7dafef0b (patch)
treec3b2da87c414881f4b53d0964f407c83492d813e /lrm/test
parentInitial commit. (diff)
downloadcluster-glue-e9be59e1502a41bab9891d96d753102a7dafef0b.tar.xz
cluster-glue-e9be59e1502a41bab9891d96d753102a7dafef0b.zip
Adding upstream version 1.0.12.upstream/1.0.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lrm/test')
-rwxr-xr-xlrm/test/LRMBasicSanityCheck.in55
-rw-r--r--lrm/test/Makefile.am48
-rw-r--r--lrm/test/README.regression164
-rw-r--r--lrm/test/apitest.c317
-rw-r--r--lrm/test/apitest.exp122
-rw-r--r--lrm/test/callbacktest.c204
-rw-r--r--lrm/test/defaults9
-rw-r--r--lrm/test/descriptions55
-rwxr-xr-xlrm/test/evaltest.sh171
-rw-r--r--lrm/test/language16
-rw-r--r--lrm/test/lrmadmin-interface43
-rw-r--r--lrm/test/lrmregtest-lsb54
-rw-r--r--lrm/test/lrmregtest.in220
-rw-r--r--lrm/test/plugintest.c84
-rwxr-xr-xlrm/test/regression.sh.in248
-rw-r--r--lrm/test/testcases/BSC4
-rw-r--r--lrm/test/testcases/Makefile.am27
-rw-r--r--lrm/test/testcases/basicset6
-rwxr-xr-xlrm/test/testcases/common.filter27
-rw-r--r--lrm/test/testcases/flood19
-rw-r--r--lrm/test/testcases/flood.exp1354
-rw-r--r--lrm/test/testcases/metadata29
-rw-r--r--lrm/test/testcases/metadata.exp31
-rwxr-xr-xlrm/test/testcases/ra-list.sh12
-rw-r--r--lrm/test/testcases/rscexec48
-rw-r--r--lrm/test/testcases/rscexec.exp117
-rw-r--r--lrm/test/testcases/rscmgmt29
-rw-r--r--lrm/test/testcases/rscmgmt.exp74
-rwxr-xr-xlrm/test/testcases/rscmgmt.log_filter13
-rw-r--r--lrm/test/testcases/serialize33
-rw-r--r--lrm/test/testcases/serialize.exp100
-rw-r--r--lrm/test/testcases/stonith2
-rw-r--r--lrm/test/testcases/stonith.exp2
-rwxr-xr-xlrm/test/testcases/xmllint.sh20
34 files changed, 3757 insertions, 0 deletions
diff --git a/lrm/test/LRMBasicSanityCheck.in b/lrm/test/LRMBasicSanityCheck.in
new file mode 100755
index 0000000..dbe8548
--- /dev/null
+++ b/lrm/test/LRMBasicSanityCheck.in
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+ # Copyright (c) 2004 International Business Machines
+ # Author: Huang Zhen <zhenhltc@cn.ibm.com>
+ #
+ # 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 2.1 of the License, or (at your option) any later version.
+ #
+ # This software 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 library; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #
+HBLIB=@libdir@/heartbeat
+LRMD=$HBLIB/lrmd
+LRMADMIN=@sbindir@/lrmadmin
+export LRMD LRMADMIN
+
+if [ $# -gt 0 ]; then
+ LRMD=$1/lrmd
+fi
+
+if [ ! -f $LRMD ]; then
+ echo $LRMD does not exist
+ exit 1
+fi
+
+if [ ! -f $LRMADMIN ]; then
+ echo $LRMADMIN does not exist
+ exit 1
+fi
+
+OUTDIR=/tmp/LRM_BSC_$$
+export OUTDIR
+[ -d $OUTDIR ] && {
+ echo $OUTDIR exists, please cleanup
+ exit 1
+}
+
+`dirname $0`/regression.sh -q set:BSC
+rc=$?
+if [ $rc -eq 0 ]; then
+ echo "LRM tests PASSED"
+ rm -rf $OUTDIR
+else
+ echo "LRM tests FAILED"
+ echo "Please check $OUTDIR for results"
+fi
+exit $rc
diff --git a/lrm/test/Makefile.am b/lrm/test/Makefile.am
new file mode 100644
index 0000000..84f6657
--- /dev/null
+++ b/lrm/test/Makefile.am
@@ -0,0 +1,48 @@
+#
+# Author: Sun Jiang Dong <sunjd@cn.ibm.com>
+# Copyright (c) 2004 International Business Machines
+#
+# 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 2
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = testcases
+
+INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
+ -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl
+
+COMMONLIBS = $(top_builddir)/lib/clplumbing/libplumb.la $(GLIBLIB)
+
+noinst_PROGRAMS = apitest plugintest callbacktest
+
+apitest_SOURCES = apitest.c
+apitest_LDFLAGS = $(COMMONLIBS)
+apitest_LDADD = $(top_builddir)/lib/$(LRM_DIR)/liblrm.la
+apitest_DEPENDENCIES = $(top_builddir)/lib/$(LRM_DIR)/liblrm.la
+
+plugintest_SOURCES = plugintest.c
+plugintest_LDADD = $(COMMONLIBS)
+plugintest_LDFLAGS = -L$(top_builddir)/lib/pils -lpils @LIBLTDL@
+
+callbacktest_SOURCES = callbacktest.c
+callbacktest_LDFLAGS = $(COMMONLIBS)
+callbacktest_LDADD = $(top_builddir)/lib/$(LRM_DIR)/liblrm.la
+callbacktest_DEPENDENCIES = $(top_builddir)/lib/$(LRM_DIR)/liblrm.la
+
+testdir = $(datadir)/$(PACKAGE_NAME)/lrmtest
+test_SCRIPTS = LRMBasicSanityCheck regression.sh evaltest.sh lrmregtest lrmregtest-lsb
+test_DATA = README.regression defaults descriptions lrmadmin-interface language
+# shouldn't need this, but we do for some versions of autofoo tools
+EXTRA_DIST = $(test_SCRIPTS) $(test_DATA)
diff --git a/lrm/test/README.regression b/lrm/test/README.regression
new file mode 100644
index 0000000..3588172
--- /dev/null
+++ b/lrm/test/README.regression
@@ -0,0 +1,164 @@
+LRM regression tests
+
+* WARNING * WARNING * WARNING * WARNING * WARNING * WARNING *
+*
+* evaltest.sh uses eval to an extent you don't really want to
+* know about. Beware. Beware twice. Any input from the testcases
+* directory is considered to be trusted. So, think twice before
+* devising your tests lest you kill your precious data. Got it?
+* Good.
+*
+* Furthermore, we are deliberately small on testing the user
+* input and no one should try to predict what is to happen on
+* random input from the testcases.
+*
+* WARNING * WARNING * WARNING * WARNING * WARNING * WARNING *
+
+Manifest
+
+ regression.sh: the top level program
+ evaltest.sh: the engine test engine
+
+ lrmadmin-interface: interface to lrmd (lrmadmin)
+ descriptions: describe what we are about to do
+ defaults: the default settings for test commands
+
+ testcases/: here are the testcases and filters
+ output/: here goes the output
+
+All volatile data lives in the testcases/ directory.
+
+NB: You should never ever need to edit regression.sh and
+evaltest.sh. If you really have to, please talk to me and I will
+try to fix it so that you do not have to.
+
+Please write new test cases. The more the merrier :)
+
+Usage
+
+The usage is:
+
+ ./regression.sh ["prepare"] ["set:"<setname>|<testcase>]
+
+Test cases are collected in test sets. The default test set is
+basicset and running regression.sh without arguments will do all
+tests from that set.
+
+To show progress, for each test a '.' is printed. For sleeps,
+a '+' for each second. Once all tests have been evaluated, the
+output is checked against the expect file. If successful, "PASS"
+is printed, otherwise "FAIL".
+
+Specifying "prepare" will make regression.sh create expect
+output files for the given set of tests or testcase.
+
+The script will start and stop lrmd itself. stonithd is also
+started to test the XML descriptions printed by stonith agents.
+No other parts of stonithd functionality is tested.
+
+The following files may be generated:
+
+ output/<testcase>.out: the output of the testcase
+ output/regression.out: the output of regression.sh
+ output/lrmd.out: the output of lrmd
+
+On success output from testcases is removed and regression.out is
+empty.
+
+Driving the test cases yourself
+
+evaltest.sh accepts input from stdin, evaluates it immediately,
+and prints results to stdout/stderr. One can perhaps get a better
+feeling of what's actually going on by running it interactively.
+Please note that you have to start the lrmd yourself beforehand.
+
+Test cases
+
+Tests are written in a simple metalanguage. The list of commands
+with rough translation to lrmadmin's options is in the language
+file. The best description of the language is in the
+lrmadmin-interface and descriptions scripts:
+
+$ egrep '^lrm|echo' lrmadmin-interface descriptions
+
+A test case is a list of tests, one per line. A few examples:
+
+ add # add a resource with default name
+ list # list all resources
+ del rsc=wiwi # remove a wiwi resource
+
+A set of defaults for LRM options is in the defaults file. That's
+why we can write short forms instead of
+
+ add rsc=r1 class=ocf type=lrmregtest provider=heartbeat ...
+
+Special operations
+
+There are special operations with which it is possible to change
+environment and do other useful things. All special ops start
+with the '%' sign and may be followed by additional parameters.
+
+%setenv
+ change the environment variable; see defaults for the
+ set of global variables and resetvars() in evaltest.sh
+
+%sleep
+ sleep
+
+%stop
+ skip the rest of the tests
+
+%extcheck
+ feed the output of the next test case to the specified
+ external program/filter; the program should either reside in
+ testcases/ or be in the PATH, i.e.
+
+ %extcheck cat
+
+ simulates a null op :)
+
+ see testcases/metadata for some examples
+
+%repeat num
+ repeat the next test num times
+ there are several variables which are substituted in the test
+ lines, so that we can simulate a for loop:
+
+ s/%t/$test_cnt/g
+ s/%l/$line/g
+ s/%j/$job_cnt/g
+ s/%i/$repeat_cnt/g
+
+ for example, to add 10 resources:
+
+ %repeat 10
+ add rsc=r-%i
+
+%bg [num]
+ run next num (or just the next one) tests in background
+
+%bgrepeat [num]
+ a combination of the previous two (used often)
+
+%wait
+ wait for the last background test to finish
+
+%shell
+ feed whatever is in the rest of the line to 'sh -s'
+
+Filters and except files
+
+Some output is necessarily very volatile, such as time stamps.
+It is possible to specify a filter for each testcase to get rid
+of superfluous information. A filter is a filter in UNIX
+sense, it takes input from stdin and prints results to stdout.
+
+There is a common filter called very inventively
+testcases/common.filter which is applied to all test cases.
+
+Except files are a list of extended regular expressions fed to
+egrep(1). That way one can filter out lines which are not
+interesting. Again, the one applied to all is
+testcases/common.excl.
+
+
diff --git a/lrm/test/apitest.c b/lrm/test/apitest.c
new file mode 100644
index 0000000..0d4c572
--- /dev/null
+++ b/lrm/test/apitest.c
@@ -0,0 +1,317 @@
+
+/*
+ * Test program for Local Resource Manager API.
+ *
+ * Copyright (C) 2004 Huang Zhen <zhenh@cn.ibm.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <lha_internal.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/poll.h>
+#include <string.h>
+#include <glib.h>
+#include <lrm/lrm_api.h>
+#include <clplumbing/cl_log.h>
+#include <syslog.h>
+
+void lrm_op_done_callback (lrm_op_t* op);
+void printf_rsc(lrm_rsc_t* rsc);
+void printf_op(lrm_op_t* op);
+void printf_hash_table(GHashTable* hash_table);
+void get_all_rsc(ll_lrm_t* lrm);
+void get_cur_state(lrm_rsc_t* rsc);
+
+int main (int argc, char* argv[])
+{
+ ll_lrm_t* lrm;
+ lrm_rsc_t* rsc = NULL;
+ lrm_op_t* op = NULL;
+ const char* rid = "ip248";
+ GHashTable* param = NULL;
+ GList* classes;
+ int i;
+
+ cl_log_set_entity("apitest");
+ cl_log_set_facility(LOG_USER);
+
+ lrm = ll_lrm_new("lrm");
+
+ if(NULL == lrm)
+ {
+ printf("lrm==NULL\n");
+ return 1;
+ }
+ puts("sigon...");
+ lrm->lrm_ops->signon(lrm,"apitest");
+
+ classes = lrm->lrm_ops->get_rsc_class_supported(lrm);
+ lrm_free_str_list(classes);
+
+ param = g_hash_table_new(g_str_hash,g_str_equal);
+ g_hash_table_insert(param, strdup("1"), strdup("192.168.192.100"));
+ puts("add_rsc...");
+ lrm->lrm_ops->add_rsc(lrm, rid, "heartbeat", "IPaddr", "heartbeat", param);
+ puts("get_rsc...");
+ rsc = lrm->lrm_ops->get_rsc(lrm, rid);
+ printf_rsc(rsc);
+
+ puts("perform_op(start)...");
+ op = lrm_op_new();
+ op->op_type = g_strdup("start");
+ op->params = param;
+ op->timeout = 0;
+ op->user_data = strdup("It is a start op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 0;
+ op->target_rc = EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+ lrm_free_op(op);
+
+ puts("perform_op(status)...");
+ param = g_hash_table_new(g_str_hash,g_str_equal);
+ g_hash_table_insert(param, strdup("1"), strdup("192.168.192.100"));
+ op = lrm_op_new();
+ op->op_type = g_strdup("status");
+ op->params = param;
+ op->timeout = 0;
+ op->user_data = strdup("It is a status op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 1000;
+ op->target_rc=EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+ lrm_free_op(op);
+
+ puts("perform_op(stop)...");
+ param = g_hash_table_new(g_str_hash,g_str_equal);
+ g_hash_table_insert(param, strdup("1"), strdup("192.168.192.100"));
+ op = lrm_op_new();
+ op->op_type = g_strdup("stop");
+ op->params = param;
+ op->timeout = 0;
+ op->user_data = strdup("It is a stop op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 0;
+ op->target_rc=EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+ lrm_free_op(op);
+
+ puts("perform_op(status)...");
+ param = g_hash_table_new(g_str_hash,g_str_equal);
+ g_hash_table_insert(param, strdup("1"), strdup("192.168.192.100"));
+ op = lrm_op_new();
+ op->op_type = g_strdup("status");
+ op->params = param;
+ op->timeout = 0;
+ op->user_data = strdup("It is a status op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 2000;
+ op->target_rc=EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+ lrm_free_op(op);
+
+ puts("perform_op(start)...");
+ param = g_hash_table_new(g_str_hash,g_str_equal);
+ g_hash_table_insert(param, strdup("1"), strdup("192.168.192.100"));
+ op = lrm_op_new();
+ op->op_type = g_strdup("start");
+ op->params = param;
+ op->timeout = 0;
+ op->user_data = strdup("It is a start op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 0;
+ op->target_rc = EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+ lrm_free_op(op);
+
+ puts("perform_op(status)...");
+ param = g_hash_table_new(g_str_hash,g_str_equal);
+ g_hash_table_insert(param, strdup("1"), strdup("192.168.192.100"));
+ op = lrm_op_new();
+ op->op_type = g_strdup("status");
+ op->params = param;
+ op->timeout = 0;
+ op->user_data = strdup("It is a status op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 3000;
+ op->target_rc=EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+ lrm_free_op(op);
+
+ puts("perform_op(stop)...");
+ param = g_hash_table_new(g_str_hash,g_str_equal);
+ g_hash_table_insert(param, strdup("1"), strdup("192.168.192.100"));
+ op = lrm_op_new();
+ op->op_type = g_strdup("stop");
+ op->params = param;
+ op->timeout = 0;
+ op->user_data = strdup("It is a stop op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 0;
+ op->target_rc=EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+ lrm_free_op(op);
+
+ for(i = 0; i < 5; i++) {
+ puts("get_cur_state...");
+ get_cur_state(rsc);
+ puts("sleep a while...");
+ sleep(1);
+ }
+
+ puts("delete_rsc...");
+ lrm->lrm_ops->delete_rsc(lrm, rid);
+ lrm_free_rsc(rsc);
+
+ puts("signoff...");
+ lrm->lrm_ops->signoff(lrm);
+
+ return 0;
+}
+void lrm_op_done_callback(lrm_op_t* op)
+{
+ puts("lrm_op_done_callback...");
+ printf_op(op);
+}
+void printf_rsc(lrm_rsc_t* rsc)
+{
+ printf("print resource>>>>>>>>>\n");
+ if (NULL == rsc) {
+ printf("resource is null\n");
+ printf("print end\n");
+ return;
+ }
+ printf("\tresource of id:%s\n", rsc->id);
+ printf("\ttype:%s\n", rsc->type);
+ printf("\tclass:%s\n", rsc->class);
+ printf("\tparams:\n");
+ printf_hash_table(rsc->params);
+ printf("print end<<<<<<<<<<<<<<<\n");
+}
+
+void printf_op(lrm_op_t* op)
+{
+ printf("print op>>>>>>>>>>>>>>>>\n");
+
+ if (NULL == op) {
+ printf("op is null\n");
+ printf("print end\n");
+ return;
+ }
+
+ printf("\top_type:%s\n",op->op_type?op->op_type:"null");
+ printf("\tparams:\n");
+ printf_hash_table(op->params);
+ printf("\ttimeout:%d\n",op->timeout);
+ printf("\tuser_data:%s\n",op->user_data?(char*)op->user_data:"null");
+ printf("\top_status:%d\n",op->op_status);
+ printf("\tapp_name:%s\n",op->app_name?op->app_name:"null");
+ printf("\toutput:%s\n",op->output?op->output:"null");
+ printf("\trc:%d\n",op->rc);
+ printf("\tcall_id:%d\n",op->call_id);
+ printf("print end<<<<<<<<<<<<<<<<<<\n");
+}
+
+static void
+printf_pair(gpointer key, gpointer value, gpointer user_data)
+{
+ printf("\t\t%s=%s\n",(char*)key,(char*)value);
+}
+void
+printf_hash_table(GHashTable* hash_table)
+{
+ if (NULL == hash_table) {
+ printf("\t\tnull\n");
+ return;
+ }
+ g_hash_table_foreach(hash_table, printf_pair, NULL);
+}
+void
+get_all_rsc(ll_lrm_t* lrm)
+{
+ GList* element = NULL, * rid_list = NULL;
+
+ puts("get_all_rscs...");
+ rid_list = lrm->lrm_ops->get_all_rscs(lrm);
+ if (NULL != rid_list) {
+ element = g_list_first(rid_list);
+ while (NULL != element) {
+ printf("\tid:%s\n",(char*)element->data);
+ element = g_list_next(element);
+ }
+ } else {
+ puts("\tnone.");
+ }
+ lrm_free_str_list(rid_list);
+}
+void
+get_cur_state(lrm_rsc_t* rsc)
+{
+ state_flag_t state;
+ GList* node = NULL, * op_list = NULL;
+ lrm_op_t* op = NULL;
+ printf("current state>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
+
+ op_list = rsc->ops->get_cur_state(rsc, &state);
+
+ printf("\tcurrent state:%s\n",state==LRM_RSC_IDLE?"Idle":"Busy");
+
+
+ for(node = g_list_first(op_list); NULL != node;
+ node = g_list_next(node)) {
+ op = (lrm_op_t*)node->data;
+ printf_op(op);
+ }
+ lrm_free_op_list(op_list);
+ printf("current end<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
+}
diff --git a/lrm/test/apitest.exp b/lrm/test/apitest.exp
new file mode 100644
index 0000000..b153ee3
--- /dev/null
+++ b/lrm/test/apitest.exp
@@ -0,0 +1,122 @@
+sigon...
+add_rsc...
+get_rsc...
+print resource
+ resource of id:ip248
+ type:IPv6addr
+ class:heartbeat
+ params:
+ 1=3ffe:ffff:0:f101::3
+print end
+perform_op(start)...
+print op
+ op_type:start
+ params:
+ 1=3ffe:ffff:0:f101::3
+ timeout:0
+ user_data:It is a start op!
+ op_status:0
+ app_name:null
+ output:null
+ rc:0
+print end
+perform_op(status)...
+print op
+ op_type:status
+ params:
+ 1=3ffe:ffff:0:f101::3
+ timeout:0
+ user_data:It is a status op!
+ op_status:0
+ app_name:null
+ output:null
+ rc:0
+print end
+perform_op(stop)...
+print op
+ op_type:stop
+ params:
+ 1=3ffe:ffff:0:f101::3
+ timeout:0
+ user_data:It is a stop op!
+ op_status:0
+ app_name:null
+ output:null
+ rc:0
+print end
+get_cur_state...
+ current state:Busy
+print op
+ op_type:start
+ params:
+ 1=3ffe:ffff:0:f101::3
+ timeout:0
+ user_data:It is a start op!
+ op_status:-1
+ app_name:apitest
+ output:null
+ rc:0
+print end
+print op
+ op_type:status
+ params:
+ 1=3ffe:ffff:0:f101::3
+ timeout:0
+ user_data:It is a status op!
+ op_status:-1
+ app_name:apitest
+ output:null
+ rc:0
+print end
+print op
+ op_type:stop
+ params:
+ 1=3ffe:ffff:0:f101::3
+ timeout:0
+ user_data:It is a stop op!
+ op_status:-1
+ app_name:apitest
+ output:null
+ rc:0
+print end
+stop_op...
+get_cur_state...
+ current state:Busy
+print op
+ op_type:start
+ params:
+ 1=3ffe:ffff:0:f101::3
+ timeout:0
+ user_data:null
+ op_status:-1
+ app_name:apitest
+ output:null
+ rc:0
+print end
+print op
+ op_type:stop
+ params:
+ 1=3ffe:ffff:0:f101::3
+ timeout:0
+ user_data:null
+ op_status:-1
+ app_name:apitest
+ output:null
+ rc:0
+print end
+sleep a while...
+get_cur_state...
+ current state:Idel
+print op
+ op_type:stop
+ params:
+ 1=3ffe:ffff:0:f101::3
+ timeout:0
+ user_data:null
+ op_status:0
+ app_name:apitest
+ output:null
+ rc:0
+print end
+delete_rsc...
+signoff...
diff --git a/lrm/test/callbacktest.c b/lrm/test/callbacktest.c
new file mode 100644
index 0000000..48f4d49
--- /dev/null
+++ b/lrm/test/callbacktest.c
@@ -0,0 +1,204 @@
+
+/*
+ * Test program for the callback function of Local Resource Manager API.
+ *
+ * Copyright (C) 2004 Huang Zhen <zhenh@cn.ibm.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#include <lha_internal.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/poll.h>
+#include <string.h>
+#include <glib.h>
+#include <lrm/lrm_api.h>
+#include <syslog.h>
+#include <clplumbing/GSource.h>
+
+static void lrm_op_done_callback(lrm_op_t *op);
+static void printf_rsc(lrm_rsc_t *rsc);
+static void printf_op(lrm_op_t *op);
+static void printf_hash_table(GHashTable *hash_table);
+static gboolean lrm_dispatch(IPC_Channel *notused, gpointer user_data);
+static GMainLoop *mainloop;
+
+int
+main(int argc, char *argv[])
+{
+ ll_lrm_t* lrm;
+ lrm_rsc_t* rsc = NULL;
+ lrm_op_t* op = NULL;
+ const char* rid = "ip248";
+ GHashTable* param = NULL;
+
+ lrm = ll_lrm_new("lrm");
+
+ if(NULL == lrm)
+ {
+ printf("lrm==NULL\n");
+ return 1;
+ }
+ puts("sigon...");
+ lrm->lrm_ops->signon(lrm,"apitest");
+ lrm->lrm_ops->set_lrm_callback(lrm, lrm_op_done_callback);
+
+ param = g_hash_table_new(g_str_hash,g_str_equal);
+ g_hash_table_insert(param, strdup("1"), strdup("3ffe:ffff:0:f101::3"));
+ puts("add_rsc...");
+ lrm->lrm_ops->add_rsc(lrm, rid, "heartbeat", "IPv6addr", NULL, param);
+ puts("get_rsc...");
+ rsc = lrm->lrm_ops->get_rsc(lrm, rid);
+ printf_rsc(rsc);
+
+ puts("perform_op(start)...");
+ op = lrm_op_new();
+ op->op_type = g_strdup("start");
+ op->params = NULL;
+ op->timeout = 0;
+ op->user_data = strdup("It is a start op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 0;
+ op->target_rc = EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+
+ puts("perform_op(status)...");
+ op = lrm_op_new();
+ op->op_type = g_strdup("status");
+ op->params = NULL;
+ op->timeout = 0;
+ op->user_data = strdup("It is a status op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 1000;
+ op->target_rc=EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+
+ puts("perform_op(stop)...");
+ op = lrm_op_new();
+ op->op_type = g_strdup("stop");
+ op->params = NULL;
+ op->timeout = 0;
+ op->user_data = strdup("It is a stop op!");
+ if ( op->user_data == NULL ) {
+ fprintf(stderr, "No enough memory.\n");
+ return -1;
+ }
+ op->user_data_len = strlen(op->user_data)+1;
+ op->interval = 0;
+ op->target_rc=EVERYTIME;
+ rsc->ops->perform_op(rsc,op);
+ printf_op(op);
+
+ G_main_add_IPC_Channel(G_PRIORITY_LOW,
+ lrm->lrm_ops->ipcchan(lrm),
+ FALSE,
+ lrm_dispatch, lrm,
+ NULL);
+
+ mainloop = g_main_new(FALSE);
+ g_main_run(mainloop);
+
+ puts("delete_rsc...");
+ lrm->lrm_ops->delete_rsc(lrm, rid);
+
+ puts("signoff...");
+ lrm->lrm_ops->signoff(lrm);
+
+ return 0;
+}
+
+static void
+lrm_op_done_callback(lrm_op_t *op)
+{
+ puts("lrm_op_done_callback...");
+ printf_op(op);
+}
+
+static gboolean
+lrm_dispatch(IPC_Channel *notused, gpointer user_data)
+{
+ ll_lrm_t *lrm = (ll_lrm_t*)user_data;
+ lrm->lrm_ops->rcvmsg(lrm, FALSE);
+ return TRUE;
+}
+
+static void
+printf_rsc(lrm_rsc_t *rsc)
+{
+ printf("print resource\n");
+ if (NULL == rsc) {
+ printf("resource is null\n");
+ printf("print end\n");
+ return;
+ }
+ printf("\tresource of id:%s\n", rsc->id);
+ printf("\ttype:%s\n", rsc->type);
+ printf("\tclass:%s\n", rsc->class);
+ printf("\tparams:\n");
+ printf_hash_table(rsc->params);
+ printf("print end\n");
+}
+
+static void
+printf_op(lrm_op_t *op)
+{
+ printf("print op\n");
+
+ if (NULL == op) {
+ printf("op is null\n");
+ printf("print end\n");
+ return;
+ }
+
+ printf("\top_type:%s\n",op->op_type?op->op_type:"null");
+ printf("\tparams:\n");
+ printf_hash_table(op->params);
+ printf("\ttimeout:%d\n",op->timeout);
+ printf("\tuser_data:%s\n",op->user_data?(char*)op->user_data:"null");
+ printf("\tuser_data pointer:%p\n",op->user_data);
+ printf("\top_status:%d\n",op->op_status);
+ printf("\tapp_name:%s\n",op->app_name?op->app_name:"null");
+ printf("\toutput:%s\n",op->output?op->output:"null");
+ printf("\trc:%d\n",op->rc);
+/* printf("\tcall_id:%d\n",op->call_id); */
+ printf("print end\n");
+}
+
+static void
+printf_pair(gpointer key, gpointer value, gpointer user_data)
+{
+ printf("\t\t%s=%s\n",(char*)key,(char*)value);
+}
+
+static void
+printf_hash_table(GHashTable *hash_table)
+{
+ if (NULL == hash_table) {
+ printf("\t\tnull\n");
+ return;
+ }
+ g_hash_table_foreach(hash_table, printf_pair, NULL);
+}
diff --git a/lrm/test/defaults b/lrm/test/defaults
new file mode 100644
index 0000000..039915b
--- /dev/null
+++ b/lrm/test/defaults
@@ -0,0 +1,9 @@
+# defaults
+: ${dflt_rsc:=r1}
+: ${dflt_type:=lrmregtest}
+: ${dflt_class:=ocf}
+: ${dflt_provider:=heartbeat}
+: ${dflt_timeout:=1000}
+: ${dflt_interval:=0}
+: ${dflt_targetrc:=EVERYTIME}
+dflt_args=""
diff --git a/lrm/test/descriptions b/lrm/test/descriptions
new file mode 100644
index 0000000..f2aab6b
--- /dev/null
+++ b/lrm/test/descriptions
@@ -0,0 +1,55 @@
+lead=".TRY"
+describe_list() {
+ echo $lead List resources
+}
+describe_add() {
+ echo $lead Add resource \
+ ${rsc:-$dflt_rsc} \
+ class=${class:-$dflt_class} type=${type:-$dflt_type} \
+ provider=${provider:-$dflt_provider} \
+ args=$args
+}
+describe_del() {
+ echo $lead Delete resource \
+ ${rsc:-$dflt_rsc}
+}
+describe_flush() {
+ echo $lead Flush resource \
+ ${rsc:-$dflt_rsc}
+}
+describe_state() {
+ echo $lead Show state \
+ ${rsc:-$dflt_rsc}
+}
+describe_info() {
+ echo $lead Show info \
+ ${rsc:-$dflt_rsc}
+}
+describe_exec() {
+ echo $lead Exec \
+ ${rsc:-$dflt_rsc} \
+ op=${operation:-$dflt_operation} \
+ timeout=${timeout:-$dflt_timeout} interval=${interval:-$dflt_interval} \
+ target=${targetrc:-$dflt_targetrc} args=$args
+}
+
+describe_classes() {
+ echo $lead List classes
+}
+describe_types() {
+ echo $lead List types \
+ class=${class:-$dflt_class}
+}
+describe_classmeta() {
+ echo $lead Meta-data \
+ class=${class:-$dflt_class}
+}
+describe_meta() {
+ echo $lead Show meta-data \
+ class=${class:-$dflt_class} \
+ type=${type:-$dflt_type} provider=${provider:-$dflt_provider}
+}
+describe_provider() {
+ echo $lead Show provider \
+ class=${class:-$dflt_class} type=${type:-$dflt_type}
+}
diff --git a/lrm/test/evaltest.sh b/lrm/test/evaltest.sh
new file mode 100755
index 0000000..f369102
--- /dev/null
+++ b/lrm/test/evaltest.sh
@@ -0,0 +1,171 @@
+#!/bin/sh
+
+ # Copyright (C) 2007 Dejan Muhamedagic <dejan@suse.de>
+ #
+ # 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 2.1 of the License, or (at your option) any later version.
+ #
+ # This software 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 library; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #
+
+: ${TESTDIR:=testcases}
+: ${LRMADMIN:=../admin/lrmadmin}
+test -x $LRMADMIN || LRMADMIN=lrmadmin
+: ${OCF_ROOT:=/usr/lib/ocf}
+
+. ./defaults
+. ./lrmadmin-interface
+. ./descriptions
+
+resetvars() {
+ unset rsc type class provider timeout interval targetrc args
+ unset extcheck
+}
+
+#
+# special operations squad
+#
+specopt_setenv() {
+ eval $rest
+}
+specopt_sleep() {
+ #sleep $rest
+ # the while loop below is the same
+ # but we give user some feedback on what's happening
+ while [ "$rest" -gt 0 ]; do
+ sleep 1
+ echo -n "+" >&3
+ rest=$(($rest-1))
+ done
+}
+specopt_extcheck() {
+ extcheck="$rest"
+ set $extcheck
+ which "$1" >/dev/null 2>&1 || # a program in the PATH
+ extcheck="$TESTDIR/$extcheck" # or our script
+}
+specopt_repeat() {
+ repeat_limit=$rest
+}
+specopt_bg() {
+ if [ "$job_cnt" -gt "$bgprocs_num" ]; then
+ bgprocs_num=${rest:-1}
+ job_cnt=1
+ else
+ echo ".BG bad usage: more tests yet to be backgrounded"
+ fi
+}
+specopt_bgrepeat() { # common
+ specopt_bg
+ specopt_repeat
+}
+specopt_wait() { # common
+ waitforbgprocs
+}
+specopt_shell() { # run command with shell
+ echo "$rest" | sh -s | # and execute the command
+ { [ "$extcheck" ] && $extcheck || cat;}
+}
+specopt() {
+ cmd=`echo $cmd | sed 's/%//'` # strip leading '%'
+ echo ".`echo $cmd | tr '[a-z]' '[A-Z]'` $rest" # show what we got
+ specopt_$cmd # do what they asked for
+}
+
+#
+# wait for background processes to finish
+# and print their output
+# NB: We wait for processes in a FIFO order
+# The order in which they finish does not matter
+#
+waitforbgprocs() {
+ while [ "$bgprocs" ]; do
+ set $bgprocs
+ proc=$1 # get the first one
+ shift 1 # remove it from the list
+ bgprocs="$@"
+ IFS=":"
+ set $proc # split into lineno,pid
+ testline=$1 jobnum=$2 pid=$3
+ unset IFS
+
+ while kill -0 $pid 2>/dev/null; do
+ sleep 1
+ done
+ wait $pid # capture the exit code
+
+ echo ".BG test line $testline/job $jobnum finished (exit code: $?):"
+ echo "==========test:$testline:$jobnum start output=========="
+ cat $OUTDIR/bg$$-$testline-$jobnum
+ echo "==========test:$testline:$jobnum end output=========="
+ rm -f $OUTDIR/bg$$-$testline-$jobnum
+ done
+}
+
+#
+# substitute variables in the test line
+#
+substvars() {
+ sed "
+ s/%t/$test_cnt/g
+ s/%l/$line/g
+ s/%j/$job_cnt/g
+ s/%i/$repeat_cnt/g
+ "
+}
+
+dotest() {
+ echo -n "." >&3
+ test_cnt=$(($test_cnt+1))
+ describe_$cmd # show what we are about to do
+ lrm_$cmd | # and execute the command
+ { [ "$extcheck" ] && $extcheck || cat;}
+}
+runonetest() {
+ eval `echo $rest | substvars` # set parameters
+ if [ "$job_cnt" -le "$bgprocs_num" ]; then
+ echo .BG test line $line/job $job_cnt runs in background
+ dotest > $OUTDIR/bg$$-$line-$job_cnt 2>&1 &
+ bgprocs="$bgprocs $line:$job_cnt:$!"
+ job_cnt=$(($job_cnt+1))
+ else
+ dotest
+ fi
+}
+runtest() {
+ while [ $repeat_cnt -le $repeat_limit ]; do
+ runonetest
+ resetvars # unset all variables
+ repeat_cnt=$(($repeat_cnt+1))
+ done
+ repeat_limit=1 repeat_cnt=1
+}
+
+#
+# run the tests
+#
+bgprocs_num=0 job_cnt=1
+repeat_limit=1 repeat_cnt=1
+line=1
+test_cnt=1
+
+while read cmd rest; do
+ case "$cmd" in
+ "") : empty ;;
+ "#"*) : a comment ;;
+ "%stop") break ;;
+ "%"*) specopt ;;
+ *) runtest ;;
+ esac
+ line=$(($line+1))
+done
+waitforbgprocs
diff --git a/lrm/test/language b/lrm/test/language
new file mode 100644
index 0000000..d2785e8
--- /dev/null
+++ b/lrm/test/language
@@ -0,0 +1,16 @@
+The meta language and how it translates to the lrmadmin options:
+
+list:-L
+add:-A %r %C %T %P
+del:-D %r
+flush:-F %r
+state:-S %r
+info:-I %r
+exec:-E %r %o %t %i %e
+
+classes:-C
+types:-T %C
+classmeta:-O %C
+meta:-M %C %T %P
+provider:-P %C %T
+
diff --git a/lrm/test/lrmadmin-interface b/lrm/test/lrmadmin-interface
new file mode 100644
index 0000000..4eb1656
--- /dev/null
+++ b/lrm/test/lrmadmin-interface
@@ -0,0 +1,43 @@
+lrm_list() {
+ $LRMADMIN -L
+}
+lrm_add() {
+ $LRMADMIN -A ${rsc:-$dflt_rsc} \
+ ${class:-$dflt_class} ${type:-$dflt_type} \
+ ${provider:-$dflt_provider} \
+ $args
+}
+lrm_del() {
+ $LRMADMIN -D ${rsc:-$dflt_rsc}
+}
+lrm_flush() {
+ $LRMADMIN -F ${rsc:-$dflt_rsc}
+}
+lrm_state() {
+ $LRMADMIN -S ${rsc:-$dflt_rsc}
+}
+lrm_info() {
+ $LRMADMIN -I ${rsc:-$dflt_rsc}
+}
+lrm_exec() {
+ $LRMADMIN -E ${rsc:-$dflt_rsc} \
+ ${operation:-$dflt_operation} \
+ ${timeout:-$dflt_timeout} ${interval:-$dflt_interval} \
+ ${targetrc:-$dflt_targetrc} $args
+}
+
+lrm_classes() {
+ $LRMADMIN -C
+}
+lrm_types() {
+ $LRMADMIN -T ${class:-$dflt_class}
+}
+lrm_classmeta() {
+ $LRMADMIN -O ${class:-$dflt_class}
+}
+lrm_meta() {
+ $LRMADMIN -M ${class:-$dflt_class} ${type:-$dflt_type} ${provider:-$dflt_provider}
+}
+lrm_provider() {
+ $LRMADMIN -P ${class:-$dflt_class} ${type:-$dflt_type}
+}
diff --git a/lrm/test/lrmregtest-lsb b/lrm/test/lrmregtest-lsb
new file mode 100644
index 0000000..4692b17
--- /dev/null
+++ b/lrm/test/lrmregtest-lsb
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# WARNING: This script is for LRM regressions tests only
+#
+### BEGIN INIT INFO
+# Provides: lrmregtest
+# Required-Start:
+# Should-Start:
+# Required-Stop:
+# Should-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: LRM regression tests LSB RA
+# Description: LRM regression tests LSB RA
+### END INIT INFO
+
+TYPE=lrmregtest
+# depends on resource-agents and the OCF
+: ${OCF_ROOT:=/usr/lib/ocf}
+. ${OCF_ROOT}/lib/heartbeat/ocf-shellfuncs
+
+case "$1" in
+ start)
+ echo -n "Starting $TYPE"
+ ha_pseudo_resource lrmregtest_lsb start
+ ;;
+ stop)
+ echo -n "Shutting down $TYPE"
+ ha_pseudo_resource lrmregtest_lsb stop
+ ;;
+ status)
+ echo -n "Checking for $TYPE"
+ ha_pseudo_resource lrmregtest_lsb monitor
+ if [ $? -eq 0 ]; then
+ echo " running"
+ exit 0
+ else
+ echo " stopped"
+ exit 3
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status}"
+ exit 1
+ ;;
+esac
+
+if [ $? -eq 0 ]; then
+ echo " OK"
+ exit 0
+else
+ echo " failed"
+ exit 1
+fi
diff --git a/lrm/test/lrmregtest.in b/lrm/test/lrmregtest.in
new file mode 100644
index 0000000..001a662
--- /dev/null
+++ b/lrm/test/lrmregtest.in
@@ -0,0 +1,220 @@
+#!/bin/sh
+#
+#
+# lrmregtest OCF RA. Does nothing but wait a few seconds, can be
+# configured to fail occassionally.
+#
+# updated to support the LRM regression testing.
+#
+# Copyright (c) 2007 SUSE LINUX AG, Dejan Muhamedagic
+# All Rights Reserved.
+#
+# Copyright (c) 2004 SUSE LINUX AG, Lars Marowsky-Brée
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of version 2 of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Further, this software is distributed without any warranty that it is
+# free of the rightful claim of any third person regarding infringement
+# or the like. Any license provided herein, whether implied or
+# otherwise, applies only to this software file. Patent licenses, if
+# any, provided herein do not apply to combinations of this program with
+# other software, or any other product whatsoever.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+#
+
+#######################################################################
+# Initialization:
+
+. ${OCF_ROOT}/lib/heartbeat/ocf-shellfuncs
+
+#######################################################################
+
+meta_data() {
+ cat <<END
+<?xml version="1.0"?>
+<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
+<resource-agent name="lrmregtest" version="0.9">
+<version>1.0</version>
+
+<longdesc lang="en">
+This is a lrmregtest Resource Agent. Use for LRM regression
+testing.
+</longdesc>
+<shortdesc lang="en">lrmregtest resource agent</shortdesc>
+
+<parameters>
+<parameter name="delay" unique="0">
+<longdesc lang="en">
+How long to delay before each action.
+</longdesc>
+<shortdesc lang="en">Action delay</shortdesc>
+<content type="integer" default="0" />
+</parameter>
+
+<parameter name="check_parallel" unique="0">
+<longdesc lang="en">
+Complain loudly if they try to run us in parallel on the same resource.
+</longdesc>
+<shortdesc lang="en">Report error if run twice at the same time</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
+<parameter name="ignore_TERM" unique="0">
+<longdesc lang="en">
+Process the TERM signal and don't exit.
+</longdesc>
+<shortdesc lang="en">No TERM ain't gonna kill us.</shortdesc>
+<content type="boolean" default="false" />
+</parameter>
+
+<parameter name="verbose" unique="0">
+<longdesc lang="en">
+Print more information.
+</longdesc>
+<shortdesc lang="en">Be verbose.</shortdesc>
+<content type="boolean" default="false" />
+</parameter>
+
+</parameters>
+
+<actions>
+<action name="start" timeout="90" />
+<action name="stop" timeout="100" />
+<action name="monitor" timeout="20" interval="10" depth="0" start-delay="0" />
+<action name="reload" timeout="90" />
+<action name="migrate_to" timeout="100" />
+<action name="migrate_from" timeout="90" />
+<action name="meta-data" timeout="5" />
+<action name="validate-all" timeout="30" />
+</actions>
+</resource-agent>
+END
+}
+
+#######################################################################
+
+# don't exit on TERM, to test that lrmd makes sure that we do exit
+sigterm_handler() {
+ ocf_log info "They use TERM to bring us down. No such luck."
+ return
+}
+
+dummy_usage() {
+ cat <<END
+usage: $0 {start|stop|monitor|migrate_to|migrate_from|validate-all|meta-data}
+
+Expects to have a fully populated OCF RA-compliant environment set.
+END
+}
+
+# signals interrupt slow calls (sleep)
+# this is an approximation (after all it's just a dummy)
+sleepsleep() {
+ delay=$1
+ now=`perl -e 'print time()'`
+ by=$(($now+$delay))
+ while [ $now -lt $by ]; do
+ ocf_log debug "Gonna sleep for $(($by-$now)) seconds..."
+ sleep $(($by-$now))
+ now=`perl -e 'print time()'`
+ done
+}
+dummy_start() {
+ sleepsleep $OCF_RESKEY_delay
+ ha_pseudo_resource lrmregtest_${OCF_RESOURCE_INSTANCE} start
+}
+
+dummy_stop() {
+ sleepsleep $OCF_RESKEY_delay
+ ha_pseudo_resource lrmregtest_${OCF_RESOURCE_INSTANCE} stop
+}
+
+dummy_monitor() {
+ sleepsleep $OCF_RESKEY_delay
+ ha_pseudo_resource lrmregtest_${OCF_RESOURCE_INSTANCE} monitor
+}
+
+dummy_validate() {
+ exit $OC_ERR_UNIMPLEMENTED
+}
+
+verbose() {
+ [ "$OCF_RESKEY_verbose" != 0 ]
+}
+environment() {
+ echo "OCF environment variables:"
+ set | egrep 'OCF_RESKEY|OCF_RESOURCE_INSTANCE'
+}
+invocation() {
+ echo "invoked with args: $@"
+}
+
+: ${OCF_RESKEY_delay=0}
+: ${OCF_RESKEY_check_parallel=1}
+: ${OCF_RESKEY_verbose=0}
+: ${OCF_RESKEY_ignore_TERM=0}
+
+verbose && environment
+
+lockf=`
+ ha_pseudo_resource lrmregtest_${OCF_RESOURCE_INSTANCE} print |
+ sed 's/$/.lock/'
+`
+
+check4parallel() {
+ if [ -f "$lockf" ] && kill -0 `cat $lockf` 2>/dev/null
+ then
+ ocf_log err "There is another instance of ${OCF_RESOURCE_INSTANCE} running: pid `cat $lockf`."
+ exit $OCF_ERR_GENERIC
+ fi
+}
+
+[ "$OCF_RESKEY_check_parallel" = 1 ] &&
+ check4parallel
+
+[ "$OCF_RESKEY_ignore_TERM" = 1 ] &&
+ trap sigterm_handler TERM
+
+echo $$ > $lockf
+trap "rm -f $lockf" EXIT
+
+verbose && invocation $@
+
+case $__OCF_ACTION in
+meta-data) meta_data
+ exit $OCF_SUCCESS
+ ;;
+start) dummy_start;;
+stop) dummy_stop;;
+monitor) dummy_monitor;;
+migrate_to) ocf_log info "Migrating ${OCF_RESOURCE_INSTANCE} to ${OCF_RESKEY_CRM_meta_migrate_to}."
+ dummy_stop
+ ;;
+migrate_from) ocf_log info "Migrating ${OCF_RESOURCE_INSTANCE} to ${OCF_RESKEY_CRM_meta_migrated_from}."
+ dummy_start
+ ;;
+reload) ocf_log err "Reloading..."
+ dummy_start
+ ;;
+validate-all) dummy_validate;;
+usage|help) dummy_usage
+ exit $OCF_SUCCESS
+ ;;
+*) dummy_usage
+ exit $OCF_ERR_UNIMPLEMENTED
+ ;;
+esac
+rc=$?
+ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc"
+exit $rc
+
diff --git a/lrm/test/plugintest.c b/lrm/test/plugintest.c
new file mode 100644
index 0000000..d25c46d
--- /dev/null
+++ b/lrm/test/plugintest.c
@@ -0,0 +1,84 @@
+/* File: plugintest.c
+ * Description: A small,simple tool to test RA execution plugin
+ *
+ * Author: Sun Jiang Dong <sunjd@cn.ibm.com>
+ * Copyright (c) 2004 International Business Machines
+ *
+ * Todo: security verification
+ *
+ * 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 2.1 of the License, or (at your option) any later version.
+ *
+ * This software 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 library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <pils/plugin.h>
+#include <pils/generic.h>
+#include <lrm/raexec.h>
+
+static void
+g_print_item(gpointer data, gpointer user_data)
+{
+ printf("%s\n", (char*)data);
+}
+
+
+int main(void)
+{
+ PILPluginUniv * PluginLoadingSystem = NULL;
+ GHashTable * RAExecFuncs = NULL;
+ GList * ratype_list;
+ struct RAExecOps * RAExec;
+ /*
+ GHashTable * cmd_params;
+ */
+ int ret;
+
+ PILGenericIfMgmtRqst RegisterRqsts[]= {
+ {"RAExec", &RAExecFuncs, NULL, NULL, NULL},
+ { NULL, NULL, NULL, NULL, NULL} };
+
+ PluginLoadingSystem = NewPILPluginUniv ("/usr/lib/heartbeat/plugins");
+
+ PILLoadPlugin(PluginLoadingSystem , "InterfaceMgr", "generic" , &RegisterRqsts);
+
+ PILLoadPlugin(PluginLoadingSystem , "RAExec", "ocf", NULL);
+ RAExec = g_hash_table_lookup(RAExecFuncs,"ocf");
+ ret = RAExec->get_resource_list(&ratype_list);
+ printf("length=%d\n", g_list_length(ratype_list));
+ if (ret >= 0) {
+ g_list_foreach(ratype_list, g_print_item, NULL);
+ }
+
+ /*
+ PILLoadPlugin(PluginLoadingSystem , "RAExec", "lsb", NULL);
+ RAExec = g_hash_table_lookup(RAExecFuncs,"lsb");
+ cmd_params = g_hash_table_new(g_str_hash, g_str_equal);
+ g_hash_table_insert(cmd_params, g_strdup("1"), g_strdup("par1"));
+ g_hash_table_insert(cmd_params, g_strdup("2"), g_strdup("par2"));
+ ret = RAExec->execra("/tmp/test.sh", "start", cmd_params,NULL);
+ */
+
+ /* For test the dealing with directory appended to RA */
+ /*
+ PILLoadPlugin(PluginLoadingSystem , "RAExec", "ocf", NULL);
+ RAExec = g_hash_table_lookup(RAExecFuncs,"ocf");
+ if (0>RAExec->execra("/root/linux-ha-checkout/linux-ha/lrm/test.sh",
+ "stop",NULL,NULL, TRUE, &key))
+ */
+ printf("execra result: ret = %d\n", ret);
+ return -1;
+}
diff --git a/lrm/test/regression.sh.in b/lrm/test/regression.sh.in
new file mode 100755
index 0000000..550321e
--- /dev/null
+++ b/lrm/test/regression.sh.in
@@ -0,0 +1,248 @@
+#!/bin/sh
+
+ # Copyright (C) 2007 Dejan Muhamedagic <dmuhamedagic@suse.de>
+ #
+ # 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 2.1 of the License, or (at your option) any later version.
+ #
+ # This software 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 library; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #
+
+OCF_ROOT=@OCF_ROOT_DIR@
+export OCF_ROOT
+if [ -z "$OCF_ROOT" ]; then
+ [ -d /usr/lib/ocf ] && OCF_ROOT=/usr/lib/ocf
+fi
+if [ ! -d "$OCF_ROOT" ]; then
+ echo "OCF_ROOT environment variable not set"
+ exit 2
+fi
+
+TESTDIR=${TESTDIR:-testcases}
+DFLT_TESTSET=basicset
+OUTDIR=${OUTDIR:-output}
+LRMD_OUTF="$OUTDIR/lrmd.out"
+LRMD_LOGF="$OUTDIR/lrmd.log"
+LRMD_DEBUGF="$OUTDIR/lrmd.debug"
+OUTF="$OUTDIR/regression.out"
+LRMADMIN="@sbindir@/lrmadmin"
+LRMD_OPTS="-vvv"
+STONITHD_OPTS="-at"
+DIFF_OPTS="--ignore-all-space -U 1"
+common_filter=$TESTDIR/common.filter
+common_exclf=$TESTDIR/common.excl
+OCF_RA=$OCF_ROOT/resource.d/heartbeat/lrmregtest
+LSB_RA=@LSB_RA_DIR@/lrmregtest
+export OUTDIR TESTDIR LRMADMIN
+
+logmsg() {
+ echo "`date`: $*" | tee -a $LRMD_DEBUGF | tee -a $LRMD_LOGF
+}
+abspath() {
+ echo $1 | grep -qs "^/" &&
+ echo $1 ||
+ echo `pwd`/$1
+}
+
+usage() {
+ cat<<EOF
+
+usage: $0 [-q] [testcase...|set:testset]
+
+Test lrmd using supplied testcases. If none are given,
+set:basicset is used. All testcases and sets are in testcases/.
+See also README.regression for description.
+
+-q: quiet operation (no progress shown)
+
+EOF
+exit 2
+}
+
+if [ `id -u` != 0 ]; then
+ echo "sorry, but i talk to root only"
+ exit 2
+fi
+cd `dirname $0`
+if [ ! -d "$TESTDIR" ]; then
+ echo "$0: $TESTDIR does not exit"
+ usage
+fi
+
+which xmllint >/dev/null 2>&1 || {
+ echo "WARNING: xmllint not available, some of the tests may fail"
+}
+
+rm -f $LRMD_LOGF $LRMD_DEBUGF
+
+# make lrmd log to our files only
+HA_logfile=`abspath $LRMD_LOGF`
+HA_debugfile=`abspath $LRMD_DEBUGF`
+HA_use_logd=no
+HA_logfacility=""
+export HA_logfile HA_debugfile HA_use_logd HA_logfacility
+
+mkdir -p $OUTDIR
+. ${OCF_ROOT}/lib/heartbeat/ocf-shellfuncs
+
+args=`getopt hq $*`
+[ $? -ne 0 ] && usage
+eval set -- "$args"
+
+SILENT=""
+while [ x"$1" != x ]; do
+ case "$1" in
+ -h) usage;;
+ -q) SILENT=1;;
+ --) shift 1; break;;
+ *) usage;;
+ esac
+ shift 1
+done
+
+exec >$OUTF 2>&1
+if [ "$SILENT" = 1 ]; then
+ exec 3>/dev/null
+else
+ exec 3>/dev/tty
+fi
+
+start_stonithd() {
+ echo "starting stonithd" >&3
+ $HA_BIN/stonithd -s 2>/dev/null
+ if [ $? -ne 0 ]; then
+ STOP_STONITHD=1
+ $HA_BIN/stonithd $STONITHD_OPTS
+ sleep 1
+ $HA_BIN/stonithd -s 2>/dev/null
+ else
+ STOP_STONITHD=
+ fi
+}
+stop_stonithd() {
+ if [ "$STOP_STONITHD" ]; then
+ echo "stopping stonithd" >&3
+ $HA_BIN/stonithd -k >/dev/null 2>&1
+ fi
+}
+start_lrmd() {
+ echo "starting lrmd" >&3
+ $HA_BIN/lrmd -s 2>/dev/null
+ if [ $? -eq 3 ]; then
+ #strace -o /tmp/lrmd.trc $HA_BIN/lrmd $LRMD_OPTS >$LRMD_OUTF 2>&1 &
+ $HA_BIN/lrmd $LRMD_OPTS >$LRMD_OUTF 2>&1 &
+ sleep 1
+ $HA_BIN/lrmd -s 2>/dev/null
+ else
+ echo "lrmd already running; can't proceed" >&3
+ return 2
+ fi
+}
+stop_lrmd() {
+ echo "stopping lrmd" >&3
+ $HA_BIN/lrmd -k
+}
+cp_ra() {
+ cp -p lrmregtest $OCF_RA
+ chmod +x $OCF_RA
+ cp -p lrmregtest-lsb $LSB_RA
+ chmod +x $LSB_RA
+}
+rm_ra() {
+ rm -f $OCF_RA $LSB_RA
+}
+
+cp_ra
+start_lrmd || exit $?
+# start_stonithd || exit $?
+trap "stop_lrmd; stop_stonithd; rm_ra" EXIT
+
+setenvironment() {
+ filterf=$TESTDIR/$testcase.filter
+ exclf=$TESTDIR/$testcase.excl
+ log_filter=$TESTDIR/$testcase.log_filter
+ expf=$TESTDIR/$testcase.exp
+ outf=$OUTDIR/$testcase.out
+ difff=$OUTDIR/$testcase.diff
+}
+
+filter_output() {
+ { [ -x $common_filter ] && $common_filter || cat;} |
+ { [ -f $common_exclf ] && egrep -vf $common_exclf || cat;} |
+ { [ -x $filterf ] && $filterf || cat;} |
+ { [ -f $exclf ] && egrep -vf $exclf || cat;}
+}
+
+dumpcase() {
+ cat<<EOF
+----------
+testcase $testcase failed
+output is in $outf
+diff (from $difff):
+`cat $difff`
+----------
+EOF
+}
+
+runtestcase() {
+ setenvironment
+ echo -n "$testcase" >&3
+ logmsg "BEGIN testcase $testcase"
+ ./evaltest.sh < $TESTDIR/$testcase > $outf 2>&1
+
+ filter_output < $outf |
+ if [ "$prepare" ]; then
+ echo " saving to expect file" >&3
+ cat > $expf
+ else
+ echo -n " checking..." >&3
+ diff $DIFF_OPTS $expf - > $difff
+ if [ $? -ne 0 ]; then
+ echo " FAIL" >&3
+ dumpcase
+ return 1
+ else
+ echo " PASS" >&3
+ rm -f $outf $difff
+ fi
+ fi
+ sed -n "/BEGIN testcase $testcase/,\$p" $LRMD_LOGF |
+ { [ -x $log_filter ] && $log_filter || cat;} |
+ egrep '(CRIT|ERROR):'
+ logmsg "END testcase $testcase"
+}
+
+[ "$1" = prepare ] && { prepare=1; shift 1;}
+[ $# -eq 0 ] && set "set:$DFLT_TESTSET"
+
+for a; do
+ if [ "$a" -a -f "$TESTDIR/$a" ]; then
+ testcase=$a
+ runtestcase
+ else
+ echo "$a" | grep -q "^set:" &&
+ TESTSET=$TESTDIR/`echo $a | sed 's/set://'`
+ while read testcase; do
+ runtestcase
+ done < $TESTSET
+ fi
+done
+
+if egrep -wv '(BEGIN|END) testcase' $OUTF >/dev/null
+then
+ echo "seems like some tests failed or else something not expected"
+ echo "check $OUTF and diff files in $OUTDIR"
+ echo "in case you wonder what lrmd was doing, read $LRMD_LOGF and $LRMD_DEBUGF"
+ exit 1
+else
+ rm -f $OUTF $LRMD_OUTF
+fi >&3
diff --git a/lrm/test/testcases/BSC b/lrm/test/testcases/BSC
new file mode 100644
index 0000000..157fb6c
--- /dev/null
+++ b/lrm/test/testcases/BSC
@@ -0,0 +1,4 @@
+rscmgmt
+metadata
+rscexec
+stonith
diff --git a/lrm/test/testcases/Makefile.am b/lrm/test/testcases/Makefile.am
new file mode 100644
index 0000000..49728d9
--- /dev/null
+++ b/lrm/test/testcases/Makefile.am
@@ -0,0 +1,27 @@
+#
+# Author: Sun Jiang Dong <sunjd@cn.ibm.com>
+# Copyright (c) 2004 International Business Machines
+#
+# 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 2
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+MAINTAINERCLEANFILES = Makefile.in
+
+testcasesdir = $(datadir)/$(PACKAGE_NAME)/lrmtest/testcases
+testcases_SCRIPTS = common.filter ra-list.sh rscmgmt.log_filter xmllint.sh
+testcases_DATA = BSC basicset metadata metadata.exp rscexec \
+ rscexec.exp rscmgmt rscmgmt.exp \
+ stonith stonith.exp
+# shouldn't need this next line...
+EXTRA_DIST = $(testcases_SCRIPTS) $(testcases_DATA)
diff --git a/lrm/test/testcases/basicset b/lrm/test/testcases/basicset
new file mode 100644
index 0000000..62b9c04
--- /dev/null
+++ b/lrm/test/testcases/basicset
@@ -0,0 +1,6 @@
+rscmgmt
+metadata
+rscexec
+stonith
+serialize
+flood
diff --git a/lrm/test/testcases/common.filter b/lrm/test/testcases/common.filter
new file mode 100755
index 0000000..f95e9d8
--- /dev/null
+++ b/lrm/test/testcases/common.filter
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+sed '
+/^lrmadmin/s/([0-9][0-9]*)/()/
+/^lrmadmin/s/^lrmadmin[^:]*: [^ ]* //
+s/call_id=[0-9][0-9]*/call_id=(removed)/
+/run at:/d
+/last rc change at:/d
+/queue time:/d
+' |
+awk '
+/Waiting for lrmd to callback.../ { n=1; next; }
+n==1 && /----------------operation--------------/ { n++; next; }
+n==2 && /type:/ { op=$0; sub("type:","",op); next }
+n==2 && /operation status:/ { desc=$0; sub("operation status:","",desc); next }
+n==2 && /op_status:/ { stat=$0; sub("op_status: *","",stat); next }
+n==2 && /return code:/ { rc=$0; sub("return code: *","",rc); next }
+n==2 && /output data:/ { n++; next; }
+n==3 && /---------------------------------------/ {
+ printf("> %s %s (status=%s,rc=%s): %s\n",op,desc,stat,rc,substr(output,2));
+ n=0;
+ output="";
+ next;
+}
+n==3 && $1!="" { output=output"/"$0; next; }
+{ print }
+'
diff --git a/lrm/test/testcases/flood b/lrm/test/testcases/flood
new file mode 100644
index 0000000..de6d742
--- /dev/null
+++ b/lrm/test/testcases/flood
@@ -0,0 +1,19 @@
+# 30 secs should be enough even on slow machines
+list
+%setenv dflt_timeout=30000
+# add 64 resources
+%repeat 64
+add rsc=r%i args="delay=0"
+# start all in background
+%bgrepeat 64
+exec rsc=r%i operation=start
+%sleep 1
+# and run a monitor on all in background
+%bgrepeat 64
+exec rsc=r%i operation=monitor
+%sleep 1
+# finally, stop all
+%repeat 64
+exec rsc=r%i operation=stop
+%repeat 64
+del rsc=r%i
diff --git a/lrm/test/testcases/flood.exp b/lrm/test/testcases/flood.exp
new file mode 100644
index 0000000..cf8a2bb
--- /dev/null
+++ b/lrm/test/testcases/flood.exp
@@ -0,0 +1,1354 @@
+.TRY List resources
+Currently no resources are managed by LRM.
+.SETENV dflt_timeout=30000
+.REPEAT 64
+.TRY Add resource r1 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r2 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r3 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r4 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r5 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r6 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r7 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r8 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r9 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r10 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r11 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r12 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r13 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r14 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r15 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r16 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r17 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r18 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r19 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r20 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r21 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r22 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r23 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r24 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r25 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r26 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r27 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r28 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r29 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r30 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r31 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r32 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r33 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r34 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r35 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r36 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r37 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r38 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r39 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r40 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r41 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r42 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r43 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r44 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r45 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r46 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r47 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r48 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r49 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r50 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r51 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r52 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r53 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r54 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r55 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r56 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r57 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r58 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r59 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r60 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r61 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r62 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r63 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY Add resource r64 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.BGREPEAT 64
+.BG test line 9/job 1 runs in background
+.BG test line 9/job 2 runs in background
+.BG test line 9/job 3 runs in background
+.BG test line 9/job 4 runs in background
+.BG test line 9/job 5 runs in background
+.BG test line 9/job 6 runs in background
+.BG test line 9/job 7 runs in background
+.BG test line 9/job 8 runs in background
+.BG test line 9/job 9 runs in background
+.BG test line 9/job 10 runs in background
+.BG test line 9/job 11 runs in background
+.BG test line 9/job 12 runs in background
+.BG test line 9/job 13 runs in background
+.BG test line 9/job 14 runs in background
+.BG test line 9/job 15 runs in background
+.BG test line 9/job 16 runs in background
+.BG test line 9/job 17 runs in background
+.BG test line 9/job 18 runs in background
+.BG test line 9/job 19 runs in background
+.BG test line 9/job 20 runs in background
+.BG test line 9/job 21 runs in background
+.BG test line 9/job 22 runs in background
+.BG test line 9/job 23 runs in background
+.BG test line 9/job 24 runs in background
+.BG test line 9/job 25 runs in background
+.BG test line 9/job 26 runs in background
+.BG test line 9/job 27 runs in background
+.BG test line 9/job 28 runs in background
+.BG test line 9/job 29 runs in background
+.BG test line 9/job 30 runs in background
+.BG test line 9/job 31 runs in background
+.BG test line 9/job 32 runs in background
+.BG test line 9/job 33 runs in background
+.BG test line 9/job 34 runs in background
+.BG test line 9/job 35 runs in background
+.BG test line 9/job 36 runs in background
+.BG test line 9/job 37 runs in background
+.BG test line 9/job 38 runs in background
+.BG test line 9/job 39 runs in background
+.BG test line 9/job 40 runs in background
+.BG test line 9/job 41 runs in background
+.BG test line 9/job 42 runs in background
+.BG test line 9/job 43 runs in background
+.BG test line 9/job 44 runs in background
+.BG test line 9/job 45 runs in background
+.BG test line 9/job 46 runs in background
+.BG test line 9/job 47 runs in background
+.BG test line 9/job 48 runs in background
+.BG test line 9/job 49 runs in background
+.BG test line 9/job 50 runs in background
+.BG test line 9/job 51 runs in background
+.BG test line 9/job 52 runs in background
+.BG test line 9/job 53 runs in background
+.BG test line 9/job 54 runs in background
+.BG test line 9/job 55 runs in background
+.BG test line 9/job 56 runs in background
+.BG test line 9/job 57 runs in background
+.BG test line 9/job 58 runs in background
+.BG test line 9/job 59 runs in background
+.BG test line 9/job 60 runs in background
+.BG test line 9/job 61 runs in background
+.BG test line 9/job 62 runs in background
+.BG test line 9/job 63 runs in background
+.BG test line 9/job 64 runs in background
+.SLEEP 1
+.BGREPEAT 64
+.BG test line 13/job 1 runs in background
+.BG test line 13/job 2 runs in background
+.BG test line 13/job 3 runs in background
+.BG test line 13/job 4 runs in background
+.BG test line 13/job 5 runs in background
+.BG test line 13/job 6 runs in background
+.BG test line 13/job 7 runs in background
+.BG test line 13/job 8 runs in background
+.BG test line 13/job 9 runs in background
+.BG test line 13/job 10 runs in background
+.BG test line 13/job 11 runs in background
+.BG test line 13/job 12 runs in background
+.BG test line 13/job 13 runs in background
+.BG test line 13/job 14 runs in background
+.BG test line 13/job 15 runs in background
+.BG test line 13/job 16 runs in background
+.BG test line 13/job 17 runs in background
+.BG test line 13/job 18 runs in background
+.BG test line 13/job 19 runs in background
+.BG test line 13/job 20 runs in background
+.BG test line 13/job 21 runs in background
+.BG test line 13/job 22 runs in background
+.BG test line 13/job 23 runs in background
+.BG test line 13/job 24 runs in background
+.BG test line 13/job 25 runs in background
+.BG test line 13/job 26 runs in background
+.BG test line 13/job 27 runs in background
+.BG test line 13/job 28 runs in background
+.BG test line 13/job 29 runs in background
+.BG test line 13/job 30 runs in background
+.BG test line 13/job 31 runs in background
+.BG test line 13/job 32 runs in background
+.BG test line 13/job 33 runs in background
+.BG test line 13/job 34 runs in background
+.BG test line 13/job 35 runs in background
+.BG test line 13/job 36 runs in background
+.BG test line 13/job 37 runs in background
+.BG test line 13/job 38 runs in background
+.BG test line 13/job 39 runs in background
+.BG test line 13/job 40 runs in background
+.BG test line 13/job 41 runs in background
+.BG test line 13/job 42 runs in background
+.BG test line 13/job 43 runs in background
+.BG test line 13/job 44 runs in background
+.BG test line 13/job 45 runs in background
+.BG test line 13/job 46 runs in background
+.BG test line 13/job 47 runs in background
+.BG test line 13/job 48 runs in background
+.BG test line 13/job 49 runs in background
+.BG test line 13/job 50 runs in background
+.BG test line 13/job 51 runs in background
+.BG test line 13/job 52 runs in background
+.BG test line 13/job 53 runs in background
+.BG test line 13/job 54 runs in background
+.BG test line 13/job 55 runs in background
+.BG test line 13/job 56 runs in background
+.BG test line 13/job 57 runs in background
+.BG test line 13/job 58 runs in background
+.BG test line 13/job 59 runs in background
+.BG test line 13/job 60 runs in background
+.BG test line 13/job 61 runs in background
+.BG test line 13/job 62 runs in background
+.BG test line 13/job 63 runs in background
+.BG test line 13/job 64 runs in background
+.SLEEP 1
+.REPEAT 64
+.TRY Exec r1 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r2 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r3 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r4 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r5 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r6 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r7 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r8 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r9 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r10 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r11 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r12 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r13 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r14 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r15 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r16 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r17 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r18 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r19 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r20 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r21 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r22 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r23 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r24 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r25 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r26 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r27 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r28 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r29 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r30 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r31 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r32 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r33 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r34 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r35 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r36 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r37 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r38 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r39 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r40 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r41 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r42 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r43 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r44 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r45 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r46 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r47 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r48 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r49 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r50 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r51 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r52 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r53 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r54 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r55 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r56 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r57 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r58 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r59 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r60 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r61 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r62 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r63 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec r64 op=stop timeout=30000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.REPEAT 64
+.TRY Delete resource r1
+Succeeded in deleting this resource.
+.TRY Delete resource r2
+Succeeded in deleting this resource.
+.TRY Delete resource r3
+Succeeded in deleting this resource.
+.TRY Delete resource r4
+Succeeded in deleting this resource.
+.TRY Delete resource r5
+Succeeded in deleting this resource.
+.TRY Delete resource r6
+Succeeded in deleting this resource.
+.TRY Delete resource r7
+Succeeded in deleting this resource.
+.TRY Delete resource r8
+Succeeded in deleting this resource.
+.TRY Delete resource r9
+Succeeded in deleting this resource.
+.TRY Delete resource r10
+Succeeded in deleting this resource.
+.TRY Delete resource r11
+Succeeded in deleting this resource.
+.TRY Delete resource r12
+Succeeded in deleting this resource.
+.TRY Delete resource r13
+Succeeded in deleting this resource.
+.TRY Delete resource r14
+Succeeded in deleting this resource.
+.TRY Delete resource r15
+Succeeded in deleting this resource.
+.TRY Delete resource r16
+Succeeded in deleting this resource.
+.TRY Delete resource r17
+Succeeded in deleting this resource.
+.TRY Delete resource r18
+Succeeded in deleting this resource.
+.TRY Delete resource r19
+Succeeded in deleting this resource.
+.TRY Delete resource r20
+Succeeded in deleting this resource.
+.TRY Delete resource r21
+Succeeded in deleting this resource.
+.TRY Delete resource r22
+Succeeded in deleting this resource.
+.TRY Delete resource r23
+Succeeded in deleting this resource.
+.TRY Delete resource r24
+Succeeded in deleting this resource.
+.TRY Delete resource r25
+Succeeded in deleting this resource.
+.TRY Delete resource r26
+Succeeded in deleting this resource.
+.TRY Delete resource r27
+Succeeded in deleting this resource.
+.TRY Delete resource r28
+Succeeded in deleting this resource.
+.TRY Delete resource r29
+Succeeded in deleting this resource.
+.TRY Delete resource r30
+Succeeded in deleting this resource.
+.TRY Delete resource r31
+Succeeded in deleting this resource.
+.TRY Delete resource r32
+Succeeded in deleting this resource.
+.TRY Delete resource r33
+Succeeded in deleting this resource.
+.TRY Delete resource r34
+Succeeded in deleting this resource.
+.TRY Delete resource r35
+Succeeded in deleting this resource.
+.TRY Delete resource r36
+Succeeded in deleting this resource.
+.TRY Delete resource r37
+Succeeded in deleting this resource.
+.TRY Delete resource r38
+Succeeded in deleting this resource.
+.TRY Delete resource r39
+Succeeded in deleting this resource.
+.TRY Delete resource r40
+Succeeded in deleting this resource.
+.TRY Delete resource r41
+Succeeded in deleting this resource.
+.TRY Delete resource r42
+Succeeded in deleting this resource.
+.TRY Delete resource r43
+Succeeded in deleting this resource.
+.TRY Delete resource r44
+Succeeded in deleting this resource.
+.TRY Delete resource r45
+Succeeded in deleting this resource.
+.TRY Delete resource r46
+Succeeded in deleting this resource.
+.TRY Delete resource r47
+Succeeded in deleting this resource.
+.TRY Delete resource r48
+Succeeded in deleting this resource.
+.TRY Delete resource r49
+Succeeded in deleting this resource.
+.TRY Delete resource r50
+Succeeded in deleting this resource.
+.TRY Delete resource r51
+Succeeded in deleting this resource.
+.TRY Delete resource r52
+Succeeded in deleting this resource.
+.TRY Delete resource r53
+Succeeded in deleting this resource.
+.TRY Delete resource r54
+Succeeded in deleting this resource.
+.TRY Delete resource r55
+Succeeded in deleting this resource.
+.TRY Delete resource r56
+Succeeded in deleting this resource.
+.TRY Delete resource r57
+Succeeded in deleting this resource.
+.TRY Delete resource r58
+Succeeded in deleting this resource.
+.TRY Delete resource r59
+Succeeded in deleting this resource.
+.TRY Delete resource r60
+Succeeded in deleting this resource.
+.TRY Delete resource r61
+Succeeded in deleting this resource.
+.TRY Delete resource r62
+Succeeded in deleting this resource.
+.TRY Delete resource r63
+Succeeded in deleting this resource.
+.TRY Delete resource r64
+Succeeded in deleting this resource.
+.BG test line 9/job 1 finished (exit code: 0):
+==========test:9:1 start output==========
+.TRY Exec r1 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:1 end output==========
+.BG test line 9/job 2 finished (exit code: 0):
+==========test:9:2 start output==========
+.TRY Exec r2 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:2 end output==========
+.BG test line 9/job 3 finished (exit code: 0):
+==========test:9:3 start output==========
+.TRY Exec r3 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:3 end output==========
+.BG test line 9/job 4 finished (exit code: 0):
+==========test:9:4 start output==========
+.TRY Exec r4 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:4 end output==========
+.BG test line 9/job 5 finished (exit code: 0):
+==========test:9:5 start output==========
+.TRY Exec r5 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:5 end output==========
+.BG test line 9/job 6 finished (exit code: 0):
+==========test:9:6 start output==========
+.TRY Exec r6 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:6 end output==========
+.BG test line 9/job 7 finished (exit code: 0):
+==========test:9:7 start output==========
+.TRY Exec r7 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:7 end output==========
+.BG test line 9/job 8 finished (exit code: 0):
+==========test:9:8 start output==========
+.TRY Exec r8 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:8 end output==========
+.BG test line 9/job 9 finished (exit code: 0):
+==========test:9:9 start output==========
+.TRY Exec r9 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:9 end output==========
+.BG test line 9/job 10 finished (exit code: 0):
+==========test:9:10 start output==========
+.TRY Exec r10 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:10 end output==========
+.BG test line 9/job 11 finished (exit code: 0):
+==========test:9:11 start output==========
+.TRY Exec r11 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:11 end output==========
+.BG test line 9/job 12 finished (exit code: 0):
+==========test:9:12 start output==========
+.TRY Exec r12 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:12 end output==========
+.BG test line 9/job 13 finished (exit code: 0):
+==========test:9:13 start output==========
+.TRY Exec r13 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:13 end output==========
+.BG test line 9/job 14 finished (exit code: 0):
+==========test:9:14 start output==========
+.TRY Exec r14 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:14 end output==========
+.BG test line 9/job 15 finished (exit code: 0):
+==========test:9:15 start output==========
+.TRY Exec r15 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:15 end output==========
+.BG test line 9/job 16 finished (exit code: 0):
+==========test:9:16 start output==========
+.TRY Exec r16 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:16 end output==========
+.BG test line 9/job 17 finished (exit code: 0):
+==========test:9:17 start output==========
+.TRY Exec r17 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:17 end output==========
+.BG test line 9/job 18 finished (exit code: 0):
+==========test:9:18 start output==========
+.TRY Exec r18 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:18 end output==========
+.BG test line 9/job 19 finished (exit code: 0):
+==========test:9:19 start output==========
+.TRY Exec r19 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:19 end output==========
+.BG test line 9/job 20 finished (exit code: 0):
+==========test:9:20 start output==========
+.TRY Exec r20 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:20 end output==========
+.BG test line 9/job 21 finished (exit code: 0):
+==========test:9:21 start output==========
+.TRY Exec r21 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:21 end output==========
+.BG test line 9/job 22 finished (exit code: 0):
+==========test:9:22 start output==========
+.TRY Exec r22 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:22 end output==========
+.BG test line 9/job 23 finished (exit code: 0):
+==========test:9:23 start output==========
+.TRY Exec r23 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:23 end output==========
+.BG test line 9/job 24 finished (exit code: 0):
+==========test:9:24 start output==========
+.TRY Exec r24 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:24 end output==========
+.BG test line 9/job 25 finished (exit code: 0):
+==========test:9:25 start output==========
+.TRY Exec r25 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:25 end output==========
+.BG test line 9/job 26 finished (exit code: 0):
+==========test:9:26 start output==========
+.TRY Exec r26 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:26 end output==========
+.BG test line 9/job 27 finished (exit code: 0):
+==========test:9:27 start output==========
+.TRY Exec r27 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:27 end output==========
+.BG test line 9/job 28 finished (exit code: 0):
+==========test:9:28 start output==========
+.TRY Exec r28 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:28 end output==========
+.BG test line 9/job 29 finished (exit code: 0):
+==========test:9:29 start output==========
+.TRY Exec r29 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:29 end output==========
+.BG test line 9/job 30 finished (exit code: 0):
+==========test:9:30 start output==========
+.TRY Exec r30 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:30 end output==========
+.BG test line 9/job 31 finished (exit code: 0):
+==========test:9:31 start output==========
+.TRY Exec r31 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:31 end output==========
+.BG test line 9/job 32 finished (exit code: 0):
+==========test:9:32 start output==========
+.TRY Exec r32 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:32 end output==========
+.BG test line 9/job 33 finished (exit code: 0):
+==========test:9:33 start output==========
+.TRY Exec r33 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:33 end output==========
+.BG test line 9/job 34 finished (exit code: 0):
+==========test:9:34 start output==========
+.TRY Exec r34 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:34 end output==========
+.BG test line 9/job 35 finished (exit code: 0):
+==========test:9:35 start output==========
+.TRY Exec r35 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:35 end output==========
+.BG test line 9/job 36 finished (exit code: 0):
+==========test:9:36 start output==========
+.TRY Exec r36 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:36 end output==========
+.BG test line 9/job 37 finished (exit code: 0):
+==========test:9:37 start output==========
+.TRY Exec r37 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:37 end output==========
+.BG test line 9/job 38 finished (exit code: 0):
+==========test:9:38 start output==========
+.TRY Exec r38 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:38 end output==========
+.BG test line 9/job 39 finished (exit code: 0):
+==========test:9:39 start output==========
+.TRY Exec r39 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:39 end output==========
+.BG test line 9/job 40 finished (exit code: 0):
+==========test:9:40 start output==========
+.TRY Exec r40 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:40 end output==========
+.BG test line 9/job 41 finished (exit code: 0):
+==========test:9:41 start output==========
+.TRY Exec r41 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:41 end output==========
+.BG test line 9/job 42 finished (exit code: 0):
+==========test:9:42 start output==========
+.TRY Exec r42 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:42 end output==========
+.BG test line 9/job 43 finished (exit code: 0):
+==========test:9:43 start output==========
+.TRY Exec r43 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:43 end output==========
+.BG test line 9/job 44 finished (exit code: 0):
+==========test:9:44 start output==========
+.TRY Exec r44 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:44 end output==========
+.BG test line 9/job 45 finished (exit code: 0):
+==========test:9:45 start output==========
+.TRY Exec r45 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:45 end output==========
+.BG test line 9/job 46 finished (exit code: 0):
+==========test:9:46 start output==========
+.TRY Exec r46 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:46 end output==========
+.BG test line 9/job 47 finished (exit code: 0):
+==========test:9:47 start output==========
+.TRY Exec r47 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:47 end output==========
+.BG test line 9/job 48 finished (exit code: 0):
+==========test:9:48 start output==========
+.TRY Exec r48 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:48 end output==========
+.BG test line 9/job 49 finished (exit code: 0):
+==========test:9:49 start output==========
+.TRY Exec r49 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:49 end output==========
+.BG test line 9/job 50 finished (exit code: 0):
+==========test:9:50 start output==========
+.TRY Exec r50 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:50 end output==========
+.BG test line 9/job 51 finished (exit code: 0):
+==========test:9:51 start output==========
+.TRY Exec r51 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:51 end output==========
+.BG test line 9/job 52 finished (exit code: 0):
+==========test:9:52 start output==========
+.TRY Exec r52 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:52 end output==========
+.BG test line 9/job 53 finished (exit code: 0):
+==========test:9:53 start output==========
+.TRY Exec r53 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:53 end output==========
+.BG test line 9/job 54 finished (exit code: 0):
+==========test:9:54 start output==========
+.TRY Exec r54 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:54 end output==========
+.BG test line 9/job 55 finished (exit code: 0):
+==========test:9:55 start output==========
+.TRY Exec r55 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:55 end output==========
+.BG test line 9/job 56 finished (exit code: 0):
+==========test:9:56 start output==========
+.TRY Exec r56 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:56 end output==========
+.BG test line 9/job 57 finished (exit code: 0):
+==========test:9:57 start output==========
+.TRY Exec r57 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:57 end output==========
+.BG test line 9/job 58 finished (exit code: 0):
+==========test:9:58 start output==========
+.TRY Exec r58 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:58 end output==========
+.BG test line 9/job 59 finished (exit code: 0):
+==========test:9:59 start output==========
+.TRY Exec r59 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:59 end output==========
+.BG test line 9/job 60 finished (exit code: 0):
+==========test:9:60 start output==========
+.TRY Exec r60 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:60 end output==========
+.BG test line 9/job 61 finished (exit code: 0):
+==========test:9:61 start output==========
+.TRY Exec r61 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:61 end output==========
+.BG test line 9/job 62 finished (exit code: 0):
+==========test:9:62 start output==========
+.TRY Exec r62 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:62 end output==========
+.BG test line 9/job 63 finished (exit code: 0):
+==========test:9:63 start output==========
+.TRY Exec r63 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:63 end output==========
+.BG test line 9/job 64 finished (exit code: 0):
+==========test:9:64 start output==========
+.TRY Exec r64 op=start timeout=30000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:9:64 end output==========
+.BG test line 13/job 1 finished (exit code: 0):
+==========test:13:1 start output==========
+.TRY Exec r1 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:1 end output==========
+.BG test line 13/job 2 finished (exit code: 0):
+==========test:13:2 start output==========
+.TRY Exec r2 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:2 end output==========
+.BG test line 13/job 3 finished (exit code: 0):
+==========test:13:3 start output==========
+.TRY Exec r3 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:3 end output==========
+.BG test line 13/job 4 finished (exit code: 0):
+==========test:13:4 start output==========
+.TRY Exec r4 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:4 end output==========
+.BG test line 13/job 5 finished (exit code: 0):
+==========test:13:5 start output==========
+.TRY Exec r5 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:5 end output==========
+.BG test line 13/job 6 finished (exit code: 0):
+==========test:13:6 start output==========
+.TRY Exec r6 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:6 end output==========
+.BG test line 13/job 7 finished (exit code: 0):
+==========test:13:7 start output==========
+.TRY Exec r7 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:7 end output==========
+.BG test line 13/job 8 finished (exit code: 0):
+==========test:13:8 start output==========
+.TRY Exec r8 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:8 end output==========
+.BG test line 13/job 9 finished (exit code: 0):
+==========test:13:9 start output==========
+.TRY Exec r9 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:9 end output==========
+.BG test line 13/job 10 finished (exit code: 0):
+==========test:13:10 start output==========
+.TRY Exec r10 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:10 end output==========
+.BG test line 13/job 11 finished (exit code: 0):
+==========test:13:11 start output==========
+.TRY Exec r11 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:11 end output==========
+.BG test line 13/job 12 finished (exit code: 0):
+==========test:13:12 start output==========
+.TRY Exec r12 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:12 end output==========
+.BG test line 13/job 13 finished (exit code: 0):
+==========test:13:13 start output==========
+.TRY Exec r13 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:13 end output==========
+.BG test line 13/job 14 finished (exit code: 0):
+==========test:13:14 start output==========
+.TRY Exec r14 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:14 end output==========
+.BG test line 13/job 15 finished (exit code: 0):
+==========test:13:15 start output==========
+.TRY Exec r15 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:15 end output==========
+.BG test line 13/job 16 finished (exit code: 0):
+==========test:13:16 start output==========
+.TRY Exec r16 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:16 end output==========
+.BG test line 13/job 17 finished (exit code: 0):
+==========test:13:17 start output==========
+.TRY Exec r17 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:17 end output==========
+.BG test line 13/job 18 finished (exit code: 0):
+==========test:13:18 start output==========
+.TRY Exec r18 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:18 end output==========
+.BG test line 13/job 19 finished (exit code: 0):
+==========test:13:19 start output==========
+.TRY Exec r19 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:19 end output==========
+.BG test line 13/job 20 finished (exit code: 0):
+==========test:13:20 start output==========
+.TRY Exec r20 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:20 end output==========
+.BG test line 13/job 21 finished (exit code: 0):
+==========test:13:21 start output==========
+.TRY Exec r21 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:21 end output==========
+.BG test line 13/job 22 finished (exit code: 0):
+==========test:13:22 start output==========
+.TRY Exec r22 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:22 end output==========
+.BG test line 13/job 23 finished (exit code: 0):
+==========test:13:23 start output==========
+.TRY Exec r23 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:23 end output==========
+.BG test line 13/job 24 finished (exit code: 0):
+==========test:13:24 start output==========
+.TRY Exec r24 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:24 end output==========
+.BG test line 13/job 25 finished (exit code: 0):
+==========test:13:25 start output==========
+.TRY Exec r25 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:25 end output==========
+.BG test line 13/job 26 finished (exit code: 0):
+==========test:13:26 start output==========
+.TRY Exec r26 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:26 end output==========
+.BG test line 13/job 27 finished (exit code: 0):
+==========test:13:27 start output==========
+.TRY Exec r27 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:27 end output==========
+.BG test line 13/job 28 finished (exit code: 0):
+==========test:13:28 start output==========
+.TRY Exec r28 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:28 end output==========
+.BG test line 13/job 29 finished (exit code: 0):
+==========test:13:29 start output==========
+.TRY Exec r29 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:29 end output==========
+.BG test line 13/job 30 finished (exit code: 0):
+==========test:13:30 start output==========
+.TRY Exec r30 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:30 end output==========
+.BG test line 13/job 31 finished (exit code: 0):
+==========test:13:31 start output==========
+.TRY Exec r31 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:31 end output==========
+.BG test line 13/job 32 finished (exit code: 0):
+==========test:13:32 start output==========
+.TRY Exec r32 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:32 end output==========
+.BG test line 13/job 33 finished (exit code: 0):
+==========test:13:33 start output==========
+.TRY Exec r33 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:33 end output==========
+.BG test line 13/job 34 finished (exit code: 0):
+==========test:13:34 start output==========
+.TRY Exec r34 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:34 end output==========
+.BG test line 13/job 35 finished (exit code: 0):
+==========test:13:35 start output==========
+.TRY Exec r35 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:35 end output==========
+.BG test line 13/job 36 finished (exit code: 0):
+==========test:13:36 start output==========
+.TRY Exec r36 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:36 end output==========
+.BG test line 13/job 37 finished (exit code: 0):
+==========test:13:37 start output==========
+.TRY Exec r37 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:37 end output==========
+.BG test line 13/job 38 finished (exit code: 0):
+==========test:13:38 start output==========
+.TRY Exec r38 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:38 end output==========
+.BG test line 13/job 39 finished (exit code: 0):
+==========test:13:39 start output==========
+.TRY Exec r39 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:39 end output==========
+.BG test line 13/job 40 finished (exit code: 0):
+==========test:13:40 start output==========
+.TRY Exec r40 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:40 end output==========
+.BG test line 13/job 41 finished (exit code: 0):
+==========test:13:41 start output==========
+.TRY Exec r41 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:41 end output==========
+.BG test line 13/job 42 finished (exit code: 0):
+==========test:13:42 start output==========
+.TRY Exec r42 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:42 end output==========
+.BG test line 13/job 43 finished (exit code: 0):
+==========test:13:43 start output==========
+.TRY Exec r43 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:43 end output==========
+.BG test line 13/job 44 finished (exit code: 0):
+==========test:13:44 start output==========
+.TRY Exec r44 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:44 end output==========
+.BG test line 13/job 45 finished (exit code: 0):
+==========test:13:45 start output==========
+.TRY Exec r45 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:45 end output==========
+.BG test line 13/job 46 finished (exit code: 0):
+==========test:13:46 start output==========
+.TRY Exec r46 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:46 end output==========
+.BG test line 13/job 47 finished (exit code: 0):
+==========test:13:47 start output==========
+.TRY Exec r47 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:47 end output==========
+.BG test line 13/job 48 finished (exit code: 0):
+==========test:13:48 start output==========
+.TRY Exec r48 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:48 end output==========
+.BG test line 13/job 49 finished (exit code: 0):
+==========test:13:49 start output==========
+.TRY Exec r49 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:49 end output==========
+.BG test line 13/job 50 finished (exit code: 0):
+==========test:13:50 start output==========
+.TRY Exec r50 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:50 end output==========
+.BG test line 13/job 51 finished (exit code: 0):
+==========test:13:51 start output==========
+.TRY Exec r51 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:51 end output==========
+.BG test line 13/job 52 finished (exit code: 0):
+==========test:13:52 start output==========
+.TRY Exec r52 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:52 end output==========
+.BG test line 13/job 53 finished (exit code: 0):
+==========test:13:53 start output==========
+.TRY Exec r53 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:53 end output==========
+.BG test line 13/job 54 finished (exit code: 0):
+==========test:13:54 start output==========
+.TRY Exec r54 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:54 end output==========
+.BG test line 13/job 55 finished (exit code: 0):
+==========test:13:55 start output==========
+.TRY Exec r55 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:55 end output==========
+.BG test line 13/job 56 finished (exit code: 0):
+==========test:13:56 start output==========
+.TRY Exec r56 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:56 end output==========
+.BG test line 13/job 57 finished (exit code: 0):
+==========test:13:57 start output==========
+.TRY Exec r57 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:57 end output==========
+.BG test line 13/job 58 finished (exit code: 0):
+==========test:13:58 start output==========
+.TRY Exec r58 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:58 end output==========
+.BG test line 13/job 59 finished (exit code: 0):
+==========test:13:59 start output==========
+.TRY Exec r59 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:59 end output==========
+.BG test line 13/job 60 finished (exit code: 0):
+==========test:13:60 start output==========
+.TRY Exec r60 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:60 end output==========
+.BG test line 13/job 61 finished (exit code: 0):
+==========test:13:61 start output==========
+.TRY Exec r61 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:61 end output==========
+.BG test line 13/job 62 finished (exit code: 0):
+==========test:13:62 start output==========
+.TRY Exec r62 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:62 end output==========
+.BG test line 13/job 63 finished (exit code: 0):
+==========test:13:63 start output==========
+.TRY Exec r63 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:63 end output==========
+.BG test line 13/job 64 finished (exit code: 0):
+==========test:13:64 start output==========
+.TRY Exec r64 op=monitor timeout=30000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:13:64 end output==========
diff --git a/lrm/test/testcases/metadata b/lrm/test/testcases/metadata
new file mode 100644
index 0000000..d155757
--- /dev/null
+++ b/lrm/test/testcases/metadata
@@ -0,0 +1,29 @@
+# list various meta-data
+%setenv LANG=POSIX
+%extcheck sort
+classes
+%extcheck ra-list.sh
+types class=ocf
+%extcheck ra-list.sh
+types class=lsb
+%extcheck ra-list.sh
+types class=heartbeat
+#%extcheck ra-list.sh
+#types class=stonith
+%extcheck xmllint.sh many
+classmeta class=ocf
+%extcheck xmllint.sh many
+classmeta class=lsb
+%extcheck xmllint.sh many
+classmeta class=heartbeat
+#%extcheck xmllint.sh many
+#classmeta class=stonith
+%extcheck xmllint.sh
+meta class=ocf type=Dummy
+%extcheck xmllint.sh
+meta class=lsb type=lrmregtest
+%extcheck xmllint.sh
+meta class=heartbeat type=Dummy
+#%extcheck xmllint.sh
+#meta class=stonith type=ssh
+provider class=ocf type=IPaddr
diff --git a/lrm/test/testcases/metadata.exp b/lrm/test/testcases/metadata.exp
new file mode 100644
index 0000000..158bad2
--- /dev/null
+++ b/lrm/test/testcases/metadata.exp
@@ -0,0 +1,31 @@
+.SETENV LANG=POSIX
+.EXTCHECK sort
+.TRY List classes
+There are 4 RA classes supported:
+heartbeat
+lsb
+ocf
+stonith
+.EXTCHECK ra-list.sh
+.TRY List types class=ocf
+Cool. RA list passed.
+.EXTCHECK ra-list.sh
+.TRY List types class=lsb
+Cool. RA list passed.
+.EXTCHECK ra-list.sh
+.TRY List types class=heartbeat
+Cool. RA list passed.
+.EXTCHECK xmllint.sh many
+.TRY Meta-data class=ocf
+.EXTCHECK xmllint.sh many
+.TRY Meta-data class=lsb
+.EXTCHECK xmllint.sh many
+.TRY Meta-data class=heartbeat
+.EXTCHECK xmllint.sh
+.TRY Show meta-data class=ocf type=Dummy provider=heartbeat
+.EXTCHECK xmllint.sh
+.TRY Show meta-data class=lsb type=lrmregtest provider=heartbeat
+.EXTCHECK xmllint.sh
+.TRY Show meta-data class=heartbeat type=Dummy provider=heartbeat
+.TRY Show provider class=ocf type=IPaddr
+heartbeat
diff --git a/lrm/test/testcases/ra-list.sh b/lrm/test/testcases/ra-list.sh
new file mode 100755
index 0000000..38fb67b
--- /dev/null
+++ b/lrm/test/testcases/ra-list.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+awk '
+NR==1 {num=$3;next}
+{in_num++}
+END{
+ if( num!=in_num )
+ print "ERROR: A mismatch in number of reported RAs!";
+ else
+ print "Cool. RA list passed.";
+}
+'
diff --git a/lrm/test/testcases/rscexec b/lrm/test/testcases/rscexec
new file mode 100644
index 0000000..e118ae1
--- /dev/null
+++ b/lrm/test/testcases/rscexec
@@ -0,0 +1,48 @@
+list
+# ocf
+%setenv dflt_rsc=rscexec_rsc_r1
+add rsc=rscexec_rsc_r1 args="delay=0"
+list
+exec operation=start
+state
+exec operation=monitor
+exec operation=start
+exec operation=monitor
+exec operation=stop
+state
+exec operation=monitor
+exec operation=stop
+exec operation=monitor
+exec operation=meta-data
+del
+# lsb
+%setenv dflt_class=lsb dftl_rsc=rscexec_rsc_r1-lsb
+add
+exec operation=start
+state
+exec operation=monitor
+exec operation=start
+exec operation=monitor
+exec operation=stop
+state
+exec operation=monitor
+exec operation=stop
+exec operation=monitor
+exec operation=meta-data
+del
+%stop
+# stonith
+%setenv dflt_class=stonith dftl_rsc=rscexec_rsc_r1-stonith
+add type=null args="hostlist=node1"
+exec operation=start
+state
+exec operation=monitor
+exec operation=start
+exec operation=monitor
+exec operation=stop
+state
+exec operation=monitor
+exec operation=stop
+exec operation=monitor
+exec operation=meta-data
+del
diff --git a/lrm/test/testcases/rscexec.exp b/lrm/test/testcases/rscexec.exp
new file mode 100644
index 0000000..71bdc2e
--- /dev/null
+++ b/lrm/test/testcases/rscexec.exp
@@ -0,0 +1,117 @@
+.TRY List resources
+Currently no resources are managed by LRM.
+.SETENV dflt_rsc=rscexec_rsc_r1
+.TRY Add resource rscexec_rsc_r1 class=ocf type=lrmregtest provider=heartbeat args=delay=0
+Succeeded in adding this resource.
+.TRY List resources
+
+Resource ID:rscexec_rsc_r1
+Resource agent class:ocf
+Resource agent type:lrmregtest
+Resource agent provider:heartbeat
+Resource agent parameters:delay=0
+.TRY Exec rscexec_rsc_r1 op=start timeout=1000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+.TRY Show state rscexec_rsc_r1
+resource state:LRM_RSC_IDLE
+The resource 1 operations' information:
+ operation 'start' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=1000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters: delay=0
+.TRY Exec rscexec_rsc_r1 op=monitor timeout=1000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+.TRY Exec rscexec_rsc_r1 op=start timeout=1000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+.TRY Exec rscexec_rsc_r1 op=monitor timeout=1000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+.TRY Exec rscexec_rsc_r1 op=stop timeout=1000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Show state rscexec_rsc_r1
+resource state:LRM_RSC_IDLE
+The resource 3 operations' information:
+ operation 'start' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=1000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters: delay=0
+ operation 'monitor' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=1000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters: delay=0
+ operation 'stop' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=1000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters: delay=0
+.TRY Exec rscexec_rsc_r1 op=monitor timeout=1000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=7): [null]
+
+.TRY Exec rscexec_rsc_r1 op=stop timeout=1000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec rscexec_rsc_r1 op=monitor timeout=1000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=7): [null]
+
+.TRY Exec rscexec_rsc_r1 op=meta-data timeout=1000 interval=0 target=EVERYTIME args=
+> meta-data succeed (status=0,rc=0): [null]
+
+.TRY Delete resource rscexec_rsc_r1
+Succeeded in deleting this resource.
+.SETENV dflt_class=lsb dftl_rsc=rscexec_rsc_r1-lsb
+.TRY Add resource rscexec_rsc_r1 class=lsb type=lrmregtest provider=heartbeat args=
+Succeeded in adding this resource.
+.TRY Exec rscexec_rsc_r1 op=start timeout=1000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+.TRY Show state rscexec_rsc_r1
+resource state:LRM_RSC_IDLE
+The resource 1 operations' information:
+ operation 'start' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=1000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters:
+.TRY Exec rscexec_rsc_r1 op=monitor timeout=1000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+.TRY Exec rscexec_rsc_r1 op=start timeout=1000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+.TRY Exec rscexec_rsc_r1 op=monitor timeout=1000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+.TRY Exec rscexec_rsc_r1 op=stop timeout=1000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Show state rscexec_rsc_r1
+resource state:LRM_RSC_IDLE
+The resource 3 operations' information:
+ operation 'start' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=1000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters:
+ operation 'monitor' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=1000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters:
+ operation 'stop' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=1000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters:
+.TRY Exec rscexec_rsc_r1 op=monitor timeout=1000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=7): [null]
+
+.TRY Exec rscexec_rsc_r1 op=stop timeout=1000 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Exec rscexec_rsc_r1 op=monitor timeout=1000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=7): [null]
+
+.TRY Exec rscexec_rsc_r1 op=meta-data timeout=1000 interval=0 target=EVERYTIME args=
+> meta-data succeed (status=0,rc=0): [null]
+
+.TRY Delete resource rscexec_rsc_r1
+Succeeded in deleting this resource.
diff --git a/lrm/test/testcases/rscmgmt b/lrm/test/testcases/rscmgmt
new file mode 100644
index 0000000..8d745d3
--- /dev/null
+++ b/lrm/test/testcases/rscmgmt
@@ -0,0 +1,29 @@
+list
+# add/remove resources
+#
+add rsc=r1
+info rsc=r1
+list
+del rsc=r1
+%setenv dflt_class=lsb dflt_type=lrmregtest
+list
+add rsc=r1
+list
+del rsc=r1
+list
+#
+# a bit of mix
+#
+%setenv dflt_class=ocf
+add rsc=r1
+add rsc=r1 class=lsb type=lrmregtest
+add rsc=r1
+del rsc=r1
+add rsc=r1 class=lsb type=lrmregtest
+list
+add rsc=r2
+list
+del rsc=r1
+del rsc=r2
+list
+del rsc=r1
diff --git a/lrm/test/testcases/rscmgmt.exp b/lrm/test/testcases/rscmgmt.exp
new file mode 100644
index 0000000..3a5c4bf
--- /dev/null
+++ b/lrm/test/testcases/rscmgmt.exp
@@ -0,0 +1,74 @@
+.TRY List resources
+Currently no resources are managed by LRM.
+.TRY Add resource r1 class=ocf type=lrmregtest provider=heartbeat args=
+Succeeded in adding this resource.
+.TRY Show info r1
+
+Resource ID:r1
+Resource agent class:ocf
+Resource agent type:lrmregtest
+Resource agent provider:heartbeat
+.TRY List resources
+
+Resource ID:r1
+Resource agent class:ocf
+Resource agent type:lrmregtest
+Resource agent provider:heartbeat
+.TRY Delete resource r1
+Succeeded in deleting this resource.
+.SETENV dflt_class=lsb dflt_type=lrmregtest
+.TRY List resources
+Currently no resources are managed by LRM.
+.TRY Add resource r1 class=lsb type=lrmregtest provider=heartbeat args=
+Succeeded in adding this resource.
+.TRY List resources
+
+Resource ID:r1
+Resource agent class:lsb
+Resource agent type:lrmregtest
+Resource agent provider:heartbeat
+.TRY Delete resource r1
+Succeeded in deleting this resource.
+.TRY List resources
+Currently no resources are managed by LRM.
+.SETENV dflt_class=ocf
+.TRY Add resource r1 class=ocf type=lrmregtest provider=heartbeat args=
+Succeeded in adding this resource.
+.TRY Add resource r1 class=lsb type=lrmregtest provider=heartbeat args=
+ERROR: lrm_add_rsc(): got a return code HA_FAIL from a reply message of addrsc with function get_ret_from_msg.
+Failed to add this resource.
+.TRY Add resource r1 class=ocf type=lrmregtest provider=heartbeat args=
+ERROR: lrm_add_rsc(): got a return code HA_FAIL from a reply message of addrsc with function get_ret_from_msg.
+Failed to add this resource.
+.TRY Delete resource r1
+Succeeded in deleting this resource.
+.TRY Add resource r1 class=lsb type=lrmregtest provider=heartbeat args=
+Succeeded in adding this resource.
+.TRY List resources
+
+Resource ID:r1
+Resource agent class:lsb
+Resource agent type:lrmregtest
+Resource agent provider:heartbeat
+.TRY Add resource r2 class=ocf type=lrmregtest provider=heartbeat args=
+Succeeded in adding this resource.
+.TRY List resources
+
+Resource ID:r2
+Resource agent class:ocf
+Resource agent type:lrmregtest
+Resource agent provider:heartbeat
+
+Resource ID:r1
+Resource agent class:lsb
+Resource agent type:lrmregtest
+Resource agent provider:heartbeat
+.TRY Delete resource r1
+Succeeded in deleting this resource.
+.TRY Delete resource r2
+Succeeded in deleting this resource.
+.TRY List resources
+Currently no resources are managed by LRM.
+.TRY Delete resource r1
+ERROR: lrm_delete_rsc(): got a return code HA_FAIL from a reply message of delrsc with function get_ret_from_msg.
+Failed to delete this resource.
diff --git a/lrm/test/testcases/rscmgmt.log_filter b/lrm/test/testcases/rscmgmt.log_filter
new file mode 100755
index 0000000..34debc5
--- /dev/null
+++ b/lrm/test/testcases/rscmgmt.log_filter
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+awk '
+n<2 && /ERROR: on_msg_add_rsc: same id resource exists./ {n++; next}
+m<1 && /ERROR: on_msg_del_rsc: no rsc with id/ {m++; next}
+{print}
+END{
+ if( n!=2 )
+ print "ERROR: missed on_msg_add_rsc errors";
+ if( m!=1 )
+ print "ERROR: missed on_msg_del_rsc errors";
+}
+'
diff --git a/lrm/test/testcases/serialize b/lrm/test/testcases/serialize
new file mode 100644
index 0000000..cad96b3
--- /dev/null
+++ b/lrm/test/testcases/serialize
@@ -0,0 +1,33 @@
+list
+# allow for a delay of 2 seconds
+%setenv dflt_timeout=2500
+add rsc=r1 args="delay=2"
+#
+# we run the next three ops in the background
+# in case ops are not serialized, the lrmregtest RA should complain
+#
+%bg 2
+exec operation=start
+# insert sleeps to make sure that the operations are started in
+# the order given here
+%sleep 1
+# set timeouts high enough so that no op fails
+exec operation=start timeout=3000
+%sleep 1
+%bgrepeat 4
+exec operation=monitor timeout=11000
+%sleep 11
+state
+exec operation=stop
+state
+del rsc=r1
+#
+#
+#
+%setenv dflt_rsc=r2 dflt_timeout=10500
+add rsc=r2 args="ignore_TERM=1 delay=9"
+exec operation=start
+%bg
+exec operation=monitor timeout=500
+exec operation=monitor
+del rsc=r2
diff --git a/lrm/test/testcases/serialize.exp b/lrm/test/testcases/serialize.exp
new file mode 100644
index 0000000..b290c95
--- /dev/null
+++ b/lrm/test/testcases/serialize.exp
@@ -0,0 +1,100 @@
+.TRY List resources
+Currently no resources are managed by LRM.
+.SETENV dflt_timeout=2500
+.TRY Add resource r1 class=ocf type=lrmregtest provider=heartbeat args=delay=2
+Succeeded in adding this resource.
+.BG 2
+.BG test line 10/job 1 runs in background
+.SLEEP 1
+.BG test line 15/job 2 runs in background
+.SLEEP 1
+.BGREPEAT 4
+.BG test line 18/job 1 runs in background
+.BG test line 18/job 2 runs in background
+.BG test line 18/job 3 runs in background
+.BG test line 18/job 4 runs in background
+.SLEEP 11
+.TRY Show state r1
+resource state:LRM_RSC_IDLE
+The resource 2 operations' information:
+ operation 'start' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=3000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters: delay=2
+ operation 'monitor' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=11000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters: delay=2
+.TRY Exec r1 op=stop timeout=2500 interval=0 target=EVERYTIME args=
+> stop succeed (status=0,rc=0): [null]
+
+.TRY Show state r1
+resource state:LRM_RSC_IDLE
+The resource 3 operations' information:
+ operation 'start' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=3000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters: delay=2
+ operation 'monitor' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=11000, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters: delay=2
+ operation 'stop' [call_id=(removed)]:
+ start_delay=0, interval=0, timeout=2500, app_name=lrmadmin
+ rc=0 (ok), op_status=0 (succeed)
+ parameters: delay=2
+.TRY Delete resource r1
+Succeeded in deleting this resource.
+.SETENV dflt_rsc=r2 dflt_timeout=10500
+.TRY Add resource r2 class=ocf type=lrmregtest provider=heartbeat args=ignore_TERM=1 delay=9
+Succeeded in adding this resource.
+.TRY Exec r2 op=start timeout=10500 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+.BG
+.BG test line 31/job 1 runs in background
+.TRY Exec r2 op=monitor timeout=10500 interval=0 target=EVERYTIME args=
+ERROR: This operation has timed out - no result from lrmd.
+.TRY Delete resource r2
+Succeeded in deleting this resource.
+.BG test line 10/job 1 finished (exit code: 0):
+==========test:10:1 start output==========
+.TRY Exec r1 op=start timeout=2500 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:10:1 end output==========
+.BG test line 15/job 2 finished (exit code: 0):
+==========test:15:2 start output==========
+.TRY Exec r1 op=start timeout=3000 interval=0 target=EVERYTIME args=
+> start succeed (status=0,rc=0): [null]
+
+==========test:15:2 end output==========
+.BG test line 18/job 1 finished (exit code: 0):
+==========test:18:1 start output==========
+.TRY Exec r1 op=monitor timeout=11000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:18:1 end output==========
+.BG test line 18/job 2 finished (exit code: 0):
+==========test:18:2 start output==========
+.TRY Exec r1 op=monitor timeout=11000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:18:2 end output==========
+.BG test line 18/job 3 finished (exit code: 0):
+==========test:18:3 start output==========
+.TRY Exec r1 op=monitor timeout=11000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:18:3 end output==========
+.BG test line 18/job 4 finished (exit code: 0):
+==========test:18:4 start output==========
+.TRY Exec r1 op=monitor timeout=11000 interval=0 target=EVERYTIME args=
+> monitor succeed (status=0,rc=0): [null]
+
+==========test:18:4 end output==========
+.BG test line 31/job 1 finished (exit code: 0):
+==========test:31:1 start output==========
+.TRY Exec r2 op=monitor timeout=500 interval=0 target=EVERYTIME args=
+ERROR: This operation has timed out - no result from lrmd.
+==========test:31:1 end output==========
diff --git a/lrm/test/testcases/stonith b/lrm/test/testcases/stonith
new file mode 100644
index 0000000..f21cf18
--- /dev/null
+++ b/lrm/test/testcases/stonith
@@ -0,0 +1,2 @@
+%extcheck xmllint.sh many
+%shell stonith -L | while read p; do echo $p:heartbeat; stonith -m -t $p; done
diff --git a/lrm/test/testcases/stonith.exp b/lrm/test/testcases/stonith.exp
new file mode 100644
index 0000000..f9f1042
--- /dev/null
+++ b/lrm/test/testcases/stonith.exp
@@ -0,0 +1,2 @@
+.EXTCHECK xmllint.sh many
+.SHELL stonith -L | while read p; do echo $p:heartbeat; stonith -m -t $p; done
diff --git a/lrm/test/testcases/xmllint.sh b/lrm/test/testcases/xmllint.sh
new file mode 100755
index 0000000..f61288c
--- /dev/null
+++ b/lrm/test/testcases/xmllint.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+gawk -v many="$1" '
+BEGIN{XMLLINT="xmllint --noout -";}
+function chkoutput(ra) {
+ if( ra=="" ) return;
+ if( close(XMLLINT) ) # we need gawk for this
+ print "xmllint reported error in RA:",ra;
+}
+many=="many" && /^[a-zA-Z][^:]*:[a-zA-Z0-9]+$/ {
+ chkoutput(ra);
+ ra=$0;
+ next;
+}
+{ print | XMLLINT }
+END{
+ if( many!="many" )
+ chkoutput("noname");
+}
+'