From 9bbb2b092cf6fe0af87683d02eaf505aac87f65f Mon Sep 17 00:00:00 2001 From: Andrew Vagin Date: Mon, 9 Nov 2015 15:35:00 +0300 Subject: [PATCH] zdtm: call test_daemon when a test state is created 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 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 8306 <... close resumed> ) = 0 8306 munmap(0x3fffa8570000, 4096 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 Reported-by: Mr Jenkins Signed-off-by: Andrew Vagin Acked-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- 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 fa8311f7b..97fd3c0a9 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);