[lttng-tools,v2,2/2] Tests: plan_tests must becalled before running tests/skipping
diff mbox series

Message ID 20190328210221.27662-2-jonathan.rajotte-julien@efficios.com
State New
Delegated to: Jérémie Galarneau
Headers show
Series
  • [lttng-tools,v2,1/2] Tests: check forlttng-modules presence
Related show

Commit Message

Jonathan Rajotte March 28, 2019, 9:02 p.m. UTC
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(-)

Comments

Jonathan Rajotte March 29, 2019, 8:27 p.m. UTC | #1
Do not consider this patch, it is bogus.

The test plan is already defined inside the notification executable runned in
kernel_test.

Thanks

On Thu, Mar 28, 2019 at 05:02:21PM -0400, Jonathan Rajotte wrote:
> 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
>

Patch
diff mbox series

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