Skip to content

Commit

Permalink
fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcmay committed May 26, 2021
1 parent a561494 commit 5e3efaf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/ubpf_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ 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,
user_error::UserError,
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,
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 5e3efaf

Please sign in to comment.