diff --git a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTimeHelper.java b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTimeHelper.java index 186ec865620a3..2236ea0ac58e3 100644 --- a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTimeHelper.java +++ b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTimeHelper.java @@ -44,6 +44,8 @@ public class CreationTimeHelper extends NativeTestHelper { // Helper so as to determine 'statx' support on the runtime system // static boolean linuxIsCreationTimeSupported(String file); static boolean linuxIsCreationTimeSupported(String file) throws Throwable { + if (!abi.defaultLookup().find("statx").isPresent()) + return false; try (var arena = Arena.ofConfined()) { MemorySegment s = arena.allocateFrom(file); return (boolean)methodHandle.invokeExact(s);