From: Andy Pan Date: Tue, 28 Feb 2023 11:31:23 +0000 (+0800) Subject: net: use /dev/null for TestSplice of big file to fix the test flakes on linux-riscv64... X-Git-Tag: go1.21rc1~1420 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4a9c84d0b7f169eb7c7bd58a334544919a022f46;p=gostls13.git net: use /dev/null for TestSplice of big file to fix the test flakes on linux-riscv64-jsing Fixes #58787 Change-Id: Ia6e9ee0d8dd505f64bfe9ffd23a868b8165f550f Reviewed-on: https://go-review.googlesource.com/c/go/+/471995 Reviewed-by: Bryan Mills Run-TryBot: Andy Pan TryBot-Result: Gopher Robot Reviewed-by: Dmitri Shuralyov Auto-Submit: Ian Lance Taylor --- diff --git a/src/net/splice_test.go b/src/net/splice_test.go index c74361d61b..75a8f274ff 100644 --- a/src/net/splice_test.go +++ b/src/net/splice_test.go @@ -108,7 +108,7 @@ func (tc spliceTestCase) test(t *testing.T) { } func (tc spliceTestCase) testFile(t *testing.T) { - f, err := os.CreateTemp(t.TempDir(), "linux-splice-to-file") + f, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0) if err != nil { t.Fatal(err) }