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

ci/tests: workarounds for flaky windows tests #542

Merged
merged 3 commits into from
Mar 20, 2023

Conversation

lukpueh
Copy link
Member

@lukpueh lukpueh commented Mar 20, 2023

Works around issues that would frequently fail Windows CI as documented in #520, by:

  • disabling hsm tests on Windows,
  • generally increasing gpg subprocess timeout in tests

This PR also once more lowers the minimum test coverage requirement, to account for the excluded tests. This should be reverted with #208.

lukpueh added 3 commits March 20, 2023 11:45
This hopefully reduces sporadic failures in Windows ci.

Signed-off-by: Lukas Puehringer <[email protected]>
Excluding more tests on Windows (HSM signer) further decreases test
coverage to ~88%. This commit makes 85% the lower boundary for all
platforms.

Coverage measurement should fine tuned with secure-systems-lab#208 and changed back
to a higher value!

Signed-off-by: Lukas Puehringer <[email protected]>
@lukpueh
Copy link
Member Author

lukpueh commented Mar 20, 2023

The failing test is an unrelated platform-independently flaky rsa test 😢 It is documented in #462.

EDIT: did not fail on a second run. let's fix / work around this separately

@lukpueh lukpueh requested a review from jku March 20, 2023 12:01
Copy link
Collaborator

@jku jku left a comment

Choose a reason for hiding this comment

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

👍 let's try this

@jku jku merged commit 93c9329 into secure-systems-lab:main Mar 20, 2023
lukpueh added a commit to lukpueh/securesystemslib that referenced this pull request Mar 21, 2023
Patching globals to modify function behavior is an anti-pattern and
should not be recommended to a user!!

But it seems acceptable in tests (see secure-systems-lab#542). For this to work, the
global must not be used before being modified, which, AFAIK, is not
possible, if the global is defined and used (e.g. in a function
signature) in the same scope.

This commit changes the relevant function to access the default
value in local scope, so that it global can be imported and
modified before it.

More invasive but probably more correct solutions would be:
- move either GPG_TIMEOUT or is_available_gnupg to a different
  module, or
- call relevant functions in tests with an explicit timeout arg

Signed-off-by: Lukas Puehringer <[email protected]>
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