From patchwork Thu Mar 28 21:02:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Rajotte X-Patchwork-Id: 2261438 X-Patchwork-Delegate: jgalar@efficios.com From: jonathan.rajotte-julien at efficios.com (Jonathan Rajotte) Date: Thu, 28 Mar 2019 17:02:21 -0400 Subject: [lttng-dev] [PATCH lttng-tools v2 2/2] Tests: plan_tests must be called before running tests/skipping In-Reply-To: <20190328210221.27662-1-jonathan.rajotte-julien@efficios.com> References: <20190328210221.27662-1-jonathan.rajotte-julien@efficios.com> Message-ID: <20190328210221.27662-2-jonathan.rajotte-julien@efficios.com> Otherwise tap parsers can complain that there was no test plan and report a failure. Signed-off-by: Jonathan Rajotte --- 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