Tests: use "kill -0" for app existence check in NS tests
[lttng-tools.git] / tests / regression / kernel / test_ns_contexts_change
index 905f6cf2bb01bd1efe349534493fe004ed6386d9..08150244d3111d19bcc5e12e1489e558a88cf190 100755 (executable)
@@ -119,13 +119,11 @@ function test_ns()
 
                touch "$file_sync_wait_before_unshare"
 
-               # Let the app do it's thing before entering the synchronisation loop
-               sleep 0.5
-
                while [ ! -f "$file_sync_signal_after_unshare" ]; do
                        # Break if the app failed / died
-                       if [ ! -f "/proc/$app_pid" ]; then
+                       if ! kill -0 "$app_pid" ; then
                                break
+                               echo "# App failed"
                        fi
                        echo "# Waiting for app..."
                        sleep 0.5
This page took 0.023636 seconds and 4 git commands to generate.