Skip to content

Commit bc608e5

Browse files
Going to remove comments
1 parent bcd7cf6 commit bc608e5

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

test/common/test_helpers.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,19 @@ static inline bool UT_LOG_ERR(const char *format, ...) {
5858
// Formatting is intended to resemble GTEST assertions outputs
5959
#define GTEST_OUT_EQ(lhs, rhs) \
6060
((bool)(((lhs) == (rhs)) || \
61-
(UT_LOG_ERR("%s:%d %s - assertion failure\nExpected: %s == %s, actual: (0x%llx) vs (0x%llx)" \
61+
UT_LOG_ERR("%s:%d %s - assertion failure\nExpected: %s == %s, actual: (0x%llx) vs (0x%llx)" \
6262
, \
6363
__FILE__, __LINE__, __func__, #lhs, \
6464
#rhs, (unsigned long long)(lhs), \
65-
(unsigned long long)(rhs)), \
66-
0)))
65+
(unsigned long long)(rhs))))
6766

6867
#define GTEST_OUT_NE(lhs, rhs) \
6968
((bool)(((lhs) != (rhs)) || \
70-
(UT_LOG_ERR("%s:%d %s - assertion failure\nExpected: %s != %s, actual: (0x%llx) vs (0x%llx)" \
69+
UT_LOG_ERR("%s:%d %s - assertion failure\nExpected: %s != %s, actual: (0x%llx) vs (0x%llx)" \
7170
, \
7271
__FILE__, __LINE__, __func__, #lhs, \
7372
#rhs, (unsigned long long)(lhs), \
74-
(unsigned long long)(rhs)), \
75-
0)))
73+
(unsigned long long)(rhs))))
7674

7775
// Assert a condition is true at runtime
7876
#define UT_ASSERT(cnd) \

test/memspaces/memspace_highest_bandwidth.cpp

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,21 @@
1212
static bool canQueryBandwidth(size_t nodeId) {
1313
hwloc_topology_t topology = nullptr;
1414
int ret = hwloc_topology_init(&topology);
15-
UT_ASSERTeq(ret, 0);
15+
// UT_ASSERTeq(ret, 0);
16+
if (!GTEST_OUT_EQ(ret, 0)){
17+
return false;
18+
}
1619
ret = hwloc_topology_load(topology);
17-
UT_ASSERTeq(ret, 0);
18-
20+
// UT_ASSERTeq(ret, 0);
21+
if (!GTEST_OUT_EQ(ret, 0)) {
22+
return false;
23+
}
1924
hwloc_obj_t numaNode =
2025
hwloc_get_obj_by_type(topology, HWLOC_OBJ_NUMANODE, nodeId);
21-
UT_ASSERTne(numaNode, nullptr);
26+
// UT_ASSERTne(numaNode, nullptr);
27+
if (!GTEST_OUT_NE(numaNode, nullptr)){
28+
return false;
29+
}
2230

2331
// Setup initiator structure.
2432
struct hwloc_location initiator;
@@ -30,7 +38,14 @@ static bool canQueryBandwidth(size_t nodeId) {
3038
numaNode, &initiator, 0, &value);
3139

3240
hwloc_topology_destroy(topology);
33-
return (ret == 0);
41+
42+
if (!GTEST_OUT_EQ(ret, 0)) {
43+
return false;
44+
}
45+
else {
46+
return true;
47+
}
48+
//return (ret == 0);
3449
}
3550

3651
INSTANTIATE_TEST_SUITE_P(memspaceLowestLatencyTest, memspaceGetTest,

0 commit comments

Comments
 (0)