Build realloc-clock SBF in tests and remove bundled artifact#2
Open
jflatow wants to merge 1 commit intocodex/create-native-deno-bindings-for-litesvmfrom
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
.soin the repo is not supported and leads to stale artifacts.reallocand theClocksysvar so the Deno bindings can call real syscalls during tests.Description
realloc_clock.sofromcrates/deno-litesvm/program_bytesand updated the Deno test to load the locally-built binary at../litesvm/test_programs/target/deploy/realloc_clock.soincrates/deno-litesvm/syscall_clock.test.ts.realloc-clockundercrates/litesvm/test_programs/with aCargo.tomlandsrc/lib.rsimplementingprocess_instructionthat computes a checksum over arealloc-sized buffer and readsClock::get()into account data.realloc-clockto thecrates/litesvm/test_programsworkspace and updated the lockfile entries accordingly.crates/deno-litesvm/Makefileto runcargo build-sbf(configurable viaSBF_BUILD_FLAGS) in thetesttarget before invokingdeno testso the program is built automatically.Testing
cargo build-sbf --skip-tools-install --manifest-path ../litesvm/test_programs/realloc-clock/Cargo.toml, which completed successfully and produced the deployable.so.deno test -A --unsafely-ignore-certificate-errors mod.test.ts client.test.ts syscall_clock.test.ts, which completed successfully.make testworkflow incrates/deno-litesvm, which required installingcargo-build-sbfin the environment and then succeeded when re-run.Codex Task