Skip to content

Commit 0dc072e

Browse files
Copilotmikeagun
andcommitted
Wrap JIT stress tests with CONFIG_BPF_JIT_DISABLED ifdef guards
Co-authored-by: mikeagun <[email protected]>
1 parent 7d14c74 commit 0dc072e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/stress/km/stress_tests_km.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,7 @@ _mt_bindmonitor_tail_call_invoke_program_test(
16201620
WSACleanup();
16211621
}
16221622

1623+
#if !defined(CONFIG_BPF_JIT_DISABLED)
16231624
TEST_CASE("jit_load_attach_detach_unload_random_v4_test", "[jit_mt_stress_test]")
16241625
{
16251626
// This test attempts to load the same JIT'ed ebpf program multiple times in different threads. This test
@@ -1638,6 +1639,7 @@ TEST_CASE("jit_load_attach_detach_unload_random_v4_test", "[jit_mt_stress_test]"
16381639
_print_test_control_info(local_test_control_info);
16391640
_mt_prog_load_stress_test(EBPF_EXECUTION_JIT, local_test_control_info);
16401641
}
1642+
#endif // !defined(CONFIG_BPF_JIT_DISABLED)
16411643

16421644
TEST_CASE("native_load_attach_detach_unload_random_v4_test", "[native_mt_stress_test]")
16431645
{
@@ -1762,6 +1764,7 @@ TEST_CASE("bindmonitor_tail_call_invoke_program_test", "[native_mt_stress_test]"
17621764
_mt_bindmonitor_tail_call_invoke_program_test(EBPF_EXECUTION_NATIVE, local_test_control_info);
17631765
}
17641766

1767+
#if !defined(CONFIG_BPF_JIT_DISABLED)
17651768
TEST_CASE("jit_unique_load_attach_detach_unload_random_v4_test", "[jit_mt_stress_test]")
17661769
{
17671770
// This test attempts to load a unique JIT ebpf program multiple times in different threads. Specifically:
@@ -1862,6 +1865,7 @@ TEST_CASE("jit_bindmonitor_tail_call_invoke_program_test", "[jit_mt_stress_test]
18621865
_print_test_control_info(local_test_control_info);
18631866
_mt_bindmonitor_tail_call_invoke_program_test(EBPF_EXECUTION_JIT, local_test_control_info);
18641867
}
1868+
#endif // !defined(CONFIG_BPF_JIT_DISABLED)
18651869

18661870
static void
18671871
_mt_load_stress_test_with_restart_timing(
@@ -2049,6 +2053,7 @@ _mt_invoke_stress_test_multiple_programs(ebpf_execution_type_t program_type, con
20492053
extension_restart_thread_context_table);
20502054
}
20512055

2056+
#if !defined(CONFIG_BPF_JIT_DISABLED)
20522057
TEST_CASE("load_attach_stress_test_restart_during_load_jit", "[jit_mt_stress_test]")
20532058
{
20542059
// Test resiliency during program 'open + load + attach' sequence with extension restart.
@@ -2065,6 +2070,7 @@ TEST_CASE("load_attach_stress_test_restart_during_load_jit", "[jit_mt_stress_tes
20652070
_print_test_control_info(local_test_control_info);
20662071
_mt_load_stress_test_with_restart_timing(EBPF_EXECUTION_JIT, local_test_control_info, true);
20672072
}
2073+
#endif // !defined(CONFIG_BPF_JIT_DISABLED)
20682074

20692075
TEST_CASE("load_attach_stress_test_restart_during_load_native", "[native_mt_stress_test]")
20702076
{
@@ -2084,6 +2090,7 @@ TEST_CASE("load_attach_stress_test_restart_during_load_native", "[native_mt_stre
20842090
_mt_load_stress_test_with_restart_timing(EBPF_EXECUTION_NATIVE, local_test_control_info, true);
20852091
}
20862092

2093+
#if !defined(CONFIG_BPF_JIT_DISABLED)
20872094
TEST_CASE("load_attach_stress_test_restart_after_load_jit", "[jit_mt_stress_test]")
20882095
{
20892096
// Test resiliency after program 'open + load + attach' sequence with extension restart.
@@ -2101,6 +2108,7 @@ TEST_CASE("load_attach_stress_test_restart_after_load_jit", "[jit_mt_stress_test
21012108
_print_test_control_info(local_test_control_info);
21022109
_mt_load_stress_test_with_restart_timing(EBPF_EXECUTION_JIT, local_test_control_info, false);
21032110
}
2111+
#endif // !defined(CONFIG_BPF_JIT_DISABLED)
21042112

21052113
TEST_CASE("load_attach_stress_test_restart_after_load_native", "[native_mt_stress_test]")
21062114
{
@@ -2121,6 +2129,7 @@ TEST_CASE("load_attach_stress_test_restart_after_load_native", "[native_mt_stres
21212129
_mt_load_stress_test_with_restart_timing(EBPF_EXECUTION_NATIVE, local_test_control_info, false);
21222130
}
21232131

2132+
#if !defined(CONFIG_BPF_JIT_DISABLED)
21242133
TEST_CASE("invoke_different_programs_restart_extension_test_jit", "[jit_mt_stress_test]")
21252134
{
21262135
// Multi-threaded stress test where each thread loads different programs with extension restart.
@@ -2136,6 +2145,7 @@ TEST_CASE("invoke_different_programs_restart_extension_test_jit", "[jit_mt_stres
21362145
_print_test_control_info(local_test_control_info);
21372146
_mt_invoke_stress_test_multiple_programs(EBPF_EXECUTION_JIT, local_test_control_info);
21382147
}
2148+
#endif // !defined(CONFIG_BPF_JIT_DISABLED)
21392149

21402150
TEST_CASE("invoke_different_programs_restart_extension_test_native", "[native_mt_stress_test]")
21412151
{

0 commit comments

Comments
 (0)