From 4b4b2fcaa47b6f2a49a63a70605e75c7e1e846d4 Mon Sep 17 00:00:00 2001 From: xieyuschen Date: Sat, 5 Oct 2024 15:52:21 +0800 Subject: [PATCH] os: remove t.Parallel in TestMkdirStickyUmask The TestMkdirStickyUmask modifies the umask for testing purpose. When run in parallel with TestCopyFS, this temporary umask change can cause TestCopyFS to create files with unintended permissions, leading to test failures. This change removes the t.Parallel call in TestMkdirStickyUmask to prevent interference with TestCopyFS, ensuring it doesn't run concurrently with the other tests that require umask. Fixes #69788 Change-Id: I9cf1da9f92283340ff85d2721781760a750d124c Reviewed-on: https://go-review.googlesource.com/c/go/+/618055 LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Auto-Submit: Ian Lance Taylor Commit-Queue: Ian Lance Taylor --- src/os/os_unix_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/os/os_unix_test.go b/src/os/os_unix_test.go index c62d7174f7..7e7281955b 100644 --- a/src/os/os_unix_test.go +++ b/src/os/os_unix_test.go @@ -233,7 +233,9 @@ func TestMkdirStickyUmask(t *testing.T) { if runtime.GOOS == "wasip1" { t.Skip("file permissions not supported on " + runtime.GOOS) } - t.Parallel() + // Issue #69788: This test temporarily changes the umask for testing purposes, + // so it shouldn't be run in parallel with other test cases + // to avoid other tests (e.g., TestCopyFS) creating files with an unintended umask. const umask = 0077 dir := t.TempDir() -- 2.48.1