[LTP] [PATCH v2 1/2] lib: fix kernel-bit detection on s390 platform
Li Wang
liwang@redhat.com
Fri Nov 10 09:07:20 CET 2017
This correction also fix the mmapstress03 issues on the latest kernel:
mmapstress03: errno = 25: really large mmap didn't fail
mmapstress03 0 TINFO : uname.machine=s390x kernel is 32bit
mmapstress03 1 TFAIL : mmapstress03.c:212: Test failed
Signed-off-by: Li Wang <liwang@redhat.com>
---
lib/tst_kernel.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/tst_kernel.c b/lib/tst_kernel.c
index fd648b1..42d64cb 100644
--- a/lib/tst_kernel.c
+++ b/lib/tst_kernel.c
@@ -34,8 +34,10 @@ int tst_kernel_bits(void)
/*
* ARM64 (aarch64) defines 32-bit compatibility modes as
* armv8l and armv8b (little and big endian).
+ * s390x is 64bit but not contain 64 in the words.
*/
- if (!strcmp(buf.machine, "armv8l") || !strcmp(buf.machine, "armv8b"))
+ if (!strcmp(buf.machine, "armv8l") || !strcmp(buf.machine, "armv8b")
+ || !strcmp(buf.machine, "s390x"))
kernel_bits = 64;
tst_resm(TINFO, "uname.machine=%s kernel is %ibit",
--
2.9.3
More information about the ltp
mailing list