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