mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Run proc_net tests.
PiperOrigin-RevId: 267280086
This commit is contained in:
@@ -305,6 +305,8 @@ syscall_test(
|
||||
|
||||
syscall_test(test = "//test/syscalls/linux:proc_pid_uid_gid_map_test")
|
||||
|
||||
syscall_test(test = "//test/syscalls/linux:proc_net_test")
|
||||
|
||||
syscall_test(
|
||||
size = "medium",
|
||||
test = "//test/syscalls/linux:pselect_test",
|
||||
|
||||
@@ -1521,6 +1521,7 @@ cc_binary(
|
||||
srcs = ["proc_net.cc"],
|
||||
linkstatic = 1,
|
||||
deps = [
|
||||
"//test/util:capability_util",
|
||||
"//test/util:file_descriptor",
|
||||
"//test/util:fs_util",
|
||||
"//test/util:test_main",
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "test/util/capability_util.h"
|
||||
#include "test/util/file_descriptor.h"
|
||||
#include "test/util/fs_util.h"
|
||||
#include "test/util/test_util.h"
|
||||
@@ -35,6 +36,8 @@ TEST(ProcSysNetIpv4Sack, Exists) {
|
||||
}
|
||||
|
||||
TEST(ProcSysNetIpv4Sack, CanReadAndWrite) {
|
||||
SKIP_IF(!ASSERT_NO_ERRNO_AND_VALUE(HaveCapability((CAP_DAC_OVERRIDE))));
|
||||
|
||||
auto const fd =
|
||||
ASSERT_NO_ERRNO_AND_VALUE(Open("/proc/sys/net/ipv4/tcp_sack", O_RDWR));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user