Fix: Tests that assume CPU 0 is present
[lttng-tools.git] / tests / regression / tools / snapshots / test_kernel
index 15b7ec1762c445a0a2429de2512c3d1d1f9bae49..892784e6164d8bb099aca14b7adce6ba27e7550f 100755 (executable)
@@ -14,7 +14,7 @@ CHANNEL_NAME="snapchan"
 
 TRACE_PATH=$(mktemp -d)
 
-NUM_TESTS=2060
+NUM_TESTS=2061
 
 source $TESTDIR/utils/utils.sh
 
@@ -31,12 +31,11 @@ function test_kernel_local_snapshot ()
        destroy_lttng_session_ok $SESSION_NAME
 
        # Validate test
+       validate_trace_path_kernel_snapshot "$TRACE_PATH" "" "snapshot-1" 0 ""
        validate_trace $EVENT_NAME $TRACE_PATH/
        if [ $? -eq 0 ]; then
                # Only delete if successful
                rm -rf $TRACE_PATH
-       else
-               break
        fi
 }
 
@@ -105,7 +104,7 @@ function true_loop_cpu0()
 {
        # Generate many system call events (fill buffers) on CPU 0
        for a in $(seq 1 $1); do
-               taskset 0x00000001 /bin/true;
+               taskset --cpu-list "$(get_any_available_cpu)" /bin/true;
        done
 }
 
This page took 0.025185 seconds and 4 git commands to generate.