cluster/dlm/tests/usertest asttest.c
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
dlm/tests/usertest/asttest.c +9 -1
@@ -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);