aboutsummaryrefslogtreecommitdiff
path: root/test/validation/api/system/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/validation/api/system/system.c')
-rw-r--r--test/validation/api/system/system.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/validation/api/system/system.c b/test/validation/api/system/system.c
index e511582dc..de49c3a5a 100644
--- a/test/validation/api/system/system.c
+++ b/test/validation/api/system/system.c
@@ -9,6 +9,7 @@
#include <odp/helper/odph_api.h>
#include "odp_cunit_common.h"
+#include "test_common_macros.h"
#define PERIODS_100_MSEC 160
#define RES_TRY_NUM 10
@@ -20,9 +21,6 @@
/* 10 usec wait time assumes >100kHz resolution on CPU cycles counter */
#define WAIT_TIME (10 * ODP_TIME_USEC_IN_NS)
-/* Check if value is power of two */
-#define IS_POW2(x) ((((x) - 1) & (x)) == 0)
-
static void test_version_api_str(void)
{
int char_ok = 0;
@@ -252,8 +250,8 @@ static void system_test_odp_sys_cache_line_size(void)
cache_size = odp_sys_cache_line_size();
CU_ASSERT(0 < cache_size);
CU_ASSERT(0 < ODP_CACHE_LINE_SIZE);
- CU_ASSERT(IS_POW2(cache_size));
- CU_ASSERT(IS_POW2(ODP_CACHE_LINE_SIZE));
+ CU_ASSERT(TEST_CHECK_POW2(cache_size));
+ CU_ASSERT(TEST_CHECK_POW2(ODP_CACHE_LINE_SIZE));
if (ODP_CACHE_LINE_SIZE != cache_size)
printf("WARNING: ODP_CACHE_LINE_SIZE and odp_sys_cache_line_size() not matching\n");