Re: [PATCH v2 33/33] tools/testing/vma: output compared expression on ASSERT_[EQ, NE]()

From: Lorenzo Stoakes

Date: Sat Jul 11 2026 - 02:33:31 EST


On Fri, Jul 10, 2026 at 05:09:54PM -0400, Gregory Price wrote:
> On Fri, Jul 10, 2026 at 09:17:14PM +0100, Lorenzo Stoakes wrote:
> > Update the macros to output the compared values at hex for easier debugging
> > when test asserts fail.
> >
> > We have to be careful not to re-evaluate expressions as they may have
> > side-effects. So update the code to take local copies and use these for
> > both the test and the debug output.
>
> Aw you found it before i reported it :]

Claude did :) I take no credit for it :P I guess I thought the re-eval wouldn't
be an issue but obviously when it's a side-effect and the userland tests do do
that, it's very important you DON'T re-evaluate :P

Human 'meh that'll probably be fine-ish' vs. robot/Gregory laser-focused vision
doing the whole 'Sorry Dave I'm afraid I can't do that' ;)

>
> >
> > Also remove unused IS_SET() macro.
> >
> > Signed-off-by: Lorenzo Stoakes <ljs@xxxxxxxxxx>
>
>
> Reviewed-by: Gregory Price <gourry@xxxxxxxxxx>
>

Cheers, Lorenzo