diff options
Diffstat (limited to 'test/syscalls')
-rw-r--r-- | test/syscalls/linux/proc.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/syscalls/linux/proc.cc b/test/syscalls/linux/proc.cc index 2da7006cf..67d3d18c7 100644 --- a/test/syscalls/linux/proc.cc +++ b/test/syscalls/linux/proc.cc @@ -725,6 +725,10 @@ TEST(ProcCpuinfo, RequiredFieldsArePresent) { } } +TEST(ProcCpuinfo, DeniesWrite) { + EXPECT_THAT(open("/proc/cpuinfo", O_WRONLY), SyscallFailsWithErrno(EACCES)); +} + // Sanity checks that uptime is present. TEST(ProcUptime, IsPresent) { std::string proc_uptime = ASSERT_NO_ERRNO_AND_VALUE(GetContents("/proc/uptime")); |