[CRIU] [PATCH] zdtm: fix msg reporting

Konstantin Neumoin kneumoin at parallels.com
Thu Sep 11 02:16:50 PDT 2014


avoid err() for regular msg reporting
---
 test/zdtm/live/static/grow_map03.c  | 2 +-
 test/zdtm/live/static/selfexe00.c   | 4 ++--
 test/zdtm/live/static/tty00.c       | 2 +-
 test/zdtm/live/transition/maps007.c | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/zdtm/live/static/grow_map03.c b/test/zdtm/live/static/grow_map03.c
index 1507b6e..d9a750b 100644
--- a/test/zdtm/live/static/grow_map03.c
+++ b/test/zdtm/live/static/grow_map03.c
@@ -29,7 +29,7 @@ int main(int argc, char **argv)
 	addr1 = mmap(start_addr + PAGE_SIZE * 5, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_GROWSDOWN, -1, 0);
 	addr2 = mmap(start_addr + PAGE_SIZE * 3, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_GROWSDOWN, -1, 0);
 
-	err("%p %p\n", addr1, addr2);
+	test_msg("%p %p\n", addr1, addr2);
 
 	test_daemon();
 	test_waitsig();
diff --git a/test/zdtm/live/static/selfexe00.c b/test/zdtm/live/static/selfexe00.c
index a42737c..a03c0e9 100644
--- a/test/zdtm/live/static/selfexe00.c
+++ b/test/zdtm/live/static/selfexe00.c
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
 		exit(1);
 	}
 	path_before[ret] = 0;
-	err("%s\n", path_before);
+	test_msg("%s\n", path_before);
 
 	test_daemon();
 	test_waitsig();
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
 		exit(1);
 	}
 	path_after[ret] = 0;
-	err("%s\n", path_after);
+	test_msg("%s\n", path_after);
 
 	if (!strcmp(path_before, path_after))
 		pass();
diff --git a/test/zdtm/live/static/tty00.c b/test/zdtm/live/static/tty00.c
index f9dfe6b..c35e9b4 100644
--- a/test/zdtm/live/static/tty00.c
+++ b/test/zdtm/live/static/tty00.c
@@ -92,7 +92,7 @@ int main(int argc, char ** argv)
 			return 1;
 		}
 	} else
-		err("The child has been killed by %d", WTERMSIG(status));
+		test_msg("The child has been killed by %d\n", WTERMSIG(status));
 
 	pass();
 
diff --git a/test/zdtm/live/transition/maps007.c b/test/zdtm/live/transition/maps007.c
index a5788c3..21960ef 100644
--- a/test/zdtm/live/transition/maps007.c
+++ b/test/zdtm/live/transition/maps007.c
@@ -119,7 +119,7 @@ int main(int argc, char **argv)
 			t[0] = lrand48();
 		}
 	}
-	err("count %d", count);
+	test_msg("count %d\n", count);
 
 	if (child == 0) {
 		futex_set_and_wake(&shm->stop, 2);
@@ -152,7 +152,7 @@ int main(int argc, char **argv)
 				goto err;
 			}
 		}
-		err("readable %d", readable);
+		test_msg("readable %d\n", readable);
 		kill(child, SIGTRAP);
 		wait(NULL);
 		pass();
-- 
1.7.11.7



More information about the CRIU mailing list