Skip to content

Loaded program test robustness#59

Merged
bw-solana merged 3 commits intoanza-xyz:masterfrom
bw-solana:loaded_program_test_robustness
Mar 13, 2024
Merged

Loaded program test robustness#59
bw-solana merged 3 commits intoanza-xyz:masterfrom
bw-solana:loaded_program_test_robustness

Conversation

@bw-solana
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
@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
OliverNChalk pushed a commit to OliverNChalk/agave that referenced this pull request Nov 11, 2025
* add cli arg generator_types

* Use strum for BlockGeneratorOption

* remove unnecessary lazy_static

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
Signed-off-by: kirill lykov <lykov.kirill@gmail.com>

* Simplify generator_type cli arg handling

Co-authored-by: Illia Bobyr <ilya.bobyr@gmail.com>
Signed-off-by: kirill lykov <lykov.kirill@gmail.com>

* add expect

---------

Signed-off-by: kirill lykov <lykov.kirill@gmail.com>
Signed-off-by: kirill lykov <kirill.lykov@solana.com>
Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
Co-authored-by: Illia Bobyr <ilya.bobyr@gmail.com>
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