Tests: Fix: Use '.logfile' instead of '.log' for test app output master
authorKienan Stewart <kstewart@efficios.com>
Thu, 31 Oct 2024 12:33:04 +0000 (08:33 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 31 Oct 2024 16:06:14 +0000 (12:06 -0400)
Observed issue
==============

Frequent CI errors related to parsing TAP log files.

E.g.

```
17:04:55 Parsing TAP test result [/var/lib/jenkins/jobs/dev_review_lttng-tools_master_linuxbuild/configurations/axis-babeltrace_version/stable-2.0/axis-build/std/axis-conf/std/axis-liburcu_version/stable-0.14/axis-platform/deb12-amd64/builds/857/tap-master-files/tap/regression/ust/ust-app-ctl-paths/test_blocking.log.d/babeltrace.err.uMIm4i.log].
17:04:55 org.tap4j.parser.ParserException: Error parsing TAP Stream:
Missing TAP Plan.
```

Cause
=====

The TAP collector in the [CI][1] uses `**/*.*`[2] as the ANT pattern
for globbing test log files.

Consequently if, for example,  `./test.log.d/session.XXXXX.log` exists,
the content will try to be parsed as a TAP report and potentially
fail.

The Jenkins TAP plugin[3] does not expose the option of adding
excludes[4] to the globbing pattern.

Solution
========

Use `.logfile` as the suffix and modify the CI TAP collector
configuration to use `**/*.log`, as `.log` is the suffix for test logs
produced when running `make check`[5].

Known drawbacks
===============

None.

References
==========

[1]: https://ci.lttng.org
[2]: https://github.com/lttng/lttng-ci/blob/74c5e73d5d1961fcd8c530323b180c688f624e5c/jobs/lttng-tools.yaml#L430
[3]: https://github.com/jenkinsci/tap-plugin/
[4]: https://github.com/jenkinsci/tap-plugin/blob/8f9fb2d2b0ac9628380c6a56e3c7c97caf29d9ca/src/main/java/org/tap4j/plugin/TapPublisher.java#L472
[5]: https://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html

Change-Id: I76b7203ce02645e222c7319ac576a9a1272cf985
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/utils.sh

index 26cb3b26a818a999c30a6acf17a77467457fbe02..04791e78a49ec98687412b411d2caf8d6dd3a1ab 100644 (file)
@@ -185,7 +185,7 @@ function lttng_log_file ()
                return
        fi
 
-       mktemp -p "${LTTNG_TEST_LOG_DIR}" "${app}.XXXXXX.log"
+       mktemp -p "${LTTNG_TEST_LOG_DIR}" "${app}.XXXXXX.logfile"
 }
 
 # Due to the renaming of threads we need to use the full command (pgrep -f) to
This page took 0.026661 seconds and 4 git commands to generate.