diff --git a/compiler-rt/test/msan/Linux/dn_expand.cpp b/compiler-rt/test/msan/Linux/dn_expand.cpp --- a/compiler-rt/test/msan/Linux/dn_expand.cpp +++ b/compiler-rt/test/msan/Linux/dn_expand.cpp @@ -12,17 +12,15 @@ char unsigned input[INPUT_LEN]; char output[1024]; - dn_expand(input, input + sizeof(input), input + 23, output, - sizeof(output)); + dn_expand(input, input + sizeof(input), input + 23, output, sizeof(output)); // READ: Uninitialized bytes in __interceptor___dn_expand } void testWrite() { - char unsigned input[] = { - 0xff, 0xc5, 0xf7, 0xff, 0x00, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x10, 0x01, 0x05, 0x00, 0x01, 0x0a, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00 - }; + char unsigned input[] = {0xff, 0xc5, 0xf7, 0xff, 0x00, 0x00, 0xff, 0x0a, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, + 0x10, 0x01, 0x05, 0x00, 0x01, 0x0a, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00}; char output[1024]; int res = dn_expand(input, input + sizeof(input), input + 23, output, @@ -46,8 +44,8 @@ __msan_check_mem_is_initialized(output, res); } -int main(int iArgc, const char* szArgv[]) { - const char* test = nullptr; +int main(int iArgc, const char *szArgv[]) { + const char *test = nullptr; if (iArgc > 1) { test = szArgv[1]; } diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/dn_expand.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/dn_expand.cpp --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/dn_expand.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/dn_expand.cpp @@ -6,24 +6,11 @@ #include -#ifdef kda_COMMENTED_OUT -void testRead() { - const int INPUT_LEN = 24; - char unsigned input[INPUT_LEN]; - char output[1024]; - - dn_expand(input, input + sizeof(input), input + 23, output, - sizeof(output)); - // READ: Uninitialized bytes in __interceptor___dn_expand -} -#endif /* kda_COMMENTED_OUT */ - void testWrite() { - char unsigned input[] = { - 0xff, 0xc5, 0xf7, 0xff, 0x00, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x10, 0x01, 0x05, 0x00, 0x01, 0x0a, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00 - }; + char unsigned input[] = {0xff, 0xc5, 0xf7, 0xff, 0x00, 0x00, 0xff, 0x0a, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, + 0x10, 0x01, 0x05, 0x00, 0x01, 0x0a, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x00}; char output[1024]; int res = dn_expand(input, input + sizeof(input), input + 23, output, @@ -47,24 +34,9 @@ assert(strcmp(output, "") == 0); } -int main(int iArgc, const char* szArgv[]) { -#ifdef kda_COMMENTED_OUT - const char* test = nullptr; - if (iArgc > 1) { - test = szArgv[1]; - } -#endif /* kda_COMMENTED_OUT */ - -#ifdef kda_COMMENTED_OUT - if (test == nullptr) { -#endif /* kda_COMMENTED_OUT */ - testWrite(); - testWriteZeroLength(); -#ifdef kda_COMMENTED_OUT - } else if (strcmp(test, "READ") == 0) { - testRead(); - } -#endif /* kda_COMMENTED_OUT */ +int main(int iArgc, const char *szArgv[]) { + testWrite(); + testWriteZeroLength(); return 0; }