diff mbox series

[v5,3/3] validation: system: 0 is valid huge page size

Message ID 1536156008-9721-4-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v5,1/3] linux-gen: sysinfo: return 0 if hugepages are not supported | expand

Commit Message

Github ODP bot Sept. 5, 2018, 2 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


If system does not support huge pages, odp_sys_huge_page_size() will
return 0, which should not be rejected by test.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 693 (lumag:fix-cpu_max_hz)
 ** https://github.com/Linaro/odp/pull/693
 ** Patch: https://github.com/Linaro/odp/pull/693.patch
 ** Base sha: 0a5d67beda902557056d5b5146d8cbe86e5001b0
 ** Merge commit sha: a057d7593fa6375352a84ec9ce2c997b6581b790
 **/
 test/validation/api/system/system.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/validation/api/system/system.c b/test/validation/api/system/system.c
index 75fd26f31..f016a2ded 100644
--- a/test/validation/api/system/system.c
+++ b/test/validation/api/system/system.c
@@ -216,7 +216,11 @@  static void system_test_odp_sys_huge_page_size(void)
 	uint64_t page;
 
 	page = odp_sys_huge_page_size();
-	CU_ASSERT(0 < page);
+	if (page == 0)
+		/* Not an error, but just to be sure to hit logs */
+		LOG_ERR("Huge pages do not seem to be supported\n");
+	else
+		CU_ASSERT(page % ODP_PAGE_SIZE == 0);
 }
 
 static void system_test_odp_sys_huge_page_size_all(void)