From a8434239146851805dadca86c41c8c156e9c0c50 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Wed, 2 Dec 2020 17:01:35 -0500 Subject: [PATCH] Fix: test: base-path tests are not run MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Observed issue ============== The base-path tests are never run during `make check`. Cause ===== Albeit 2a1668643ca94195d5c3889d0337e19165805a42 [1] introduces the tests, the test file is not added to the test list. Solution ======== Add the test file to the test list. One of the substest is failing. not ok 20 - Snapshot recorded # Failed test 'Snapshot recorded' # in .//../../../utils/utils.sh:lttng_snapshot_record() at line 1468. ok 21 - Destroy session ust_app_snapshot_base_path not ok 22 - Validate trace for event tp:tptest This is caused by the removal of `trace_path=$2` in c28fcefd993b7539716bb5cd9557a08a217ec463 [2]. The removal is most probably a merge error or simply a mistake on my end. This commit revert that change. Also add load-stream-extra-path.lttng in EXTRA_DIST. Known drawbacks ========= None References ========== [1] https://github.com/lttng/lttng-tools/commit/2a1668643ca94195d5c3889d0337e19165805a42 [2] https://github.com/lttng/lttng-tools/commit/2a1668643ca94195d5c3889d0337e19165805a42 Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau Change-Id: I255908165d59e02e0e11b123d3538a74f53fb584 --- tests/regression/Makefile.am | 3 ++- tests/regression/tools/base-path/Makefile.am | 2 +- tests/utils/utils.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am index 73eb9f7da..5a2cec371 100644 --- a/tests/regression/Makefile.am +++ b/tests/regression/Makefile.am @@ -4,7 +4,8 @@ LOG_DRIVER_FLAGS = --merge --post-script $(top_srcdir)/tests/utils/warn_processe LOG_DRIVER = env PGREP='$(PGREP)' AM_TAP_AWK='$(AWK)' $(SHELL) \ $(top_srcdir)/config/tap-driver.sh -TESTS = tools/filtering/test_invalid_filter \ +TESTS = tools/base-path/test_ust \ + tools/filtering/test_invalid_filter \ tools/filtering/test_unsupported_op \ tools/filtering/test_valid_filter \ tools/streaming/test_ust \ diff --git a/tests/regression/tools/base-path/Makefile.am b/tests/regression/tools/base-path/Makefile.am index 9885af19a..37eecc112 100644 --- a/tests/regression/tools/base-path/Makefile.am +++ b/tests/regression/tools/base-path/Makefile.am @@ -1,5 +1,5 @@ noinst_SCRIPTS = test_ust -EXTRA_DIST = test_ust +EXTRA_DIST = test_ust load-stream-extra-path.lttng all-local: @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index b29fa5f2d..9bfd450e0 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -1420,7 +1420,7 @@ function lttng_snapshot_record () local sess_name=$1 local trace_path=$2 - $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot record -s $sess_name $trace_path 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST + $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot record -s "$sess_name" "$trace_path" 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST ok $? "Snapshot recorded" } -- 2.34.1