@@ -51,26 +51,27 @@ struct memspaceHostAllProviderTest : ::memspaceHostAllTest {
5151
5252TEST_F (numaNodesTest, memspaceGet) {
5353 umf_const_memspace_handle_t hMemspace = umfMemspaceHostAllGet ();
54- UT_ASSERTne (hMemspace, nullptr );
54+ ASSERT_NE (hMemspace, nullptr );
5555
5656 // Confirm that the HOST ALL memspace is composed of all available NUMA nodes.
57- UT_ASSERTeq (hMemspace->size , nodeIds.size ());
57+ ASSERT_EQ (hMemspace->size , nodeIds.size ());
5858 for (size_t i = 0 ; i < hMemspace->size ; i++) {
5959 // NUMA memory target internally casts the config directly into priv.
6060 // TODO: Use the memory target API when it becomes available.
6161 struct umf_numa_memtarget_config_t *numaTargetCfg =
6262 (struct umf_numa_memtarget_config_t *)hMemspace->nodes [i]->priv ;
63- UT_ASSERT (std::find (nodeIds.begin (), nodeIds.end (),
64- numaTargetCfg->physical_id ) != nodeIds.end ());
63+ ASSERT_NE (std::find (nodeIds.begin (), nodeIds.end (),
64+ numaTargetCfg->physical_id ),
65+ nodeIds.end ());
6566 }
6667}
6768
6869TEST_F (memspaceHostAllTest, providerFromHostAllMemspace) {
6970 umf_memory_provider_handle_t hProvider = nullptr ;
7071 umf_result_t ret =
7172 umfMemoryProviderCreateFromMemspace (hMemspace, nullptr , &hProvider);
72- UT_ASSERTeq (ret, UMF_RESULT_SUCCESS);
73- UT_ASSERTne (hProvider, nullptr );
73+ ASSERT_EQ (ret, UMF_RESULT_SUCCESS);
74+ ASSERT_NE (hProvider, nullptr );
7475
7576 umfMemoryProviderDestroy (hProvider);
7677}
@@ -81,13 +82,13 @@ TEST_F(memspaceHostAllProviderTest, allocFree) {
8182 size_t alignment = 0 ;
8283
8384 umf_result_t ret = umfMemoryProviderAlloc (hProvider, size, alignment, &ptr);
84- UT_ASSERTeq (ret, UMF_RESULT_SUCCESS);
85- UT_ASSERTne (ptr, nullptr );
85+ ASSERT_EQ (ret, UMF_RESULT_SUCCESS);
86+ ASSERT_NE (ptr, nullptr );
8687
8788 memset (ptr, 0xFF , size);
8889
8990 ret = umfMemoryProviderFree (hProvider, ptr, size);
90- UT_ASSERTeq (ret, UMF_RESULT_SUCCESS);
91+ ASSERT_EQ (ret, UMF_RESULT_SUCCESS);
9192}
9293
9394TEST_F (memspaceHostAllProviderTest, hostAllDefaults) {
@@ -96,7 +97,7 @@ TEST_F(memspaceHostAllProviderTest, hostAllDefaults) {
9697 // default kernel path (no mbind).
9798
9899 umf_const_memspace_handle_t hMemspace = umfMemspaceHostAllGet ();
99- UT_ASSERTne (hMemspace, nullptr );
100+ ASSERT_NE (hMemspace, nullptr );
100101
101102 umf_memory_provider_handle_t hProvider = nullptr ;
102103 umf_result_t ret = umfMemoryProviderCreateFromMemspace (
@@ -110,14 +111,14 @@ TEST_F(memspaceHostAllProviderTest, hostAllDefaults) {
110111 size_t alignment = 0 ;
111112
112113 ret = umfMemoryProviderAlloc (hProvider, size, alignment, &ptr1);
113- UT_ASSERTeq (ret, UMF_RESULT_SUCCESS);
114- UT_ASSERTne (ptr1, nullptr );
114+ ASSERT_EQ (ret, UMF_RESULT_SUCCESS);
115+ ASSERT_NE (ptr1, nullptr );
115116 memset (ptr1, 0xFF , size);
116117
117118 // Create single allocation using mmap
118119 void *ptr2 = mmap (nullptr , size, PROT_READ | PROT_WRITE,
119120 MAP_PRIVATE | MAP_ANONYMOUS, -1 , 0 );
120- UT_ASSERTne (ptr2, nullptr );
121+ ASSERT_NE (ptr2, nullptr );
121122 memset (ptr2, 0xFF , size);
122123
123124 // Compare UMF and kernel default allocation policy
@@ -127,28 +128,28 @@ TEST_F(memspaceHostAllProviderTest, hostAllDefaults) {
127128
128129 int ret2 = get_mempolicy (&memMode1, nodemask1->maskp , nodemask1->size , ptr1,
129130 MPOL_F_ADDR);
130- UT_ASSERTeq (ret2, 0 );
131+ ASSERT_EQ (ret2, 0 );
131132 ret2 = get_mempolicy (&memMode2, nodemask2->maskp , nodemask2->size , ptr2,
132133 MPOL_F_ADDR);
133- UT_ASSERTeq (ret2, 0 );
134- UT_ASSERTeq (memMode1, memMode2);
135- UT_ASSERTeq (nodemask1->size , nodemask2->size );
136- UT_ASSERTeq (numa_bitmask_equal (nodemask1, nodemask2), 1 );
134+ ASSERT_EQ (ret2, 0 );
135+ ASSERT_EQ (memMode1, memMode2);
136+ ASSERT_EQ (nodemask1->size , nodemask2->size );
137+ ASSERT_EQ (numa_bitmask_equal (nodemask1, nodemask2), 1 );
137138
138139 int nodeId1 = -1 , nodeId2 = -1 ;
139140 ret2 = get_mempolicy (&nodeId1, nullptr , 0 , ptr1, MPOL_F_ADDR | MPOL_F_NODE);
140- UT_ASSERTeq (ret2, 0 );
141+ ASSERT_EQ (ret2, 0 );
141142 ret2 = get_mempolicy (&nodeId2, nullptr , 0 , ptr2, MPOL_F_ADDR | MPOL_F_NODE);
142- UT_ASSERTeq (ret2, 0 );
143- UT_ASSERTeq (nodeId1, nodeId2);
143+ ASSERT_EQ (ret2, 0 );
144+ ASSERT_EQ (nodeId1, nodeId2);
144145
145146 numa_free_nodemask (nodemask2);
146147 numa_free_nodemask (nodemask1);
147148
148149 ret2 = munmap (ptr2, size);
149- UT_ASSERTeq (ret2, 0 );
150+ ASSERT_EQ (ret2, 0 );
150151
151152 ret = umfMemoryProviderFree (hProvider, ptr1, size);
152- UT_ASSERTeq (ret, UMF_RESULT_SUCCESS);
153+ ASSERT_EQ (ret, UMF_RESULT_SUCCESS);
153154 umfMemoryProviderDestroy (hProvider);
154155}
0 commit comments