Skip to content

amd_smi: fail on unexpected add/start errors#555

Merged
Treece-Burgess merged 1 commit intoicl-utk-edu:masterfrom
djwoun:amd_smi-harness-fail-unexpected-rc
Feb 6, 2026
Merged

amd_smi: fail on unexpected add/start errors#555
Treece-Burgess merged 1 commit intoicl-utk-edu:masterfrom
djwoun:amd_smi-harness-fail-unexpected-rc

Conversation

@djwoun
Copy link
Contributor

@djwoun djwoun commented Feb 5, 2026

Pull Request Description

Updates EXIT_WARNING_ON_ADD to treat unexpected error codes (e.g., PAPI_EISRUN, PAPI_EINVAL) as test failures. Previously, non-listed errors were silently ignored, causing tests to pass incorrectly.

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

@djwoun djwoun requested a review from Treece-Burgess February 5, 2026 21:20
@djwoun djwoun force-pushed the amd_smi-harness-fail-unexpected-rc branch from f4629c0 to 58be8a3 Compare February 5, 2026 21:27
@djwoun djwoun force-pushed the amd_smi-harness-fail-unexpected-rc branch from c52cf22 to 767ae83 Compare February 6, 2026 16:22
Copy link
Contributor

@Treece-Burgess Treece-Burgess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing was done on Odyssey at Oregon with ROCm 7.2.0.

In the master branch, if the call prepare_event_handle failed with an error code outside of PAPI_ENOEVNT, PAPI_ECNFLCT, PAPI_EPERM, or PAPI_ENOSUPP the test would pass:

[tburgess@odyssey tests]$ ./amdsmi_set_test 
Skipping fan_speed test: event unavailable
PASSED

However, this branch updates this to the correct behavior:

[tburgess@odyssey tests]$ ./amdsmi_set_test 
Unexpected error encountered (-24) when adding the event amd_smi:::power_cap.

Along with this, papi_component_avail, papi_native_avail, and papi_command_line work as expected.
The amd_smi component tests all pass (minus amdsmi_set_test.c as I lack the permissions to properly run this test).

@Treece-Burgess Treece-Burgess force-pushed the amd_smi-harness-fail-unexpected-rc branch from 767ae83 to acb8caa Compare February 6, 2026 18:31
@Treece-Burgess Treece-Burgess merged commit 7bd08fe into icl-utk-edu:master Feb 6, 2026
4 checks passed
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