Fix: Tests that assume CPU 0 is present
[lttng-tools.git] / tests / regression / tools / snapshots / test_kernel
index a2a4db06d6a84e87bab2f1c5ddf8ef7dd3d3b157..abb2435631c3fd25d603d94ccaa7835275f3ecc4 100755 (executable)
@@ -56,8 +56,6 @@ function test_kernel_local_snapshot_after_stop ()
        if [ $? -eq 0 ]; then
                # Only delete if successful
                rm -rf $TRACE_PATH
-       else
-               break
        fi
 }
 
@@ -79,8 +77,6 @@ function test_kernel_local_snapshot_append_to_metadata ()
        if [ $? -eq 0 ]; then
                # Only delete if successful
                rm -rf $TRACE_PATH
-       else
-               break
        fi
 
        diag "Adding event $EVENT2"
@@ -92,8 +88,6 @@ function test_kernel_local_snapshot_append_to_metadata ()
        if [ $? -eq 0 ]; then
                # Only delete if successful
                rm -rf $TRACE_PATH
-       else
-               break
        fi
 
        stop_lttng_tracing_ok $SESSION_NAME
@@ -102,8 +96,8 @@ function test_kernel_local_snapshot_append_to_metadata ()
 
 function generate_filter_events_cpu0()
 {
-       # Generate many events (fill buffers) on CPU 0
-       taskset 0x00000001 /bin/echo -n "$1" > /proc/lttng-test-filter-event 2> /dev/null
+       # Generate many events (fill buffers) on a single CPU
+       taskset --cpu-list "$(get_any_available_cpu)" /bin/echo -n "$1" > /proc/lttng-test-filter-event 2> /dev/null
 }
 
 function test_kernel_local_snapshot_discard ()
This page took 0.023852 seconds and 4 git commands to generate.