diff --git a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java index 647ee7b1a7e31..9dd4f27b1bb8e 100644 --- a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java +++ b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java @@ -28,7 +28,7 @@ * that support it, tests using /tmp directory. * @library ../.. /test/lib /java/foreign * @build jdk.test.lib.Platform NativeTestHelper - * @run main/othervm --enable-native-access=ALL-UNNAMED CreationTime + * @run main/othervm/native --enable-native-access=ALL-UNNAMED CreationTime */ /* @test id=cwd @@ -37,7 +37,7 @@ * scratch directory maybe at diff disk partition to /tmp on linux. * @library ../.. /test/lib /java/foreign * @build jdk.test.lib.Platform NativeTestHelper - * @run main/othervm --enable-native-access=ALL-UNNAMED CreationTime . + * @run main/othervm/native --enable-native-access=ALL-UNNAMED CreationTime . */ import java.lang.foreign.Linker; diff --git a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/libCreationTimeHelper.c b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/libCreationTimeHelper.c index e08fe00facec0..6cb20602a170a 100644 --- a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/libCreationTimeHelper.c +++ b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/libCreationTimeHelper.c @@ -86,9 +86,8 @@ static statx_func* my_statx_func = NULL; // static boolean linuxIsCreationTimeSupported(char* file) EXPORT bool linuxIsCreationTimeSupported(char* file) { #if defined(__linux__) - struct my_statx stx; + struct my_statx stx = {0}; int ret, atflag = AT_SYMLINK_NOFOLLOW; - memset(&stx, 0xbf, sizeof(stx)); unsigned int mask = STATX_BASIC_STATS | STATX_BTIME; my_statx_func = (statx_func*) dlsym(RTLD_DEFAULT, "statx");