mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix flakiness in FUSE syscall tests.
PiperOrigin-RevId: 506082577
This commit is contained in:
committed by
gVisor bot
parent
1a24483004
commit
7058ea8d30
@@ -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",
|
||||
],
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user