-
Notifications
You must be signed in to change notification settings - Fork 319
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
svm: add program cache tests #4656
base: master
Are you sure you want to change the base?
Conversation
If you re-work the program cache, please also update the concurrent tests available here: https://github.com/anza-xyz/agave/blob/master/svm/tests/concurrent_tests.rs |
this changes nothing but tests so im assuming one approval only from svm group is fine |
svm/tests/mock_bank.rs
Outdated
); | ||
|
||
// Other loaders are needed for testing program cache behavior. | ||
// NOTE when LoaderV4 is ready for testing, it must be added here. |
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.
loader-v4 is ready for testing now.
svm/tests/integration_test.rs
Outdated
fn svm_integration(test_entries: Vec<SvmTestEntry>) { | ||
for test_entry in test_entries { | ||
let env = SvmTestEnvironment::create(test_entry); | ||
env.execute(); | ||
} | ||
} | ||
|
||
#[test_matrix([false, true], [false, true])] | ||
fn program_cache_create_account(enable_fee_only_transactions: bool, disable_executable_flag: bool) { |
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.
disable_executable_flag => remove_accounts_executable_flag_checks
It only removes the checks of the flag, not the flag itself.
Problem
we are planning on refactoring transaction processing to use a per-transaction (changed from per-batch) local program cache. this requires new logic for handling tombstones, which lacks test coverage
Summary of Changes
add tests. also fix a bug in the svm test framework for setting program upgrade authority, and improve logging failures for better test-driven development