[DRBD-cvs] svn commit by lars - r2437 - trunk/testing/testsuite - Ernest Montrose (stratus): This patch fixes an issue wh

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Thu Sep 21 09:07:52 CEST 2006


Author: lars
Date: 2006-09-21 09:07:50 +0200 (Thu, 21 Sep 2006)
New Revision: 2437

Modified:
   trunk/testing/testsuite/testsuite.pl
Log:
Ernest Montrose (stratus):

This patch fixes an issue where testsuite.pl hangs and timeouts waiting
for result from a drbd device under test.  When this happens both the
agent and the client are waiting for data from each other.
Testsuits.pl eventually fails with a timeout.  Send_command() changed to
synchronize the I/o and close the descriptors when done.



Modified: trunk/testing/testsuite/testsuite.pl
===================================================================
--- trunk/testing/testsuite/testsuite.pl	2006-09-20 15:16:51 UTC (rev 2436)
+++ trunk/testing/testsuite/testsuite.pl	2006-09-21 07:07:50 UTC (rev 2437)
@@ -368,7 +368,13 @@
 
       exit 0;
     }
- 
+    $local_reply = "";
+    while (<CHILD1>) {
+        $local_reply .= $_;
+    }
+    push @reply, $local_reply;
+    close(CHILD1);
+
     my $pid2 = open(CHILD2, "-|");
     if ($pid2 == 0) {
       print {$config{'node2'}} $command."\n";
@@ -378,16 +384,11 @@
     }
 
     $local_reply = "";
-    while (<CHILD1>) {
-      $local_reply .= $_;
-    }
-    push @reply, $local_reply;
-
-    $local_reply = "";
     while (<CHILD2>) {
       $local_reply .= $_;
     }
     push @reply, $local_reply;
+    close(CHILD2);
   }
 
   return process_reply($command, @reply);



More information about the drbd-cvs mailing list