Fix: test: base-path tests are not run
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 2 Dec 2020 22:01:35 +0000 (17:01 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 13 Apr 2021 20:28:55 +0000 (16:28 -0400)
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 <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9a8040141c29e391363b17954a20155abdb3cc04

tests/regression/Makefile.am
tests/regression/tools/base-path/Makefile.am
tests/utils/utils.sh

index 6aab423eb45dcfea396aa8696162a8f696873ac5..7970695fe9040f5017797f68536e915bb415c9dc 100644 (file)
@@ -6,7 +6,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 \
index 999e10f7c3bff0dfd3b2a3e91417c8b90abddfd4..5b463a66c7dcec7a698d390ab423ddb2d108108b 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
 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 \
index b17ba26ebe724326703a11cecac561f7d64eb989..be83e73a622637812feb51fe3ff35d99029fc48a 100644 (file)
@@ -1551,8 +1551,9 @@ function lttng_snapshot_del_output_fail ()
 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"
 }
 
This page took 0.030119 seconds and 4 git commands to generate.