Commit b4e87072 authored by Song Liu's avatar Song Liu Committed by Andrii Nakryiko

selftests/bpf: Skip all serial_test_get_branch_snapshot in vm

Skipping the second half of the test is not enough to silent the warning
in dmesg. Skip the whole test before we can either properly silent the
warning in kernel, or fix LBR snapshot for VM.

Fixes: 025bd7c7 ("selftests/bpf: Add test for bpf_get_branch_snapshot")
Fixes: aa67fdb4 ("selftests/bpf: Skip the second half of get_branch_snapshot in vm")
Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211026000733.477714-1-songliubraving@fb.com
parent e02daf4c
...@@ -78,6 +78,12 @@ void serial_test_get_branch_snapshot(void) ...@@ -78,6 +78,12 @@ void serial_test_get_branch_snapshot(void)
struct get_branch_snapshot *skel = NULL; struct get_branch_snapshot *skel = NULL;
int err; int err;
/* Skip the test before we fix LBR snapshot for hypervisor. */
if (is_hypervisor()) {
test__skip();
return;
}
if (create_perf_events()) { if (create_perf_events()) {
test__skip(); /* system doesn't support LBR */ test__skip(); /* system doesn't support LBR */
goto cleanup; goto cleanup;
...@@ -107,16 +113,6 @@ void serial_test_get_branch_snapshot(void) ...@@ -107,16 +113,6 @@ void serial_test_get_branch_snapshot(void)
goto cleanup; goto cleanup;
} }
if (is_hypervisor()) {
/* As of today, LBR in hypervisor cannot be stopped before
* too many entries are flushed. Skip the hit/waste test
* for now in hypervisor until we optimize the LBR in
* hypervisor.
*/
test__skip();
goto cleanup;
}
ASSERT_GT(skel->bss->test1_hits, 6, "find_looptest_in_lbr"); ASSERT_GT(skel->bss->test1_hits, 6, "find_looptest_in_lbr");
/* Given we stop LBR in software, we will waste a few entries. /* Given we stop LBR in software, we will waste a few entries.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment