Merge "heapprofd tests: skip all devices with an x86-like primary ABI"
diff --git a/src/profiling/memory/heapprofd_end_to_end_test.cc b/src/profiling/memory/heapprofd_end_to_end_test.cc
index b0032af..e5d48d8 100644
--- a/src/profiling/memory/heapprofd_end_to_end_test.cc
+++ b/src/profiling/memory/heapprofd_end_to_end_test.cc
@@ -638,14 +638,15 @@
}
};
-// TODO(b/118428762): stop pretending the tests pass on cuttlefish
-bool IsCuttlefish() {
- std::string build = ReadProperty("ro.build.product", "");
- return build.find("vsoc_x86") == 0; // also matches vsoc_x86_64
+// TODO(b/118428762): unwinding is broken at least x86 emulators, blanket-skip
+// all x86-like primary ABIs until we've taken a closer look.
+bool IsX86() {
+ std::string abi = ReadProperty("ro.product.cpu.abi", "");
+ return abi.find("x86") != std::string::npos;
}
TEST_F(HeapprofdEndToEnd, Smoke_Central) {
- if (IsCuttlefish())
+ if (IsX86())
return;
auto prop = DisableFork();
@@ -654,7 +655,7 @@
}
TEST_F(HeapprofdEndToEnd, TwoProcesses_Fork) {
- if (IsCuttlefish())
+ if (IsX86())
return;
// RAII handle that resets to central mode when out of scope.
@@ -664,7 +665,7 @@
}
TEST_F(HeapprofdEndToEnd, TwoProcesses_Central) {
- if (IsCuttlefish())
+ if (IsX86())
return;
auto prop = DisableFork();
@@ -673,7 +674,7 @@
}
TEST_F(HeapprofdEndToEnd, Smoke_Fork) {
- if (IsCuttlefish())
+ if (IsX86())
return;
// RAII handle that resets to central mode when out of scope.
@@ -683,7 +684,7 @@
}
TEST_F(HeapprofdEndToEnd, FinalFlush_Central) {
- if (IsCuttlefish())
+ if (IsX86())
return;
auto prop = DisableFork();
@@ -692,7 +693,7 @@
}
TEST_F(HeapprofdEndToEnd, FinalFlush_Fork) {
- if (IsCuttlefish())
+ if (IsX86())
return;
// RAII handle that resets to central mode when out of scope.
@@ -702,7 +703,7 @@
}
TEST_F(HeapprofdEndToEnd, NativeStartup_Central) {
- if (IsCuttlefish())
+ if (IsX86())
return;
auto prop = DisableFork();
@@ -711,7 +712,7 @@
}
TEST_F(HeapprofdEndToEnd, NativeStartup_Fork) {
- if (IsCuttlefish())
+ if (IsX86())
return;
// RAII handle that resets to central mode when out of scope.
@@ -721,7 +722,7 @@
}
TEST_F(HeapprofdEndToEnd, ReInit_Central) {
- if (IsCuttlefish())
+ if (IsX86())
return;
auto prop = DisableFork();
@@ -730,7 +731,7 @@
}
TEST_F(HeapprofdEndToEnd, ReInit_Fork) {
- if (IsCuttlefish())
+ if (IsX86())
return;
// RAII handle that resets to central mode when out of scope.
@@ -740,7 +741,7 @@
}
TEST_F(HeapprofdEndToEnd, ConcurrentSession_Central) {
- if (IsCuttlefish())
+ if (IsX86())
return;
auto prop = DisableFork();
@@ -749,7 +750,7 @@
}
TEST_F(HeapprofdEndToEnd, ConcurrentSession_Fork) {
- if (IsCuttlefish())
+ if (IsX86())
return;
// RAII handle that resets to central mode when out of scope.
diff --git a/test/cts/heapprofd_test_cts.cc b/test/cts/heapprofd_test_cts.cc
index e6007cd..6c40a16 100644
--- a/test/cts/heapprofd_test_cts.cc
+++ b/test/cts/heapprofd_test_cts.cc
@@ -227,17 +227,18 @@
system(stop_cmd.c_str());
}
-// TODO(b/118428762, b/125385428): stop pretending the tests pass on cuttlefish
-bool IsCuttlefish() {
+// TODO(b/118428762): unwinding is broken at least x86 emulators, blanket-skip
+// all x86-like primary ABIs until we've taken a closer look.
+bool IsX86() {
char buf[PROP_VALUE_MAX + 1] = {};
- int ret = __system_property_get("ro.build.product", buf);
+ int ret = __system_property_get("ro.product.cpu.abi", buf);
PERFETTO_CHECK(ret >= 0);
- std::string debuggable(buf);
- return debuggable.find("vsoc_x86") == 0; // also matches vsoc_x86_64
+ std::string abi(buf);
+ return abi.find("x86") != std::string::npos;
}
TEST(HeapprofdCtsTest, DebuggableAppRuntime) {
- if (IsCuttlefish())
+ if (IsX86())
return;
std::string app_name = "android.perfetto.cts.app.debuggable";
@@ -247,7 +248,7 @@
}
TEST(HeapprofdCtsTest, DebuggableAppStartup) {
- if (IsCuttlefish())
+ if (IsX86())
return;
std::string app_name = "android.perfetto.cts.app.debuggable";
@@ -257,7 +258,7 @@
}
TEST(HeapprofdCtsTest, ReleaseAppRuntime) {
- if (IsCuttlefish())
+ if (IsX86())
return;
std::string app_name = "android.perfetto.cts.app.release";
@@ -272,7 +273,7 @@
}
TEST(HeapprofdCtsTest, ReleaseAppStartup) {
- if (IsCuttlefish())
+ if (IsX86())
return;
std::string app_name = "android.perfetto.cts.app.release";