diff --git a/suite/tests/CMakeLists.txt b/suite/tests/CMakeLists.txt index ea96653c7fd..9120058c08a 100644 --- a/suite/tests/CMakeLists.txt +++ b/suite/tests/CMakeLists.txt @@ -2729,10 +2729,15 @@ if (NOT ARM) # FIXME i#1551: fix bugs on ARM torunonly_ci(client.truncate.thread-churn-2 win32.threadchurn client.truncate.dll client-interface/truncate.c "2" "" "") endif (WIN32) - if (NOT AARCH64) # FIXME i#1569: get working on AArch64 - tobuild_ci(client.dr_options client-interface/dr_options.c - "" "-native_exec_list foo.dll,bar.dll -opt_cleancall 3 -thread_private" "") - endif (NOT AARCH64) + + # TODO i#1884: Add support for -thread_private caches on ARM and AArch64 + if (AARCH64) + set (boolean_option "-disable_traces") + else () + set (boolean_option "-thread_private") + endif (AARCH64) + tobuild_ci(client.dr_options client-interface/dr_options.c + "" "-native_exec_list foo.dll,bar.dll -opt_cleancall 3 ${boolean_option}" "") endif (NOT ARM) tobuild_ci(client.unregister client-interface/unregister.c "" "" "") if (NOT ARM AND NOT RISCV64) # FIXME i#2094: implement cleancall optimizations on ARM diff --git a/suite/tests/client-interface/dr_options.dll.c b/suite/tests/client-interface/dr_options.dll.c index 0096a2b8a2e..aed3409ee35 100644 --- a/suite/tests/client-interface/dr_options.dll.c +++ b/suite/tests/client-interface/dr_options.dll.c @@ -38,6 +38,15 @@ #include +// TODO i#1884: Add support for -thread_private caches on ARM and AArch64 +#ifdef AARCH64 +static const char *BOOLEAN_OPTION = "disable_traces"; +static const bool USING_PRIVATE_CACHES = false; +#else +static const char *BOOLEAN_OPTION = "thread_private"; +static const bool USING_PRIVATE_CACHES = true; +#endif + DR_EXPORT void dr_init(client_id_t client_id) { @@ -56,13 +65,14 @@ dr_init(client_id_t client_id) ASSERT(int_option == 3); /* Query existing boolean option. */ - success = dr_get_integer_option("thread_private", &int_option); + success = dr_get_integer_option(BOOLEAN_OPTION, &int_option); ASSERT(success); ASSERT(int_option == 1); + /* For major behavior changing options, we expose dedicated query APIs which * should match the value read from the arbitrary query API. */ - ASSERT(dr_using_all_private_caches()); + ASSERT(dr_using_all_private_caches() == USING_PRIVATE_CACHES); ASSERT(dr_running_under_dynamorio());