diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-05-07 14:11:28 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-05-07 12:20:20 +0000 |
| commit | fc7348e9d52ba26a91ae1fcf1d602bbf84bbdcd2 (patch) | |
| tree | 2ade685ffa21980c1d4289315a251a84ff8dd13f | |
| parent | cb2dcc0ecd47d23bd111a0ff629395ca0e10fe93 (diff) | |
syz-fuzzer: fix gvisor testing
Previously testing procedure used rpctype.Dial for the test connection,
and it had special handling for "stdin". Restore that special handling.
| -rw-r--r-- | syz-fuzzer/testing.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/syz-fuzzer/testing.go b/syz-fuzzer/testing.go index 925504b7e..ce21aaa11 100644 --- a/syz-fuzzer/testing.go +++ b/syz-fuzzer/testing.go @@ -30,13 +30,16 @@ type checkArgs struct { } func testImage(hostAddr string, args *checkArgs) { - log.Logf(0, "connecting to host at %v", hostAddr) - timeout := time.Minute * args.ipcConfig.Timeouts.Scale - conn, err := net.DialTimeout("tcp", hostAddr, timeout) - if err != nil { - log.SyzFatalf("failed to connect to host: %v", err) + // gVisor uses "stdin" for communication, which is not a real tcp address. + if hostAddr != "stdin" { + log.Logf(0, "connecting to host at %v", hostAddr) + timeout := time.Minute * args.ipcConfig.Timeouts.Scale + conn, err := net.DialTimeout("tcp", hostAddr, timeout) + if err != nil { + log.SyzFatalf("failed to connect to host: %v", err) + } + conn.Close() } - conn.Close() if err := checkRevisions(args); err != nil { log.SyzFatal(err) } |
