Skip to content

Commit

Permalink
Test maximum instructions when callx is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Nov 8, 2024
1 parent f64404d commit 52f5665
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3499,6 +3499,23 @@ fn callx_unsupported_instruction_and_exceeded_max_instructions() {
);
}

#[test]
fn test_maximum_after_callx() {
test_interpreter_and_jit_asm!(
"
mov64 r0, 0x0
or64 r8, 0x20
callx r8
exit
function_foo:
mov64 r0, 0x2A
exit",
[],
TestContextObject::new(3),
ProgramResult::Err(EbpfError::ExceededMaxInstructions),
);
}

// SBPFv1 only [DEPRECATED]

#[test]
Expand Down

0 comments on commit 52f5665

Please sign in to comment.