From 5e3efafaf4de639bad40a29d04ba8302253bee0a Mon Sep 17 00:00:00 2001 From: Jack May Date: Tue, 25 May 2021 16:54:15 -0700 Subject: [PATCH] fix windows --- tests/ubpf_execution.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/ubpf_execution.rs b/tests/ubpf_execution.rs index 289acbb67..2080612cb 100644 --- a/tests/ubpf_execution.rs +++ b/tests/ubpf_execution.rs @@ -14,8 +14,7 @@ extern crate thiserror; use rand::{rngs::SmallRng, RngCore, SeedableRng}; use solana_rbpf::{ assembler::assemble, - ebpf, - elf::{register_bpf_function, ElfError}, + elf::ElfError, error::EbpfError, memory_region::AccessType, syscalls, @@ -23,7 +22,7 @@ use solana_rbpf::{ verifier::check, vm::{Config, EbpfVm, Executable, SyscallObject, SyscallRegistry}, }; -use std::{collections::BTreeMap, fs::File, io::Read}; +use std::{fs::File, io::Read}; use test_utils::{ BpfSyscallString, BpfSyscallU64, BpfTracePrintf, Result, SyscallWithContext, TestInstructionMeter, PROG_TCP_PORT_80, TCP_SACK_ASM, TCP_SACK_MATCH, TCP_SACK_NOMATCH, @@ -3229,6 +3228,9 @@ fn test_tcp_sack_nomatch() { #[cfg(not(windows))] fn execute_generated_program(prog: &[u8]) -> bool { + use solana_rbpf::elf::register_bpf_function; + use std::collections::BTreeMap; + let max_instruction_count = 1024; let mem_size = 1024 * 1024; let mut bpf_functions = BTreeMap::new(); @@ -3293,6 +3295,7 @@ fn execute_generated_program(prog: &[u8]) -> bool { #[cfg(not(windows))] #[test] fn test_total_chaos() { + use solana_rbpf::ebpf; let instruction_count = 6; let iteration_count = 1000000; let mut program = vec![0; instruction_count * ebpf::INSN_SIZE];