Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: lib by lars from ([email protected])
2. Linux-HA CVS: mgmt by zhenh from
([email protected])
3. Linux-HA CVS: mgmt by zhenh from
([email protected])
4. Linux-HA CVS: lib by davidlee from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sun, 8 Jan 2006 14:47:37 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by lars from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : lars
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/clplumbing
Modified Files:
ipcsocket.c
Log Message:
Fix typo in comment.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/ipcsocket.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -3 -r1.164 -r1.165
--- ipcsocket.c 5 Dec 2005 14:54:31 -0000 1.164
+++ ipcsocket.c 8 Jan 2006 21:47:36 -0000 1.165
@@ -1,4 +1,4 @@
-/* $Id: ipcsocket.c,v 1.164 2005/12/05 14:54:31 sunjd Exp $ */
+/* $Id: ipcsocket.c,v 1.165 2006/01/08 21:47:36 lars Exp $ */
/*
* ipcsocket unix domain socket implementation of IPC abstraction.
*
@@ -633,7 +633,7 @@
/*
- * Called by socket_destory(). Disconnect the connection
+ * Called by socket_destroy(). Disconnect the connection
* and set ch_status to IPC_DISCONNECT.
*
* parameters :
------------------------------
Message: 2
Date: Mon, 9 Jan 2006 00:50:07 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/client
Added Files:
.cvsignore
Log Message:
add .cvsignore
------------------------------
Message: 3
Date: Mon, 9 Jan 2006 00:50:54 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/daemon
Added Files:
.cvsignore
Log Message:
add .cvsignore
------------------------------
Message: 4
Date: Mon, 9 Jan 2006 05:38:15 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by davidlee from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : davidlee
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/clplumbing
Modified Files:
ipctest.c
Log Message:
Optional verbosity (-v). Allow adjustment of iterations (-i <n>).
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/ipctest.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- ipctest.c 18 Dec 2005 22:02:39 -0000 1.43
+++ ipctest.c 9 Jan 2006 12:38:14 -0000 1.44
@@ -1,4 +1,4 @@
-/* $Id: ipctest.c,v 1.43 2005/12/18 22:02:39 alan Exp $ */
+/* $Id: ipctest.c,v 1.44 2006/01/09 12:38:14 davidlee Exp $ */
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -26,6 +26,8 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
+/* libgen.h: for 'basename()' on Solaris */
+#include <libgen.h>
#include <glib.h>
#include <clplumbing/cl_log.h>
#include <clplumbing/cl_poll.h>
@@ -55,6 +57,11 @@
static int (*PollFunc)(struct pollfd * fds, unsigned int, int)
= (int (*)(struct pollfd * fds, unsigned int, int)) poll;
static gboolean checkmsg(IPC_Message* rmsg, const char * who, int rcount);
+
+int iter_def = 10000; /* number of iterations */
+int verbosity = 0; /* verbosity level */
+const char *procname;
+
static int
channelpair(TestFunc_t clientfunc, TestFunc_t serverfunc, int count)
{
@@ -62,12 +69,20 @@
int rc = 0;
int waitstat = 0;
+ if (verbosity >= 1) {
+ cl_log(LOG_DEBUG, "%s[%d]%d: main process",
+ procname, (int)getpid(), __LINE__);
+ }
switch (fork()) {
case -1:
cl_perror("can't fork");
exit(1);
break;
default: /* Parent */
+ if (verbosity >= 1) {
+ cl_log(LOG_DEBUG, "%s[%d]%d: main waiting...",
+ procname, (int)getpid(), __LINE__);
+ }
while (wait(&waitstat) > 0) {
if (WIFEXITED(waitstat)) {
rc += WEXITSTATUS(waitstat);
@@ -75,6 +90,10 @@
rc += 1;
}
}
+ if (verbosity >= 1) {
+ cl_log(LOG_DEBUG, "%s[%d]%d: main ended rc: %d",
+ procname, (int)getpid(), __LINE__, rc);
+ }
if (rc > 127) {
rc = 127;
}
@@ -99,7 +118,15 @@
case 0: /* echo "client" Child */
channels[1]->ops->destroy(channels[1]);
channels[1] = NULL;
+ if (verbosity >= 1) {
+ cl_log(LOG_DEBUG, "%s[%d]%d: client
starting...",
+ procname, (int)getpid(), __LINE__);
+ }
rc = clientfunc(channels[0], count);
+ if (verbosity >= 1) {
+ cl_log(LOG_DEBUG, "%s[%d]%d: client ended
rc:%d",
+ procname, (int)getpid(), __LINE__, rc);
+ }
exit (rc > 127 ? 127 : rc);
break;
@@ -108,6 +135,10 @@
}
channels[0]->ops->destroy(channels[0]);
channels[0] = NULL;
+ if (verbosity >= 1) {
+ cl_log(LOG_DEBUG, "%s[%d]%d: server starting...",
+ procname, (int)getpid(), __LINE__);
+ }
rc = serverfunc(channels[1], count);
wait(&waitstat);
if (WIFEXITED(waitstat)) {
@@ -115,6 +146,10 @@
}else{
rc += 1;
}
+ if (verbosity >= 1) {
+ cl_log(LOG_DEBUG, "%s[%d]%d: server ended rc:%d",
+ procname, (int)getpid(), __LINE__, rc);
+ }
return(rc);
}
@@ -183,16 +218,48 @@
int
main(int argc, char ** argv)
{
+ int argflag, argerrs;
+ int iterations;
int rc = 0;
+ /*
+ * Check and process arguments.
+ * -v: verbose
+ * -i: number of iterations
+ */
+ procname = basename(argv[0]);
+
+ argerrs = 0;
+ iterations = iter_def;
+ while ((argflag = getopt(argc, argv, "i:v")) != EOF) {
+ switch (argflag) {
+ case 'i': /* iterations */
+ iterations = atoi(optarg);
+ break;
+ case 'v': /* verbosity */
+ verbosity++;
+ break;
+ default:
+ argerrs++;
+ break;
+ }
+ }
+ if (argerrs) {
+ fprintf(stderr, "Usage: %s [-v] [-i iterations]\n"
+ "\t-v : verbose\n"
+ "\t-i : iterations (default %d)\n",
+ procname, iter_def);
+ exit(1);
+ }
+
cl_malloc_forced_for_glib();
- cl_log_set_entity("ipctest");
+ cl_log_set_entity(procname);
cl_log_enable_stderr(TRUE);
- rc += transport_tests(10000);
+ rc += transport_tests(iterations);
#if 0
/* Broken for the moment - need to fix it long term */
@@ -201,7 +268,7 @@
g_main_set_poll_func(cl_glibpoll);
ipc_set_pollfunc(cl_poll);
- rc += transport_tests(50000);
+ rc += transport_tests(5 * iterations);
#endif
cl_log(LOG_INFO, "TOTAL errors: %d", rc);
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 26, Issue 7
*******************************************