Skip to content

Conversation

@alliepiper
Copy link
Contributor

@alliepiper alliepiper commented Nov 1, 2025

  • CUB's usages of XFAIL compilation are updated to use the new utility.
  • test_device_segment_reduce_offset_type_fail test is fixed; the regexes weren't detected and some cases were failing for unintended reasons.
  • test_param_general_fail is added to test edge case.

Supports CUB-style in-source error regex extraction as defined the docs:

# cccl_add_xfail_compile_target_test(
#   <target_name>
#   [TEST_NAME <test_name>]
#   [ERROR_REGEX <regex>]
#   [SOURCE_FILE <source_file>]
#   [ERROR_REGEX_LABEL <error_string>]
#   [ERROR_NUMBER <error_number>]
#   [ERROR_NUMBER_TARGET_NAME_REGEX <regex>]
# )
#
# Given a configured build target that is expected to fail to compile:
# - Mark the target as excluded from the `all` target.
# - Create a CTest test that compiles the target. If TEST_NAME is provided, it is used.
#   Otherwise, the target_name is used as the test name.
# - When the test runs, it passes if exactly one of the following conditions is met:
#   - A provided / detected error regex matches the compilation output, ignoring exit code.
#   - No error regex is provided / detected, and the compilation fails.
#
# An error regex may be explicitly provided via ERROR_REGEX, or it may be
# detected by scanning the SOURCE_FILE for a specially formatted comment.
#
# If ERROR_REGEX_LABEL is provided, the SOURCE_FILE will read, looking for a comment of the form:
#
# // <ERROR_REGEX_LABEL> {{"error_regex"}}
#
# An error number may be appended to the ERROR_REGEX_LABEL in the comment:
#
# // <ERROR_REGEX_LABEL>-<error_number> {{"error_regex"}}
#
# If ERROR_NUMBER_TARGET_NAME_REGEX is specified, the regex is used to capture
# the error_number from the target name. If target_name is
# "cccl.test.my_test.err_5.foo_3" and ERROR_NUMBER_TARGET_NAME_REGEX is
# "\\.err_([0-9]+)", the captured error number "5."
#
# // <ERROR_REGEX_LABEL>-<captured_error_number> {{"error_regex"}}
#
# If ERROR_NUMBER is provided, ERROR_NUMBER_TARGET_NAME_REGEX is ignored.
# If ERROR_NUMBER_TARGET_NAME_REGEX is provided but does not match, a plain ERROR_REGEX_LABEL is used.

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Nov 1, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Progress in CCCL Nov 1, 2025
@alliepiper
Copy link
Contributor Author

/ok to test

- CUB's usages of XFAIL compilation are updated to use the new utility.
- test_device_segment_reduce_offset_type_fail test is fixed; the regexes weren't detected and some cases were failing for unintended reasons.
- test_param_general_fail is added to test edge case.
@alliepiper
Copy link
Contributor Author

/ok to test

@alliepiper alliepiper marked this pull request as ready for review November 1, 2025 19:47
@alliepiper alliepiper requested review from a team as code owners November 1, 2025 19:47
@alliepiper alliepiper requested review from fbusato and wmaxey November 1, 2025 19:47
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Nov 1, 2025
@github-actions

This comment was marked as outdated.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

🥳 CI Workflow Results

🟩 Finished in 6h 14m: Pass: 100%/263 | Total: 9d 15h | Max: 5h 14m | Hits: 69%/383777

See results here.

@alliepiper alliepiper merged commit 3096674 into NVIDIA:main Nov 6, 2025
550 of 554 checks passed
@alliepiper alliepiper deleted the xfail_test_util branch November 6, 2025 12:55
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants