From 2feda2ae4496d3fc0ce0d0d8558dc46981bd8cb2 Mon Sep 17 00:00:00 2001 From: Luiz Oliveira Date: Wed, 5 Aug 2026 19:23:06 -0400 Subject: [PATCH] Enable the Go race detector for the `test` make target and CI workflow (#765) - [x] Tests pass - [ ] Appropriate changes to documentation are included in the PR --- .github/workflows/pr-workflow.yaml | 4 ++-- Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-workflow.yaml b/.github/workflows/pr-workflow.yaml index 47a14340c..14d0c1681 100644 --- a/.github/workflows/pr-workflow.yaml +++ b/.github/workflows/pr-workflow.yaml @@ -36,12 +36,12 @@ jobs: uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 with: go-version-file: 'go.mod' - - run: go test -v ./... + - run: go test -race -v ./... # Root-gated tests (overlay mounts, whiteout mknod, trusted.* xattrs, ...) # skip for the unprivileged runner user above; rerun the packages that # contain them (any test importing internal/roottest) under sudo. - name: root-gated tests - run: hack/run-root-tests.sh -v + run: hack/run-root-tests.sh -race -v - name: verify run: hack/verify-all.sh # One kind cluster exercises BOTH runtimes. Free x86-64 ubuntu-latest runners diff --git a/Makefile b/Makefile index c68dbd3ea..3eea157f4 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ build-demos: .PHONY: test test: - $(GO) test ./... + $(GO) test -race ./... .PHONY: e2e e2e: build build-demos