[Devel] [PATCH 6/8] cr_tests: simple: Make output more useful

Matt Helsley matthltc at us.ibm.com
Tue Mar 9 14:48:18 PST 2010


I'd have thought seeing "hello, world!" was a sign the test passed. Make the
output indicative of the test results.

Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
---
 simple/ckpt.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/simple/ckpt.c b/simple/ckpt.c
index 2f7d0bb..4bbef81 100644
--- a/simple/ckpt.c
+++ b/simple/ckpt.c
@@ -65,17 +65,17 @@ int main(int argc, char *argv[])
 	dup2(fileno(file), 1);
 	dup2(fileno(file), 2);
 
-	fprintf(file, "hello, world!\n");
+	fprintf(file, "Invoking checkpoint syscall... ");
 	fflush(file);
 
 	ret = syscall(__NR_checkpoint, pid, ckptfd, CHECKPOINT_SUBTREE, logfd);
 	if (ret < 0) {
+		fprintf(file, " FAILED.\n");
 		perror("checkpoint");
 		exit(2);
 	}
 
-	fprintf(file, "world, hello!\n");
-	fprintf(file, "ret = %d\n", ret);
+	fprintf(file, "PASSED.\nret = %d\n", ret);
 	fflush(file);
 	close(logfd);
 
-- 
1.6.3.3

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list