summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-11-23 13:36:19 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-23 13:38:41 -0800
commit5d5af881103b784374f7e5231224cacbf19ec2d4 (patch)
treee6a1f52edeb59d9dfdbead40672fe0478f71fd87
parent5212b4f7b28ddea466ccb50085da2b0368029d19 (diff)
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
-rw-r--r--test/syscalls/linux/proc.cc4
1 files changed, 4 insertions, 0 deletions
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;