Fix: tests: test_kernel: break should only be used in loops
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 24 Feb 2022 19:06:28 +0000 (14:06 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 28 Feb 2022 21:51:46 +0000 (16:51 -0500)
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 <jeremie.galarneau@efficios.com>
Change-Id: I286ccb796afbbca4e3866e6fd0b35a3746045346

tests/regression/tools/snapshots/test_kernel

index a2a4db06d6a84e87bab2f1c5ddf8ef7dd3d3b157..5c93296a03a2f8b7a440f1bd9aeacba6c1c8377f 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
This page took 0.025378 seconds and 4 git commands to generate.