From ccf4ba99a90f6f1366daef776ae90187c9f3c6b1 Mon Sep 17 00:00:00 2001 From: "Nicholas S. Husin" Date: Mon, 30 Mar 2026 19:17:03 -0400 Subject: net/http: run tests for HTTP/3 where it can already pass By default, our test harnesses (run and runSynctest) now use http3Mode, in addition to http1Mode and http2Mode, when no []testMode were explicitly defined for a given test. Tests that cannot currently pass for HTTP/3 have been modified to use http3SkippedMode, which serves as a convenient alias for the old default of []testMode{http1Mode, http2Mode}. We changed the default mode and defined http3SkippedMode so we have a clear list of TODOs in terms of how much changes are still needed before our HTTP/3 implementation reaches basic feature parity with HTTP/1 and HTTP/2. For #70914 Change-Id: I719d5d66399a51f7c3d96180ebed9b606a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/765320 Reviewed-by: Damien Neil LUCI-TryBot-Result: Go LUCI Reviewed-by: Nicholas Husin --- src/net/http/fs_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/net/http/fs_test.go') diff --git a/src/net/http/fs_test.go b/src/net/http/fs_test.go index 32fb696fee..2dc03e13ff 100644 --- a/src/net/http/fs_test.go +++ b/src/net/http/fs_test.go @@ -709,7 +709,7 @@ func testServeIndexHtmlFS(t *testing.T, mode testMode) { } } -func TestFileServerZeroByte(t *testing.T) { run(t, testFileServerZeroByte) } +func TestFileServerZeroByte(t *testing.T) { run(t, testFileServerZeroByte, http3SkippedMode) } func testFileServerZeroByte(t *testing.T, mode testMode) { ts := newClientServerTest(t, mode, FileServer(Dir("."))).ts @@ -842,7 +842,10 @@ func (fsys fakeFS) Open(name string) (File, error) { return &fakeFile{ReadSeeker: strings.NewReader(f.contents), fi: f, path: name}, nil } -func TestDirectoryIfNotModified(t *testing.T) { run(t, testDirectoryIfNotModified) } +func TestDirectoryIfNotModified(t *testing.T) { + // HTTP/3 trips off race detector. + run(t, testDirectoryIfNotModified, http3SkippedMode) +} func testDirectoryIfNotModified(t *testing.T, mode testMode) { const indexContents = "I am a fake index.html file" fileMod := time.Unix(1000000000, 0).UTC() @@ -916,7 +919,10 @@ func mustStat(t *testing.T, fileName string) fs.FileInfo { return fi } -func TestServeContent(t *testing.T) { run(t, testServeContent) } +func TestServeContent(t *testing.T) { + // HTTP/3 trips off race detector. + run(t, testServeContent, http3SkippedMode) +} func testServeContent(t *testing.T, mode testMode) { type serveParam struct { name string -- cgit v1.3