Skip to content

tests: make Fortran DType tests assert an explicit success marker (fix loose "10" pass regex) - #189

Merged
bobrobey merged 1 commit into
amd:mainfrom
dannybaths:c6-fortran-dtype-pass-token
Sep 7, 2026
Merged

tests: make Fortran DType tests assert an explicit success marker (fix loose "10" pass regex)#189
bobrobey merged 1 commit into
amd:mainfrom
dannybaths:c6-fortran-dtype-pass-token

Conversation

@dannybaths

@dannybaths dannybaths commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

What

The five OpenMP_Language_Constructs_Fortran_DType_* CTest entries gate on a loose PASS_REGULAR_EXPRESSION "10". A bare 10 can be matched by output unrelated to the test result, for example a build path or dashboard build name that contains 10 such as moduleset10, so a test can report PASS without the executable ever producing the correct answer.

This change makes the pass criterion honest:

  • Each tests/openmp_language_constructs_fortran_dtype_*.sh now runs the real executable, prints its output, and emits an explicit marker: FORTRAN-DTYPE-RESULT: <last non-empty output line>.
  • tests/CMakeLists.txt matches FORTRAN-DTYPE-RESULT: +10 instead of 10. The + tolerates Fortran list-directed leading spaces, for example RESULT: 10.
  • The scripts add set -euo pipefail after the existing module-detection block, so a failed build or a nonzero executable exit fails the test visibly instead of silently.
  • The pointer test drops a stray cd derived_types; there is no 7_derived_types/derived_types directory, and under set -e that failed cd must not remain.

Why

A pass regex of 10 is trivially satisfied by unrelated text and hides real build/run failures. Matching an explicit marker printed from the executable output makes these tests trustworthy.

Validation

AAC7: MI300A / gfx942, focused no-submit run:

cd tests && rm -rf build && cmake . -B build
ctest -V -R '^OpenMP_Language_Constructs_Fortran_DType' --test-dir build

Result: 5/5 pass, each via the explicit marker FORTRAN-DTYPE-RESULT: 10; 100% tests passed, 0 tests failed out of 5. Confirmed the new regex does not match a moduleset10-style path while the old 10 did.

AAC6 no-regression: PASS, Slurm job 19708 on ppac-pl1-s24-16 / PPAC_MI300A_SPX, 5/5 Fortran DType tests passed with FORTRAN-DTYPE-RESULT: 10.

Replace the loose PASS_REGULAR_EXPRESSION "10" on the five
OpenMP_Language_Constructs_Fortran_DType_* tests with an explicit
FORTRAN-DTYPE-RESULT marker emitted from the real executable output, add
set -euo pipefail so build/run failures fail visibly, and drop a stray
cd derived_types in the pointer test (no such directory).
@dannybaths dannybaths changed the title tests: assert explicit success marker for Fortran DType tests tests: make Fortran DType tests assert an explicit success marker (fix loose "10" pass regex) Sep 7, 2026
@bobrobey
bobrobey merged commit 20e9322 into amd:main Sep 7, 2026
@bobrobey

bobrobey commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Making this success marker a little more rigorous -- good

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants