diff mbox

[ndctl] ndctl, hugetlb: skip, don't fail

Message ID 151824022366.4967.8494321995118743101.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Accepted
Commit 8834f8887180
Headers show

Commit Message

Dan Williams Feb. 10, 2018, 5:23 a.m. UTC
The hugetlb test has x86 assumptions. Skip instead of fail to enable
package build environments that run the unit tests.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 test/hugetlb.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/test/hugetlb.c b/test/hugetlb.c
index a08a93ad40f3..11b7a3d25bb2 100644
--- a/test/hugetlb.c
+++ b/test/hugetlb.c
@@ -13,12 +13,10 @@  static int test_hugetlb(void)
 	for (i = 0; i < (int) ARRAY_SIZE(aligns); i++) {
 		fprintf(stderr, "%s: page_size: %#lx\n", __func__, aligns[i]);
 		rc = test_dax_directio(-1, aligns[i], NULL, 0);
-		if (rc == -ENOMEM || rc == -EACCES)
-			return 77;
-		else if (rc == -ENOENT && aligns[i] == SZ_1G)
+		if (rc == -ENOENT && aligns[i] == SZ_1G)
 			continue; /* system not configured for 1G pages */
 		else if (rc)
-			return rc;
+			return 77;
 	}
 	return 0;
 }