summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorGabriele Monaco <gmonaco@redhat.com>2026-07-23 09:45:30 +0200
committerGabriele Monaco <gmonaco@redhat.com>2026-07-31 16:27:45 +0200
commitcf8f191c06546dff223df12010d4a21f7b631ae3 (patch)
tree2b4270e5e15d56d46fe5124d0ad8e057118c67ce /tools/perf/scripts/python
parent8da2a88383658dac97769ed8f807ef6100a69480 (diff)
rv: Add KUnit mock for current
Some monitors do not only rely on tracepoint arguments but also on the currently executing task. This makes it more challenging to mock events in KUnit. Define wrapper functions around current, the functionality is mocked only during KUnit, an additional function call is avoided using a static branch unless any (even unrelated) KUnit test is running. Rely on a global mock_current variable that is set only by the RV KUnit tests and cleared on teardown. Unrelated KUnit tests that happen to trigger RV handlers would see it null and use current. Reviewed-by: Nam Cao <namcao@linutronix.de> Reviewed-by: Wen Yang <wen.yang@linux.dev> Link: https://lore.kernel.org/r/20260723074534.43521-14-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions