Fix flakiness in FUSE syscall tests.

PiperOrigin-RevId: 506082577
This commit is contained in:
Lucas Manning
2023-01-31 12:41:11 -08:00
committed by gVisor bot
parent 1a24483004
commit 7058ea8d30
2 changed files with 10 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@ go_binary(
visibility = ["//test/runner:__subpackages__"],
deps = [
"//pkg/log",
"//runsc/specutils",
"@com_github_hanwen_go_fuse_v2//fs:go_default_library",
"@com_github_hanwen_go_fuse_v2//fuse:go_default_library",
],
+9 -1
View File
@@ -23,6 +23,7 @@ import (
"github.com/hanwen/go-fuse/v2/fs"
"github.com/hanwen/go-fuse/v2/fuse"
"gvisor.dev/gvisor/pkg/log"
"gvisor.dev/gvisor/runsc/specutils"
)
func main() {
@@ -44,7 +45,14 @@ func main() {
server.Unmount()
server.Wait()
}()
if err := server.WaitMount(); err != nil {
// TODO(b/267200022): Investigate why gofuse pollHack sometimes fails with
// EINTR.
if _, _, err := specutils.RetryEintr(func() (uintptr, uintptr, error) {
if err := server.WaitMount(); err != nil {
return 0, 0, err
}
return 0, 0, nil
}); err != nil {
// We don't shutdown the serve loop. If the mount does
// not succeed, the loop won't work and exit.
log.Warningf(`Could not mount fuse submount "/tmp": %v`, err)