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

Adds test coverage for #20669 #20690

Merged
merged 1 commit into from
Oct 18, 2021

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Oct 14, 2021

Problem

#20669 unveiled a gap in the tests:
Upgradeable loader BPF programs were invoked but the executor was already cached.
So the situation in which the executor needs to be created here never occurred.

Summary of Changes

Invoke the deployed program in test_bpf_loader_upgradeable_deploy_with_max_len.

Fixes #

@Lichtso Lichtso requested a review from jackcmay October 14, 2021 08:23
@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #20690 (13a180c) into master (bbc0bb4) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #20690     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         495      495             
  Lines      137776   137785      +9     
=========================================
- Hits       112917   112911      -6     
- Misses      24859    24874     +15     

@@ -1772,6 +1772,21 @@ mod tests {
assert_eq!(elf[i], *byte);
}

// Invoke deployed program
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to add more coverage here but what is this catching that something like the following isn't?

let result = bank_client.send_and_confirm_instruction(&mint_keypair, instruction.clone());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my assessment of the problem was wrong. I updated the description of the PR.

To answer your question:
This new part covers the case in which the executor is not cached and needs to be created on invocation.

@Lichtso Lichtso merged commit 8955c76 into solana-labs:master Oct 18, 2021
@Lichtso Lichtso deleted the test/coverage_for_20669 branch October 18, 2021 07:55
dankelleher pushed a commit to identity-com/solana that referenced this pull request Nov 24, 2021
frits-metalogix added a commit to identity-com/solana that referenced this pull request Nov 24, 2021
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.

2 participants