You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abrt-java-connector/SOURCES/0005-Update-the-test-result...

159 lines
12 KiB

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