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

tests: Handle some failures when using -race #739

Merged
merged 5 commits into from
Jan 22, 2025

Conversation

3v1n0
Copy link
Collaborator

@3v1n0 3v1n0 commented Jan 17, 2025

See commits for details.

Close: #703

UDENG-5710

@3v1n0 3v1n0 requested a review from a team as a code owner January 17, 2025 18:34
@3v1n0 3v1n0 force-pushed the some-goraces-handling branch from 342d4e1 to 3b403b0 Compare January 17, 2025 18:36
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 83.07%. Comparing base (36511cd) to head (6c1bf10).
Report is 214 commits behind head on main.

Files with missing lines Patch % Lines
pam/tools/pam-runner/pam-runner.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #739      +/-   ##
==========================================
- Coverage   83.43%   83.07%   -0.37%     
==========================================
  Files          83       96      +13     
  Lines        8689     9585     +896     
  Branches       74       74              
==========================================
+ Hits         7250     7963     +713     
- Misses       1111     1238     +127     
- Partials      328      384      +56     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@3v1n0 3v1n0 force-pushed the some-goraces-handling branch 2 times, most recently from 74f8df0 to f6d13c8 Compare January 20, 2025 15:52
3v1n0 added 3 commits January 20, 2025 16:58
Errno may be accessed by other code during the go execution, breaking
our assumptions.

So let's test that our code is race-free by using a test variable
instead.
…vhs output

Since the introduction of the VHS wait feature we may get the data race
output as VHS error, so let's handle it earlier if vhs process fails.

We still keep the check in the golden file, as we may still get a race
output after a successful Wait.

Closes: ubuntu#703
We were relying on the process output to check on data races, while Go allows
us to write the race content
@3v1n0 3v1n0 force-pushed the some-goraces-handling branch from f6d13c8 to 6c1bf10 Compare January 20, 2025 15:58
@3v1n0 3v1n0 requested a review from adombeck January 21, 2025 16:27
@3v1n0 3v1n0 merged commit 59c7b76 into ubuntu:main Jan 22, 2025
10 checks passed
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.

Data race in pam/integration-tests
3 participants