This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
forked from qmonnet/rbpf
-
Notifications
You must be signed in to change notification settings - Fork 181
Cleanup - Move tests into separate files #649
Closed
Lichtso
wants to merge
18
commits into
solana-labs:main
from
anza-xyz:cleanup/move_tests_into_separate_files
Closed
Cleanup - Move tests into separate files #649
Lichtso
wants to merge
18
commits into
solana-labs:main
from
anza-xyz:cleanup/move_tests_into_separate_files
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Always sanitize emit_profile_instruction_count() and emit_undo_profile_instruction_count(). * Sanitize emit_validate_instruction_count() as well.
* Updates the README * Bump to v0.9.0 * Renames the crate.
…ons(). (#5) And uses wider verification loads.
* All the immediate values can use the same encryption key. There is no need to generate a new one for each. * Optimizes memory access instructions. * Moves second half of emit_sanitized_load_immediate(REGISTER_SCRATCH, vm_addr) into ANCHOR_TRANSLATE_MEMORY_ADDRESS. * Moves second half of emit_sanitized_load_immediate(stack_slot_of_value_to_store, constant) into ANCHOR_TRANSLATE_MEMORY_ADDRESS.
* Removes dst == FRAME_PTR_REG special case. * Allows encoding of u8 displacement in SIB mode. * Splits off X86Instruction::alu_immediate(). * Adds X86Register.
* Swaps `mov32 dst, imm` and `mov64 dst, imm` behavior description. * Makes cargo clippy happy.
…rams (#11) * Address offsetting via indirection of the load instruction. * Groups the instructions of `self.emit_profile_instruction_count(None);`. * Stores text_section relative offsets in pc_section instead of absolute addresses. * Stores u32 instead of u64 elements in pc_section. * Spills to MMX register and uses 64 bit load immediate.
…12) * Uses the MSB in pc_section to mark invalid call targets. * Removes the second pass over pc_section in resolve_jumps(). * Removes emit_undo_profile_instruction_count() from ANCHOR_CALL_REG_UNSUPPORTED_INSTRUCTION.
* Moves test_invalid_exit_or_return() to verifier tests. * Moves test_invalid_call_imm() to verifier. * Adds test_call_imm_does_not_dispatch_syscalls(). * Moves test_interpreter_and_jit, test_interpreter_and_jit_asm, test_interpreter_and_jit_elf and test_syscall_asm into test_utils crate. * Removes JIT compilation error check. * Refactors expected_result in test_interpreter_and_jit!(). * Removes the option to skip the verifier in test_interpreter_and_jit!(). * Run all tests (except for those which expect ExceededMaxInstructions) with and without override_budget. * Adds a variant of test_interpreter_and_jit!() which does not check the result. * Uses test_utils macros in exercise_instructions test_ins(). * Report all diverged properties.
… does not need to. (#18)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rust has two styles for writing tests:
The first style has the advantage that one can reuse the
use
import statements and gets direct access to private fields. The second style allows one to use the crates dev-dependencies.Currently we use both. This PR converts all of the first to the second. This will allow subsequent PRs to move test only code such as syscalls.rs and the
TestContextObject
into thetest_utils
crate as a dev-dependency.