From: Matthew Auld Date: Thu, 9 Apr 2026 12:15:09 +0000 (+0100) Subject: drm/ttm/tests: fix lru_count ASSERT X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=3b053cd71598f7769f41b4f01f4540aab2e77b93;p=thirdparty%2Fkernel%2Flinux.git drm/ttm/tests: fix lru_count ASSERT On pool init we should expect the lru_count for each node to be zeroed as per __list_lru_init -> init_one_lru, but here we are asserting the opposite. Currently our CI is blowing up with: 10:23:33] # ttm_device_init_pools: ASSERTION FAILED at drivers/gpu/drm/ttm/tests/ttm_device_test.c:178 [10:23:33] Expected !list_lru_count(&pt.pages) to be false, but is true [10:23:33] [FAILED] DMA allocations, DMA32 required [10:23:33] [PASSED] No DMA allocations, DMA32 required [10:23:33] # ttm_device_init_pools: ASSERTION FAILED at drivers/gpu/drm/ttm/tests/ttm_device_test.c:178 [10:23:33] Expected !list_lru_count(&pt.pages) to be false, but is true Fixes: 444e2a19d7fd ("ttm/pool: port to list_lru. (v2)") Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: Christian Koenig Cc: Dave Airlie Reviewed-by: Ryszard Knop Signed-off-by: Dave Airlie Link: https://patch.msgid.link/20260409121512.81298-3-matthew.auld@intel.com --- diff --git a/drivers/gpu/drm/ttm/tests/ttm_device_test.c b/drivers/gpu/drm/ttm/tests/ttm_device_test.c index db4b4a09a73f9..8bcac84e98466 100644 --- a/drivers/gpu/drm/ttm/tests/ttm_device_test.c +++ b/drivers/gpu/drm/ttm/tests/ttm_device_test.c @@ -176,7 +176,7 @@ static void ttm_device_init_pools(struct kunit *test) if (ttm_pool_uses_dma_alloc(pool)) KUNIT_ASSERT_FALSE(test, - !list_lru_count(&pt.pages)); + list_lru_count(&pt.pages)); } } }