[DRBD-cvs] testing by lars; * add WIFSIGNALED test to wbtest, and er...

drbd-user@lists.linbit.com drbd-user@lists.linbit.com
Thu, 17 Jun 2004 03:34:17 +0200 (CEST)


DRBD CVS committal

Author  : lars
Project : drbd
Module  : testing

Dir     : drbd/testing/CTH/wbtest


Modified Files:
      Tag: rel-0_7-branch
	wbtest.c 


Log Message:
* add WIFSIGNALED test to wbtest, and error out on child errors as well! 
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/testing/CTH/wbtest/Attic/wbtest.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -3 -r1.1.2.1 -r1.1.2.2
--- wbtest.c	27 May 2004 12:44:18 -0000	1.1.2.1
+++ wbtest.c	17 Jun 2004 01:34:12 -0000	1.1.2.2
@@ -185,8 +185,18 @@
 					"child %u exited with status %u (%u remain)\n",
 					reaped_pid, WEXITSTATUS(status),
 					*kids);
-				// don't error here, we want to keep going
+				err = 1; // DO error here, we do NOT want to keep going
 			}
+			if (WAIT_ON_SINGLE_CHILD == single) {
+				break;
+			}
+		} else if (WIFSIGNALED(status)) {
+			(*kids)--;
+			fprintf(stderr,
+				"child %u exited with status %u (%u remain)\n",
+				reaped_pid, WTERMSIG(status),
+				*kids);
+			err = 1; // DO error here, we do NOT want to keep going
 			if (WAIT_ON_SINGLE_CHILD == single) {
 				break;
 			}