From: Kienan Stewart Date: Fri, 9 Feb 2024 14:08:07 +0000 (-0500) Subject: tests: Correct tap_generator skip() when count is greater than 1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d46c935357f0c559289245b9e2b25c8cfaf9d831;p=lttng-tools.git tests: Correct tap_generator skip() when count is greater than 1 Issue observed ============== Output when skipping multiple was incorrectly printing the test case number, eg. ``` ok 3 - Start session `session_ldr8cxix` 41 ok 4 # Skip: Test application 'gen-ust-events-constructor/gen-ust-events-constructor-so' not found ok 6 # Skip: Test application 'gen-ust-events-constructor/gen-ust-events-constructor-so' not found ok 8 # Skip: Test application 'gen-ust-events-constructor/gen-ust-events-constructor-so' not found ``` Cause ===== The `test_number` was adding the current index to the already modified `self._last_test_case_id`. Solution ======== Use `self._last_test_case_id` with no changes. Known drawbacks =============== None. Change-Id: I8ff16b83619cf6e6db2636eeccd58725cc03d0f8 Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- diff --git a/tests/utils/lttngtest/tap_generator.py b/tests/utils/lttngtest/tap_generator.py index 75960aece..c9bd8edad 100644 --- a/tests/utils/lttngtest/tap_generator.py +++ b/tests/utils/lttngtest/tap_generator.py @@ -130,7 +130,7 @@ class TapGenerator: self._last_test_case_id = self._last_test_case_id + 1 self._print( "ok {test_number} # Skip: {reason}".format( - reason=reason, test_number=(i + self._last_test_case_id) + reason=reason, test_number=(self._last_test_case_id) ) )