+ # We just want the app to register, no event generated.
+ # But we want the pid for the app since we need to validate its
+ # unregistration on lttng listing.
+ $TESTAPP_BIN -i 0 -w 0 > /dev/null 2>&1 &
+ app_pid=$!
+ wait $app_pid
+
+ wait_until_app_unregistration $app_pid
+ ok $? "App is un-registered"
+
+ # Set the rotation after that the app is done and that it was
+ # unregistered from lttng-sessiond.
+ # This is necessary since the rotate_timer_test function expects the
+ # second rotation archive to be empty. On slow machine it can take more
+ # than 500ms for the lttng-sessiond to receive and handle an app
+ # termination. This can lead to situation where the second rotation
+ # archive still have the channels for the pid for the app since that
+ # from the point of view of the lttng-sessiond/consumer the app is still
+ # "alive" and "kicking". This is a problem only for per-pid testing.
+ lttng_enable_rotation_timer_ok $SESSION_NAME 500ms
+
+ rotate_timer_test "${TRACE_PATH}/${HOSTNAME}/${SESSION_NAME}*/archives" 1