Tests: use "kill -0" for app existence check in NS tests
[lttng-tools.git] / tests / regression / ust / namespaces / test_ns_contexts_change
index 18a22e588567c0965143de2bbcc9ef0cd07ad720..0e03d53932dbd3aaaacbf7fcbcd60beeb6e907af 100755 (executable)
@@ -72,12 +72,10 @@ function test_ns()
        $TESTAPP_BIN -n "$ns" -i $NUM_EVENT -a "$file_sync_after_unshare" -b "$file_sync_before_last" &
        app_pid=$!
 
-       # Let the app do it's thing before entering the synchronisation loop
-       sleep 0.5
-
        while [ ! -f "$file_sync_after_unshare" ]; do
                # Break if the app failed / died
-               if [ ! -f "/proc/$app_pid" ]; then
+               if ! kill -0 "$app_pid" ; then
+                       echo "# App failed"
                        break
                fi
                echo "# Waiting for app..."
This page took 0.023138 seconds and 4 git commands to generate.