summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/perf/linux/BUILD2
-rw-r--r--test/perf/linux/send_recv_benchmark.cc2
-rw-r--r--test/runner/setup_container/BUILD2
-rw-r--r--test/runner/setup_container/setup_container.cc2
-rw-r--r--test/syscalls/linux/BUILD228
-rw-r--r--test/syscalls/linux/accept_bind.cc2
-rw-r--r--test/syscalls/linux/accept_bind_stream.cc2
-rw-r--r--test/syscalls/linux/bind.cc2
-rw-r--r--test/syscalls/linux/connect_external.cc2
-rw-r--r--test/syscalls/linux/fallocate.cc2
-rw-r--r--test/syscalls/linux/fcntl.cc2
-rw-r--r--test/syscalls/linux/flock.cc2
-rw-r--r--test/syscalls/linux/ioctl.cc2
-rw-r--r--test/syscalls/linux/ip6tables.cc2
-rw-r--r--test/syscalls/linux/ip_socket_test_util.h2
-rw-r--r--test/syscalls/linux/network_namespace.cc2
-rw-r--r--test/syscalls/linux/packet_socket.cc2
-rw-r--r--test/syscalls/linux/packet_socket_raw.cc2
-rw-r--r--test/syscalls/linux/partial_bad_buffer.cc2
-rw-r--r--test/syscalls/linux/ping_socket.cc2
-rw-r--r--test/syscalls/linux/proc_net.cc2
-rw-r--r--test/syscalls/linux/raw_socket.cc2
-rw-r--r--test/syscalls/linux/raw_socket_hdrincl.cc2
-rw-r--r--test/syscalls/linux/raw_socket_icmp.cc2
-rw-r--r--test/syscalls/linux/readahead.cc2
-rw-r--r--test/syscalls/linux/sendfile_socket.cc2
-rw-r--r--test/syscalls/linux/socket.cc2
-rw-r--r--test/syscalls/linux/socket_abstract.cc2
-rw-r--r--test/syscalls/linux/socket_bind_to_device.cc2
-rw-r--r--test/syscalls/linux/socket_bind_to_device_distribution.cc2
-rw-r--r--test/syscalls/linux/socket_bind_to_device_sequence.cc2
-rw-r--r--test/syscalls/linux/socket_blocking.cc2
-rw-r--r--test/syscalls/linux/socket_blocking.h2
-rw-r--r--test/syscalls/linux/socket_capability.cc2
-rw-r--r--test/syscalls/linux/socket_filesystem.cc2
-rw-r--r--test/syscalls/linux/socket_generic.h2
-rw-r--r--test/syscalls/linux/socket_generic_stress.cc2
-rw-r--r--test/syscalls/linux/socket_generic_test_cases.cc2
-rw-r--r--test/syscalls/linux/socket_inet_loopback.cc2
-rw-r--r--test/syscalls/linux/socket_inet_loopback_isolated.cc2
-rw-r--r--test/syscalls/linux/socket_inet_loopback_nogotsan.cc2
-rw-r--r--test/syscalls/linux/socket_inet_loopback_test_params.h2
-rw-r--r--test/syscalls/linux/socket_ip_loopback_blocking.cc2
-rw-r--r--test/syscalls/linux/socket_ip_tcp_generic.cc2
-rw-r--r--test/syscalls/linux/socket_ip_tcp_generic.h2
-rw-r--r--test/syscalls/linux/socket_ip_tcp_generic_loopback.cc2
-rw-r--r--test/syscalls/linux/socket_ip_tcp_loopback.cc2
-rw-r--r--test/syscalls/linux/socket_ip_tcp_loopback_blocking.cc2
-rw-r--r--test/syscalls/linux/socket_ip_tcp_loopback_nonblock.cc2
-rw-r--r--test/syscalls/linux/socket_ip_tcp_udp_generic.cc2
-rw-r--r--test/syscalls/linux/socket_ip_udp_generic.cc2
-rw-r--r--test/syscalls/linux/socket_ip_udp_generic.h2
-rw-r--r--test/syscalls/linux/socket_ip_udp_loopback.cc2
-rw-r--r--test/syscalls/linux/socket_ip_udp_loopback_blocking.cc2
-rw-r--r--test/syscalls/linux/socket_ip_udp_loopback_nonblock.cc2
-rw-r--r--test/syscalls/linux/socket_ip_udp_unbound_external_networking.cc2
-rw-r--r--test/syscalls/linux/socket_ip_udp_unbound_external_networking.h2
-rw-r--r--test/syscalls/linux/socket_ip_unbound.cc2
-rw-r--r--test/syscalls/linux/socket_ip_unbound_netlink.cc2
-rw-r--r--test/syscalls/linux/socket_ipv4_udp_unbound.cc2
-rw-r--r--test/syscalls/linux/socket_ipv4_udp_unbound.h2
-rw-r--r--test/syscalls/linux/socket_ipv4_udp_unbound_external_networking_test.cc2
-rw-r--r--test/syscalls/linux/socket_ipv4_udp_unbound_loopback.cc2
-rw-r--r--test/syscalls/linux/socket_ipv4_udp_unbound_loopback_netlink.cc2
-rw-r--r--test/syscalls/linux/socket_ipv4_udp_unbound_loopback_nogotsan.cc2
-rw-r--r--test/syscalls/linux/socket_ipv4_udp_unbound_netlink.h2
-rw-r--r--test/syscalls/linux/socket_ipv6_udp_unbound.cc2
-rw-r--r--test/syscalls/linux/socket_ipv6_udp_unbound.h2
-rw-r--r--test/syscalls/linux/socket_ipv6_udp_unbound_external_networking_test.cc2
-rw-r--r--test/syscalls/linux/socket_ipv6_udp_unbound_loopback.cc2
-rw-r--r--test/syscalls/linux/socket_ipv6_udp_unbound_loopback_netlink.cc2
-rw-r--r--test/syscalls/linux/socket_ipv6_udp_unbound_netlink.h2
-rw-r--r--test/syscalls/linux/socket_netdevice.cc2
-rw-r--r--test/syscalls/linux/socket_netlink.cc2
-rw-r--r--test/syscalls/linux/socket_netlink_route.cc2
-rw-r--r--test/syscalls/linux/socket_netlink_uevent.cc2
-rw-r--r--test/syscalls/linux/socket_netlink_util.cc2
-rw-r--r--test/syscalls/linux/socket_non_blocking.cc2
-rw-r--r--test/syscalls/linux/socket_non_blocking.h2
-rw-r--r--test/syscalls/linux/socket_non_stream.cc2
-rw-r--r--test/syscalls/linux/socket_non_stream.h2
-rw-r--r--test/syscalls/linux/socket_non_stream_blocking.cc2
-rw-r--r--test/syscalls/linux/socket_non_stream_blocking.h2
-rw-r--r--test/syscalls/linux/socket_stream.cc2
-rw-r--r--test/syscalls/linux/socket_stream.h2
-rw-r--r--test/syscalls/linux/socket_stream_blocking.cc2
-rw-r--r--test/syscalls/linux/socket_stream_blocking.h2
-rw-r--r--test/syscalls/linux/socket_stream_nonblock.cc2
-rw-r--r--test/syscalls/linux/socket_stream_nonblock.h2
-rw-r--r--test/syscalls/linux/socket_unix.cc2
-rw-r--r--test/syscalls/linux/socket_unix.h2
-rw-r--r--test/syscalls/linux/socket_unix_abstract_nonblock.cc2
-rw-r--r--test/syscalls/linux/socket_unix_blocking_local.cc2
-rw-r--r--test/syscalls/linux/socket_unix_cmsg.cc2
-rw-r--r--test/syscalls/linux/socket_unix_cmsg.h2
-rw-r--r--test/syscalls/linux/socket_unix_dgram.cc2
-rw-r--r--test/syscalls/linux/socket_unix_dgram.h2
-rw-r--r--test/syscalls/linux/socket_unix_dgram_local.cc2
-rw-r--r--test/syscalls/linux/socket_unix_dgram_non_blocking.cc2
-rw-r--r--test/syscalls/linux/socket_unix_domain.cc2
-rw-r--r--test/syscalls/linux/socket_unix_filesystem_nonblock.cc2
-rw-r--r--test/syscalls/linux/socket_unix_non_stream.cc2
-rw-r--r--test/syscalls/linux/socket_unix_non_stream.h2
-rw-r--r--test/syscalls/linux/socket_unix_non_stream_blocking_local.cc2
-rw-r--r--test/syscalls/linux/socket_unix_pair.cc2
-rw-r--r--test/syscalls/linux/socket_unix_pair_nonblock.cc2
-rw-r--r--test/syscalls/linux/socket_unix_seqpacket.cc2
-rw-r--r--test/syscalls/linux/socket_unix_seqpacket.h2
-rw-r--r--test/syscalls/linux/socket_unix_seqpacket_local.cc2
-rw-r--r--test/syscalls/linux/socket_unix_stream.cc2
-rw-r--r--test/syscalls/linux/socket_unix_stream_blocking_local.cc2
-rw-r--r--test/syscalls/linux/socket_unix_stream_local.cc2
-rw-r--r--test/syscalls/linux/socket_unix_stream_nonblock_local.cc2
-rw-r--r--test/syscalls/linux/socket_unix_unbound_abstract.cc2
-rw-r--r--test/syscalls/linux/socket_unix_unbound_dgram.cc2
-rw-r--r--test/syscalls/linux/socket_unix_unbound_filesystem.cc2
-rw-r--r--test/syscalls/linux/socket_unix_unbound_seqpacket.cc2
-rw-r--r--test/syscalls/linux/socket_unix_unbound_stream.cc2
-rw-r--r--test/syscalls/linux/tcp_socket.cc2
-rw-r--r--test/syscalls/linux/tuntap.cc2
-rw-r--r--test/syscalls/linux/udp_bind.cc2
-rw-r--r--test/syscalls/linux/udp_socket.cc2
-rw-r--r--test/syscalls/linux/unix_domain_socket_test_util.h2
-rw-r--r--test/util/BUILD26
-rw-r--r--test/util/socket_util.cc (renamed from test/syscalls/linux/socket_test_util.cc)2
-rw-r--r--test/util/socket_util.h (renamed from test/syscalls/linux/socket_test_util.h)0
-rw-r--r--test/util/socket_util_impl.cc (renamed from test/syscalls/linux/socket_test_util_impl.cc)2
127 files changed, 251 insertions, 251 deletions
diff --git a/test/perf/linux/BUILD b/test/perf/linux/BUILD
index dd1d2438c..e76e359ff 100644
--- a/test/perf/linux/BUILD
+++ b/test/perf/linux/BUILD
@@ -27,10 +27,10 @@ cc_binary(
deps = [
gbenchmark,
gtest,
- "//test/syscalls/linux:socket_test_util",
"//test/util:file_descriptor",
"//test/util:logging",
"//test/util:posix_error",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
"//test/util:thread_util",
diff --git a/test/perf/linux/send_recv_benchmark.cc b/test/perf/linux/send_recv_benchmark.cc
index d73e49523..41509e211 100644
--- a/test/perf/linux/send_recv_benchmark.cc
+++ b/test/perf/linux/send_recv_benchmark.cc
@@ -23,10 +23,10 @@
#include "gtest/gtest.h"
#include "absl/synchronization/notification.h"
#include "benchmark/benchmark.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/logging.h"
#include "test/util/posix_error.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/runner/setup_container/BUILD b/test/runner/setup_container/BUILD
index 5b99d1de9..f879ef649 100644
--- a/test/runner/setup_container/BUILD
+++ b/test/runner/setup_container/BUILD
@@ -12,8 +12,8 @@ cc_binary(
visibility = ["//test/runner:__subpackages__"],
deps = [
"//test/syscalls/linux:socket_netlink_util",
- "//test/syscalls/linux:socket_test_util",
"//test/util:capability_util",
"//test/util:posix_error",
+ "//test/util:socket_util",
],
)
diff --git a/test/runner/setup_container/setup_container.cc b/test/runner/setup_container/setup_container.cc
index 9a4e3fb8b..e6fae37e1 100644
--- a/test/runner/setup_container/setup_container.cc
+++ b/test/runner/setup_container/setup_container.cc
@@ -17,9 +17,9 @@
#include <unistd.h>
#include "test/syscalls/linux/socket_netlink_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/posix_error.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/BUILD b/test/syscalls/linux/BUILD
index 9e955f797..7185df076 100644
--- a/test/syscalls/linux/BUILD
+++ b/test/syscalls/linux/BUILD
@@ -1,4 +1,4 @@
-load("//tools:defs.bzl", "cc_binary", "cc_library", "default_net_util", "gbenchmark", "gtest", "select_arch", "select_system")
+load("//tools:defs.bzl", "cc_binary", "cc_library", "gbenchmark", "gtest", "select_arch", "select_system")
package(
default_visibility = ["//:sandbox"],
@@ -128,9 +128,9 @@ cc_library(
srcs = ["socket_netlink_util.cc"],
hdrs = ["socket_netlink_util.h"],
deps = [
- ":socket_test_util",
"//test/util:file_descriptor",
"//test/util:posix_error",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
],
)
@@ -146,36 +146,12 @@ cc_library(
)
cc_library(
- name = "socket_test_util",
- testonly = 1,
- srcs = [
- "socket_test_util.cc",
- "socket_test_util_impl.cc",
- ],
- hdrs = ["socket_test_util.h"],
- defines = select_system(),
- deps = default_net_util() + [
- gtest,
- "@com_google_absl//absl/memory",
- "@com_google_absl//absl/strings",
- "@com_google_absl//absl/strings:str_format",
- "@com_google_absl//absl/time",
- "@com_google_absl//absl/types:optional",
- "//test/util:file_descriptor",
- "//test/util:posix_error",
- "//test/util:temp_path",
- "//test/util:test_util",
- "//test/util:thread_util",
- ],
-)
-
-cc_library(
name = "unix_domain_socket_test_util",
testonly = 1,
srcs = ["unix_domain_socket_test_util.cc"],
hdrs = ["unix_domain_socket_test_util.h"],
deps = [
- ":socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
gtest,
"//test/util:test_util",
@@ -188,7 +164,7 @@ cc_library(
srcs = ["ip_socket_test_util.cc"],
hdrs = ["ip_socket_test_util.h"],
deps = [
- ":socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
],
)
@@ -233,9 +209,9 @@ cc_binary(
srcs = ["accept_bind.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -248,9 +224,9 @@ cc_binary(
srcs = ["accept_bind_stream.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -349,8 +325,8 @@ cc_binary(
srcs = ["bind.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -363,7 +339,7 @@ cc_binary(
srcs = ["socket.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:file_descriptor",
"//test/util:temp_umask",
@@ -378,9 +354,9 @@ cc_binary(
srcs = ["socket_capability.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:capability_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -540,9 +516,9 @@ cc_binary(
srcs = ["connect_external.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:file_descriptor",
"//test/util:fs_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -755,10 +731,10 @@ cc_binary(
linkstatic = 1,
deps = [
":file_base",
- ":socket_test_util",
"//test/util:cleanup",
"//test/util:eventfd_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
gtest,
@@ -801,12 +777,12 @@ cc_binary(
srcs = ["fcntl.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:capability_util",
"//test/util:cleanup",
"//test/util:eventfd_util",
"//test/util:file_descriptor",
"//test/util:fs_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/memory",
@@ -834,8 +810,8 @@ cc_binary(
],
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
gtest,
@@ -1021,9 +997,9 @@ cc_binary(
linkstatic = 1,
deps = [
":ip_socket_test_util",
- ":socket_test_util",
":unix_domain_socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:signal_util",
"//test/util:test_main",
@@ -1065,9 +1041,9 @@ cc_binary(
linkstatic = 1,
deps = [
":iptables_types",
- ":socket_test_util",
"//test/util:capability_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -1083,9 +1059,9 @@ cc_binary(
linkstatic = 1,
deps = [
":iptables_types",
- ":socket_test_util",
"//test/util:capability_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -1464,10 +1440,10 @@ cc_binary(
defines = select_system(),
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
"//test/util:capability_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:endian",
gtest,
@@ -1482,10 +1458,10 @@ cc_binary(
srcs = ["packet_socket.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
"//test/util:capability_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:endian",
gtest,
@@ -1541,9 +1517,9 @@ cc_binary(
srcs = select_system(linux = ["partial_bad_buffer.cc"]),
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:file_descriptor",
"//test/util:fs_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/time",
gtest,
"//test/util:posix_error",
@@ -1576,8 +1552,8 @@ cc_binary(
linkstatic = 1,
deps = [
":ip_socket_test_util",
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:optional",
@@ -1795,10 +1771,10 @@ cc_binary(
srcs = ["proc_net.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:capability_util",
"//test/util:file_descriptor",
"//test/util:fs_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
gtest,
@@ -1942,10 +1918,10 @@ cc_binary(
srcs = ["raw_socket_hdrincl.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
"//test/util:capability_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:endian",
gtest,
@@ -1961,10 +1937,10 @@ cc_binary(
defines = select_system(),
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
"//test/util:capability_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/base:core_headers",
gtest,
"//test/util:test_main",
@@ -1978,10 +1954,10 @@ cc_binary(
srcs = ["raw_socket_icmp.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
"//test/util:capability_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/base:core_headers",
gtest,
"//test/util:test_main",
@@ -2011,8 +1987,8 @@ cc_binary(
srcs = ["readahead.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:temp_path",
"//test/util:test_main",
@@ -2211,8 +2187,8 @@ cc_binary(
srcs = ["sendfile_socket.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
gtest,
":ip_socket_test_util",
@@ -2390,8 +2366,8 @@ cc_library(
"socket_generic.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
gtest,
@@ -2411,8 +2387,8 @@ cc_binary(
deps = [
gtest,
":ip_socket_test_util",
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
"//test/util:thread_util",
@@ -2427,8 +2403,8 @@ cc_library(
srcs = ["socket_unix_dgram.cc"],
hdrs = ["socket_unix_dgram.h"],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/time",
gtest,
"//test/util:test_util",
@@ -2442,8 +2418,8 @@ cc_library(
srcs = ["socket_unix_seqpacket.cc"],
hdrs = ["socket_unix_seqpacket.h"],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/time",
gtest,
"//test/util:test_util",
@@ -2461,7 +2437,7 @@ cc_library(
"socket_ip_tcp_generic.h",
],
deps = [
- ":socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/time",
gtest,
@@ -2482,8 +2458,8 @@ cc_library(
"socket_non_blocking.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_util",
],
@@ -2500,8 +2476,8 @@ cc_library(
"socket_unix_non_stream.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:memory_util",
"//test/util:test_util",
@@ -2520,8 +2496,8 @@ cc_library(
],
deps = [
":ip_socket_test_util",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_util",
],
@@ -2539,7 +2515,7 @@ cc_library(
],
deps = [
":ip_socket_test_util",
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_util",
],
@@ -2557,7 +2533,7 @@ cc_library(
],
deps = [
":ip_socket_test_util",
- ":socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/memory",
gtest,
"//test/util:posix_error",
@@ -2578,7 +2554,7 @@ cc_library(
],
deps = [
":ip_socket_test_util",
- ":socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/memory",
gtest,
"//test/util:posix_error",
@@ -2599,9 +2575,9 @@ cc_library(
],
deps = [
":socket_netlink_route_util",
- ":socket_test_util",
"//test/util:capability_util",
"//test/util:cleanup",
+ "//test/util:socket_util",
gtest,
],
alwayslink = 1,
@@ -2618,8 +2594,8 @@ cc_library(
],
deps = [
":socket_netlink_route_util",
- ":socket_test_util",
"//test/util:capability_util",
+ "//test/util:socket_util",
gtest,
],
alwayslink = 1,
@@ -2636,7 +2612,7 @@ cc_library(
],
deps = [
":ip_socket_test_util",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_util",
],
alwayslink = 1,
@@ -2683,10 +2659,10 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_generic_test_cases",
- ":socket_test_util",
":socket_unix_cmsg_test_cases",
":socket_unix_test_cases",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2701,8 +2677,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_non_blocking_test_cases",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2715,10 +2691,10 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_non_stream_test_cases",
- ":socket_test_util",
":socket_unix_dgram_test_cases",
":socket_unix_non_stream_test_cases",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2730,8 +2706,8 @@ cc_binary(
srcs = ["socket_unix_dgram_non_blocking.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -2747,10 +2723,10 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_non_stream_test_cases",
- ":socket_test_util",
":socket_unix_non_stream_test_cases",
":socket_unix_seqpacket_test_cases",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2762,8 +2738,8 @@ cc_binary(
srcs = ["socket_unix_stream.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/time",
gtest,
"//test/util:test_main",
@@ -2781,7 +2757,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_ip_tcp_generic_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2796,7 +2772,7 @@ cc_binary(
linkstatic = 1,
deps = [
":ip_socket_test_util",
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -2813,7 +2789,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_generic_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2829,7 +2805,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_non_blocking_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2847,7 +2823,7 @@ cc_binary(
":socket_generic_test_cases",
":socket_ip_udp_test_cases",
":socket_non_stream_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2863,7 +2839,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_ipv4_udp_unbound_external_networking_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2879,7 +2855,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_ipv6_udp_unbound_external_networking_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2895,8 +2871,8 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_bind_to_device_util",
- ":socket_test_util",
"//test/util:capability_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -2914,8 +2890,8 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_bind_to_device_util",
- ":socket_test_util",
"//test/util:capability_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/container:node_hash_map",
gtest,
"//test/util:test_main",
@@ -2934,8 +2910,8 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_bind_to_device_util",
- ":socket_test_util",
"//test/util:capability_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -2953,7 +2929,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_non_blocking_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2969,7 +2945,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_ipv4_udp_unbound_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -2985,7 +2961,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_ipv6_udp_unbound_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3000,7 +2976,7 @@ cc_binary(
linkstatic = 1,
deps = [
":ip_socket_test_util",
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3018,7 +2994,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_ipv4_udp_unbound_netlink_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3034,7 +3010,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_ipv6_udp_unbound_netlink_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3049,7 +3025,7 @@ cc_binary(
linkstatic = 1,
deps = [
":ip_socket_test_util",
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3066,8 +3042,8 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_netlink_route_util",
- ":socket_test_util",
"//test/util:capability_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3083,8 +3059,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_generic_test_cases",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3099,8 +3075,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_non_blocking_test_cases",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3115,10 +3091,10 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_generic_test_cases",
- ":socket_test_util",
":socket_unix_cmsg_test_cases",
":socket_unix_test_cases",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3133,8 +3109,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_non_blocking_test_cases",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3145,7 +3121,7 @@ cc_library(
testonly = 1,
hdrs = ["socket_inet_loopback_test_params.h"],
deps = [
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
],
)
@@ -3158,8 +3134,8 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_inet_loopback_test_params",
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
@@ -3180,8 +3156,8 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_inet_loopback_test_params",
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
gtest,
"//test/util:posix_error",
@@ -3199,7 +3175,7 @@ cc_binary(
deps = [
":socket_inet_loopback_test_params",
":socket_netlink_util",
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3213,8 +3189,8 @@ cc_binary(
srcs = ["socket_netlink.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3229,10 +3205,10 @@ cc_binary(
deps = [
":socket_netlink_route_util",
":socket_netlink_util",
- ":socket_test_util",
"//test/util:capability_util",
"//test/util:cleanup",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings:str_format",
gtest,
"//test/util:test_main",
@@ -3247,8 +3223,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_netlink_util",
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3267,8 +3243,8 @@ cc_library(
"socket_stream.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/time",
gtest,
"//test/util:test_util",
@@ -3286,8 +3262,8 @@ cc_library(
"socket_blocking.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/time",
gtest,
"//test/util:test_util",
@@ -3307,8 +3283,8 @@ cc_library(
"socket_unix.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
gtest,
"//test/util:test_util",
@@ -3327,8 +3303,8 @@ cc_library(
"socket_unix_cmsg.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/strings",
gtest,
"//test/util:test_util",
@@ -3347,8 +3323,8 @@ cc_library(
"socket_stream_blocking.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/time",
gtest,
"//test/util:test_util",
@@ -3368,8 +3344,8 @@ cc_library(
"socket_stream_nonblock.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_util",
],
@@ -3386,8 +3362,8 @@ cc_library(
"socket_non_stream_blocking.h",
],
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/time",
gtest,
"//test/util:test_util",
@@ -3422,8 +3398,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_stream_test_cases",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3438,8 +3414,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_stream_blocking_test_cases",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3455,7 +3431,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_stream_blocking_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3470,8 +3446,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_stream_nonblocking_test_cases",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"//test/util:test_main",
"//test/util:test_util",
],
@@ -3483,8 +3459,8 @@ cc_binary(
srcs = ["socket_unix_unbound_dgram.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3497,8 +3473,8 @@ cc_binary(
srcs = ["socket_unix_unbound_abstract.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3511,8 +3487,8 @@ cc_binary(
srcs = ["socket_unix_unbound_filesystem.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:file_descriptor",
"//test/util:test_main",
@@ -3529,8 +3505,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_blocking_test_cases",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3547,7 +3523,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_blocking_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3563,8 +3539,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_non_stream_blocking_test_cases",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3581,7 +3557,7 @@ cc_binary(
deps = [
":ip_socket_test_util",
":socket_non_stream_blocking_test_cases",
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3596,10 +3572,10 @@ cc_binary(
],
linkstatic = 1,
deps = [
- ":socket_test_util",
":socket_unix_cmsg_test_cases",
":socket_unix_test_cases",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3612,8 +3588,8 @@ cc_binary(
srcs = ["socket_unix_unbound_seqpacket.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3626,8 +3602,8 @@ cc_binary(
srcs = ["socket_unix_unbound_stream.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -3641,8 +3617,8 @@ cc_binary(
linkstatic = 1,
deps = [
":socket_netlink_util",
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/base:endian",
gtest,
"//test/util:test_main",
@@ -3799,8 +3775,8 @@ cc_binary(
defines = select_system(),
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
"@com_google_absl//absl/time",
gtest,
"//test/util:posix_error",
@@ -3910,7 +3886,7 @@ cc_binary(
srcs = ["tuntap.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
":socket_netlink_route_util",
"//test/util:capability_util",
@@ -3943,8 +3919,8 @@ cc_binary(
linkstatic = 1,
deps = [
":ip_socket_test_util",
- ":socket_test_util",
":unix_domain_socket_test_util",
+ "//test/util:socket_util",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/time",
@@ -3963,8 +3939,8 @@ cc_binary(
srcs = ["udp_bind.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
"//test/util:file_descriptor",
+ "//test/util:socket_util",
gtest,
"//test/util:test_main",
"//test/util:test_util",
@@ -4144,7 +4120,7 @@ cc_binary(
srcs = ["network_namespace.cc"],
linkstatic = 1,
deps = [
- ":socket_test_util",
+ "//test/util:socket_util",
gtest,
"//test/util:capability_util",
"//test/util:posix_error",
diff --git a/test/syscalls/linux/accept_bind.cc b/test/syscalls/linux/accept_bind.cc
index ba3747290..0d16d1d83 100644
--- a/test/syscalls/linux/accept_bind.cc
+++ b/test/syscalls/linux/accept_bind.cc
@@ -20,9 +20,9 @@
#include <vector>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/accept_bind_stream.cc b/test/syscalls/linux/accept_bind_stream.cc
index 4857f160b..5f2b07105 100644
--- a/test/syscalls/linux/accept_bind_stream.cc
+++ b/test/syscalls/linux/accept_bind_stream.cc
@@ -19,9 +19,9 @@
#include <vector>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/bind.cc b/test/syscalls/linux/bind.cc
index 9547c4ab2..8e1d00619 100644
--- a/test/syscalls/linux/bind.cc
+++ b/test/syscalls/linux/bind.cc
@@ -17,8 +17,8 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/connect_external.cc b/test/syscalls/linux/connect_external.cc
index 1edb50e47..fb2476da4 100644
--- a/test/syscalls/linux/connect_external.cc
+++ b/test/syscalls/linux/connect_external.cc
@@ -22,9 +22,9 @@
#include <tuple>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/fs_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// This file contains tests specific to connecting to host UDS managed outside
diff --git a/test/syscalls/linux/fallocate.cc b/test/syscalls/linux/fallocate.cc
index 5c839447e..5f1b4d5e5 100644
--- a/test/syscalls/linux/fallocate.cc
+++ b/test/syscalls/linux/fallocate.cc
@@ -31,11 +31,11 @@
#include "absl/strings/str_cat.h"
#include "absl/time/time.h"
#include "test/syscalls/linux/file_base.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/cleanup.h"
#include "test/util/eventfd_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/posix_error.h"
+#include "test/util/socket_util.h"
#include "test/util/temp_path.h"
#include "test/util/test_util.h"
diff --git a/test/syscalls/linux/fcntl.cc b/test/syscalls/linux/fcntl.cc
index 91526572b..0e78a4d4a 100644
--- a/test/syscalls/linux/fcntl.cc
+++ b/test/syscalls/linux/fcntl.cc
@@ -35,7 +35,6 @@
#include "absl/strings/str_cat.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/cleanup.h"
#include "test/util/eventfd_util.h"
@@ -46,6 +45,7 @@
#include "test/util/posix_error.h"
#include "test/util/save_util.h"
#include "test/util/signal_util.h"
+#include "test/util/socket_util.h"
#include "test/util/temp_path.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/flock.cc b/test/syscalls/linux/flock.cc
index 10dad042f..686b779be 100644
--- a/test/syscalls/linux/flock.cc
+++ b/test/syscalls/linux/flock.cc
@@ -21,8 +21,8 @@
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "test/syscalls/linux/file_base.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/temp_path.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/ioctl.cc b/test/syscalls/linux/ioctl.cc
index 9b16d1558..88056ef2e 100644
--- a/test/syscalls/linux/ioctl.cc
+++ b/test/syscalls/linux/ioctl.cc
@@ -26,10 +26,10 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/signal_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/ip6tables.cc b/test/syscalls/linux/ip6tables.cc
index e0e146067..d11b45d4a 100644
--- a/test/syscalls/linux/ip6tables.cc
+++ b/test/syscalls/linux/ip6tables.cc
@@ -17,9 +17,9 @@
#include "gtest/gtest.h"
#include "test/syscalls/linux/iptables.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/ip_socket_test_util.h b/test/syscalls/linux/ip_socket_test_util.h
index bde481f7e..8f26f1cd0 100644
--- a/test/syscalls/linux/ip_socket_test_util.h
+++ b/test/syscalls/linux/ip_socket_test_util.h
@@ -21,7 +21,7 @@
#include <string>
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/network_namespace.cc b/test/syscalls/linux/network_namespace.cc
index 133fdecf0..1984feedd 100644
--- a/test/syscalls/linux/network_namespace.cc
+++ b/test/syscalls/linux/network_namespace.cc
@@ -20,9 +20,9 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/posix_error.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/packet_socket.cc b/test/syscalls/linux/packet_socket.cc
index 1e246c421..98339277b 100644
--- a/test/syscalls/linux/packet_socket.cc
+++ b/test/syscalls/linux/packet_socket.cc
@@ -29,10 +29,10 @@
#include "gtest/gtest.h"
#include "absl/base/internal/endian.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// Some of these tests involve sending packets via AF_PACKET sockets and the
diff --git a/test/syscalls/linux/packet_socket_raw.cc b/test/syscalls/linux/packet_socket_raw.cc
index 7e439466e..07beb8ba0 100644
--- a/test/syscalls/linux/packet_socket_raw.cc
+++ b/test/syscalls/linux/packet_socket_raw.cc
@@ -30,10 +30,10 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/internal/endian.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// Some of these tests involve sending packets via AF_PACKET sockets and the
diff --git a/test/syscalls/linux/partial_bad_buffer.cc b/test/syscalls/linux/partial_bad_buffer.cc
index 223ddc0c8..1bdfcbbe3 100644
--- a/test/syscalls/linux/partial_bad_buffer.cc
+++ b/test/syscalls/linux/partial_bad_buffer.cc
@@ -26,10 +26,10 @@
#include "gtest/gtest.h"
#include "absl/time/clock.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/fs_util.h"
#include "test/util/posix_error.h"
+#include "test/util/socket_util.h"
#include "test/util/temp_path.h"
#include "test/util/test_util.h"
diff --git a/test/syscalls/linux/ping_socket.cc b/test/syscalls/linux/ping_socket.cc
index 8268e91da..7ec1938bf 100644
--- a/test/syscalls/linux/ping_socket.cc
+++ b/test/syscalls/linux/ping_socket.cc
@@ -29,8 +29,8 @@
#include "absl/strings/str_join.h"
#include "absl/types/optional.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// Note: These tests require /proc/sys/net/ipv4/ping_group_range to be
diff --git a/test/syscalls/linux/proc_net.cc b/test/syscalls/linux/proc_net.cc
index 3b8a71ab4..4cbe30fc1 100644
--- a/test/syscalls/linux/proc_net.cc
+++ b/test/syscalls/linux/proc_net.cc
@@ -28,10 +28,10 @@
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "absl/time/clock.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/fs_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/raw_socket.cc b/test/syscalls/linux/raw_socket.cc
index f8798bc76..e19fe8f6b 100644
--- a/test/syscalls/linux/raw_socket.cc
+++ b/test/syscalls/linux/raw_socket.cc
@@ -27,10 +27,10 @@
#include <algorithm>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// Note: in order to run these tests, /proc/sys/net/ipv4/ping_group_range will
diff --git a/test/syscalls/linux/raw_socket_hdrincl.cc b/test/syscalls/linux/raw_socket_hdrincl.cc
index 4611b6283..f1d8fd295 100644
--- a/test/syscalls/linux/raw_socket_hdrincl.cc
+++ b/test/syscalls/linux/raw_socket_hdrincl.cc
@@ -27,10 +27,10 @@
#include "gtest/gtest.h"
#include "absl/base/internal/endian.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/raw_socket_icmp.cc b/test/syscalls/linux/raw_socket_icmp.cc
index 275996bd3..27d3fffee 100644
--- a/test/syscalls/linux/raw_socket_icmp.cc
+++ b/test/syscalls/linux/raw_socket_icmp.cc
@@ -24,10 +24,10 @@
#include <cstdint>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/readahead.cc b/test/syscalls/linux/readahead.cc
index 71073bb3c..04104c912 100644
--- a/test/syscalls/linux/readahead.cc
+++ b/test/syscalls/linux/readahead.cc
@@ -16,8 +16,8 @@
#include <fcntl.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/temp_path.h"
#include "test/util/test_util.h"
diff --git a/test/syscalls/linux/sendfile_socket.cc b/test/syscalls/linux/sendfile_socket.cc
index c101fe9d2..ac6e89e91 100644
--- a/test/syscalls/linux/sendfile_socket.cc
+++ b/test/syscalls/linux/sendfile_socket.cc
@@ -24,8 +24,8 @@
#include "gtest/gtest.h"
#include "absl/strings/string_view.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/temp_path.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket.cc b/test/syscalls/linux/socket.cc
index 2742d19be..d2762b6e9 100644
--- a/test/syscalls/linux/socket.cc
+++ b/test/syscalls/linux/socket.cc
@@ -20,8 +20,8 @@
#include <unistd.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/temp_umask.h"
#include "test/util/test_util.h"
diff --git a/test/syscalls/linux/socket_abstract.cc b/test/syscalls/linux/socket_abstract.cc
index 00999f192..d450fad14 100644
--- a/test/syscalls/linux/socket_abstract.cc
+++ b/test/syscalls/linux/socket_abstract.cc
@@ -15,10 +15,10 @@
#include <vector>
#include "test/syscalls/linux/socket_generic.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/socket_unix.h"
#include "test/syscalls/linux/socket_unix_cmsg.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_bind_to_device.cc b/test/syscalls/linux/socket_bind_to_device.cc
index 6b27f6eab..dac31a90c 100644
--- a/test/syscalls/linux/socket_bind_to_device.cc
+++ b/test/syscalls/linux/socket_bind_to_device.cc
@@ -34,8 +34,8 @@
#include "gtest/gtest.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_bind_to_device_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket_bind_to_device_distribution.cc b/test/syscalls/linux/socket_bind_to_device_distribution.cc
index 70b0b2742..4cddb875a 100644
--- a/test/syscalls/linux/socket_bind_to_device_distribution.cc
+++ b/test/syscalls/linux/socket_bind_to_device_distribution.cc
@@ -35,8 +35,8 @@
#include "gtest/gtest.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_bind_to_device_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket_bind_to_device_sequence.cc b/test/syscalls/linux/socket_bind_to_device_sequence.cc
index d3cc71dbf..334b46730 100644
--- a/test/syscalls/linux/socket_bind_to_device_sequence.cc
+++ b/test/syscalls/linux/socket_bind_to_device_sequence.cc
@@ -36,8 +36,8 @@
#include "absl/container/node_hash_map.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_bind_to_device_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket_blocking.cc b/test/syscalls/linux/socket_blocking.cc
index 7e88aa2d9..5262e9ed9 100644
--- a/test/syscalls/linux/socket_blocking.cc
+++ b/test/syscalls/linux/socket_blocking.cc
@@ -23,8 +23,8 @@
#include "gtest/gtest.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
#include "test/util/timer_util.h"
diff --git a/test/syscalls/linux/socket_blocking.h b/test/syscalls/linux/socket_blocking.h
index db26e5ef5..89134ec30 100644
--- a/test/syscalls/linux/socket_blocking.h
+++ b/test/syscalls/linux/socket_blocking.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_BLOCKING_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_BLOCKING_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_capability.cc b/test/syscalls/linux/socket_capability.cc
index f75482aba..95cf1f6b4 100644
--- a/test/syscalls/linux/socket_capability.cc
+++ b/test/syscalls/linux/socket_capability.cc
@@ -16,9 +16,9 @@
// headers).
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_filesystem.cc b/test/syscalls/linux/socket_filesystem.cc
index 287359363..a611e9f4e 100644
--- a/test/syscalls/linux/socket_filesystem.cc
+++ b/test/syscalls/linux/socket_filesystem.cc
@@ -15,10 +15,10 @@
#include <vector>
#include "test/syscalls/linux/socket_generic.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/socket_unix.h"
#include "test/syscalls/linux/socket_unix_cmsg.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_generic.h b/test/syscalls/linux/socket_generic.h
index 00ae7bfc3..a13262355 100644
--- a/test/syscalls/linux/socket_generic.h
+++ b/test/syscalls/linux/socket_generic.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_GENERIC_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_GENERIC_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_generic_stress.cc b/test/syscalls/linux/socket_generic_stress.cc
index 778c32a8e..9ff385b41 100644
--- a/test/syscalls/linux/socket_generic_stress.cc
+++ b/test/syscalls/linux/socket_generic_stress.cc
@@ -29,8 +29,8 @@
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket_generic_test_cases.cc b/test/syscalls/linux/socket_generic_test_cases.cc
index fe5171bc8..c509d54e2 100644
--- a/test/syscalls/linux/socket_generic_test_cases.cc
+++ b/test/syscalls/linux/socket_generic_test_cases.cc
@@ -25,9 +25,9 @@
#include "gtest/gtest.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/capability_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// This file is a generic socket test file. It must be built with another file
diff --git a/test/syscalls/linux/socket_inet_loopback.cc b/test/syscalls/linux/socket_inet_loopback.cc
index 9ae0cc59d..5f0b40ecf 100644
--- a/test/syscalls/linux/socket_inet_loopback.cc
+++ b/test/syscalls/linux/socket_inet_loopback.cc
@@ -35,10 +35,10 @@
#include "absl/time/time.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_inet_loopback_test_params.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/posix_error.h"
#include "test/util/save_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket_inet_loopback_isolated.cc b/test/syscalls/linux/socket_inet_loopback_isolated.cc
index ab2259b55..182d20a9e 100644
--- a/test/syscalls/linux/socket_inet_loopback_isolated.cc
+++ b/test/syscalls/linux/socket_inet_loopback_isolated.cc
@@ -18,7 +18,7 @@
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "test/syscalls/linux/socket_inet_loopback_test_params.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// Unit tests in this file will run in their own network namespace.
diff --git a/test/syscalls/linux/socket_inet_loopback_nogotsan.cc b/test/syscalls/linux/socket_inet_loopback_nogotsan.cc
index cc2773af1..479162487 100644
--- a/test/syscalls/linux/socket_inet_loopback_nogotsan.cc
+++ b/test/syscalls/linux/socket_inet_loopback_nogotsan.cc
@@ -28,10 +28,10 @@
#include "absl/strings/str_cat.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_inet_loopback_test_params.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/posix_error.h"
#include "test/util/save_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_inet_loopback_test_params.h b/test/syscalls/linux/socket_inet_loopback_test_params.h
index 42b48eb8a..163e595a8 100644
--- a/test/syscalls/linux/socket_inet_loopback_test_params.h
+++ b/test/syscalls/linux/socket_inet_loopback_test_params.h
@@ -16,7 +16,7 @@
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_INET_LOOPBACK_TEST_PARAMS_H_
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_ip_loopback_blocking.cc b/test/syscalls/linux/socket_ip_loopback_blocking.cc
index fda252dd7..caa5c0c63 100644
--- a/test/syscalls/linux/socket_ip_loopback_blocking.cc
+++ b/test/syscalls/linux/socket_ip_loopback_blocking.cc
@@ -18,7 +18,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_tcp_generic.cc b/test/syscalls/linux/socket_ip_tcp_generic.cc
index 2f5743cda..3271263c8 100644
--- a/test/syscalls/linux/socket_ip_tcp_generic.cc
+++ b/test/syscalls/linux/socket_ip_tcp_generic.cc
@@ -28,7 +28,7 @@
#include "absl/memory/memory.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/temp_path.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket_ip_tcp_generic.h b/test/syscalls/linux/socket_ip_tcp_generic.h
index a3eff3c73..e9e60ef4c 100644
--- a/test/syscalls/linux/socket_ip_tcp_generic.h
+++ b/test/syscalls/linux/socket_ip_tcp_generic.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IP_TCP_GENERIC_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IP_TCP_GENERIC_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_ip_tcp_generic_loopback.cc b/test/syscalls/linux/socket_ip_tcp_generic_loopback.cc
index 4e79d21f4..3406874b8 100644
--- a/test/syscalls/linux/socket_ip_tcp_generic_loopback.cc
+++ b/test/syscalls/linux/socket_ip_tcp_generic_loopback.cc
@@ -18,7 +18,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_ip_tcp_generic.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_tcp_loopback.cc b/test/syscalls/linux/socket_ip_tcp_loopback.cc
index 9db3037bc..0796b8634 100644
--- a/test/syscalls/linux/socket_ip_tcp_loopback.cc
+++ b/test/syscalls/linux/socket_ip_tcp_loopback.cc
@@ -16,7 +16,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_generic.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_tcp_loopback_blocking.cc b/test/syscalls/linux/socket_ip_tcp_loopback_blocking.cc
index f996b93d2..533ccc3ae 100644
--- a/test/syscalls/linux/socket_ip_tcp_loopback_blocking.cc
+++ b/test/syscalls/linux/socket_ip_tcp_loopback_blocking.cc
@@ -18,7 +18,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_stream_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_tcp_loopback_nonblock.cc b/test/syscalls/linux/socket_ip_tcp_loopback_nonblock.cc
index ffa377210..05fe2a738 100644
--- a/test/syscalls/linux/socket_ip_tcp_loopback_nonblock.cc
+++ b/test/syscalls/linux/socket_ip_tcp_loopback_nonblock.cc
@@ -18,7 +18,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_non_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_tcp_udp_generic.cc b/test/syscalls/linux/socket_ip_tcp_udp_generic.cc
index f178f1af9..88adb5b1b 100644
--- a/test/syscalls/linux/socket_ip_tcp_udp_generic.cc
+++ b/test/syscalls/linux/socket_ip_tcp_udp_generic.cc
@@ -23,7 +23,7 @@
#include "gtest/gtest.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_udp_generic.cc b/test/syscalls/linux/socket_ip_udp_generic.cc
index 1694e188a..8a87f2667 100644
--- a/test/syscalls/linux/socket_ip_udp_generic.cc
+++ b/test/syscalls/linux/socket_ip_udp_generic.cc
@@ -28,7 +28,7 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_udp_generic.h b/test/syscalls/linux/socket_ip_udp_generic.h
index 106c54e9f..a3a66c768 100644
--- a/test/syscalls/linux/socket_ip_udp_generic.h
+++ b/test/syscalls/linux/socket_ip_udp_generic.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IP_UDP_GENERIC_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IP_UDP_GENERIC_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_ip_udp_loopback.cc b/test/syscalls/linux/socket_ip_udp_loopback.cc
index c7fa44884..6d06bd580 100644
--- a/test/syscalls/linux/socket_ip_udp_loopback.cc
+++ b/test/syscalls/linux/socket_ip_udp_loopback.cc
@@ -18,7 +18,7 @@
#include "test/syscalls/linux/socket_generic.h"
#include "test/syscalls/linux/socket_ip_udp_generic.h"
#include "test/syscalls/linux/socket_non_stream.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_udp_loopback_blocking.cc b/test/syscalls/linux/socket_ip_udp_loopback_blocking.cc
index d6925a8df..60d02e079 100644
--- a/test/syscalls/linux/socket_ip_udp_loopback_blocking.cc
+++ b/test/syscalls/linux/socket_ip_udp_loopback_blocking.cc
@@ -16,7 +16,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_non_stream_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_udp_loopback_nonblock.cc b/test/syscalls/linux/socket_ip_udp_loopback_nonblock.cc
index d675eddc6..c011e3658 100644
--- a/test/syscalls/linux/socket_ip_udp_loopback_nonblock.cc
+++ b/test/syscalls/linux/socket_ip_udp_loopback_nonblock.cc
@@ -16,7 +16,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_non_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_udp_unbound_external_networking.cc b/test/syscalls/linux/socket_ip_udp_unbound_external_networking.cc
index fdbb2216b..af2459a2f 100644
--- a/test/syscalls/linux/socket_ip_udp_unbound_external_networking.cc
+++ b/test/syscalls/linux/socket_ip_udp_unbound_external_networking.cc
@@ -14,7 +14,7 @@
#include "test/syscalls/linux/socket_ip_udp_unbound_external_networking.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_udp_unbound_external_networking.h b/test/syscalls/linux/socket_ip_udp_unbound_external_networking.h
index e5287addb..2e8aab129 100644
--- a/test/syscalls/linux/socket_ip_udp_unbound_external_networking.h
+++ b/test/syscalls/linux/socket_ip_udp_unbound_external_networking.h
@@ -16,7 +16,7 @@
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IP_UDP_UNBOUND_EXTERNAL_NETWORKING_H_
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_ip_unbound.cc b/test/syscalls/linux/socket_ip_unbound.cc
index 029f1e872..930f19e59 100644
--- a/test/syscalls/linux/socket_ip_unbound.cc
+++ b/test/syscalls/linux/socket_ip_unbound.cc
@@ -24,7 +24,7 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ip_unbound_netlink.cc b/test/syscalls/linux/socket_ip_unbound_netlink.cc
index b02222999..803a3b30b 100644
--- a/test/syscalls/linux/socket_ip_unbound_netlink.cc
+++ b/test/syscalls/linux/socket_ip_unbound_netlink.cc
@@ -25,8 +25,8 @@
#include "gtest/gtest.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_netlink_route_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv4_udp_unbound.cc b/test/syscalls/linux/socket_ipv4_udp_unbound.cc
index 18be4dcc7..816d1181c 100644
--- a/test/syscalls/linux/socket_ipv4_udp_unbound.cc
+++ b/test/syscalls/linux/socket_ipv4_udp_unbound.cc
@@ -26,9 +26,9 @@
#include "gtest/gtest.h"
#include "absl/memory/memory.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/posix_error.h"
#include "test/util/save_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv4_udp_unbound.h b/test/syscalls/linux/socket_ipv4_udp_unbound.h
index f64c57645..3818a3490 100644
--- a/test/syscalls/linux/socket_ipv4_udp_unbound.h
+++ b/test/syscalls/linux/socket_ipv4_udp_unbound.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IPV4_UDP_UNBOUND_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IPV4_UDP_UNBOUND_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_ipv4_udp_unbound_external_networking_test.cc b/test/syscalls/linux/socket_ipv4_udp_unbound_external_networking_test.cc
index f6e64c157..ebf2185f2 100644
--- a/test/syscalls/linux/socket_ipv4_udp_unbound_external_networking_test.cc
+++ b/test/syscalls/linux/socket_ipv4_udp_unbound_external_networking_test.cc
@@ -17,7 +17,7 @@
#include <vector>
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv4_udp_unbound_loopback.cc b/test/syscalls/linux/socket_ipv4_udp_unbound_loopback.cc
index f121c044d..00930c544 100644
--- a/test/syscalls/linux/socket_ipv4_udp_unbound_loopback.cc
+++ b/test/syscalls/linux/socket_ipv4_udp_unbound_loopback.cc
@@ -16,7 +16,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_ipv4_udp_unbound.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv4_udp_unbound_loopback_netlink.cc b/test/syscalls/linux/socket_ipv4_udp_unbound_loopback_netlink.cc
index 8052bf404..f90a48630 100644
--- a/test/syscalls/linux/socket_ipv4_udp_unbound_loopback_netlink.cc
+++ b/test/syscalls/linux/socket_ipv4_udp_unbound_loopback_netlink.cc
@@ -16,7 +16,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_ipv4_udp_unbound_netlink.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv4_udp_unbound_loopback_nogotsan.cc b/test/syscalls/linux/socket_ipv4_udp_unbound_loopback_nogotsan.cc
index a2c6d4491..5a7bca658 100644
--- a/test/syscalls/linux/socket_ipv4_udp_unbound_loopback_nogotsan.cc
+++ b/test/syscalls/linux/socket_ipv4_udp_unbound_loopback_nogotsan.cc
@@ -18,7 +18,7 @@
#include "gtest/gtest.h"
#include "absl/memory/memory.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv4_udp_unbound_netlink.h b/test/syscalls/linux/socket_ipv4_udp_unbound_netlink.h
index 73e7836d5..17c8e2b84 100644
--- a/test/syscalls/linux/socket_ipv4_udp_unbound_netlink.h
+++ b/test/syscalls/linux/socket_ipv4_udp_unbound_netlink.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IPV4_UDP_UNBOUND_NETLINK_UTIL_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IPV4_UDP_UNBOUND_NETLINK_UTIL_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_ipv6_udp_unbound.cc b/test/syscalls/linux/socket_ipv6_udp_unbound.cc
index a4e3371f4..612fd531c 100644
--- a/test/syscalls/linux/socket_ipv6_udp_unbound.cc
+++ b/test/syscalls/linux/socket_ipv6_udp_unbound.cc
@@ -31,9 +31,9 @@
#include "gtest/gtest.h"
#include "absl/memory/memory.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/posix_error.h"
#include "test/util/save_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv6_udp_unbound.h b/test/syscalls/linux/socket_ipv6_udp_unbound.h
index 71e160f73..060343eaf 100644
--- a/test/syscalls/linux/socket_ipv6_udp_unbound.h
+++ b/test/syscalls/linux/socket_ipv6_udp_unbound.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IPV6_UDP_UNBOUND_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IPV6_UDP_UNBOUND_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_ipv6_udp_unbound_external_networking_test.cc b/test/syscalls/linux/socket_ipv6_udp_unbound_external_networking_test.cc
index 5c764b8fd..ff12eafc3 100644
--- a/test/syscalls/linux/socket_ipv6_udp_unbound_external_networking_test.cc
+++ b/test/syscalls/linux/socket_ipv6_udp_unbound_external_networking_test.cc
@@ -17,7 +17,7 @@
#include <vector>
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv6_udp_unbound_loopback.cc b/test/syscalls/linux/socket_ipv6_udp_unbound_loopback.cc
index 058336ecc..f11f444a2 100644
--- a/test/syscalls/linux/socket_ipv6_udp_unbound_loopback.cc
+++ b/test/syscalls/linux/socket_ipv6_udp_unbound_loopback.cc
@@ -16,7 +16,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_ipv6_udp_unbound.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv6_udp_unbound_loopback_netlink.cc b/test/syscalls/linux/socket_ipv6_udp_unbound_loopback_netlink.cc
index 17021ff82..565f9bc2e 100644
--- a/test/syscalls/linux/socket_ipv6_udp_unbound_loopback_netlink.cc
+++ b/test/syscalls/linux/socket_ipv6_udp_unbound_loopback_netlink.cc
@@ -16,7 +16,7 @@
#include "test/syscalls/linux/ip_socket_test_util.h"
#include "test/syscalls/linux/socket_ipv6_udp_unbound_netlink.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_ipv6_udp_unbound_netlink.h b/test/syscalls/linux/socket_ipv6_udp_unbound_netlink.h
index 88098be82..f017a4c89 100644
--- a/test/syscalls/linux/socket_ipv6_udp_unbound_netlink.h
+++ b/test/syscalls/linux/socket_ipv6_udp_unbound_netlink.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IPV6_UDP_UNBOUND_NETLINK_UTIL_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_IPV6_UDP_UNBOUND_NETLINK_UTIL_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_netdevice.cc b/test/syscalls/linux/socket_netdevice.cc
index 8d214a2b7..c95c5305d 100644
--- a/test/syscalls/linux/socket_netdevice.cc
+++ b/test/syscalls/linux/socket_netdevice.cc
@@ -22,8 +22,8 @@
#include "gtest/gtest.h"
#include "absl/base/internal/endian.h"
#include "test/syscalls/linux/socket_netlink_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// Tests for netdevice queries.
diff --git a/test/syscalls/linux/socket_netlink.cc b/test/syscalls/linux/socket_netlink.cc
index 4ec0fd4fa..c78529a14 100644
--- a/test/syscalls/linux/socket_netlink.cc
+++ b/test/syscalls/linux/socket_netlink.cc
@@ -18,8 +18,8 @@
#include <unistd.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// Tests for all netlink socket protocols.
diff --git a/test/syscalls/linux/socket_netlink_route.cc b/test/syscalls/linux/socket_netlink_route.cc
index ee3c08770..a5c788346 100644
--- a/test/syscalls/linux/socket_netlink_route.cc
+++ b/test/syscalls/linux/socket_netlink_route.cc
@@ -29,10 +29,10 @@
#include "absl/strings/str_format.h"
#include "test/syscalls/linux/socket_netlink_route_util.h"
#include "test/syscalls/linux/socket_netlink_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/cleanup.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// Tests for NETLINK_ROUTE sockets.
diff --git a/test/syscalls/linux/socket_netlink_uevent.cc b/test/syscalls/linux/socket_netlink_uevent.cc
index da425bed4..9e025911b 100644
--- a/test/syscalls/linux/socket_netlink_uevent.cc
+++ b/test/syscalls/linux/socket_netlink_uevent.cc
@@ -20,8 +20,8 @@
#include "gtest/gtest.h"
#include "test/syscalls/linux/socket_netlink_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
// Tests for NETLINK_KOBJECT_UEVENT sockets.
diff --git a/test/syscalls/linux/socket_netlink_util.cc b/test/syscalls/linux/socket_netlink_util.cc
index bdebea321..c1bff3c65 100644
--- a/test/syscalls/linux/socket_netlink_util.cc
+++ b/test/syscalls/linux/socket_netlink_util.cc
@@ -22,7 +22,7 @@
#include <vector>
#include "absl/strings/str_cat.h"
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_non_blocking.cc b/test/syscalls/linux/socket_non_blocking.cc
index c3520cadd..3d09485d3 100644
--- a/test/syscalls/linux/socket_non_blocking.cc
+++ b/test/syscalls/linux/socket_non_blocking.cc
@@ -20,8 +20,8 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_non_blocking.h b/test/syscalls/linux/socket_non_blocking.h
index bd3e02fd2..604206cfb 100644
--- a/test/syscalls/linux/socket_non_blocking.h
+++ b/test/syscalls/linux/socket_non_blocking.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_NON_BLOCKING_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_NON_BLOCKING_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_non_stream.cc b/test/syscalls/linux/socket_non_stream.cc
index c61817f14..7c3310909 100644
--- a/test/syscalls/linux/socket_non_stream.cc
+++ b/test/syscalls/linux/socket_non_stream.cc
@@ -20,8 +20,8 @@
#include "gtest/gtest.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_non_stream.h b/test/syscalls/linux/socket_non_stream.h
index 469fbe6a2..4876730f9 100644
--- a/test/syscalls/linux/socket_non_stream.h
+++ b/test/syscalls/linux/socket_non_stream.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_NON_STREAM_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_NON_STREAM_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_non_stream_blocking.cc b/test/syscalls/linux/socket_non_stream_blocking.cc
index b052f6e61..ac33407f8 100644
--- a/test/syscalls/linux/socket_non_stream_blocking.cc
+++ b/test/syscalls/linux/socket_non_stream_blocking.cc
@@ -22,8 +22,8 @@
#include "gtest/gtest.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket_non_stream_blocking.h b/test/syscalls/linux/socket_non_stream_blocking.h
index 6e205a039..71520bb37 100644
--- a/test/syscalls/linux/socket_non_stream_blocking.h
+++ b/test/syscalls/linux/socket_non_stream_blocking.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_NON_STREAM_BLOCKING_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_NON_STREAM_BLOCKING_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_stream.cc b/test/syscalls/linux/socket_stream.cc
index 6522b2e01..11903f28b 100644
--- a/test/syscalls/linux/socket_stream.cc
+++ b/test/syscalls/linux/socket_stream.cc
@@ -21,8 +21,8 @@
#include "gtest/gtest.h"
#include "absl/time/clock.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_stream.h b/test/syscalls/linux/socket_stream.h
index b837b8f8c..dc6fb2f98 100644
--- a/test/syscalls/linux/socket_stream.h
+++ b/test/syscalls/linux/socket_stream.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_STREAM_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_STREAM_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_stream_blocking.cc b/test/syscalls/linux/socket_stream_blocking.cc
index 0743322ac..e168f79ff 100644
--- a/test/syscalls/linux/socket_stream_blocking.cc
+++ b/test/syscalls/linux/socket_stream_blocking.cc
@@ -22,8 +22,8 @@
#include "gtest/gtest.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
#include "test/util/timer_util.h"
diff --git a/test/syscalls/linux/socket_stream_blocking.h b/test/syscalls/linux/socket_stream_blocking.h
index 9fd19ff90..f760188f6 100644
--- a/test/syscalls/linux/socket_stream_blocking.h
+++ b/test/syscalls/linux/socket_stream_blocking.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_STREAM_BLOCKING_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_STREAM_BLOCKING_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_stream_nonblock.cc b/test/syscalls/linux/socket_stream_nonblock.cc
index 74d608741..788fae906 100644
--- a/test/syscalls/linux/socket_stream_nonblock.cc
+++ b/test/syscalls/linux/socket_stream_nonblock.cc
@@ -20,8 +20,8 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_stream_nonblock.h b/test/syscalls/linux/socket_stream_nonblock.h
index c3b7fad91..d1adaa95c 100644
--- a/test/syscalls/linux/socket_stream_nonblock.h
+++ b/test/syscalls/linux/socket_stream_nonblock.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_STREAM_NONBLOCK_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_STREAM_NONBLOCK_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_unix.cc b/test/syscalls/linux/socket_unix.cc
index 591cab3fd..cf96b2075 100644
--- a/test/syscalls/linux/socket_unix.cc
+++ b/test/syscalls/linux/socket_unix.cc
@@ -26,8 +26,8 @@
#include "gtest/gtest.h"
#include "absl/strings/string_view.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket_unix.h b/test/syscalls/linux/socket_unix.h
index 3625cc404..f6405f399 100644
--- a/test/syscalls/linux/socket_unix.h
+++ b/test/syscalls/linux/socket_unix.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_unix_abstract_nonblock.cc b/test/syscalls/linux/socket_unix_abstract_nonblock.cc
index 8bef76b67..617c5bfe5 100644
--- a/test/syscalls/linux/socket_unix_abstract_nonblock.cc
+++ b/test/syscalls/linux/socket_unix_abstract_nonblock.cc
@@ -15,8 +15,8 @@
#include <vector>
#include "test/syscalls/linux/socket_non_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_blocking_local.cc b/test/syscalls/linux/socket_unix_blocking_local.cc
index 77cb8c6d6..ba34320bc 100644
--- a/test/syscalls/linux/socket_unix_blocking_local.cc
+++ b/test/syscalls/linux/socket_unix_blocking_local.cc
@@ -15,8 +15,8 @@
#include <vector>
#include "test/syscalls/linux/socket_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_cmsg.cc b/test/syscalls/linux/socket_unix_cmsg.cc
index 22a4ee0d1..6191b1448 100644
--- a/test/syscalls/linux/socket_unix_cmsg.cc
+++ b/test/syscalls/linux/socket_unix_cmsg.cc
@@ -26,8 +26,8 @@
#include "gtest/gtest.h"
#include "absl/strings/string_view.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/socket_unix_cmsg.h b/test/syscalls/linux/socket_unix_cmsg.h
index 431606903..f5a276155 100644
--- a/test/syscalls/linux/socket_unix_cmsg.h
+++ b/test/syscalls/linux/socket_unix_cmsg.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_CMSG_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_CMSG_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_unix_dgram.cc b/test/syscalls/linux/socket_unix_dgram.cc
index 5b0844493..d43c83d71 100644
--- a/test/syscalls/linux/socket_unix_dgram.cc
+++ b/test/syscalls/linux/socket_unix_dgram.cc
@@ -20,8 +20,8 @@
#include "gtest/gtest.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_dgram.h b/test/syscalls/linux/socket_unix_dgram.h
index 0764ef85b..e9b8373a5 100644
--- a/test/syscalls/linux/socket_unix_dgram.h
+++ b/test/syscalls/linux/socket_unix_dgram.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_DGRAM_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_DGRAM_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_unix_dgram_local.cc b/test/syscalls/linux/socket_unix_dgram_local.cc
index 31d2d5216..4760630b9 100644
--- a/test/syscalls/linux/socket_unix_dgram_local.cc
+++ b/test/syscalls/linux/socket_unix_dgram_local.cc
@@ -15,10 +15,10 @@
#include <vector>
#include "test/syscalls/linux/socket_non_stream.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/socket_unix_dgram.h"
#include "test/syscalls/linux/socket_unix_non_stream.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_dgram_non_blocking.cc b/test/syscalls/linux/socket_unix_dgram_non_blocking.cc
index 2db8b68d3..ca277122e 100644
--- a/test/syscalls/linux/socket_unix_dgram_non_blocking.cc
+++ b/test/syscalls/linux/socket_unix_dgram_non_blocking.cc
@@ -16,8 +16,8 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_domain.cc b/test/syscalls/linux/socket_unix_domain.cc
index f7dff8b4d..d8cb5b892 100644
--- a/test/syscalls/linux/socket_unix_domain.cc
+++ b/test/syscalls/linux/socket_unix_domain.cc
@@ -15,8 +15,8 @@
#include <vector>
#include "test/syscalls/linux/socket_generic.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_filesystem_nonblock.cc b/test/syscalls/linux/socket_unix_filesystem_nonblock.cc
index 6700b4d90..cdd38f681 100644
--- a/test/syscalls/linux/socket_unix_filesystem_nonblock.cc
+++ b/test/syscalls/linux/socket_unix_filesystem_nonblock.cc
@@ -15,8 +15,8 @@
#include <vector>
#include "test/syscalls/linux/socket_non_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_non_stream.cc b/test/syscalls/linux/socket_unix_non_stream.cc
index 9425e87a6..d18f9e7b0 100644
--- a/test/syscalls/linux/socket_unix_non_stream.cc
+++ b/test/syscalls/linux/socket_unix_non_stream.cc
@@ -19,9 +19,9 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/memory_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_non_stream.h b/test/syscalls/linux/socket_unix_non_stream.h
index 7478ab172..44d1c0033 100644
--- a/test/syscalls/linux/socket_unix_non_stream.h
+++ b/test/syscalls/linux/socket_unix_non_stream.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_NON_STREAM_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_NON_STREAM_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_unix_non_stream_blocking_local.cc b/test/syscalls/linux/socket_unix_non_stream_blocking_local.cc
index fddcdf1c5..92f40f5e5 100644
--- a/test/syscalls/linux/socket_unix_non_stream_blocking_local.cc
+++ b/test/syscalls/linux/socket_unix_non_stream_blocking_local.cc
@@ -15,8 +15,8 @@
#include <vector>
#include "test/syscalls/linux/socket_non_stream_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_pair.cc b/test/syscalls/linux/socket_unix_pair.cc
index 85999db04..28a437339 100644
--- a/test/syscalls/linux/socket_unix_pair.cc
+++ b/test/syscalls/linux/socket_unix_pair.cc
@@ -14,10 +14,10 @@
#include <vector>
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/socket_unix.h"
#include "test/syscalls/linux/socket_unix_cmsg.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_pair_nonblock.cc b/test/syscalls/linux/socket_unix_pair_nonblock.cc
index 281410a9a..39360896b 100644
--- a/test/syscalls/linux/socket_unix_pair_nonblock.cc
+++ b/test/syscalls/linux/socket_unix_pair_nonblock.cc
@@ -15,8 +15,8 @@
#include <vector>
#include "test/syscalls/linux/socket_non_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_seqpacket.cc b/test/syscalls/linux/socket_unix_seqpacket.cc
index d6e7031c0..2a2741eb9 100644
--- a/test/syscalls/linux/socket_unix_seqpacket.cc
+++ b/test/syscalls/linux/socket_unix_seqpacket.cc
@@ -20,8 +20,8 @@
#include "gtest/gtest.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_seqpacket.h b/test/syscalls/linux/socket_unix_seqpacket.h
index 30d9b9edf..5bb36af92 100644
--- a/test/syscalls/linux/socket_unix_seqpacket.h
+++ b/test/syscalls/linux/socket_unix_seqpacket.h
@@ -15,7 +15,7 @@
#ifndef GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_SEQPACKET_H_
#define GVISOR_TEST_SYSCALLS_LINUX_SOCKET_UNIX_SEQPACKET_H_
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/syscalls/linux/socket_unix_seqpacket_local.cc b/test/syscalls/linux/socket_unix_seqpacket_local.cc
index 69a5f150d..492416a77 100644
--- a/test/syscalls/linux/socket_unix_seqpacket_local.cc
+++ b/test/syscalls/linux/socket_unix_seqpacket_local.cc
@@ -15,10 +15,10 @@
#include <vector>
#include "test/syscalls/linux/socket_non_stream.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/socket_unix_non_stream.h"
#include "test/syscalls/linux/socket_unix_seqpacket.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_stream.cc b/test/syscalls/linux/socket_unix_stream.cc
index 3ff810914..6e9f70f8c 100644
--- a/test/syscalls/linux/socket_unix_stream.cc
+++ b/test/syscalls/linux/socket_unix_stream.cc
@@ -19,8 +19,8 @@
#include "gtest/gtest.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_stream_blocking_local.cc b/test/syscalls/linux/socket_unix_stream_blocking_local.cc
index 8429bd429..97a6bb327 100644
--- a/test/syscalls/linux/socket_unix_stream_blocking_local.cc
+++ b/test/syscalls/linux/socket_unix_stream_blocking_local.cc
@@ -15,8 +15,8 @@
#include <vector>
#include "test/syscalls/linux/socket_stream_blocking.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_stream_local.cc b/test/syscalls/linux/socket_unix_stream_local.cc
index a7e3449a9..4b267ccae 100644
--- a/test/syscalls/linux/socket_unix_stream_local.cc
+++ b/test/syscalls/linux/socket_unix_stream_local.cc
@@ -15,8 +15,8 @@
#include <vector>
#include "test/syscalls/linux/socket_stream.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_stream_nonblock_local.cc b/test/syscalls/linux/socket_unix_stream_nonblock_local.cc
index 4b763c8e2..d7bf7747b 100644
--- a/test/syscalls/linux/socket_unix_stream_nonblock_local.cc
+++ b/test/syscalls/linux/socket_unix_stream_nonblock_local.cc
@@ -14,8 +14,8 @@
#include <vector>
#include "test/syscalls/linux/socket_stream_nonblock.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_unbound_abstract.cc b/test/syscalls/linux/socket_unix_unbound_abstract.cc
index dd3d25450..0f6864266 100644
--- a/test/syscalls/linux/socket_unix_unbound_abstract.cc
+++ b/test/syscalls/linux/socket_unix_unbound_abstract.cc
@@ -16,8 +16,8 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_unbound_dgram.cc b/test/syscalls/linux/socket_unix_unbound_dgram.cc
index 907dca0f1..ccf2c94a1 100644
--- a/test/syscalls/linux/socket_unix_unbound_dgram.cc
+++ b/test/syscalls/linux/socket_unix_unbound_dgram.cc
@@ -17,8 +17,8 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_unbound_filesystem.cc b/test/syscalls/linux/socket_unix_unbound_filesystem.cc
index a035fb095..811fe12a1 100644
--- a/test/syscalls/linux/socket_unix_unbound_filesystem.cc
+++ b/test/syscalls/linux/socket_unix_unbound_filesystem.cc
@@ -17,9 +17,9 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_unbound_seqpacket.cc b/test/syscalls/linux/socket_unix_unbound_seqpacket.cc
index cb99030f5..e22018890 100644
--- a/test/syscalls/linux/socket_unix_unbound_seqpacket.cc
+++ b/test/syscalls/linux/socket_unix_unbound_seqpacket.cc
@@ -16,8 +16,8 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/socket_unix_unbound_stream.cc b/test/syscalls/linux/socket_unix_unbound_stream.cc
index f185dded3..b10062bc2 100644
--- a/test/syscalls/linux/socket_unix_unbound_stream.cc
+++ b/test/syscalls/linux/socket_unix_unbound_stream.cc
@@ -16,8 +16,8 @@
#include <sys/un.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/tcp_socket.cc b/test/syscalls/linux/tcp_socket.cc
index 183819faf..cb77986c2 100644
--- a/test/syscalls/linux/tcp_socket.cc
+++ b/test/syscalls/linux/tcp_socket.cc
@@ -29,9 +29,9 @@
#include "gtest/gtest.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/posix_error.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/tuntap.cc b/test/syscalls/linux/tuntap.cc
index 1c74b9724..7c9c5c870 100644
--- a/test/syscalls/linux/tuntap.cc
+++ b/test/syscalls/linux/tuntap.cc
@@ -31,11 +31,11 @@
#include "absl/strings/ascii.h"
#include "absl/strings/str_split.h"
#include "test/syscalls/linux/socket_netlink_route_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/capability_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/fs_util.h"
#include "test/util/posix_error.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/udp_bind.cc b/test/syscalls/linux/udp_bind.cc
index f68d78aa2..5ed115a14 100644
--- a/test/syscalls/linux/udp_bind.cc
+++ b/test/syscalls/linux/udp_bind.cc
@@ -17,8 +17,8 @@
#include <sys/types.h>
#include "gtest/gtest.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/util/file_descriptor.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
namespace gvisor {
diff --git a/test/syscalls/linux/udp_socket.cc b/test/syscalls/linux/udp_socket.cc
index b40598767..3353e58cb 100644
--- a/test/syscalls/linux/udp_socket.cc
+++ b/test/syscalls/linux/udp_socket.cc
@@ -39,10 +39,10 @@
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "test/syscalls/linux/ip_socket_test_util.h"
-#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/file_descriptor.h"
#include "test/util/posix_error.h"
+#include "test/util/socket_util.h"
#include "test/util/test_util.h"
#include "test/util/thread_util.h"
diff --git a/test/syscalls/linux/unix_domain_socket_test_util.h b/test/syscalls/linux/unix_domain_socket_test_util.h
index b8073db17..4240bd5f6 100644
--- a/test/syscalls/linux/unix_domain_socket_test_util.h
+++ b/test/syscalls/linux/unix_domain_socket_test_util.h
@@ -17,7 +17,7 @@
#include <string>
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {
diff --git a/test/util/BUILD b/test/util/BUILD
index cc83221ea..4a4401ba8 100644
--- a/test/util/BUILD
+++ b/test/util/BUILD
@@ -1,4 +1,4 @@
-load("//tools:defs.bzl", "cc_library", "cc_test", "coreutil", "gbenchmark", "gtest", "select_system")
+load("//tools:defs.bzl", "cc_library", "cc_test", "coreutil", "default_net_util", "gbenchmark", "gtest", "select_system")
package(
default_visibility = ["//:sandbox"],
@@ -414,3 +414,27 @@ cc_library(
":temp_path",
],
)
+
+cc_library(
+ name = "socket_util",
+ testonly = 1,
+ srcs = [
+ "socket_util.cc",
+ "socket_util_impl.cc",
+ ],
+ hdrs = ["socket_util.h"],
+ defines = select_system(),
+ deps = default_net_util() + [
+ gtest,
+ "@com_google_absl//absl/memory",
+ "@com_google_absl//absl/strings",
+ "@com_google_absl//absl/strings:str_format",
+ "@com_google_absl//absl/time",
+ "@com_google_absl//absl/types:optional",
+ "//test/util:file_descriptor",
+ "//test/util:posix_error",
+ "//test/util:temp_path",
+ "//test/util:test_util",
+ "//test/util:thread_util",
+ ],
+)
diff --git a/test/syscalls/linux/socket_test_util.cc b/test/util/socket_util.cc
index c1cded834..f2360b732 100644
--- a/test/syscalls/linux/socket_test_util.cc
+++ b/test/util/socket_util.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
#include <arpa/inet.h>
#include <netinet/in.h>
diff --git a/test/syscalls/linux/socket_test_util.h b/test/util/socket_util.h
index 0e2be63cc..0e2be63cc 100644
--- a/test/syscalls/linux/socket_test_util.h
+++ b/test/util/socket_util.h
diff --git a/test/syscalls/linux/socket_test_util_impl.cc b/test/util/socket_util_impl.cc
index ef661a0e3..04550ad7c 100644
--- a/test/syscalls/linux/socket_test_util_impl.cc
+++ b/test/util/socket_util_impl.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "test/syscalls/linux/socket_test_util.h"
+#include "test/util/socket_util.h"
namespace gvisor {
namespace testing {