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
|
diff -ur a/stress-sock.c b/stress-sock.c
--- a/stress-sock.c 2020-11-07 10:52:22.000000000 -0800
+++ b/stress-sock.c 2020-11-08 22:51:33.327668500 -0800
@@ -422,7 +422,7 @@
&cpu, &optlen);
}
#endif
- if (socket_domain == AF_INET || socket_domain == AF_INET6) {
+ if (socket_domain == AF_INET) {
int val, ret;
socklen_t optlen;
@@ -756,6 +756,8 @@
(void)close(sfd);
break;
}
+
+#if defined(SO_SNDBUF)
len = sizeof(sndbuf);
if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, &len) < 0) {
pr_fail("%s: getsockopt failed, errno=%d (%s)\n",
@@ -763,6 +765,8 @@
(void)close(sfd);
break;
}
+#endif
+
#if defined(SOL_TCP) && defined(TCP_QUICKACK)
{
int ret, one = 1;
diff -ur a/stress-sockabuse.c b/stress-sockabuse.c
--- a/stress-sockabuse.c 2020-11-07 10:52:22.000000000 -0800
+++ b/stress-sockabuse.c 2020-11-08 22:52:27.297668500 -0800
@@ -278,6 +278,7 @@
(void)close(sfd);
break;
}
+#if defined(SO_SNDBUF)
len = sizeof(sndbuf);
if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, &len) < 0) {
pr_fail("%s: getsockopt failed, errno=%d (%s)\n",
@@ -285,6 +286,7 @@
(void)close(sfd);
break;
}
+#endif
(void)memset(buf, 'A' + (get_counter(args) % 26), sizeof(buf));
n = send(sfd, buf, sizeof(buf), 0);
diff -ur a/stress-sockmany.c b/stress-sockmany.c
--- a/stress-sockmany.c 2020-11-07 10:52:22.000000000 -0800
+++ b/stress-sockmany.c 2020-11-08 22:53:06.247668500 -0800
@@ -221,6 +221,7 @@
(void)close(sfd);
break;
}
+#if defined(SO_SNDBUF)
len = sizeof(sndbuf);
if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, &len) < 0) {
pr_fail("%s: getsockopt failed, errno=%d (%s)\n",
@@ -228,6 +229,8 @@
(void)close(sfd);
break;
}
+#endif
+
#if defined(SOL_TCP) && defined(TCP_QUICKACK)
{
int ret, one = 1;
diff -ur a/stress-resources.c b/stress-resources.c
--- a/stress-resources.c 2020-11-07 10:52:22.000000000 -0800
+++ b/stress-resources.c 2020-11-08 23:20:35.227668500 -0800
@@ -130,7 +130,7 @@
size_t i, n;
size_t shmall, freemem, totalmem, freeswap;
const pid_t pid = getpid();
- static const int domains[] = { AF_INET, AF_INET6 };
+ static const int domains[] = { AF_INET };
static const int types[] = { SOCK_STREAM, SOCK_DGRAM };
static stress_info_t info[MAX_LOOPS];
#if defined(O_NOATIME)
@@ -309,11 +309,13 @@
if (!keep_stressing_flag())
break;
+#if 0
if (socketpair(AF_UNIX, SOCK_STREAM, 0,
info[i].fd_socketpair) < 0) {
info[i].fd_socketpair[0] = -1;
info[i].fd_socketpair[1] = -1;
}
+#endif
#if defined(HAVE_USERFAULTFD)
info[i].fd_uf = shim_userfaultfd(0);
d
|