Tests: Cleanup: notification: `assert()` that `app_pid` is set
[lttng-tools.git] / tests / regression / tools / notification / notification.c
index d3917b4784d0eccb421af7e38474bfd5db255639..631948cda93d4a440875a8146fb306d4147edf5a 100644 (file)
@@ -43,7 +43,7 @@
 
 int nb_args = 0;
 int named_pipe_args_start = 0;
-pid_t app_pid = -1;
+pid_t app_pid = 0;
 const char *app_state_file = NULL;
 
 static
@@ -156,6 +156,8 @@ int suspend_application(void)
        /*
         * Send SIGUSR1 to application instructing it to bypass tracepoint.
         */
+       assert(app_pid > 1);
+
        ret = kill(app_pid, SIGUSR1);
        if (ret) {
                fail("SIGUSR1 failed. errno %d", errno);
@@ -186,6 +188,8 @@ int resume_application(void)
                goto error;
        }
 
+       assert(app_pid > 1);
+
        ret = kill(app_pid, SIGUSR1);
        if (ret) {
                fail("SIGUSR1 failed. errno %d", errno);
This page took 0.023453 seconds and 4 git commands to generate.