From d61d4fae208679ab4824cb0b53cfc1390803944e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 24 Feb 2022 14:06:28 -0500 Subject: [PATCH] Fix: tests: test_kernel: break should only be used in loops MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tests/regression/tools/snapshots/test_kernel | 6 ------ 1 file changed, 6 deletions(-) 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 -- 2.34.1