From 4a9c84d0b7f169eb7c7bd58a334544919a022f46 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Tue, 28 Feb 2023 19:31:23 +0800 Subject: [PATCH] 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 --- src/net/splice_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } -- 2.50.0