tests/amdgpu: Add shared lockdep checks for reset tests
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | lib/amdgpu: Add shared lockdep violation helperslib/ lib/ tests/ | +126 | 0 replies | |
| 2/2 | tests/amdgpu: Check lockdep violations in reset teststests/ tests/ tests/ | +73 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/2] tests/amdgpu: Add shared lockdep checks for reset tests
From: Vitaly Prosyak <[email protected]>
This series extends the existing amdgpu lockdep validation coverage by moving the common /dev/kmsg and kernel taint checking logic out of amd_lockdep and into shared amdgpu helpers, then using those helpers in additional reset-oriented tests.
Patch 1 is a refactor only and makes no functional change to amd_lockdep. The test still requires CONFIG_LOCKDEP through /proc/lockdep_stats, opens /dev/kmsg at the start of each lockdep-sensitive subtest, records the starting taint state, and fails if a lockdep splat or new TAINT_WARN appears. The helper move keeps that logic in one place so other amdgpu tests can use the same behavior without duplicating the plumbing.
Patch 2 enables the shared optional lockdep checks in amd_dispatch, amd_deadlock, and amd_queue_reset. These tests mostly exercise queue reset and GPU reset paths, including user queue coverage, so they are a useful place to catch lockdep issues while reset and recovery paths are being stressed.
Unlike amd_lockdep, these tests are not dedicated lockdep tests and must continue to run on kernels without CONFIG_LOCKDEP. The new begin/end helper checks /proc/lockdep_stats first; when lockdep is unavailable the check is a no-op, and when lockdep is available each subtest fails if new lockdep traces or TAINT_WARN are observed.
Vitaly Prosyak (2):
lib/amdgpu: Add shared lockdep violation helpers tests/amdgpu: Check lockdep violations in reset tests
lib/amdgpu/amd_utils.c | 100 ++++++++++++++++++++++++++++++ lib/amdgpu/amd_utils.h | 14 +++++ tests/amdgpu/amd_deadlock.c | 45 ++++++++++++++ tests/amdgpu/amd_dispatch.c | 25 ++++++++ tests/amdgpu/amd_lockdep.c | 110 ++++----------------------------- tests/amdgpu/amd_queue_reset.c | 3 + 6 files changed, 199 insertions(+), 98 deletions(-)
Signature · 1 line
2.55.0