1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build solaris && !illumos
package net
import (
"testing"
"time"
)
const (
syscall_TCP_KEEPIDLE = sysTCP_KEEPIDLE
syscall_TCP_KEEPCNT = sysTCP_KEEPCNT
syscall_TCP_KEEPINTVL = sysTCP_KEEPINTVL
)
type fdType = int
func maybeSkipKeepAliveTest(_ *testing.T) {}
var testConfigs = []KeepAliveConfig{
{
Enable: true,
Idle: 20 * time.Second, // the minimum value is ten seconds on Solaris
Interval: 10 * time.Second, // ditto
Count: 10,
},
{
Enable: true,
Idle: 0,
Interval: 0,
Count: 0,
},
{
Enable: true,
Idle: -1,
Interval: -1,
Count: -1,
},
{
Enable: true,
Idle: -1,
Interval: 10 * time.Second,
Count: 10,
},
{
Enable: true,
Idle: 20 * time.Second,
Interval: -1,
Count: 10,
},
{
Enable: true,
Idle: 20 * time.Second,
Interval: 10 * time.Second,
Count: -1,
},
{
Enable: true,
Idle: -1,
Interval: -1,
Count: 10,
},
{
Enable: true,
Idle: -1,
Interval: 10 * time.Second,
Count: -1,
},
{
Enable: true,
Idle: 20 * time.Second,
Interval: -1,
Count: -1,
},
{
Enable: true,
Idle: 0,
Interval: 10 * time.Second,
Count: 10,
},
{
Enable: true,
Idle: 20 * time.Second,
Interval: 0,
Count: 10,
},
{
Enable: true,
Idle: 20 * time.Second,
Interval: 10 * time.Second,
Count: 0,
},
{
Enable: true,
Idle: 0,
Interval: 0,
Count: 10,
},
{
Enable: true,
Idle: 0,
Interval: 10 * time.Second,
Count: 0,
},
{
Enable: true,
Idle: 20 * time.Second,
Interval: 0,
Count: 0,
},
}
|