Re: [PATCH] kunit: take `kunit_assert` as `const`

From: Miguel Ojeda
Date: Wed May 04 2022 - 15:26:37 EST


Hi David,

On Wed, May 4, 2022 at 4:05 PM David Gow <davidgow@xxxxxxxxxx> wrote:
>
> I definitely agree here -- I can't recall any particular plan that
> would require this to be non-const, and we can always change it back
> if we really need to.

That is good to know, thanks! Out-of-tree users can always be a surprise... :)

> Very exciting! I assume that's the PR here:
> https://github.com/Rust-for-Linux/linux/pull/757

Indeed! I hope you like it -- we are taking the documentation tests in
Rust (which are a very lightweight way of writing examples which
double as tests) and generating KUnit test cases on the fly. For the
moment it is just for the `kernel` crate, but the idea is to
generalize it for modules etc.

By the way, since you saw the PR... do you know if KUnit relies (or
will rely) on "stack-dumping" functions like `longjmp`?

Cheers,
Miguel