Re: [PATCH v3 11/17] rv: Prevent unintentional tracepoints during KUnit tests
From: Gabriele Monaco
Date: Tue Jul 07 2026 - 03:49:24 EST
On Tue, 2026-07-07 at 09:00 +0200, Nam Cao wrote:
> Gabriele Monaco <gmonaco@xxxxxxxxxx> writes:
> > Monitor initialisation also called during KUnit tests may register some
> > tracepoints, this can lead to issues since we don't expect real monitor
> > events running during KUnit tests.
> >
> > Prevent tracepoint registration if an RV KUnit test is running.
> >
> > Reviewed-by: Nam Cao <namcao@xxxxxxxxxxxxx>
> > Signed-off-by: Gabriele Monaco <gmonaco@xxxxxxxxxx>
>
> Somehow I have no recollection of seeing this patch.
Well, I'm fairly sure you reviewed it ;)
> But since we already hold rv_interface_lock during the test, is this
> really necessary?
This is for things like ltl_monitor_init() that attaches the newtask probe.
The function is also doing a few other things we may not want to do, to be fair,
but calling the monitor_init() function as-is was the easiest solution I could
think of. Also ha_monitor_init() may attach a probe.
I suppose I could also do some more targeted initialisation/destruction, in fact
right now, the LTL initialisation does a bunch of stuff tests don't need and
doesn't do what they do need (initialise the dummy tasks, which aren't part of
the task list).
I should probably rethink this a little.
Thanks,
Gabriele