* [SWDEV-531904] Unit and Integ Test Updates
Updated: unit_tests.py
- Removed redundant self.setUp() and self.tearDown() calls.
- Removed test_free_name_value_pairs() since is internal only.
Updated: integration_test.py
- Added logic to set AMDSMI_CLI_PATH from environment or default.
- Raise FileNotFoundError if path does not exist.
- Append CLI path to sys.path and handle ImportError with a clear message.
- Removed redundant @handle_exceptions function decorator.
- Removed redundant self.setUp() and self.tearDown() calls.
Updated: amdsmi_interface.py
- Removed POINTER conversion in amdsmi_get_gpu_pm_metrics_info() and amdsmi_get_gpu_reg_table_info()
All tests pass/skip
Signed-off-by: Juan Castillo <juan.castillo@amd.com>
* Update tests/python_unittest/integration_test.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Castillo, Juan <Juan.Castillo@amd.com>
* Review Update 1
Modified: integration_test.py
- Added logic to properly loop through firmware list and display each name and version
Signed-off-by: Juan Castillo <juan.castillo@amd.com>
* Skip xgmi_err tests + improve running output
Changes:
1. Now check for elevated permissions
2. Skip xgmi_error related SYSFS tests, refer to xgmi_read_write.cc
(both are skipped)
3. Added list of tests and provided a summary of additional output
provided
Change-Id: Iefc85c270faad89c625e2bd7af397d24faed2437
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
---------
Signed-off-by: Juan Castillo <juan.castillo@amd.com>
Signed-off-by: Castillo, Juan <Juan.Castillo@amd.com>
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Co-authored-by: Juan Castillo <juan.castillo@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Charis Poag <Charis.Poag@amd.com>
[ROCm/amdsmi commit: 67eb541c15]
* Adjusted amdsmitst and reset command to account for separation of power profile and perf level behavior
* Updated test to reset power profile to previous user setting
* Removed performance level from reset_profile_results in reset --profile command
* Updated Changelog with change to reset profile behavior
---------
Signed-off-by: gabrpham_amdeng <Gabriel.Pham@amd.com>
[ROCm/amdsmi commit: 954d4860c1]
Previously, the function was iterating through all enum
values(0-250). This fix reduces the number of hwmon operations
by calling add_temp_sensor_entry only for temperature types
that fall within the defined enum ranges.
Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
[ROCm/amdsmi commit: 17ffe5a1bd]
Added bad_page_threshold_exceeded field to ras, which
compares retired pages count against bad page threshold.
This field displays True if retired pages exceed the
threshold, False if within threshold, or N/A if
threshold data is unavailable.
---------
Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Signed-off-by: Arif, Maisam <Maisam.Arif@amd.com>
Co-authored-by: Arif, Maisam <Maisam.Arif@amd.com>
[ROCm/amdsmi commit: edaae978a2]
amdsmi/tests/amd_smi_test/functional/memorypartition_read_write.cc:453:32: warning: the address of ‘orig_memory_partition’ will never be NULL [-Waddress]
453 | if ((orig_memory_partition == nullptr) ||
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
[ROCm/amdsmi commit: 66eb189396]
warning: the address of ‘amdsmi_asic_info_t::vendor_name’ will never be NULL [-Waddress]
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
[ROCm/amdsmi commit: 4a863b27ab]
amd_smi_cper.h:32:1: warning: ‘typedef’ was ignored in this declaration
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
[ROCm/amdsmi commit: 3d0ea25af3]
When running on a system that doesn't support HSMP (such as an APU)
then the following is observed:
```
/usr/include/c++/15.1.1/bits/stl_vector.h:1263: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = void*; _Alloc = std::allocator<void*>; reference = void*&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
```
This is because no "CPU" are detected on the SOC, which really means
no CPUs that support HSMP. Catch this case so that a clean return
can be passed up.
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
[ROCm/amdsmi commit: e5d9e1361e]
- Regenerate Rust wrapper against latest amdsmi.h header
- Add libc dependency for proper C memory management
- Fix compilation errors caused by types removed from amdsmi.h
- Add FFI bindings regeneration documentation in README
This update ensures the Rust bindings are synchronized with the latest
C API and provides guidance for developers on regenerating
Bindings.
Signed-off-by: Tim Huang <tim.huang@amd.com>
[ROCm/amdsmi commit: 51a44bc0c4]
- **Fixed gpuboard and baseboard temperatures enums in amdsmi Python Library**.
- AmdSmiTemperatureType had issues with referencing the right attribute, so we removed the following duplicate enums:
- `AmdSmiTemperatureType.GPUBOARD_NODE_FIRST`
- `AmdSmiTemperatureType.GPUBOARD_VR_FIRST`
- `AmdSmiTemperatureType.BASEBOARD_FIRST`
Change-Id: Ia61446b593bd9182d597c4b4c2ac3c5ffdae7493
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
[ROCm/amdsmi commit: 286c421a49]
* Cmake fix updates
* Next fix will be addressing libdrm further
---------
Signed-off-by: adapryor <Adam.pryor@amd.com>
Signed-off-by: Justin Williams <juwillia@amd.com>
[ROCm/amdsmi commit: 652761de54]
* Added gpu-board and base-board temperatures to amd-smi metric
* Updated Changelog and adjusted the metric base-board/gpu-board output
* Adjusted output of metric to hide base/gpu-board when not relevant
---------
Signed-off-by: gabrpham_amdeng <Gabriel.Pham@amd.com>
[ROCm/amdsmi commit: b13fc16d60]
* Remove vm checks in rocm-smi
* Move virtualization checks up the stack into amd-smi
---------
Signed-off-by: adapryor <Adam.pryor@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
[ROCm/amdsmi commit: f8afba0a5f]
* Update amd-smi doc with examples of CPER and AFID API usage.
---------
Signed-off-by: Oosman Saeed <oossaeed@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
[ROCm/amdsmi commit: fd5e37a07e]