From: Li Wang Date: Fri, 10 Nov 2017 16:07:20 +0800 Subject: [LTP] [PATCH v2 1/2] lib: fix kernel-bit detection on s390 platform Message-ID: <20171110080721.12355-1-liwang@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it 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 --- 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