Internal change.

PiperOrigin-RevId: 540338096
This commit is contained in:
gVisor bot
2023-06-14 11:56:16 -07:00
parent 2ca109d47c
commit fdaf777344
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -1826,6 +1826,7 @@ cc_binary(
"//test/util:mount_util",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/container:node_hash_set",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
+3 -2
View File
@@ -51,6 +51,7 @@
#include "gtest/gtest.h"
#include "absl/algorithm/container.h"
#include "absl/container/btree_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/container/node_hash_set.h"
#include "absl/strings/ascii.h"
#include "absl/strings/match.h"
@@ -1169,7 +1170,7 @@ static void CheckFdDirGetdentsDuplicates(const std::string& path) {
EXPECT_GE(newfd, 1024);
auto fd_closer = Cleanup([newfd]() { close(newfd); });
auto fd_files = ASSERT_NO_ERRNO_AND_VALUE(ListDir(path.c_str(), false));
absl::node_hash_set<std::string> fd_files_dedup(fd_files.begin(),
absl::flat_hash_set<std::string> fd_files_dedup(fd_files.begin(),
fd_files.end());
EXPECT_EQ(fd_files.size(), fd_files_dedup.size());
}
@@ -2673,7 +2674,7 @@ void CheckDuplicatesRecursively(std::string path) {
return;
}
auto dir_closer = Cleanup([&dir]() { closedir(dir); });
absl::node_hash_set<std::string> children;
absl::flat_hash_set<std::string> children;
while (true) {
// Readdir(3): If the end of the directory stream is reached, NULL is
// returned and errno is not changed. If an error occurs, NULL is