Add a sleep to leave time for the ustconsumer thread to initialize correctly
before the fork.
Most of the time the consumer was not yet started at the time of the fork so
a bunch of initializations were not done and the fork code path was not
tested properly.
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Acked-by: Nils Carlson <nils.carlson@ericsson.com>
printf("Fork test program, parent pid is %d\n", getpid());
trace_mark(ust, before_fork, MARK_NOARGS);
+ /* Sleep here to make sure the consumer is initialized before we fork */
+ sleep(1);
+
result = fork();
if(result == -1) {
perror("fork");