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