Skip to content

Commit

Permalink
Disable JIT bpf program tests on non x86 archs (solana-labs#26654)
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarry authored and Lcchy committed Jul 22, 2022
1 parent 63ef27f commit 1e13239
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions programs/bpf/tests/programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,27 @@ fn run_program(name: &str) -> u64 {
)
.unwrap();

#[allow(unused_mut)]
let mut verified_executable = VerifiedExecutable::<
RequisiteVerifier,
BpfError,
ThisInstructionMeter,
>::from_executable(executable)
.unwrap();
verified_executable.jit_compile().unwrap();

let run_program_iterations = {
#[cfg(target_arch = "x86_64")]
{
verified_executable.jit_compile().unwrap();
2
}
#[cfg(not(target_arch = "x86_64"))]
1
};

let mut instruction_count = 0;
let mut tracer = None;
for i in 0..2 {
for i in 0..run_program_iterations {
let transaction_context = &mut invoke_context.transaction_context;
let instruction_context = transaction_context
.get_current_instruction_context()
Expand Down

0 comments on commit 1e13239

Please sign in to comment.