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)
commit6f0c56fac825ab70695727a40aa349b7cf5324b6
tree7797db634545e0cdef443076f8c39122af544d4b
parent1fa11e2f48f15ba299133841d28a59662f61bb75
Tests: Fix: Use '.logfile' instead of '.log' for test app output

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
This page took 0.025448 seconds and 4 git commands to generate.