Re: [PATCH v7 04/25] kunit: take `kunit_assert` as `const`

From: Shuah Khan
Date: Mon May 23 2022 - 14:37:07 EST


On 5/23/22 11:15 AM, Daniel Latypov wrote:
On Sun, May 22, 2022 at 7:03 PM Miguel Ojeda <ojeda@xxxxxxxxxx> wrote:

The `kunit_do_failed_assertion` function passes its
`struct kunit_assert` argument to `kunit_fail`. This one,
in turn, calls its `format` field passing the assert again
as a `const` pointer.

Therefore, the whole chain may be made `const`.

Reviewed-by: Daniel Latypov <dlatypov@xxxxxxxxxx>
Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx>
Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
---
This is a prerequisite patch, independently submitted at:

https://lore.kernel.org/lkml/20220502093625.GA23225@xxxxxxxxxx/

FYI, we'd asked Shuah to pick this patch up in her "kunit" branch.
It's applied here:
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit&id=7466886b400b1904ce30fa311904849e314a2cf4

It had previously seemed unclear if this series could make it for the
5.19 merge window (but it now looks like there's interest in trying it
out early on).

Daniel


I am just about send pull request with this patch included.

thanks,
-- Shuah