Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTs [bmqp/mqbu/mqbs]: limit cycles number for memory sanitizer #342

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/groups/bmq/bmqp/bmqp_messageguidgenerator.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,13 @@ static void test3_multithreadUseIP()
// This test case times out on AIX if 'k_NUM_GUIDS' is close to 1 million
// (it's unable to complete in 90 seconds).
const int k_NUM_GUIDS = 500000; // 500k
#elif defined(__has_feature)
// Avoid timeout under MemorySanitizer
const int k_NUM_GUIDS = __has_feature(memory_sanitizer) ? 500000 // 500k
: 1000000; // 1M
#elif defined(__SANITIZE_MEMORY__)
// GCC-supported macros for checking MSAN
const int k_NUM_GUIDS = 500000; // 500k
#else
const int k_NUM_GUIDS = 1000000; // 1M
#endif
Expand Down Expand Up @@ -376,6 +383,13 @@ static void test4_multithreadUseHostname()
// This test case times out on AIX if 'k_NUM_GUIDS' is close to 1 million
// (it's unable to complete in 90 seconds).
const int k_NUM_GUIDS = 500000; // 500k
#elif defined(__has_feature)
// Avoid timeout under MemorySanitizer
const int k_NUM_GUIDS = __has_feature(memory_sanitizer) ? 500000 // 500k
: 1000000; // 1M
#elif defined(__SANITIZE_MEMORY__)
// GCC-supported macros for checking MSAN
const int k_NUM_GUIDS = 500000; // 500k
#else
const int k_NUM_GUIDS = 1000000; // 1M
#endif
Expand Down Expand Up @@ -550,6 +564,14 @@ static void test6_defaultHashUniqueness()

#ifdef BSLS_PLATFORM_OS_AIX
const bsls::Types::Int64 k_NUM_GUIDS = 1000000; // 1M
#elif defined(__has_feature)
// Avoid timeout under MemorySanitizer
const bsls::Types::Int64 k_NUM_GUIDS = __has_feature(memory_sanitizer)
? 1000000 // 1M
: 10000000; // 10M
#elif defined(__SANITIZE_MEMORY__)
// GCC-supported macros for checking MSAN
const bsls::Types::Int64 k_NUM_GUIDS = 1000000; // 1M
#else
const bsls::Types::Int64 k_NUM_GUIDS = 10000000; // 10M
#endif
Expand Down Expand Up @@ -632,6 +654,14 @@ static void test7_customHashUniqueness()

#ifdef BSLS_PLATFORM_OS_AIX
const bsls::Types::Int64 k_NUM_GUIDS = 1000000; // 1M
#elif defined(__has_feature)
// Avoid timeout under MemorySanitizer
const bsls::Types::Int64 k_NUM_GUIDS = __has_feature(memory_sanitizer)
? 1000000 // 1M
: 10000000; // 10M
#elif defined(__SANITIZE_MEMORY__)
// GCC-supported macros for checking MSAN
const bsls::Types::Int64 k_NUM_GUIDS = 1000000; // 1M
#else
const bsls::Types::Int64 k_NUM_GUIDS = 10000000; // 10M
#endif
Expand Down
16 changes: 16 additions & 0 deletions src/groups/mqb/mqbs/mqbs_datastore.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ static void test2_defaultHashUniqueness()

#ifdef BSLS_PLATFORM_OS_AIX
const bsls::Types::Int64 k_NUM_KEYS = 1000000; // 1M
#elif defined(__has_feature)
// Avoid timeout under MemorySanitizer
const bsls::Types::Int64 k_NUM_GUIDS = __has_feature(memory_sanitizer)
? 1000000 // 1M
: 10000000; // 10M
#elif defined(__SANITIZE_MEMORY__)
// GCC-supported macros for checking MSAN
const bsls::Types::Int64 k_NUM_GUIDS = 1000000; // 1M
#else
const bsls::Types::Int64 k_NUM_KEYS = 10000000; // 10M
#endif
Expand Down Expand Up @@ -213,6 +221,14 @@ static void test3_customHashUniqueness()

#ifdef BSLS_PLATFORM_OS_AIX
const bsls::Types::Int64 k_NUM_KEYS = 5000000; // 5M
#elif defined(__has_feature)
// Avoid timeout under MemorySanitizer
const bsls::Types::Int64 k_NUM_GUIDS = __has_feature(memory_sanitizer)
? 5000000 // 5M
: 10000000; // 10M
#elif defined(__SANITIZE_MEMORY__)
// GCC-supported macros for checking MSAN
const bsls::Types::Int64 k_NUM_GUIDS = 5000000; // 5M
#else
const bsls::Types::Int64 k_NUM_KEYS = 10000000; // 10M
#endif
Expand Down
23 changes: 23 additions & 0 deletions src/groups/mqb/mqbu/mqbu_messageguidutil.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ static void test2_multithread()
// This test case times out on AIX if 'k_NUM_GUIDS' is close to 1 million
// (it's unable to complete in 90 seconds).
const int k_NUM_GUIDS = 500000; // 500k
#elif defined(__has_feature)
// Avoid timeout under MemorySanitizer
const int k_NUM_GUIDS = __has_feature(memory_sanitizer) ? 500000 // 500k
: 1000000; // 1M
#elif defined(__SANITIZE_MEMORY__)
// GCC-supported macros for checking MSAN
const int k_NUM_GUIDS = 500000; // 500k
#else
const int k_NUM_GUIDS = 1000000; // 1M
#endif
Expand Down Expand Up @@ -313,6 +320,14 @@ static void test4_defaultHashUniqueness()

#ifdef BSLS_PLATFORM_OS_AIX
const bsls::Types::Int64 k_NUM_GUIDS = 1000000; // 1M
#elif defined(__has_feature)
// Avoid timeout under MemorySanitizer
const bsls::Types::Int64 k_NUM_GUIDS = __has_feature(memory_sanitizer)
? 1000000 // 1M
: 10000000; // 10M
#elif defined(__SANITIZE_MEMORY__)
// GCC-supported macros for checking MSAN
const bsls::Types::Int64 k_NUM_GUIDS = 1000000; // 1M
#else
const bsls::Types::Int64 k_NUM_GUIDS = 10000000; // 10M
#endif
Expand Down Expand Up @@ -393,6 +408,14 @@ static void test5_customHashUniqueness()

#ifdef BSLS_PLATFORM_OS_AIX
const bsls::Types::Int64 k_NUM_GUIDS = 1000000; // 1M
#elif defined(__has_feature)
// Avoid timeout under MemorySanitizer
const bsls::Types::Int64 k_NUM_GUIDS = __has_feature(memory_sanitizer)
? 1000000 // 1M
: 10000000; // 10M
#elif defined(__SANITIZE_MEMORY__)
// GCC-supported macros for checking MSAN
const bsls::Types::Int64 k_NUM_GUIDS = 1000000; // 1M
#else
const bsls::Types::Int64 k_NUM_GUIDS = 10000000; // 10M
#endif
Expand Down
Loading