syscall: skip testAmbientCaps tests if there is no nobody user

When there is not a nobody user (for example inside Docker), the
tests TestAmbientCaps and TestAmbientCapsUserns should be skipped
instead of failing.

Fixes #71644
This commit is contained in:
Carlos Ramos Carreño 2025-02-13 20:17:49 +00:00
parent ca4649747a
commit a4c4f5bb61

View file

@ -646,7 +646,7 @@ func testAmbientCaps(t *testing.T, userns bool) {
u, err := user.Lookup("nobody")
if err != nil {
t.Fatal(err)
t.Skip("skipping: the nobody user does not exist; see Issue 71644")
}
uid, err := strconv.ParseInt(u.Uid, 0, 32)
if err != nil {