[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/dlm/tests/usertest asttest.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]