]> Cypherpunks repositories - gostls13.git/commitdiff
net: don't run TestTCPBig unconditionally
authorMikio Hara <mikioh.mikioh@gmail.com>
Wed, 16 Nov 2016 04:35:59 +0000 (13:35 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Wed, 16 Nov 2016 05:51:18 +0000 (05:51 +0000)
The test requires tons of memory and results various failures, mainly
runtime errors and process termination by SIGKILL, caused by resource
exhaustion when the node under test doesn't have much resources.

This change makes use of -tcpbig flag to enable the test.

Change-Id: Id53fa5d88543e2e60ca9bb4f55a1914ccca844e1
Reviewed-on: https://go-review.googlesource.com/33254
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/net/main_test.go
src/net/tcpsock_test.go

index 7573ded93bd545c5c1fc51850511d2c1682cb98f..28a8ff66d65b695d9815971c9e2b099ddae4c4e6 100644 (file)
@@ -24,6 +24,8 @@ var (
 )
 
 var (
+       testTCPBig = flag.Bool("tcpbig", false, "whether to test massive size of data per read or write call on TCP connection")
+
        testDNSFlood = flag.Bool("dnsflood", false, "whether to test DNS query flooding")
 
        // If external IPv4 connectivity exists, we can try dialing
index 7c8610d32baa808877aa4d0de01d5a795f6929b7..573e834911b74115389dcbca7ff372f80fe1722c 100644 (file)
@@ -670,8 +670,8 @@ func TestTCPSelfConnect(t *testing.T) {
 // Test that >32-bit reads work on 64-bit systems.
 // On 32-bit systems this tests that maxint reads work.
 func TestTCPBig(t *testing.T) {
-       if testing.Short() {
-               t.Skip("skipping test in short mode")
+       if !*testTCPBig {
+               t.Skip("test disabled; use -tcpbig to enable")
        }
 
        for _, writev := range []bool{false, true} {