Blob Blame History Raw
From 4152a88cf588e94c9bf6edb3706cdf81fd25bce2 Mon Sep 17 00:00:00 2001
From: Andrei Vagin <avagin@gmail.com>
Date: Wed, 22 Dec 2021 17:08:42 -0800
Subject: [PATCH 100/120] zdtm/static/uffd-events: add more log messages

Signed-off-by: Andrei Vagin <avagin@gmail.com>
---
 test/zdtm/static/uffd-events.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/test/zdtm/static/uffd-events.c b/test/zdtm/static/uffd-events.c
index c811bcf4c..edd6c09ca 100644
--- a/test/zdtm/static/uffd-events.c
+++ b/test/zdtm/static/uffd-events.c
@@ -153,28 +153,30 @@ int main(int argc, char **argv)
 		return 1;
 	}
 
+	test_msg("For a child process\n");
 	pid = fork();
 	if (pid < 0) {
 		fail("Can't fork");
 		return 1;
 	}
 
-	/* check madvise(MADV_DONTNEED) */
+	test_msg("Check madvise(MADV_DONTNEED)\n");
 	if (check_madv_dn(1))
 		return 1;
 
-	/* check growing mremap */
+	test_msg("Check growing mremap\n");
 	if (check_mremap_grow(2))
 		return 1;
 
-	/* check swapped mappings */
+	test_msg("Check swapped mappings\n");
 	if (check_swapped_mappings(3))
 		return 1;
 
 	if (pid) {
-		int status;
+		int status = -1;
 
-		waitpid(-1, &status, 0);
+		test_msg("Wait for the child %d\n", pid);
+		waitpid(pid, &status, 0);
 		if (status) {
 			fail("child failed");
 			return status;
-- 
2.34.1