On 07/08/2019 14:32, Dmitry Chuyko wrote: > The test fails on some machines but does not fail on others, all 4.x > kernels. The possible problem may be when build host and run host are > different machines. This seems to be related to map0() implementation in > FileChannelImpl.c in case MAP_SYNC and MAP_SHARED_VALIDATE are not > defined (or defined).
Ah yes, I see what is goign on now. It makes sense that you are seeing IOException: "Invalid argument" when passing MAP_SYNC to mmap on a Linux kernel that does not support those flags. Whereas on a Linux kernel which does support those flags you would expect to see the result i got IOException: "Operation not supported". That's because mmap with MAP_SYNC is not an appropriate operation to request on a non-DAX file. n.b. these messages come out of the relevant errno value. The AArch64 code produces an UnsupportedOperationException because the map with MAP_SYNC is being rejected in the Java code. That happens because I am running on an ARMV8.1 processor which does not support cache writeback to memory (ARMv8.2 chips are not yet generally available). The same applies for i386. It produces UnsupportedOperationException because the map with MAP_SYNC is being rejected in the Java code. The test needs tweaking to remedy this bad result and explain better the expected results. I don't think there is actually any great merit checking for a specific error message in the IOException so I will remove that check. The test should always expect IOException from x86, always expect UnsupportedOperationException from i386 and allow for either from AArch64. I have folded those fixes into the next version. > I also recommend to print original ioe stacktrace in the test. Adding > such gives us useful information like this: I have already done this too :-) regards, Andrew Dinn ----------- Senior Principal Software Engineer Red Hat UK Ltd Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander