]> Cypherpunks repositories - gostls13.git/commitdiff
net: use /dev/null for TestSplice of big file to fix the test flakes on linux-riscv64...
authorAndy Pan <panjf2000@gmail.com>
Tue, 28 Feb 2023 11:31:23 +0000 (19:31 +0800)
committerGopher Robot <gobot@golang.org>
Tue, 28 Feb 2023 19:35:52 +0000 (19:35 +0000)
Fixes #58787

Change-Id: Ia6e9ee0d8dd505f64bfe9ffd23a868b8165f550f
Reviewed-on: https://go-review.googlesource.com/c/go/+/471995
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Andy Pan <panjf2000@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/net/splice_test.go

index c74361d61b6230fe7f33542993be47c2e6f9ce76..75a8f274ff05db8fde7fea40930c7fc7b316359a 100644 (file)
@@ -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)
        }