Hi Julian,
Neither mine "sleep 0.1" or your version with "while [! -f ............" are race condition free.
I suggest that we add an option to gen-ust-events to wait before the first event is generated.
gen_kernel_test_events already have this functionality to wait before the first event.
Something like this
static struct option long_options[] =
{
/* These options set a flag. */
{"iter", required_argument, 0, 'i'},
{"wait", required_argument, 0, 'w'},
{"sync-after-first-event", required_argument, 0, 'a'},
{"sync-before-last-event", required_argument, 0, 'b'},
{"sync-before-last-event-touch", required_argument, 0, 'c'},
{"sync-before-exit", required_argument, 0, 'd'},
{"sync-before-exit-touch", required_argument, 0, 'e'},
+ {"sync-before-first-event", required_argument, 0, 'f'},
{0, 0, 0, 0}
};
....
I will create one or more patches for this tomorrow