-
Notifications
You must be signed in to change notification settings - Fork 176
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
Exercise all bpf instructions #552
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #552 +/- ##
==========================================
+ Coverage 88.34% 89.43% +1.08%
==========================================
Files 24 23 -1
Lines 10282 9931 -351
==========================================
- Hits 9084 8882 -202
+ Misses 1198 1049 -149 ☔ View full report in Codecov by Sentry. |
4180b00
to
b1fdeb9
Compare
Looks good in general. However, we already have a bunch of fuzzers all with different interfaces, capabilities, etc. Would be nice to have a more structured approach instead of many individual ad-hoc solutions. |
What do you have in mind? I can extend this test to include branch tests and load/store tests, which would cover almost all of the instructions. I also feel this would be a useful addition for any future arm64 jitter. |
Is there any updates on the status of this PR? I was looking forward to using this fuzzer. |
I believe the PR is really good to ensure the consistency between the jitter and the interpreter and I thought it would be nice to even cover the SBFv1 instructions. There are instructions that the compiler does not emit today, but that the RPBF crate supports, so having this test ensures everything works in tandem if we were to enable their emission. |
tests/exercise_instructions.rs
Outdated
exit" | ||
); | ||
|
||
test_interpreter_and_jit_asm!(asm.as_str(), input, (), TestContextObject::new(cu)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we testing call
and exit
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, however testing those is a bit trivial/uninteresting
Signed-off-by: Sean Young <[email protected]>
This tests checks that all the alu instructions have the same output for jit and interpreted.