@@ -98,19 +98,22 @@ static const ChannelWatermarkType::Enum WAT_HIGH =
98
98
static const ChannelWatermarkType::Enum WAT_LOW =
99
99
ChannelWatermarkType::e_LOW_WATERMARK;
100
100
101
+ // Adjust attempt interval depending on the platform
101
102
#ifdef BSLS_PLATFORM_OS_SOLARIS
102
- static const bool skipTest = true ;
103
+ static const int k_ATTEMPT_INTERVAL_MS = 300 ;
103
104
#elif defined( \
104
105
__has_feature) // Clang-supported method for checking sanitizers.
105
- static const bool skipTest = __has_feature(memory_sanitizer) ||
106
- __has_feature (thread_sanitizer) ||
107
- __has_feature(undefined_behavior_sanitizer);
106
+ static const int k_ATTEMPT_INTERVAL_MS =
107
+ (__has_feature(memory_sanitizer) || __has_feature(thread_sanitizer) ||
108
+ __has_feature (undefined_behavior_sanitizer))
109
+ ? 400
110
+ : 1;
108
111
#elif defined(__SANITIZE_MEMORY__) || defined(__SANITIZE_THREAD__) || \
109
112
defined (__SANITIZE_UNDEFINED__)
110
113
// GCC-supported macros for checking MSAN, TSAN and UBSAN.
111
- static const bool skipTest = true ;
114
+ static const int k_ATTEMPT_INTERVAL_MS = 400 ;
112
115
#else
113
- static const bool skipTest = false ; // Default to running the test.
116
+ static const int k_ATTEMPT_INTERVAL_MS = 1 ;
114
117
#endif
115
118
116
119
// ========================
@@ -658,10 +661,9 @@ void Tester::connect(int line,
658
661
659
662
ConnectOptions reqOptions (options, s_allocator_p);
660
663
661
- reqOptions.setAttemptInterval (
662
- bsls::TimeInterval (0 , 10 * bdlt::TimeUnitRatio::k_NS_PER_MS));
663
-
664
- reqOptions.setAttemptInterval (bsls::TimeInterval (0 , 1 ));
664
+ reqOptions.setAttemptInterval (bsls::TimeInterval (
665
+ 0 ,
666
+ k_ATTEMPT_INTERVAL_MS * bdlt::TimeUnitRatio::k_NS_PER_MS));
665
667
666
668
HandleMap::iterator serverIter = d_handleMap.find (endpointOrServer);
667
669
if (serverIter != d_handleMap.end ()) {
@@ -1055,22 +1057,6 @@ static void test6_preCreationCbTest()
1055
1057
{
1056
1058
mwctst::TestHelper::printTestName (" Pre Creation Cb Test" );
1057
1059
1058
- if (skipTest) {
1059
- // This test has been disabled for Solaris/MSan/TSan/UBSan build. This
1060
- // test relies on the timings of certain callbacks being fired before
1061
- // or after certain operations. Normally this timing is always
1062
- // observed, but in msan/tsan/ubsan enabled build, the timing gets
1063
- // changed, leading to test failure. Of course, the right fix is to
1064
- // not rely on these timings, which can be worked on if the test starts
1065
- // failing in non-instrumented builds. Additionally, we could try to
1066
- // enable this test in MSan/TSan/UBSan build once all MSan/TSan/UBSan
1067
- // reports have been fixed to see if that helps (see `msansup.txt`,
1068
- // `tsansup.txt` and `ubsansup.txt`).
1069
- bsl::cout << " Test skipped (running on Solaris or under sanitizer)"
1070
- << bsl::endl;
1071
- return ; // RETURN
1072
- }
1073
-
1074
1060
Tester t (s_allocator_p);
1075
1061
1076
1062
// Concern 'a'
@@ -1106,22 +1092,6 @@ static void test5_visitChannelsTest()
1106
1092
{
1107
1093
mwctst::TestHelper::printTestName (" Cancel Handle Test" );
1108
1094
1109
- if (skipTest) {
1110
- // This test has been disabled for Solaris/MSan/TSan/UBSan build. This
1111
- // test relies on the timings of certain callbacks being fired before
1112
- // or after certain operations. Normally this timing is always
1113
- // observed, but in msan/tsan/ubsan enabled build, the timing gets
1114
- // changed, leading to test failure. Of course, the right fix is to
1115
- // not rely on these timings, which can be worked on if the test starts
1116
- // failing in non-instrumented builds. Additionally, we could try to
1117
- // enable this test in MSan/TSan/UBSan build once all MSan/TSan/UBSan
1118
- // reports have been fixed to see if that helps (see `msansup.txt`,
1119
- // `tsansup.txt` and `ubsansup.txt`).
1120
- bsl::cout << " Test skipped (running on Solaris or under sanitizer)"
1121
- << bsl::endl;
1122
- return ; // RETURN
1123
- }
1124
-
1125
1095
Tester t (s_allocator_p);
1126
1096
1127
1097
// Concerns 'a'
@@ -1162,22 +1132,6 @@ static void test4_cancelHandleTest()
1162
1132
{
1163
1133
mwctst::TestHelper::printTestName (" Cancel Handle Test" );
1164
1134
1165
- if (skipTest) {
1166
- // This test has been disabled for Solaris/MSan/TSan/UBSan build. This
1167
- // test relies on the timings of certain callbacks being fired before
1168
- // or after certain operations. Normally this timing is always
1169
- // observed, but in msan/tsan/ubsan enabled build, the timing gets
1170
- // changed, leading to test failure. Of course, the right fix is to
1171
- // not rely on these timings, which can be worked on if the test starts
1172
- // failing in non-instrumented builds. Additionally, we could try to
1173
- // enable this test in MSan/TSan/UBSan build once all MSan/TSan/UBSan
1174
- // reports have been fixed to see if that helps (see `msansup.txt`,
1175
- // `tsansup.txt` and `ubsansup.txt`).
1176
- bsl::cout << " Test skipped (running on Solaris or under sanitizer)"
1177
- << bsl::endl;
1178
- return ; // RETURN
1179
- }
1180
-
1181
1135
Tester t (s_allocator_p);
1182
1136
1183
1137
// Concerns 'a'
@@ -1232,22 +1186,6 @@ static void test3_watermarkTest()
1232
1186
{
1233
1187
mwctst::TestHelper::printTestName (" Watermark Test" );
1234
1188
1235
- if (skipTest) {
1236
- // This test has been disabled for Solaris/MSan/TSan/UBSan build. This
1237
- // test relies on the timings of certain callbacks being fired before
1238
- // or after certain operations. Normally this timing is always
1239
- // observed, but in msan/tsan/ubsan enabled build, the timing gets
1240
- // changed, leading to test failure. Of course, the right fix is to
1241
- // not rely on these timings, which can be worked on if the test starts
1242
- // failing in non-instrumented builds. Additionally, we could try to
1243
- // enable this test in MSan/TSan/UBSan build once all MSan/TSan/UBSan
1244
- // reports have been fixed to see if that helps (see `msansup.txt`,
1245
- // `tsansup.txt` and `ubsansup.txt`).
1246
- bsl::cout << " Test skipped (running on Solaris or under sanitizer)"
1247
- << bsl::endl;
1248
- return ; // RETURN
1249
- }
1250
-
1251
1189
Tester t (s_allocator_p);
1252
1190
1253
1191
// Concern 'a'
@@ -1337,22 +1275,6 @@ static void test1_breathingTest()
1337
1275
{
1338
1276
mwctst::TestHelper::printTestName (" Breathing Test" );
1339
1277
1340
- if (skipTest) {
1341
- // This test has been disabled for Solaris/MSan/TSan/UBSan build. This
1342
- // test relies on the timings of certain callbacks being fired before
1343
- // or after certain operations. Normally this timing is always
1344
- // observed, but in msan/tsan/ubsan enabled build, the timing gets
1345
- // changed, leading to test failure. Of course, the right fix is to
1346
- // not rely on these timings, which can be worked on if the test starts
1347
- // failing in non-instrumented builds. Additionally, we could try to
1348
- // enable this test in MSan/TSan/UBSan build once all MSan/TSan/UBSan
1349
- // reports have been fixed to see if that helps (see `msansup.txt`,
1350
- // `tsansup.txt` and `ubsansup.txt`).
1351
- bsl::cout << " Test skipped (running on Solaris or under sanitizer)"
1352
- << bsl::endl;
1353
- return ; // RETURN
1354
- }
1355
-
1356
1278
Tester t (s_allocator_p);
1357
1279
t.init (L_);
1358
1280
0 commit comments