cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/dlm/tests/usertest asttest.c
@ 2007-02-19 14:01 pcaulfield
  0 siblings, 0 replies; only message in thread
From: pcaulfield @ 2007-02-19 14:01 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield at sourceware.org	2007-02-19 14:01:45

Modified files:
	dlm/tests/usertest: asttest.c 

Log message:
	Add delay switch

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/tests/usertest/asttest.c.diff?cvsroot=cluster&r1=1.3&r2=1.4

--- cluster/dlm/tests/usertest/asttest.c	2006/03/03 13:06:58	1.3
+++ cluster/dlm/tests/usertest/asttest.c	2007/02/19 14:01:45	1.4
@@ -138,6 +138,7 @@
 {
     char *resource = "LOCK-NAME";
     int  flags = 0;
+    int  delay = 0;
     int  status;
     int  mode = LKM_EXMODE;
     int  convmode = -1;
@@ -148,7 +149,7 @@
     /* Deal with command-line arguments */
     opterr = 0;
     optind = 0;
-    while ((opt=getopt(argc,argv,"?m:nqupc:CvV")) != EOF)
+    while ((opt=getopt(argc,argv,"?m:nqupc:d:CvV")) != EOF)
     {
 	switch(opt)
 	{
@@ -188,6 +189,10 @@
 	    do_crash = 1;
 	    break;
 
+	case 'd':
+	    delay = atoi(optarg);	
+	    break;
+
 	case 'V':
 	    printf("\nasttest version 0.1\n\n");
 	    exit(1);
@@ -242,6 +247,9 @@
     else
 	poll_for_ast();
 
+    if (delay)
+        sleep(delay);
+
     if (!quiet)
     {
         fprintf(stderr, "unlocking %s...", resource);



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-19 14:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-19 14:01 [Cluster-devel] cluster/dlm/tests/usertest asttest.c pcaulfield

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).