[LTP] [PATCH] max_map_count: fix a mistake and support it for aarch64_be

Cui Bixuan cuibixuan@huawei.com
Fri Dec 16 09:25:52 CET 2016


There is a mistake for if (strcmp()) for skipping in aarch64.
And there is the same error in aarch64be, so add it.

Signed-off-by: Cui Bixuan <cuibixuan@huawei.com>
---
 testcases/kernel/mem/tunable/max_map_count.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/mem/tunable/max_map_count.c b/testcases/kernel/mem/tunable/max_map_count.c
index eb7486f..ca322da 100644
--- a/testcases/kernel/mem/tunable/max_map_count.c
+++ b/testcases/kernel/mem/tunable/max_map_count.c
@@ -139,7 +139,7 @@ static bool filter_map(const char *line)
 		return true;
 #elif defined(__arm__)
 	/* Skip it when run it in aarch64 */
-	if (strcmp(un.machine, "aarch64"))
+	if ((!strcmp(un.machine, "aarch64")) || (!strcmp(un.machine, "aarch64_be")))
 		return false;

 	/* Older arm kernels didn't label their vdso maps */
-- 
2.6.2


More information about the ltp mailing list