ART: Fix android-cloexec warnings
Use the DupCloexec helper wherever possible. Add O_CLOEXEC to open
and fopen calls.
Bug: 32619234
Test: WITH_TIDY=1 mmma art
Change-Id: I0afb1beea53ab8f68ab85d1762aff999903060fe
diff --git a/profman/profile_assistant_test.cc b/profman/profile_assistant_test.cc
index 31dfbc0..e9d3290 100644
--- a/profman/profile_assistant_test.cc
+++ b/profman/profile_assistant_test.cc
@@ -1192,7 +1192,7 @@
// Run profman and pass the dex file with --apk-fd.
android::base::unique_fd apk_fd(
- open(GetTestDexFileName("ProfileTestMultiDex").c_str(), O_RDONLY));
+ open(GetTestDexFileName("ProfileTestMultiDex").c_str(), O_RDONLY)); // NOLINT
ASSERT_GE(apk_fd.get(), 0);
std::string profman_cmd = GetProfmanCmd();
@@ -1270,7 +1270,7 @@
// Run profman and pass the dex file with --apk-fd.
android::base::unique_fd apk_fd(
- open(GetTestDexFileName("ProfileTestMultiDex").c_str(), O_RDONLY));
+ open(GetTestDexFileName("ProfileTestMultiDex").c_str(), O_RDONLY)); // NOLINT
ASSERT_GE(apk_fd.get(), 0);
std::string profman_cmd = GetProfmanCmd();