From 5724383eb134c8a5c2a4a5ed67e2d3999073b98b Mon Sep 17 00:00:00 2001 From: Shuo Wang Date: Fri, 18 Oct 2024 10:33:55 +0800 Subject: [PATCH] syscall: skip TestSetuidEtc when root's gid is not 0 Fixes #69921 --- src/syscall/syscall_linux_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/syscall/syscall_linux_test.go b/src/syscall/syscall_linux_test.go index f5d6bb8a12..c719be5222 100644 --- a/src/syscall/syscall_linux_test.go +++ b/src/syscall/syscall_linux_test.go @@ -499,6 +499,9 @@ func TestSetuidEtc(t *testing.T) { if syscall.Getuid() != 0 { t.Skip("skipping root only test") } + if syscall.Getgid() != 0 { + t.Skip("skipping the test when root's gid is not default value 0") + } if testing.Short() && testenv.Builder() != "" && os.Getenv("USER") == "swarming" { // The Go build system's swarming user is known not to be root. // Unfortunately, it sometimes appears as root due the current