[CRIU] [PATCH] zdtm: call test_daemon when a test state is created

Andrey Vagin avagin at openvz.org
Mon Nov 9 04:35:39 PST 2015


From: Andrew Vagin <avagin at openvz.org>

Otherwise a test can create or delete some mappings:

8306  getppid()                         = 83
8306  kill(83, SIGTERM)                 = 0
8306  clock_gettime(CLOCK_BOOTTIME, {1916694, 423447417}) = 0
8306  clock_gettime(CLOCK_MONOTONIC_COARSE, {1916694, 419509587}) = 0
8306  open("/etc/localtime", O_RDONLY|O_CLOEXEC)              = 3
8306  fstat(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
8306  fstat(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
8306  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 <unfinished ...>
8306  <... mmap resumed> )              = 0x3fffa8570000
8306  read(3, "TZif2...", 4096) = 127
8306  lseek(3, -71, SEEK_CUR)             = 56
8306  read(3, "TZif2...", 4096) = 71
8306  close(3 <unfinished ...>
8306  <... close resumed> )             = 0
8306  munmap(0x3fffa8570000, 4096 <unfinished ...>
8306  <... munmap resumed> )            = 0
8306  write(2, "12:15:36.347:    84: ( start) boottime 1916694 boottime-coarse 1916694 total_sleep_time 0\n", 90 )             = 90
8306  futex(0x10020850, FUTEX_WAIT, 0, NULL <unfinished ...>

Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 test/zdtm/live/static/posix_timers.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test/zdtm/live/static/posix_timers.c b/test/zdtm/live/static/posix_timers.c
index fa8311f..97fd3c0 100644
--- a/test/zdtm/live/static/posix_timers.c
+++ b/test/zdtm/live/static/posix_timers.c
@@ -420,13 +420,12 @@ int main(int argc, char **argv)
 
 	usleep(500 * 1000);
 
-	test_daemon();
-
 	clock_gettime(CLOCK_REALTIME, &start);
 	err = get_total_sleep_time(&sleep_start, "start");
 	if (err)
 		return err;
 
+	test_daemon();
 	test_waitsig();
 
 	clock_gettime(CLOCK_REALTIME, &end);
-- 
2.4.3



More information about the CRIU mailing list