diff options
author | Fabricio Voznika <fvoznika@google.com> | 2021-06-10 13:28:06 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-10 13:36:03 -0700 |
commit | 21169357ca913de9cef50da6f235a482b7a3cfab (patch) | |
tree | 9b78610d4f10ffa7c97bc89cb2fc83b2c7bd56ba /test | |
parent | 8d426b73818cf07aeee3db88478a00b80ad9aafe (diff) |
Add /proc/sys/vm/max_map_count
Set it to int32 max because gVisor doesn't have a limit.
Fixes #2337
PiperOrigin-RevId: 378722230
Diffstat (limited to 'test')
-rw-r--r-- | test/syscalls/linux/proc.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/syscalls/linux/proc.cc b/test/syscalls/linux/proc.cc index 24928d876..78aa73edc 100644 --- a/test/syscalls/linux/proc.cc +++ b/test/syscalls/linux/proc.cc @@ -2364,6 +2364,15 @@ TEST(ProcSysKernelHostname, MatchesUname) { EXPECT_EQ(procfs_hostname, hostname); } +TEST(ProcSysVmMaxmapCount, HasNumericValue) { + const std::string val_str = + ASSERT_NO_ERRNO_AND_VALUE(GetContents("/proc/sys/vm/max_map_count")); + int32_t val; + EXPECT_TRUE(absl::SimpleAtoi(val_str, &val)) + << "/proc/sys/vm/max_map_count does not contain a numeric value: " + << val_str; +} + TEST(ProcSysVmMmapMinAddr, HasNumericValue) { const std::string mmap_min_addr_str = ASSERT_NO_ERRNO_AND_VALUE(GetContents("/proc/sys/vm/mmap_min_addr")); |