net: pass TMPDIR to test client process

Fixes the TestSplice test on Android where the default
TMPDIR (/data/local/tmp) might not be available.

Change-Id: I4f104d11254ba855b1bd2dfa0547d69b7bce4878
Reviewed-on: https://go-review.googlesource.com/c/go/+/170947
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Elias Naur 2019-04-07 20:29:24 +02:00
parent 7331edcef5
commit ef38e21eb5
1 changed files with 1 additions and 0 deletions

View File

@ -369,6 +369,7 @@ func startSpliceClient(conn Conn, op string, chunkSize, totalSize int) (func(),
"GO_NET_TEST_SPLICE_OP=" + op,
"GO_NET_TEST_SPLICE_CHUNK_SIZE=" + strconv.Itoa(chunkSize),
"GO_NET_TEST_SPLICE_TOTAL_SIZE=" + strconv.Itoa(totalSize),
"TMPDIR=" + os.Getenv("TMPDIR"),
}
cmd.ExtraFiles = append(cmd.ExtraFiles, f)
cmd.Stdout = os.Stdout