Skip to content

Commit 3985551

Browse files
committed
Remove ZERO_INITIALIZE flag from USM pool fixture, PoolCreate Success test
Instead this is now a separate case in USMPoolCreate Also zero initialize pools in pool fixture
1 parent 140fb05 commit 3985551

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

test/conformance/testing/include/uur/fixtures.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ struct urUSMPoolTest : urContextTest {
634634
void SetUp() override {
635635
UUR_RETURN_ON_FATAL_FAILURE(urContextTest::SetUp());
636636
ur_usm_pool_desc_t pool_desc{UR_STRUCTURE_TYPE_USM_POOL_DESC, nullptr,
637-
UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK};
637+
0};
638638
ASSERT_SUCCESS(urUSMPoolCreate(this->context, &pool_desc, &pool));
639639
}
640640

@@ -645,14 +645,14 @@ struct urUSMPoolTest : urContextTest {
645645
UUR_RETURN_ON_FATAL_FAILURE(urContextTest::TearDown());
646646
}
647647

648-
ur_usm_pool_handle_t pool;
648+
ur_usm_pool_handle_t pool = nullptr;
649649
};
650650

651651
template <class T> struct urUSMPoolTestWithParam : urContextTestWithParam<T> {
652652
void SetUp() override {
653653
UUR_RETURN_ON_FATAL_FAILURE(urContextTestWithParam<T>::SetUp());
654654
ur_usm_pool_desc_t pool_desc{UR_STRUCTURE_TYPE_USM_POOL_DESC, nullptr,
655-
UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK};
655+
0};
656656
ASSERT_SUCCESS(urUSMPoolCreate(this->context, &pool_desc, &pool));
657657
}
658658

@@ -663,7 +663,7 @@ template <class T> struct urUSMPoolTestWithParam : urContextTestWithParam<T> {
663663
UUR_RETURN_ON_FATAL_FAILURE(urContextTestWithParam<T>::TearDown());
664664
}
665665

666-
ur_usm_pool_handle_t pool;
666+
ur_usm_pool_handle_t pool = nullptr;
667667
};
668668

669669
struct urVirtualMemGranularityTest : urContextTest {

test/conformance/usm/urUSMPoolCreate.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ using urUSMPoolCreateTest = uur::urContextTest;
99
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urUSMPoolCreateTest);
1010

1111
TEST_P(urUSMPoolCreateTest, Success) {
12+
ur_usm_pool_desc_t pool_desc{UR_STRUCTURE_TYPE_USM_POOL_DESC, nullptr, 0};
13+
ur_usm_pool_handle_t pool = nullptr;
14+
ASSERT_SUCCESS(urUSMPoolCreate(context, &pool_desc, &pool));
15+
ASSERT_NE(pool, nullptr);
16+
EXPECT_SUCCESS(urUSMPoolRelease(pool));
17+
}
18+
19+
TEST_P(urUSMPoolCreateTest, SuccessWithFlag) {
1220
ur_usm_pool_desc_t pool_desc{UR_STRUCTURE_TYPE_USM_POOL_DESC, nullptr,
1321
UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK};
1422
ur_usm_pool_handle_t pool = nullptr;

0 commit comments

Comments
 (0)