Merge "libcutils: remove unused socket_set_receive_timeout()."
diff --git a/adb/client/fastdeploy.cpp b/adb/client/fastdeploy.cpp
index bdc9e56..5fa0edb 100644
--- a/adb/client/fastdeploy.cpp
+++ b/adb/client/fastdeploy.cpp
@@ -101,17 +101,12 @@
static void push_to_device(const void* data, size_t byte_count, const char* dst, bool sync) {
std::vector<const char*> srcs;
- {
- TemporaryFile temp;
- android::base::WriteFully(temp.fd, data, byte_count);
- srcs.push_back(temp.path);
-
- // On Windows, the file needs to be flushed before pushing to device.
- // closing the file flushes its content, but we still need to remove it after push.
- // FileDeleter does exactly that.
- temp.DoNotRemove();
- }
- FileDeleter temp_deleter(srcs.back());
+ TemporaryFile tf;
+ android::base::WriteFully(tf.fd, data, byte_count);
+ srcs.push_back(tf.path);
+ // On Windows, the file needs to be flushed before pushing to device,
+ // but can't be removed until after the push.
+ unix_close(tf.release());
if (!do_sync_push(srcs, dst, sync)) {
error_exit("Failed to push fastdeploy agent to device.");
diff --git a/adb/fastdeploy/deployagent/test/com/android/fastdeploy/FastDeployTest.java b/adb/fastdeploy/deployagent/test/com/android/fastdeploy/FastDeployTest.java
index ef6ccae..4aa2f79 100644
--- a/adb/fastdeploy/deployagent/test/com/android/fastdeploy/FastDeployTest.java
+++ b/adb/fastdeploy/deployagent/test/com/android/fastdeploy/FastDeployTest.java
@@ -20,7 +20,9 @@
import static org.junit.Assert.assertTrue;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
+import com.android.ddmlib.Log.LogLevel;
import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
@@ -68,17 +70,19 @@
}
private boolean isAppInstalled(String packageName) throws DeviceNotAvailableException {
- final String commandResult = getDevice().executeShellCommand("pm list packages");
+ final String result = getDevice().executeShellCommand("pm list packages");
+ CLog.logAndDisplay(LogLevel.INFO, result);
final int prefixLength = "package:".length();
- return Arrays.stream(commandResult.split("\\r?\\n"))
+ return Arrays.stream(result.split("\\r?\\n"))
.anyMatch(line -> line.substring(prefixLength).equals(packageName));
}
// Mostly copied from PkgInstallSignatureVerificationTest.java.
- private String fastInstallPackage(String apkPath)
+ private void fastInstallPackage(String apkPath)
throws IOException, DeviceNotAvailableException {
- return getDevice().executeAdbCommand("install", "-t", "--fastdeploy", "--force-agent",
+ String result = getDevice().executeAdbCommand("install", "-t", "--fastdeploy", "--force-agent",
apkPath);
+ CLog.logAndDisplay(LogLevel.INFO, result);
}
}
diff --git a/fs_mgr/libsnapshot/snapshot_metadata_updater_test.cpp b/fs_mgr/libsnapshot/snapshot_metadata_updater_test.cpp
index 7d96a67..4fd8759 100644
--- a/fs_mgr/libsnapshot/snapshot_metadata_updater_test.cpp
+++ b/fs_mgr/libsnapshot/snapshot_metadata_updater_test.cpp
@@ -325,7 +325,7 @@
EXPECT_TRUE(CheckGroupName("product", "another_group"));
}
-INSTANTIATE_TEST_SUITE_P(, SnapshotMetadataUpdaterTest, testing::Values(0, 1));
+INSTANTIATE_TEST_SUITE_P(Snapshot, SnapshotMetadataUpdaterTest, testing::Values(0, 1));
} // namespace snapshot
} // namespace android
diff --git a/fs_mgr/libsnapshot/snapshot_test.cpp b/fs_mgr/libsnapshot/snapshot_test.cpp
index 3c3d9a6..af268f9 100644
--- a/fs_mgr/libsnapshot/snapshot_test.cpp
+++ b/fs_mgr/libsnapshot/snapshot_test.cpp
@@ -1338,7 +1338,7 @@
ASSERT_TRUE(new_sm->CancelUpdate());
}
-INSTANTIATE_TEST_SUITE_P(, FlashAfterUpdateTest, Combine(Values(0, 1), Bool()),
+INSTANTIATE_TEST_SUITE_P(Snapshot, FlashAfterUpdateTest, Combine(Values(0, 1), Bool()),
[](const TestParamInfo<FlashAfterUpdateTest::ParamType>& info) {
return "Flash"s + (std::get<0>(info.param) ? "New"s : "Old"s) +
"Slot"s + (std::get<1>(info.param) ? "After"s : "Before"s) +
diff --git a/libgrallocusage/Android.bp b/libgrallocusage/Android.bp
index d27feb9..ce0c3c8 100644
--- a/libgrallocusage/Android.bp
+++ b/libgrallocusage/Android.bp
@@ -20,12 +20,7 @@
"-Werror",
],
cppflags: [
- "-Weverything",
- "-Wno-c++98-compat-pedantic",
- // Hide errors in headers we include
- "-Wno-global-constructors",
- "-Wno-exit-time-destructors",
- "-Wno-padded",
+ "-Wextra",
],
srcs: ["GrallocUsageConversion.cpp"],
export_include_dirs: ["include"],
diff --git a/libprocessgroup/profiles/test.cpp b/libprocessgroup/profiles/test.cpp
index bc9aade..b37e3e6 100644
--- a/libprocessgroup/profiles/test.cpp
+++ b/libprocessgroup/profiles/test.cpp
@@ -33,14 +33,14 @@
}
// Test suite instantiations
-INSTANTIATE_TEST_SUITE_P(, JsonSchemaTest,
+INSTANTIATE_TEST_SUITE_P(Cgroups, JsonSchemaTest,
::testing::Values(MakeTestParam<Cgroups>("/cgroups.json"),
MakeTestParam<Cgroups>("/cgroups.recovery.json"),
MakeTestParam<TaskProfiles>("/task_profiles.json")));
-INSTANTIATE_TEST_SUITE_P(, CgroupsTest,
+INSTANTIATE_TEST_SUITE_P(Cgroups, CgroupsTest,
::testing::Values(MakeTestParam<Cgroups>("/cgroups.json"),
MakeTestParam<Cgroups>("/cgroups.recovery.json")));
-INSTANTIATE_TEST_SUITE_P(, TaskProfilesTest,
+INSTANTIATE_TEST_SUITE_P(TaskProfiles, TaskProfilesTest,
::testing::Values(MakeTestParam<TaskProfiles>("/task_profiles.json")));
} // namespace profiles
diff --git a/libunwindstack/tests/ArmExidxDecodeTest.cpp b/libunwindstack/tests/ArmExidxDecodeTest.cpp
index 7b1dd92..69a7816 100644
--- a/libunwindstack/tests/ArmExidxDecodeTest.cpp
+++ b/libunwindstack/tests/ArmExidxDecodeTest.cpp
@@ -1662,7 +1662,7 @@
ASSERT_EQ(0x10U, (*exidx_->regs())[15]);
}
-INSTANTIATE_TEST_SUITE_P(, ArmExidxDecodeTest,
+INSTANTIATE_TEST_SUITE_P(Unwindstack, ArmExidxDecodeTest,
::testing::Values("logging", "register_logging", "no_logging"));
} // namespace unwindstack