From: Jérémie Galarneau Date: Thu, 24 Feb 2022 19:06:28 +0000 (-0500) Subject: Fix: tests: test_kernel: break should only be used in loops X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=d61d4fae208679ab4824cb0b53cfc1390803944e;p=deliverable%2Flttng-tools.git Fix: tests: test_kernel: break should only be used in loops Using `break` in a function's scope makes no sense in bash. I am guessing the original author meant to exit early from the various tests. Regardless, the rest of the test can be ran without issues. I am not sure traces of failed tests should be kept, but that's a separate issue. Signed-off-by: Jérémie Galarneau Change-Id: I286ccb796afbbca4e3866e6fd0b35a3746045346 --- diff --git a/tests/regression/tools/snapshots/test_kernel b/tests/regression/tools/snapshots/test_kernel index 02cf98d94..f1015ee25 100755 --- a/tests/regression/tools/snapshots/test_kernel +++ b/tests/regression/tools/snapshots/test_kernel @@ -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