6d9473
From d4f9c9338bf285897f71d841606b9ba0ee05379c Mon Sep 17 00:00:00 2001
6d9473
From: Jakub Filak <jfilak@redhat.com>
6d9473
Date: Tue, 25 Nov 2014 08:18:52 -0500
6d9473
Subject: [PATCH] Update the test results
6d9473
6d9473
---
6d9473
 test/CMakeLists.txt                        | 30 ++++++++++++++++--------------
6d9473
 test/outputs/Linux-armv7l/run_test.log.in  | 15 +++++++++------
6d9473
 test/outputs/run_bad_class.log.in          |  3 ---
6d9473
 test/outputs/run_missing_class_test.log.in |  7 +++++++
6d9473
 test/outputs/run_test.log.in               | 15 +++++++++------
6d9473
 5 files changed, 41 insertions(+), 29 deletions(-)
6d9473
 create mode 100644 test/outputs/run_missing_class_test.log.in
6d9473
6d9473
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
6d9473
index b7818d6..7c26330 100644
6d9473
--- a/test/CMakeLists.txt
6d9473
+++ b/test/CMakeLists.txt
6d9473
@@ -181,22 +181,24 @@ _add_test_target(
6d9473
 )
6d9473
 _add_test(run_bad_class 2)
6d9473
 
6d9473
-# Disabled because JVM catches the ClassNotFoundException in a native method and exits gracefully
6d9473
-#_add_test_target(
6d9473
-#    run_missing_class_test
6d9473
-#    MissingClassTest
6d9473
-#    PRE rm -f MissingClassTest.class
6d9473
-#    DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH}
6d9473
-#    AGENT_OPTIONS executable=threadclass
6d9473
-#)
6d9473
-#_add_test(run_missing_class_test 2)
6d9473
-add_custom_target(
6d9473
+# Disable for JVM-1.7, because it catches the ClassNotFoundException in a native method and exits gracefully
6d9473
+_add_test_target(
6d9473
     run_missing_class_test
6d9473
-    COMMAND rm -f MissingClassTest.class && LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=output=run_missing_class.log MissingClassTest || test ! -e run_missing_class.log
6d9473
-    DEPENDS AbrtChecker ${TEST_JAVA_TARGETS}
6d9473
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
6d9473
+    MissingClassTest
6d9473
+    PRE rm -f MissingClassTest.class
6d9473
+    DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH}
6d9473
+    AGENT_OPTIONS executable=threadclass
6d9473
 )
6d9473
-add_test(test_run_missing_class_test make run_missing_class_test)
6d9473
+_add_test(run_missing_class_test 2)
6d9473
+
6d9473
+# Disable for JVM-1.8, because missing class causes an uncaught exception
6d9473
+#add_custom_target(
6d9473
+#    run_missing_class_test
6d9473
+#    COMMAND rm -f MissingClassTest.class && LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=output=run_missing_class.log MissingClassTest || test ! -e run_missing_class.log
6d9473
+#    DEPENDS AbrtChecker ${TEST_JAVA_TARGETS}
6d9473
+#    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
6d9473
+#)
6d9473
+#add_test(test_run_missing_class_test make run_missing_class_test)
6d9473
 
6d9473
 _add_test_target(
6d9473
     run_try_finally
6d9473
diff --git a/test/outputs/Linux-armv7l/run_test.log.in b/test/outputs/Linux-armv7l/run_test.log.in
6d9473
index 5e29659..8616aed 100644
6d9473
--- a/test/outputs/Linux-armv7l/run_test.log.in
6d9473
+++ b/test/outputs/Linux-armv7l/run_test.log.in
6d9473
@@ -1,22 +1,25 @@
6d9473
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.<init>()
6d9473
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
6d9473
 Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory)
6d9473
-	at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
+	at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
+	at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
 	at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
 	at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 	at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 	at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 executable: @CMAKE_BINARY_DIR@/test/Test.class
6d9473
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.<init>()
6d9473
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
6d9473
 Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
6d9473
-	at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
+	at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
+	at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
 	at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
 	at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 	at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 	at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 executable: @CMAKE_BINARY_DIR@/test/Test.class
6d9473
-Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.<init>()
6d9473
+Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open()
6d9473
 Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
6d9473
-	at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
+	at java.io.FileOutputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
+	at java.io.FileOutputStream.open(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
 	at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
 	at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
 	at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
diff --git a/test/outputs/run_bad_class.log.in b/test/outputs/run_bad_class.log.in
6d9473
index 348f056..2b58474 100644
6d9473
--- a/test/outputs/run_bad_class.log.in
6d9473
+++ b/test/outputs/run_bad_class.log.in
6d9473
@@ -1,8 +1,5 @@
6d9473
 Uncaught exception java.lang.ClassNotFoundException in method java.lang.ClassLoader.loadClass()
6d9473
 Exception in thread "main" java.lang.ClassNotFoundException: foobar
6d9473
-	at java.net.URLClassLoader$1.run(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader$1.class]
6d9473
-	at java.net.URLClassLoader$1.run(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader$1.class]
6d9473
-	at java.security.AccessController.doPrivileged(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/security/AccessController.class]
6d9473
 	at java.net.URLClassLoader.findClass(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader.class]
6d9473
 	at java.lang.ClassLoader.loadClass(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class]
6d9473
 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/misc/Launcher$AppClassLoader.class]
6d9473
diff --git a/test/outputs/run_missing_class_test.log.in b/test/outputs/run_missing_class_test.log.in
6d9473
new file mode 100644
6d9473
index 0000000..fbbd20d
6d9473
--- /dev/null
6d9473
+++ b/test/outputs/run_missing_class_test.log.in
6d9473
@@ -0,0 +1,7 @@
6d9473
+Uncaught exception java.lang.ClassNotFoundException in method java.lang.ClassLoader.loadClass()
6d9473
+Exception in thread "main" java.lang.ClassNotFoundException: MissingClassTest
6d9473
+	at java.net.URLClassLoader.findClass(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader.class]
6d9473
+	at java.lang.ClassLoader.loadClass(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class]
6d9473
+	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/misc/Launcher$AppClassLoader.class]
6d9473
+	at java.lang.ClassLoader.loadClass(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class]
6d9473
+executable: JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar
6d9473
diff --git a/test/outputs/run_test.log.in b/test/outputs/run_test.log.in
6d9473
index 804afb5..2b88fc7 100644
6d9473
--- a/test/outputs/run_test.log.in
6d9473
+++ b/test/outputs/run_test.log.in
6d9473
@@ -1,22 +1,25 @@
6d9473
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
6d9473
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open0()
6d9473
 Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory)
6d9473
-	at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
+	at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
+	at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
 	at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
 	at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 	at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 	at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 executable: @CMAKE_BINARY_DIR@/test/Test.class
6d9473
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
6d9473
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open0()
6d9473
 Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
6d9473
-	at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
+	at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
+	at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
 	at java.io.FileInputStream.<init>(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
6d9473
 	at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 	at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 	at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
 executable: @CMAKE_BINARY_DIR@/test/Test.class
6d9473
-Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open()
6d9473
+Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open0()
6d9473
 Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
6d9473
-	at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
+	at java.io.FileOutputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
+	at java.io.FileOutputStream.open(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
 	at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
 	at java.io.FileOutputStream.<init>(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
6d9473
 	at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class]
6d9473
-- 
6d9473
1.8.3.1
6d9473