Merge "Format parameter for MemtagNoteTest" am: 8d21eac241
am: 6982631986
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2636750 Change-Id: I19b389e5920d216bb84977bb7321523eaa1c75b9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
b8e77f0c78
1 changed files with 9 additions and 2 deletions
|
@ -221,6 +221,8 @@ TEST(heap_tagging_level, tagging_level_transition_sync_none) {
|
|||
enum class MemtagNote { NONE, ASYNC, SYNC };
|
||||
class MemtagNoteTest : public testing::TestWithParam<std::tuple<MemtagNote, bool>> {};
|
||||
|
||||
static const char* kNoteSuffix[] = {"disabled", "async", "sync"};
|
||||
|
||||
TEST_P(MemtagNoteTest, SEGV) {
|
||||
#if defined(__BIONIC__) && defined(__aarch64__)
|
||||
SKIP_WITH_NATIVE_BRIDGE; // http://b/242170715
|
||||
|
@ -232,7 +234,6 @@ TEST_P(MemtagNoteTest, SEGV) {
|
|||
bool withHWASAN = __has_feature(hwaddress_sanitizer);
|
||||
bool withMTE = getauxval(AT_HWCAP2) & HWCAP2_MTE;
|
||||
|
||||
const char* kNoteSuffix[] = {"disabled", "async", "sync"};
|
||||
const char* kExpectedOutputHWASAN[] = {".*tag-mismatch.*", ".*tag-mismatch.*",
|
||||
".*tag-mismatch.*"};
|
||||
// Note that we do not check the exact si_code of the "async" variant, as it may be auto-upgraded
|
||||
|
@ -261,4 +262,10 @@ TEST_P(MemtagNoteTest, SEGV) {
|
|||
INSTANTIATE_TEST_SUITE_P(, MemtagNoteTest,
|
||||
testing::Combine(testing::Values(MemtagNote::NONE, MemtagNote::ASYNC,
|
||||
MemtagNote::SYNC),
|
||||
testing::Bool()));
|
||||
testing::Bool()),
|
||||
[](const ::testing::TestParamInfo<MemtagNoteTest::ParamType>& info) {
|
||||
MemtagNote note = std::get<0>(info.param);
|
||||
std::string s = kNoteSuffix[static_cast<int>(note)];
|
||||
if (std::get<1>(info.param)) s += "_static";
|
||||
return s;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue