Blame SOURCES/0055-Update-the-test-results.patch

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