From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager/src daemons/restree.c daemon ...
Date: 22 Mar 2007 23:16:05 -0000 [thread overview]
Message-ID: <20070322231605.8988.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: lhh at sourceware.org 2007-03-22 23:15:59
Modified files:
rgmanager/src/daemons: restree.c
rgmanager/src/daemons/tests: gentests.sh runtests.sh
rgmanager/src/resources: ip.sh
Added files:
rgmanager/src/daemons/tests: test001.start.expected
test001.stop.expected
test002.start.expected
test002.stop.expected
test003.start.expected
test003.stop.expected
test004.start.expected
test004.stop.expected
test005.start.expected
test005.stop.expected
test006.start.expected
test006.stop.expected
test007.start.expected
test007.stop.expected
test008.start.expected
test008.stop.expected
test009.start.expected
test009.stop.expected
test010.start.expected
test010.stop.expected
test011.start.expected
test011.stop.expected
test012.start.expected
test012.stop.expected
test013.start.expected
test013.stop.expected
test014.start.expected
test014.stop.expected
test015.start.expected
test015.stop.expected
test016.start.expected
test016.stop.expected test017.conf
test017.start.expected
test017.stop.expected
Log message:
Fix 212121, patch 4. Also, add automated start/stop order checks to src/daemons/tests
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.10.2.14&r2=1.10.2.15
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test001.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test001.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test002.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test002.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test003.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test003.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test004.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test004.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test005.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test005.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test006.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test006.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test007.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test007.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test008.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test008.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test009.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test009.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test010.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test010.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test011.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test011.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test012.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test012.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test013.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test013.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test014.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test014.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test015.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test015.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test016.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test016.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test017.conf.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test017.start.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/test017.stop.expected.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/gentests.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/tests/runtests.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/ip.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.16&r2=1.5.2.17
--- cluster/rgmanager/src/daemons/restree.c 2007/03/20 19:40:06 1.10.2.14
+++ cluster/rgmanager/src/daemons/restree.c 2007/03/22 23:15:58 1.10.2.15
@@ -46,6 +46,9 @@
int _res_op(resource_node_t **tree, resource_t *first, char *type,
void * __attribute__((unused))ret, int op);
void print_env(char **env);
+static inline int _res_op_internal(resource_node_t **tree, resource_t *first,
+ char *type, void *__attribute__((unused))ret, int realop,
+ resource_node_t *node);
/* XXX from reslist.c */
void * act_dup(resource_act_t *acts);
@@ -947,8 +950,8 @@
static inline int
-_xx_child_internal(resource_node_t *node, resource_node_t *child, void *ret,
- int op)
+_xx_child_internal(resource_node_t *node, resource_t *first,
+ resource_node_t *child, void *ret, int op)
{
int x;
resource_rule_t *rule = node->rn_resource->r_rule;
@@ -964,7 +967,7 @@
}
}
- return _res_op_internal(&child, child->rn_resource,
+ return _res_op_internal(&child, first,
child->rn_resource->r_rule->rr_type,
ret, op, child);
}
@@ -979,13 +982,13 @@
if (op == RS_START || op == RS_STATUS) {
list_for(&node->rn_child, child, y) {
- rv = _xx_child_internal(node, child, ret, op);
+ rv = _xx_child_internal(node, first, child, ret, op);
if (rv)
return rv;
}
} else {
list_for_rev(&node->rn_child, child, y) {
- rv += _xx_child_internal(node, child, ret, op);
+ rv += _xx_child_internal(node, first, child, ret, op);
}
}
--- cluster/rgmanager/src/daemons/tests/gentests.sh 2005/01/25 17:37:33 1.1.2.1
+++ cluster/rgmanager/src/daemons/tests/gentests.sh 2007/03/22 23:15:58 1.1.2.2
@@ -34,6 +34,25 @@
echo OK
done
+
+#
+# Start/stop tests (noop)
+#
+for t in $TESTS; do
+ declare SERVICES=$(echo "xpath /cluster/rm/service" | xmllint $t.conf --shell | grep content | cut -f2 -d'=')
+ declare phase svc
+ echo -n "Generating $t exec..."
+ for phase in start stop; do
+ echo -n "$phase..."
+ rm -f $t.$phase.expected
+ for svc in $SERVICES; do
+ ../rg_test ../../resources noop $t.conf $phase service $svc >> $t.$phase.expected 2> /dev/null
+ done
+ done
+ echo "OK"
+done
+
+
#
# Delta tests
#
--- cluster/rgmanager/src/daemons/tests/runtests.sh 2005/01/25 17:37:33 1.1.2.1
+++ cluster/rgmanager/src/daemons/tests/runtests.sh 2007/03/22 23:15:58 1.1.2.2
@@ -42,6 +42,41 @@
echo OK
done
+
+#
+# Start/stop tests (noop)
+#
+for t in $TESTS; do
+ declare SERVICES=$(echo "xpath /cluster/rm/service" | xmllint $t.conf --shell | grep content | cut -f2 -d'=')
+ declare phase svc
+ echo -n " Checking $t.conf..."
+ for phase in start stop; do
+ echo -n "$phase..."
+ rm -f $t.$phase.out
+ for svc in $SERVICES; do
+ ../rg_test ../../resources noop $t.conf $phase service $svc >> $t.$phase.out 2> $t.$phase.out.stderr
+ done
+ diff -w $t.$phase.expected $t.$phase.out
+ if [ $? -ne 0 ]; then
+ echo "FAILED"
+ echo "*** Start Test $t failed"
+ exit 1
+ fi
+ if grep -q "allocation trace" $t.$phase.out.stderr; then
+ echo "FAILED - memory leak"
+ echo "*** Memory Test $t failed"
+ echo
+ echo Output:
+ echo
+ cat $t.$phase.out.stderr
+ exit 1
+ fi
+ rm -f $t.$phase.out $t.$phase.out.stderr
+ done
+ echo "OK"
+done
+
+
#
# Delta tests
#
--- cluster/rgmanager/src/resources/ip.sh 2006/12/13 18:19:57 1.5.2.16
+++ cluster/rgmanager/src/resources/ip.sh 2007/03/22 23:15:59 1.5.2.17
@@ -887,6 +887,11 @@
if [ $? -ne 0 ]; then
exit $OCF_ERR_GENERIC
fi
+ export OCF_CHECK_LEVEL=10
+ ip_op ${OCF_RESKEY_family} status ${OCF_RESKEY_address}
+ if [ $? -ne 0 ]; then
+ exit $OCF_ERR_GENERIC
+ fi
if [ $NFS_TRICKS -eq 0 ]; then
if [ "$OCF_RESKEY_nfslock" = "yes" ] || \
reply other threads:[~2007-03-22 23:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070322231605.8988.qmail@sourceware.org \
--to=lhh@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).