From 5d5af881103b784374f7e5231224cacbf19ec2d4 Mon Sep 17 00:00:00 2001 From: Adin Scannell Date: Mon, 23 Nov 2020 13:36:19 -0800 Subject: Ignore permission failures in CheckDuplicatesRecursively. Not all files are always accessible by the process itself. This was specifically seen with map_files, but there's no rule that every entry must be accessible by the process itself. PiperOrigin-RevId: 343919117 --- test/syscalls/linux/proc.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/syscalls') diff --git a/test/syscalls/linux/proc.cc b/test/syscalls/linux/proc.cc index 47028639f..f43a41891 100644 --- a/test/syscalls/linux/proc.cc +++ b/test/syscalls/linux/proc.cc @@ -2478,6 +2478,10 @@ void CheckDuplicatesRecursively(std::string path) { absl::EndsWith(path, "/net")) { break; } + // We may also see permission failures traversing some files. + if (errno == EACCES && absl::StartsWith(path, "/proc/")) { + break; + } // Otherwise, no errors are allowed. ASSERT_EQ(errno, 0) << path; -- cgit v1.2.3