Hi all,
LTP failed with mmap into high region on s390x:
hugemmap03 0 TINFO : set nr_hugepages to 64
hugemmap03 1 TFAIL : mmap into high region succeeded unexpectedly
hugemmap03 0 TINFO : set nr_hugepages to 0
hugemmap03 0 TWARN : tst_rmdir: rmobj(/tmp/hugOr8owE) failed:
remove(/tmp/hugOr8owE) failed; errno=16: Device or resource busy
According to the test case, the failing code is:
103 /* Attempt to mmap into highmem addr, should get ENOMEM */
104 addr = mmap(HIGH_ADDR, map_sz, PROT_READ,
105 MAP_SHARED | MAP_FIXED, fildes, 0);
106 if (addr != MAP_FAILED) {
107 tst_resm(TFAIL, "mmap into high region "
108 "succeeded unexpectedly");
109 goto fail;
110 }
with HIGH_ADDR defined as:
#define HIGH_ADDR (void *)(0x1000000000000)
This is an 2^48 address... which is likely the maximum for amd64. On
s390x, the address space is up to 2^53. So the mmap() in the test case
succeeds which is not expected.
---------------------------------------------
after increase the HIGH_ADDR value, test PASS.
[root@ibm-z10-38 hugemmap]# cat hugemmap03.c |grep HIGH
#define HIGH_ADDR (void *)(0x100000000000000) <----increase the value
addr = mmap(HIGH_ADDR, map_sz, PROT_READ,
[root@ibm-z10-38 hugemmap]# ./hugemmap03 -s 1024
hugemmap03 0 TINFO : set nr_hugepages to 1024
hugemmap03 1 TPASS : mmap into high region failed as expected:
errno=ENOMEM(12): Cannot allocate memory
hugemmap03 0 TINFO : set nr_hugepages to 0
--
Regards,
Li Wang
Email: [email protected]
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list