Test RJUMP¶
Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py@206854b5
.
Generate fixtures for these test cases for Osaka with:
fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py --fork Osaka
Test Functions Overview¶
Name | Type | Cases (Osaka) | Description |
---|---|---|---|
test_rjump_negative |
eof_state_test | 0 | Test for a forward RJUMPI and backward RJUMP |
test_rjump_positive_negative |
eof_state_test | 0 | EOF1V4200_0001 (Valid) EOF code containing RJUMP (Positive, Negative) |
test_rjump_zero |
eof_state_test | 0 | EOF1V4200_0002 (Valid) EOF code containing RJUMP (Zero) |
test_rjump_maxes |
eof_state_test | 0 | EOF1V4200_0003 EOF with RJUMP containing the maximum positive and negative offset (32767) |
test_rjump_max_bytecode_size |
eof_test | 1 | EOF1V4200_0003 EOF with RJUMP containing the maximum offset that does not exceed the maximum |
test_rjump_truncated_rjump |
eof_test | 1 | EOF1I4200_0001 (Invalid) EOF code containing truncated RJUMP |
test_rjump_truncated_rjump_2 |
eof_test | 1 | EOF1I4200_0002 (Invalid) EOF code containing truncated RJUMP |
test_rjump_into_header |
eof_test | 1 | EOF1I4200_0003 (Invalid) EOF code containing RJUMP with target outside code bounds |
test_rjump_before_header |
eof_test | 1 | EOF1I4200_0004 (Invalid) EOF code containing RJUMP with target outside code bounds |
test_rjump_into_data |
eof_test | 1 | EOF1I4200_0005 (Invalid) EOF code containing RJUMP with target outside code bounds |
test_rjump_outside_other_section_before |
eof_test | 1 | EOF code containing RJUMP with target outside code bounds (prior code section) |
test_rjump_outside_other_section_after |
eof_test | 1 | EOF code containing RJUMP with target outside code bounds (Subsequent code section) |
test_rjump_after_container |
eof_test | 1 | EOF1I4200_0006 (Invalid) EOF code containing RJUMP with target outside code bounds |
test_rjump_to_code_end |
eof_test | 1 | EOF1I4200_0007 (Invalid) EOF code containing RJUMP with target outside code bounds |
test_rjump_into_self_data_portion |
eof_test | 2 | EOF1I4200_0008 (Invalid) EOF code containing RJUMP with target self RJUMP immediate |
test_rjump_into_self_remaining_code |
eof_test | 1 | EOF1I4200_0008 (Invalid) EOF code containing RJUMP with target self RJUMP but remaining |
test_rjump_into_self |
eof_test | 1 | EOF code containing RJUMP with target self RJUMP |
test_rjump_into_self_pre_code |
eof_test | 1 | EOF code containing RJUMP with target self RJUMP with non-zero stack before RJUMP |
test_rjump_into_stack_height_diff |
eof_test | 1 | EOF code containing RJUMP with target instruction that causes stack height difference |
test_rjump_into_stack_height_diff_2 |
eof_test | 1 | EOF code containing RJUMP with target instruction that cause stack height difference |
test_rjump_into_stack_underflow |
eof_test | 1 | EOF code containing RJUMP with target instruction that cause stack underflow |
test_rjump_into_rjump |
eof_test | 1 | EOF1I4200_0009 (Invalid) EOF code containing RJUMP with target other RJUMP immediate |
test_rjump_into_rjumpi |
eof_test | 1 | EOF1I4200_0010 (Invalid) EOF code containing RJUMP with target RJUMPI immediate |
test_rjump_into_push_1 |
eof_test | 2 | EOF1I4200_0011 (Invalid) EOF code containing RJUMP with target PUSH1 immediate |
test_rjump_into_push_n |
eof_test | 124 | EOF1I4200_0011 (Invalid) EOF code containing RJUMP with target PUSH2+ immediate |
test_rjump_into_rjumpv |
eof_test | 4 | EOF1I4200_0012 (Invalid) EOF code containing RJUMP with target RJUMPV immediate |
test_rjump_into_callf |
eof_test | 2 | EOF1I4200_0013 (Invalid) EOF code containing RJUMP with target CALLF immediate |
test_rjump_into_dupn |
eof_test | 1 | EOF code containing RJUMP with target DUPN immediate |
test_rjump_into_swapn |
eof_test | 1 | EOF code containing RJUMP with target SWAPN immediate |
test_rjump_into_exchange |
eof_test | 1 | EOF code containing RJUMP with target EXCHANGE immediate |
test_rjump_into_eofcreate |
eof_test | 1 | EOF code containing RJUMP with target EOFCREATE immediate |
test_rjump_into_returncontract |
eof_test | 1 | EOF code containing RJUMP with target RETURNCONTRACT immediate |
test_rjump_unreachable_code |
eof_test | 1 | EOF code containing instructions skipped by RJUMP |
test_rjump_backwards_reference_only |
eof_test | 1 | EOF code containing instructions only reachable by backwards RJUMP |
test_rjump_backwards_illegal_stack_height |
eof_test | 1 | Invalid backward jump, found via fuzzing coverage |
test_rjump_backwards_infinite_loop |
eof_test | 1 | Validate that a backwards RJUMP as terminal operation is valid |