Commit 7ddabbf 1 parent 3c27f91 commit 7ddabbf Copy full SHA for 7ddabbf
File tree 1 file changed +7
-3
lines changed
test/hotspot/jtreg/runtime/jni/FindClassUtf8
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
25
25
* @bug 8166358
26
26
* @summary verify that -Xcheck:jni finds a bad utf8 name for class name.
27
27
* @library /test/lib
28
- * @run main/native/othervm FindClassUtf8 test
28
+ * @run main/native FindClassUtf8 test
29
29
*/
30
30
31
+ import jdk .test .lib .Utils ;
31
32
import jdk .test .lib .process .ProcessTools ;
32
33
import jdk .test .lib .process .OutputAnalyzer ;
33
34
@@ -42,7 +43,10 @@ public final class FindClassUtf8 {
42
43
public static void main (String ... args ) throws Exception {
43
44
if (args .length == 1 ) {
44
45
// run java -Xcheck:jni FindClassUtf8 and check that the -Xcheck:jni message comes out.
45
- ProcessTools .executeTestJvm ("-Xcheck:jni" , "-XX:-CreateCoredumpOnCrash" , "FindClassUtf8" )
46
+ ProcessTools .executeTestJvm ("-Djava.library.path=" + Utils .TEST_NATIVE_PATH ,
47
+ "-Xcheck:jni" ,
48
+ "-XX:-CreateCoredumpOnCrash" ,
49
+ "FindClassUtf8" )
46
50
.shouldContain ("JNI class name is not a valid UTF8 string" )
47
51
.shouldNotHaveExitValue (0 ); // you get a core dump from -Xcheck:jni failures
48
52
} else {
You can’t perform that action at this time.
0 commit comments