-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
CPI: improve test coverage #31986
CPI: improve test coverage #31986
Conversation
df1c36b
to
c6a8b29
Compare
Codecov Report
@@ Coverage Diff @@
## master #31986 +/- ##
=========================================
- Coverage 82.0% 82.0% -0.1%
=========================================
Files 784 784
Lines 212534 212755 +221
=========================================
+ Hits 174341 174460 +119
- Misses 38193 38295 +102 |
@@ -3933,3 +3933,98 @@ fn test_program_sbf_inner_instruction_alignment_checks() { | |||
let result = bank_client.send_and_confirm_instruction(&mint_keypair, instruction.clone()); | |||
assert!(result.is_ok()); | |||
} | |||
|
|||
#[test] |
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.
these test looks nice. if it's not too much trouble, how about backporting only these tests to v1.14? after all our test coverage isn't that good, esp for error/edge cases. I think these tests should have existed way before direct mapping...
b00ef5c
to
fa28958
Compare
Ok this is now ready for another round of reviews:
The diff has grown kinda large, but it's mostly new tests for edge conditions that weren't tested before. I've found some other unrelated, not direct mapping related bugs that I'm going to fix separately |
Done |
cb7833b
to
eca410e
Compare
ad813b7
to
ed1f9f4
Compare
8a79403
to
291e0a0
Compare
Alright this is now ready for another round of reviews! I actually have a couple more tests that I want to add, but they aren't around known issues they're just for coverage, so no reason to delay this. Ideally I want to land and enable in testnet asap. |
bde85d6
to
abc693a
Compare
abc693a
to
e711470
Compare
seems |
9ec1798
to
c0cb53e
Compare
fixed, a test had to be updated after the ref_to_len_in_vm >= MM_INPUT_START check |
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.
lgtm with nits.
really thanks for the hard work.
c0cb53e
to
225fdff
Compare
Add TEST_FORBID_LEN_UPDATE_AFTER_OWNERSHIP_CHANGE_MOVING_DATA_POINTER and TEST_FORBID_LEN_UPDATE_AFTER_OWNERSHIP_CHANGE that exercise the new logic.
Remove some copy pasta and rename two tests to better describe what they're doing
…tableDataModified
225fdff
to
08942d9
Compare
hey! it seems that this one broke master CI after merged 😢 https://buildkite.com/solana-labs/solana/builds/101262#018a643d-750f-4021-b395-4188ff9a982d |
oops, fixing! |
This reverts commit 6679153.
This reverts commit 6679153.
This adds a number of tests and checks the behavior with direct mapping on and off.