aboutsummaryrefslogtreecommitdiff
path: root/test/validation/api/system/system.c
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2021-08-19 16:50:53 +0300
committerGitHub <noreply@github.com>2021-08-19 16:50:53 +0300
commit9aec81d8e15798d23c4a090c4cd6067976074866 (patch)
treed6be901f263355f3c2b624dd36b813b42add16bc /test/validation/api/system/system.c
parent6b6de8d7044d7a484b671a80768cf068f5b56814 (diff)
parentcf4d3329d4a9b53663ee27a904ee88f2cd3f50d8 (diff)
Merge ODP v1.31.0.0v1.31.0.0_DPDK_19.11
Merge ODP linux-generic v1.31.0.0 into ODP-DPDK.
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");