Accept inaccessible host locks as a non-root precondition

This commit is contained in:
pingqiu committed 2026-12-05 13:25:00 -08:00
1 parent 77abb0ad39
commit 6e445da214
1 file changed
+4
@@ -29,6 +29,10 @@ func assertMiniUnprivileged(t *testing.T) {
if err == nil {
break
}
if errors.Is(err, syscall.EACCES) || errors.Is(err, syscall.EPERM) {
t.Logf("non-root uid=%d euid=%d; host lock path %s is inaccessible: %v", os.Getuid(), os.Geteuid(), p, err)
return
}
if !errors.Is(err, os.ErrNotExist) {
t.Fatalf("host lock preflight: %v", err)
}