Makefile: only use race detection when it's available#3518
Makefile: only use race detection when it's available#3518openshift-merge-robot merged 1 commit intocontainers:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nalind The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
LGTM |
|
Ah, right, the order matters. Swapped them. |
|
LGTM |
|
Taking the |
|
And likewise, |
|
What about the copy command? |
|
I'm currently hoping it doesn't slow the integration tests down enough to cause CI jobs to time out, but we'll see. |
Check if `go test` supports the -race flag on the build platform, and if so, use it for unit tests instead of just assuming that it's always available. Use sync/atomic to safely use a uint32 instead of a bool to keep track of whether or not the process we started for RUN has stopped. [NO NEW TESTS NEEDED] Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
|
Switched to using |
|
/lgtm |
|
LGTM |
|
/hold cancel |
What type of PR is this?
/kind other
What this PR does / why we need it:
Check if
go testsupports the-raceflag on the build platform, and if so, and only use it for unit tests if it's supported.Fix a race in
run_linux.go.How to verify it
make test-unitshould work correctly on platforms where the-raceflag is not supported for builds.go help buildwill list which platforms your installed version of Go supports the flag for.Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Marking this as not needing new tests, though it may end up requiring additional changes if the tests we already have start noticing things that need to be fixed.
Does this PR introduce a user-facing change?