Thread (23 messages) flat view 23 messages, 3 authors, 8d ago

Re: [PATCH 5/7] iommu/arm-smmu-v3-test: Add missing error checks for inv array

From: Mostafa Saleh <smostafa@google.com>
Date: 2026-09-01 08:51:41
Also in: linux-iommu, lkml

On Fri, Aug 28, 2026 at 11:27:22AM -0300, Jason Gunthorpe wrote:
quoted
arm_smmu_invs_merge() and arm_smmu_invs_alloc() can return NULL or
errors which are checked by the driver but not the test.

Add KUNIT_ASSERT_NOT_ERR_OR_NULL() after calling them to fail the
test instead of accessing NULL or ERR pointers.
I've generally had the opinion that if kunit tests hit bugs I don't
actually care what happens next so long as the bug is evident.. Many
tests can't clean up when they get longjump'd out like this too.
I tend to agree as that's how I use kunit also, but I'd be extra
careful around crashing the kernel from kunit as it can be triggered
from userspace.

Thanks,
Mostafa
So, IDK, it is fine but I also think this is in a category that maybe
sashiko prompts should address instead somehow.

-- 
Jason
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help