-
Notifications
You must be signed in to change notification settings - Fork 37
Add initial PVM test vectors #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
koute
wants to merge
26
commits into
w3f:master
Choose a base branch
from
koute:master_pvm_initial
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e285daa
Add initial PVM test vectors
koute 19d2ad8
Pre-clobber the output reg in `inst_div_unsigned_with_overflow`
koute 9ba4b5b
Replace underscores with hypens, because ASN.1 doesn't like underscores
koute e89f6b7
Add JSON Schema and ASN.1 schema
koute 96025c7
Add comments to the ASN.1 schema, reference the paper, update README
koute 1d43b7d
Add the instruction/program counter to the tests
koute 9b35cf4
Correct the expected PC for when the program halts
koute f4c9f3f
Add tests involving memory
koute dbbfbd4
Remove accidental `OPTIONAL` from the ASN.1 schema
koute 3e18a7f
Add gas
koute e267a75
Rename `code` -> `program`
koute 5581280
Fix some typos in the ASN.1 schema
koute a2b1870
Align reg3 serialization with the GP and add extra testcases
koute 0a4c99b
PVM tests v0.2: add 'invalid' to disassemblies to mark implicit traps
koute 8659541
PVM tests v0.2: bitmask paddings are now filled with zeros
koute fb4de8a
PVM tests v0.2: `inst_rem_signed`: make output non-zero
koute fa6cf0a
PVM tests v0.2: `inst_rem_signed_with_overflow`: non-zero initial val…
koute 83596b5
PVM tests v0.2: `inst_set_*`: non-zero initial value of output reg
koute 51e134e
PVM tests v0.2: add more load/store tests
koute 30ba85a
PVM tests v0.2: update README
koute a54d7cf
PVM tests v0.3: remove tests which expose gas precharging
koute bf3c81a
PVM tests v0.4
koute cd85648
PVM tests v0.4: remove read-only panicking tests
koute e231523
PVM tests v0.4: remove `inst_load_u8_nok` and `inst_store_u8_trap_ina…
koute 5427958
Merge remote-tracking branch 'origin/master' into HEAD
koute d60a459
PVM tests v0.5: updated for GP 0.8.0
koute File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # PVM Test Vectors, version 0.1 | ||
|
|
||
| ## How to use this | ||
|
|
||
| The [`programs`](./programs) directory contains `.json` files, each containing a single test. | ||
|
|
||
| Here's an example of such a test: | ||
|
|
||
| ``` | ||
| { | ||
| "name": "inst_add", | ||
| "initial_regs": [0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0], | ||
| "code": [0, 0, 3, 8, 121, 8, 249], | ||
| "expected_status": "trap", | ||
| "expected_regs": [0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0] | ||
| } | ||
| ``` | ||
|
|
||
| * `name` -- a unique identifier for the test | ||
| * `initial_regs` -- the initial value of each of the 13 registers; these need to be set *before* the test program is executed | ||
| * `code` -- the code blob of the program to be executed as part of the test | ||
| * `expected_status` -- the way the program is supposed to end; currently it can be one of the following: | ||
| - `"trap"` -- the execution ended with a trap (the `trap` instruction was executed, the execution went "out of bounds", an invalid jump was made, or an invalid instruction was executed) | ||
| - `"halt"` -- the execution finished gracefully (a dynamic jump to address `0xffff0000` was made) | ||
| * `expected_regs` -- the expected values of each of the 13 registers *after* the test program is executed | ||
|
|
||
| See [TESTCASES.md](./TESTCASES.md) for a human-readable index of all of the test cases. | ||
|
|
||
| ## Changelog | ||
|
|
||
| ### v0.1 | ||
|
|
||
| * Initial test vectors. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.