[CRIU] [PATCH 1/3] zdtm: Make pthread00 to use exit(0)

Cyrill Gorcunov gorcunov at openvz.org
Fri Nov 23 04:49:04 EST 2012


No need for error code here, we test results
by special bitmap.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 test/zdtm/live/static/pthread00.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/test/zdtm/live/static/pthread00.c b/test/zdtm/live/static/pthread00.c
index 7b7c060..20d200a 100644
--- a/test/zdtm/live/static/pthread00.c
+++ b/test/zdtm/live/static/pthread00.c
@@ -52,7 +52,7 @@ static void *ff1(void *map)
 
 	pid = test_fork();
 	if (pid < 0) {
-		exit(1);
+		exit(0);
 	} else if (pid == 0) {
 		SET_CREATED(map, 4);
 		while (1) {
@@ -64,12 +64,12 @@ static void *ff1(void *map)
 			if (ret) {
 				if (IS_STARTED(map, 4)) {
 					SET_FAILED(map, 4);
-					exit(4);
+					exit(0);
 				}
 			} else {
 				if (IS_STARTED(map, 4)) {
 					SET_PASSED(map, 4);
-					exit(4);
+					exit(0);
 				}
 			}
 			sleep(1);
@@ -115,7 +115,7 @@ static void *f1(void *map)
 	pid = test_fork();
 	if (pid < 0) {
 		fail("Failed to test_fork()\n");
-		exit(1);
+		exit(0);
 	} else if (pid == 0) {
 		SET_CREATED(map, 2);
 		while (1) {
@@ -127,12 +127,12 @@ static void *f1(void *map)
 			if (ret) {
 				if (IS_STARTED(map, 2)) {
 					SET_FAILED(map, 2);
-					exit(2);
+					exit(0);
 				}
 			} else {
 				if (IS_STARTED(map, 2)) {
 					SET_PASSED(map, 2);
-					exit(2);
+					exit(0);
 				}
 			}
 			sleep(1);
@@ -175,7 +175,7 @@ static void *f2(void *map)
 	pid = test_fork();
 	if (pid < 0) {
 		fail("Failed to test_fork()\n");
-		exit(1);
+		exit(0);
 	} else if (pid == 0) {
 		SET_CREATED(map, 0);
 		while (1) {
-- 
1.7.7.6



More information about the CRIU mailing list