]> git.hungrycats.org Git - linux/commit
tools/rv: Fix substring match bug in monitor name search
authorGabriele Monaco <gmonaco@redhat.com>
Thu, 14 May 2026 15:20:42 +0000 (17:20 +0200)
committerGabriele Monaco <gmonaco@redhat.com>
Thu, 4 Jun 2026 14:44:24 +0000 (16:44 +0200)
commita963fbf3166f2e178ac38b6c3c186a0c98092fb9
tree7ceab50727f3a73ec79e12cd9359045bda5d4fd2
parent08904765bb941f98306ae6841c33cfd299343faf
tools/rv: Fix substring match bug in monitor name search

__ikm_find_monitor_name() relies on strstr() to find a monitor by name,
which fails if the target monitor is a substring of a previously listed
monitor.

Fix it by tokenizing the available_monitors file and matching full
tokens instead.

Fixes: eba321a16fc6 ("tools/rv: Add support for nested monitors")
Reviewed-by: Nam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/r/20260514152055.229162-2-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
tools/verification/rv/src/in_kernel.c