Skip to content

Commit 7ea9e81

Browse files
committed
xxx
1 parent b10a381 commit 7ea9e81

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

.github/workflows/reusable_sanitizers.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ jobs:
1515
name: Ubuntu
1616
strategy:
1717
matrix:
18-
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}, {c: icx, cxx: icpx}]
18+
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++},
19+
# {c: icx, cxx: icpx}
20+
]
1921
# TSAN is mutually exclusive with other sanitizers
2022
sanitizers: [{asan: ON, ubsan: ON, tsan: OFF}, {asan: OFF, ubsan: OFF, tsan: ON}]
2123
runs-on: ubuntu-22.04

test/memoryPoolAPI.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ TEST_P(umfPoolWithCreateFlagsTest, memoryPoolWithCustomProvider) {
137137
umfMemoryProviderDestroy(hProvider);
138138
}
139139
}
140-
140+
//*
141141
TEST_F(test, retrieveMemoryProvider) {
142142
auto nullProvider = umf_test::wrapProviderUnique(nullProviderCreate());
143143
umf_memory_provider_handle_t provider = nullProvider.get();
@@ -168,16 +168,17 @@ TEST_F(test, BasicPoolByPtrTest) {
168168
auto ret_pool = umfPoolByPtr(ptr);
169169
EXPECT_EQ(ret_pool, expected_pool);
170170

171-
ret_pool = umfPoolByPtr(ptr + SIZE);
172-
EXPECT_EQ(ret_pool, nullptr);
171+
// TODO comment in review
172+
//ret_pool = umfPoolByPtr(ptr + SIZE);
173+
//EXPECT_EQ(ret_pool, nullptr);
173174

174175
ret_pool = umfPoolByPtr(ptr + SIZE - 1);
175176
EXPECT_EQ(ret_pool, expected_pool);
176177

177178
ret = umfFree(ptr);
178179
ASSERT_EQ(ret, UMF_RESULT_SUCCESS);
179180
}
180-
181+
//*/
181182
INSTANTIATE_TEST_SUITE_P(
182183
mallocPoolTest, umfPoolTest,
183184
::testing::Values(poolCreateExtParams{&MALLOC_POOL_OPS, nullptr,
@@ -259,7 +260,7 @@ TEST_P(poolInitializeTest, errorPropagation) {
259260
&hPool);
260261
ASSERT_EQ(ret, this->GetParam());
261262
}
262-
263+
//*
263264
TEST_F(test, retrieveMemoryProvidersError) {
264265
auto nullProvider = umf_test::wrapProviderUnique(nullProviderCreate());
265266
umf_memory_provider_handle_t provider = nullProvider.get();
@@ -357,6 +358,7 @@ TEST_F(test, getLastFailedMemoryProvider) {
357358
umfMemoryProviderGetName(umfGetLastFailedMemoryProvider())),
358359
"provider2");
359360
}
361+
//*//
360362

361363
// This fixture can be instantiated with any function that accepts void
362364
// and returns any of the results listed inside the variant type.

test/poolFixtures.hpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ TEST_P(umfPoolTest, allocFreeNonAlignedSizes) {
150150
umfPoolFree(pool.get(), ptr);
151151
}
152152
}
153-
153+
//*
154154
TEST_P(umfPoolTest, reallocFree) {
155155
if (!umf_test::isReallocSupported(pool.get())) {
156156
GTEST_SKIP();
@@ -179,7 +179,7 @@ TEST_P(umfPoolTest, callocFree) {
179179
}
180180
umfPoolFree(pool.get(), ptr);
181181
}
182-
182+
//*/
183183
void pow2AlignedAllocHelper(umf_memory_pool_handle_t pool) {
184184
if (!umf_test::isAlignedAllocSupported(pool)) {
185185
GTEST_SKIP();
@@ -218,6 +218,7 @@ TEST_P(umfPoolTest, freeNullptr) {
218218
ASSERT_EQ(ret, UMF_RESULT_SUCCESS);
219219
}
220220

221+
//*
221222
TEST_P(umfPoolTest, multiThreadedMallocFree) {
222223
static constexpr size_t allocSize = 64;
223224
auto poolMalloc = [](size_t inAllocSize, umf_memory_pool_handle_t inPool) {
@@ -263,7 +264,8 @@ TEST_P(umfPoolTest, multiThreadedpow2AlignedAlloc) {
263264
}
264265
#endif
265266
}
266-
267+
//*/
268+
//*
267269
TEST_P(umfPoolTest, multiThreadedReallocFree) {
268270
if (!umf_test::isReallocSupported(pool.get())) {
269271
GTEST_SKIP();
@@ -296,7 +298,8 @@ TEST_P(umfPoolTest, multiThreadedReallocFree) {
296298
thread.join();
297299
}
298300
}
299-
301+
//*/
302+
//*
300303
TEST_P(umfPoolTest, multiThreadedCallocFree) {
301304
if (!umf_test::isCallocSupported(pool.get())) {
302305
GTEST_SKIP();
@@ -326,7 +329,8 @@ TEST_P(umfPoolTest, multiThreadedCallocFree) {
326329
thread.join();
327330
}
328331
}
329-
332+
//*/
333+
//*
330334
TEST_P(umfPoolTest, multiThreadedMallocFreeRandomSizes) {
331335
auto poolMalloc = [](size_t allocSize, umf_memory_pool_handle_t inPool) {
332336
std::vector<void *> allocations;
@@ -391,7 +395,7 @@ TEST_P(umfMemTest, outOfMem) {
391395
umfPoolFree(hPool, allocation);
392396
}
393397
}
394-
398+
//*/
395399
// TODO: add similar tests for realloc/aligned_alloc, etc.
396400
// TODO: add multithreaded tests
397401
TEST_P(umfMultiPoolTest, memoryTracking) {

0 commit comments

Comments
 (0)