diff options
| author | Sanjay Yadav <sanjay.kumar.yadav@intel.com> | 2026-02-27 18:30:38 +0530 |
|---|---|---|
| committer | Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> | 2026-03-03 13:37:42 +0530 |
| commit | abdcd4c3586dee8c190ac932cb544036b0c937b9 (patch) | |
| tree | 0bdd2346eef090fe8e2cd8e6a4eefb04ffa64fc7 /tools/perf/scripts/python | |
| parent | 01086b97dcc92799bd03cd243ed6061fd21db7a6 (diff) | |
gpu/buddy: Introduce gpu_buddy_assert() for kunit-aware assertions
Introduce gpu_buddy_assert(), a small helper that wraps WARN_ON() and,
when CONFIG_KUNIT is enabled, also calls kunit_fail_current_test() so
that any active KUnit test is marked as failed. In non-KUnit builds
the macro reduces to WARN_ON(), preserving existing behaviour.
Stringify the asserted condition in the failure message to make it easy
to identify which assertion fired. Leave the WARN_ON() in
gpu_buddy_block_trim() unchanged, as it returns -EINVAL and the caller
already observes the failure via the return code.
Cc: Christian König <christian.koenig@amd.com>
Cc: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Suggested-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Sanjay Yadav <sanjay.kumar.yadav@intel.com>
Reviewed-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Link: https://patch.msgid.link/20260227130037.53615-2-sanjay.kumar.yadav@intel.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
