Re-land tests for MTE globals
The original patch (aosp/2709995) was reverted because of a bug in the
linker implementation of the feature.
This patch adds a couple of tests. In comparison to the previous
version, this comes in source-based only because we don't need a
prebuilt now that the toolchain is modern enough to produce MTE-globals
capable binaries.
There is a main test that checks that MTE globals is working properly.
And there's another test that checks against the regression that caused
this feature to be reverted in the first place.
Bug: 315182011
Test: On both an MTE-enabled and non-MTE-enabled device:
Test: atest libprocinfo_test bionic-unit-tests bionic-unit-tests-static
CtsGwpAsanTestCases gwp_asan_unittest debuggerd_test memtag_stack_dlopen_test
Change-Id: I19ec542ef792eaba59d21eb0e033ed7d00c6127b
diff --git a/tests/Android.bp b/tests/Android.bp
index f5f3e31..ea03c08 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -429,6 +429,7 @@
"math_test.cpp",
"membarrier_test.cpp",
"memtag_stack_test.cpp",
+ "memtag_globals_test.cpp",
"mntent_test.cpp",
"mte_test.cpp",
"netdb_test.cpp",
@@ -896,6 +897,11 @@
"preinit_syscall_test_helper",
"thread_exit_cb_helper",
"tls_properties_helper",
+ "memtag_globals_binary",
+ "memtag_globals_binary_static",
+ "mte_globals_relr_regression_test_b_314038442",
+ "mte_globals_relr_regression_test_b_314038442_mte",
+ "memtag_globals_dso",
],
data_libs: [
"libatest_simple_zip",
@@ -1286,6 +1292,11 @@
"heap_tagging_static_disabled_helper",
"heap_tagging_static_sync_helper",
"heap_tagging_sync_helper",
+ "memtag_globals_binary",
+ "memtag_globals_binary_static",
+ "memtag_globals_dso",
+ "mte_globals_relr_regression_test_b_314038442",
+ "mte_globals_relr_regression_test_b_314038442_mte",
"stack_tagging_helper",
"stack_tagging_static_helper",
],