[lttng-dev] [PATCH lttng-tools v2 2/2] Tests: plan_tests must be called before running tests/skipping

Jonathan Rajotte jonathan.rajotte-julien at efficios.com
Thu Mar 28 17:02:21 EDT 2019


Otherwise tap parsers can complain that there was no test plan and
report a failure.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
---
 tests/regression/tools/notification/test_notification_kernel | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/regression/tools/notification/test_notification_kernel b/tests/regression/tools/notification/test_notification_kernel
index e7368df26..604cc48cf 100755
--- a/tests/regression/tools/notification/test_notification_kernel
+++ b/tests/regression/tools/notification/test_notification_kernel
@@ -107,12 +107,13 @@ function kernel_test
 	rm -rf ${consumerd_pipe[@]} 2> /dev/null
 }
 
+plan_tests $NUM_TESTS
+
 if [ "$(id -u)" == "0" ]; then
 	validate_lttng_modules_present
 	kernel_test
 else
 	# Kernel tests are skipped.
-	plan_tests $NUM_TESTS
 	skip 0 "Root access is needed. Skipping all kernel notification tests." $NUM_TESTS
 fi
 
-- 
2.17.1



More information about the lttng-dev mailing list