Skip to content

Commit

Permalink
Declutter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Sep 6, 2024
1 parent d3468b2 commit bd43a7c
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions tests/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2692,11 +2692,6 @@ fn test_err_instruction_count_syscall_capped() {

#[test]
fn test_non_terminate_early() {
let config = Config {
enabled_sbpf_versions: SBPFVersion::V1..=SBPFVersion::V1,
..Config::default()
};

test_interpreter_and_jit_asm!(
"
mov64 r6, 0x0
Expand All @@ -2705,15 +2700,14 @@ fn test_non_terminate_early() {
mov64 r3, 0x0
mov64 r4, 0x0
mov64 r5, r6
syscall Unresolved
callx r6
add64 r6, 0x1
ja -0x8
exit",
config.clone(),
[],
(),
TestContextObject::new(7),
ProgramResult::Err(EbpfError::UnsupportedInstruction),
ProgramResult::Err(EbpfError::CallOutsideTextSegment),
);
}

Expand Down Expand Up @@ -2776,21 +2770,15 @@ fn test_err_capped_before_exception() {
ProgramResult::Err(EbpfError::ExceededMaxInstructions),
);

let config = Config {
enabled_sbpf_versions: SBPFVersion::V1..=SBPFVersion::V1,
..Config::default()
};

test_interpreter_and_jit_asm!(
"
mov64 r1, 0x0
mov64 r2, 0x0
add64 r0, 0x0
add64 r0, 0x0
syscall Unresolved
callx r2
add64 r0, 0x0
exit",
config.clone(),
[],
(),
TestContextObject::new(4),
Expand Down

0 comments on commit bd43a7c

Please sign in to comment.