diff options
author | Adin Scannell <ascannell@google.com> | 2020-11-23 13:36:19 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-23 13:38:41 -0800 |
commit | 5d5af881103b784374f7e5231224cacbf19ec2d4 (patch) | |
tree | e6a1f52edeb59d9dfdbead40672fe0478f71fd87 /test/syscalls/linux | |
parent | 5212b4f7b28ddea466ccb50085da2b0368029d19 (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
Diffstat (limited to 'test/syscalls/linux')
-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 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; |