From 5b9b303fa7e8508362c3be1e0c8f1feec15678b2 Mon Sep 17 00:00:00 2001 From: James Blair Date: Thu, 27 Jul 2023 23:49:09 +1200 Subject: [PATCH] Simplify go data race detection control. Use data race detection by default for all amd64 and arm64 tests. Remove redundant parameters in github workflows. Signed-off-by: James Blair --- .github/workflows/e2e-arm64-template.yaml | 2 +- .github/workflows/e2e.yaml | 4 ++-- .github/workflows/grpcproxy.yaml | 4 ++-- .github/workflows/tests-arm64-nightly.yaml | 2 +- .github/workflows/tests-arm64-template.yaml | 6 +++--- .github/workflows/tests.yaml | 6 +++--- scripts/test.sh | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/e2e-arm64-template.yaml b/.github/workflows/e2e-arm64-template.yaml index 2251bc4e124..cf03e6ff9b0 100644 --- a/.github/workflows/e2e-arm64-template.yaml +++ b/.github/workflows/e2e-arm64-template.yaml @@ -44,7 +44,7 @@ jobs: echo "${TARGET}" case "${TARGET}" in linux-arm64-e2e) - GOOS=linux GOARCH=arm64 CPU=4 EXPECT_DEBUG=true RACE=true ${{ inputs.e2eTestCmd }} + GOOS=linux GOARCH=arm64 CPU=4 EXPECT_DEBUG=true ${{ inputs.e2eTestCmd }} ;; *) echo "Failed to find target" diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index f418d66fdf9..27961955439 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -27,10 +27,10 @@ jobs: echo "${TARGET}" case "${TARGET}" in linux-amd64-e2e) - VERBOSE=1 GOOS=linux GOARCH=amd64 CPU=4 EXPECT_DEBUG=true RACE=true make test-e2e-release + VERBOSE=1 GOOS=linux GOARCH=amd64 CPU=4 EXPECT_DEBUG=true make test-e2e-release ;; linux-386-e2e) - VERBOSE=1 GOOS=linux GOARCH=386 CPU=4 EXPECT_DEBUG=true RACE=true make test-e2e + VERBOSE=1 GOOS=linux GOARCH=386 CPU=4 EXPECT_DEBUG=true make test-e2e ;; *) echo "Failed to find target" diff --git a/.github/workflows/grpcproxy.yaml b/.github/workflows/grpcproxy.yaml index 346b5eb9370..eb1264df089 100644 --- a/.github/workflows/grpcproxy.yaml +++ b/.github/workflows/grpcproxy.yaml @@ -26,10 +26,10 @@ jobs: echo "${TARGET}" case "${TARGET}" in linux-amd64-grpcproxy-integration) - GOOS=linux GOARCH=amd64 CPU=4 RACE=true make test-grpcproxy-integration + GOOS=linux GOARCH=amd64 CPU=4 make test-grpcproxy-integration ;; linux-amd64-grpcproxy-e2e) - GOOS=linux GOARCH=amd64 CPU=4 RACE=true make test-grpcproxy-e2e + GOOS=linux GOARCH=amd64 CPU=4 make test-grpcproxy-e2e ;; *) echo "Failed to find target" diff --git a/.github/workflows/tests-arm64-nightly.yaml b/.github/workflows/tests-arm64-nightly.yaml index 7ebf79a6f4e..2952ad965ea 100644 --- a/.github/workflows/tests-arm64-nightly.yaml +++ b/.github/workflows/tests-arm64-nightly.yaml @@ -17,6 +17,6 @@ jobs: uses: ./.github/workflows/tests-arm64-template.yaml with: etcdBranch: release-3.5 - integrationTestCmd: PASSES='integration' RACE='false' ./test.sh + integrationTestCmd: PASSES='integration' ./test.sh unitTestCmd: PASSES='unit' CPU='4' ./test.sh -p=2 gofailMake: "no" diff --git a/.github/workflows/tests-arm64-template.yaml b/.github/workflows/tests-arm64-template.yaml index 98c062445c3..7976546c9dd 100644 --- a/.github/workflows/tests-arm64-template.yaml +++ b/.github/workflows/tests-arm64-template.yaml @@ -34,7 +34,7 @@ jobs: - linux-arm64-integration-1-cpu - linux-arm64-integration-2-cpu - linux-arm64-integration-4-cpu - - linux-arm64-unit-4-cpu-race + - linux-arm64-unit-4-cpu steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: @@ -67,8 +67,8 @@ jobs: if [ "${{ inputs.gofailMake }}" == "yes" ]; then make gofail-enable; fi GOOS=linux GOARCH=arm64 CPU=4 ${{ inputs.integrationTestCmd }} ;; - linux-arm64-unit-4-cpu-race) - GOOS=linux GOARCH=arm64 CPU=4 RACE=true ${{ inputs.unitTestCmd }} + linux-arm64-unit-4-cpu) + GOOS=linux GOARCH=arm64 CPU=4 ${{ inputs.unitTestCmd }} ;; *) echo "Failed to find target" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ca20d2d76ba..23681055b1a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,7 +12,7 @@ jobs: - linux-amd64-integration-1-cpu - linux-amd64-integration-2-cpu - linux-amd64-integration-4-cpu - - linux-amd64-unit-4-cpu-race + - linux-amd64-unit-4-cpu - linux-386-unit-1-cpu steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -42,8 +42,8 @@ jobs: make gofail-enable GOOS=linux GOARCH=amd64 CPU=4 make test-integration ;; - linux-amd64-unit-4-cpu-race) - GOOS=linux GOARCH=amd64 CPU=4 RACE=true GO_TEST_FLAGS='-p=2' make test-unit + linux-amd64-unit-4-cpu) + GOOS=linux GOARCH=amd64 CPU=4 GO_TEST_FLAGS='-p=2' make test-unit ;; linux-386-unit-1-cpu) GOOS=linux GOARCH=386 CPU=1 GO_TEST_FLAGS='-p=4' make test-unit diff --git a/scripts/test.sh b/scripts/test.sh index 93770974aa6..264f3272129 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -68,7 +68,7 @@ fi # determine whether target supports race detection if [ -z "${RACE:-}" ] ; then - if [ "$GOARCH" == "amd64" ]; then + if [ "$GOARCH" == "amd64" ] || [ "$GOARCH" == "arm64" ]; then RACE="--race" else RACE="--race=false"