Skip to content
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

Loaded program test robustness #59

Merged
merged 3 commits into from
Mar 13, 2024

Conversation

bw-solana
Copy link

@bw-solana bw-solana commented Mar 4, 2024

Problem

Some of the current tests in loaded_programs.rs are not robust to different MAX_LOADED_ENTRY_COUNT values. For context, I'm exploring tuning this value down for stress testing as a means of increasing cache churn.

Summary of Changes

  1. Make expected entry counts dynamic against max cache entry count.
  2. Pull out program_deploy_test_helper helper function to reduce duplicate code. Note that a side effect of this is that we use the same reason for tombstones across all the programs. Previously they were different for each program, but my understanding is stressing this is not the intention of the test (and if it is, it wasn't comprehensive anyhow)

@bw-solana
Copy link
Author

bw-solana commented Mar 4, 2024

Failing due to new security audit. Will wait for #60 to resolve

#60 has been merged and resolved the CI issues

@bw-solana bw-solana force-pushed the loaded_program_test_robustness branch from 0944a75 to 3fad744 Compare March 4, 2024 21:18
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (3f9a7a5) to head (3fad744).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master      #59     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%     
=========================================
  Files         837      837             
  Lines      225922   225873     -49     
=========================================
- Hits       184955   184878     -77     
- Misses      40967    40995     +28     

@bw-solana bw-solana requested a review from Lichtso March 5, 2024 15:29
@bw-solana bw-solana marked this pull request as ready for review March 5, 2024 15:29
@bw-solana bw-solana requested review from pgarg66 and removed request for Lichtso March 6, 2024 19:48
@pgarg66 pgarg66 requested a review from alessandrod March 6, 2024 21:40
@alessandrod
Copy link

Thanks for improving the tests!

Pull out program_deploy_test_helper helper function to reduce duplicate code. Note that a side effect of this is that we use the same reason for tombstones across all the programs. Previously they were different for each program, but my understanding is stressing this is not the intention of the test (and if it is, it wasn't comprehensive anyhow)

Correct, the tombstone type is irrelevant for eviction, so this seems fine.

@bw-solana bw-solana merged commit 81075e6 into anza-xyz:master Mar 13, 2024
35 checks passed
@bw-solana bw-solana deleted the loaded_program_test_robustness branch March 13, 2024 15:22
codebender828 pushed a commit to codebender828/agave that referenced this pull request Oct 3, 2024
* tests robust to prog entry count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants