summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/testing/selftests/bpf/prog_tests/get_branch_snapshot.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/get_branch_snapshot.c b/tools/testing/selftests/bpf/prog_tests/get_branch_snapshot.c
index d6d70a359aeb..81402e443984 100644
--- a/tools/testing/selftests/bpf/prog_tests/get_branch_snapshot.c
+++ b/tools/testing/selftests/bpf/prog_tests/get_branch_snapshot.c
@@ -78,6 +78,12 @@ void serial_test_get_branch_snapshot(void)
struct get_branch_snapshot *skel = NULL;
int err;
+ /* Skip the test before we fix LBR snapshot for hypervisor. */
+ if (is_hypervisor()) {
+ test__skip();
+ return;
+ }
+
if (create_perf_events()) {
test__skip(); /* system doesn't support LBR */
goto cleanup;
@@ -107,16 +113,6 @@ void serial_test_get_branch_snapshot(void)
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");
/* Given we stop LBR in software, we will waste a few entries.