Skip to content

DAOS-18626 test: Add per-sanitizer suite selection and JUnit reporting to run_utest.py#18697

Draft
knard38 wants to merge 1 commit into
masterfrom
ckochhof/dev/master/daos-18626/patch-003
Draft

DAOS-18626 test: Add per-sanitizer suite selection and JUnit reporting to run_utest.py#18697
knard38 wants to merge 1 commit into
masterfrom
ckochhof/dev/master/daos-18626/patch-003

Conversation

@knard38

@knard38 knard38 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This is PR 2 of 10 in the split of DAOS-18626 (see ckochhof/dev/master/daos-18626/patch-001 for the original, unsplit commit). It extends utils/run_utest.py so the unit-test suite can be run selectively under ASan, UBSan, or TSan, and so results are reported in a form CI can consume. Nothing calls these new flags yet in this PR — that comes later in this stack.

What/why

  • New --asan/--ubsan/--tsan flags select suites via new asan/tsan Suite config keys (utest.yaml); suites unsuitable under a given sanitizer (e.g. memcheck-only suites, control Go tests) opt out via asan: False/gha: False.
  • New --list flag prints the suites/tests that would run, honoring all selection/filter options, without running them.
  • Per-test sanitizer log capture: new-since-setup() sanitizer log files (found via the ASAN_OPTIONS/UBSAN_OPTIONS/TSAN_OPTIONS log_path= directory) are copied into each test's own log dir, tagged with a companion <logfile>.testname file for attribution.
  • cmocka XML results are now written into CMOCKA_XML_FILE's directory (the Docker-mounted test-results/ volume) instead of a source-relative test_results/ directory, and only newly-appeared XML files are relabeled per test/suite.
  • In GHA context, one JUnit TestCase is now written per test per suite (write_xml_result()) so result counts are accurate.
  • utils/utest.yaml: tag suites with tsan: True (opt-in, TSan suites are a small subset) and asan: False/gha: False (opt-out) as appropriate for each suite.

Testing

  • python3 utils/run_utest.py --asan --list, --ubsan --list, --tsan --list print the expected suite/test subsets (manually verified against utest.yaml's new tags).
  • Existing (no-flag) invocation behavior is unchanged — this is a backward-compatible, additive change.
  • No CI job invokes these new flags yet in this PR; they're exercised end-to-end starting with PR 7 (patch-008) and activated in CI by PR 9 (patch-010) of this stack.

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

…g to run_utest.py

Extend utils/run_utest.py so the unit-test suite can be run selectively
under ASan, UBSan, or TSan, and so results are reported in a form CI can
consume:

- New --asan/--ubsan/--tsan flags select suites via new 'asan'/'tsan'
  Suite config keys (utest.yaml); suites unsuitable under a given
  sanitizer (e.g. memcheck-only suites, control Go tests) opt out.
- New --list flag prints the suites/tests that would run, honoring all
  selection/filter options, without running them.
- Per-test sanitizer log capture: new-since-setup() sanitizer log files
  (found via the ASAN_OPTIONS/UBSAN_OPTIONS/TSAN_OPTIONS log_path=
  directory) are copied into each test's own log dir, tagged with a
  companion '<logfile>.testname' file for attribution.
- cmocka XML results are now written into CMOCKA_XML_FILE's directory
  (the Docker-mounted test-results/ volume) instead of a source-relative
  test_results/ directory, and only newly-appeared XML files are
  relabeled per test/suite.
- In GHA context, one JUnit TestCase per test is now written per suite
  (write_xml_result()) so result counts are accurate.
- utils/utest.yaml: tag suites with 'tsan: True' (opt-in, TSan suites
  are a small subset) and 'asan: False'/'gha: False' (opt-out) as
  appropriate for each suite.

None of these flags or config keys are referenced by any workflow yet;
this is a standalone, backward-compatible change to the test runner.
Part of the DAOS-18626 ASan CI split (see
ckochhof/dev/master/daos-18626/patch-001 for the original, unsplit
commit).

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
@github-actions

Copy link
Copy Markdown

Ticket title is 'Add ASan/UBSan/TSan sanitizer checks to the GitHub Actions unit-test CI'
Status is 'In Progress'
Errors are Title of PR is too long
https://daosio.atlassian.net/browse/DAOS-18626

@knard38 knard38 self-assigned this Jul 22, 2026
@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Cluster Box Medium MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-18697/1/execution/node/1755/log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants