|
|
f9a98e |
From 4cbac07ce5e03172636dc7b782a4e3d67870bac5 Mon Sep 17 00:00:00 2001
|
|
|
f9a98e |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
f9a98e |
Date: Tue, 4 Feb 2014 16:38:02 +0100
|
|
|
f9a98e |
Subject: [PATCH 42/43] Add a test for multiple calls of Agent_OnLoad
|
|
|
f9a98e |
|
|
|
f9a98e |
Related to rhbz#1063322
|
|
|
f9a98e |
---
|
|
|
f9a98e |
test/CMakeLists.txt | 10 ++++++++++
|
|
|
f9a98e |
test/outputs/run_three_times.log.in | 13 +++++++++++++
|
|
|
f9a98e |
2 files changed, 23 insertions(+)
|
|
|
f9a98e |
create mode 100644 test/outputs/run_three_times.log.in
|
|
|
f9a98e |
|
|
|
f9a98e |
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
|
|
f9a98e |
index 0439294..5b117a1 100644
|
|
|
f9a98e |
--- a/test/CMakeLists.txt
|
|
|
f9a98e |
+++ b/test/CMakeLists.txt
|
|
|
f9a98e |
@@ -317,5 +317,15 @@ _add_test(run_remote_thread 0)
|
|
|
f9a98e |
_add_analyze_test(not_reportable_1remote_class)
|
|
|
f9a98e |
_add_analyze_test(not_reportable_3remote_classes)
|
|
|
f9a98e |
|
|
|
f9a98e |
+_add_test_target(
|
|
|
f9a98e |
+ run_three_times
|
|
|
f9a98e |
+ SimpleTest
|
|
|
f9a98e |
+ DEPENDS ${TEST_JAVA_TARGETS}
|
|
|
f9a98e |
+ AGENT_OPTIONS caught=java.lang.ArrayIndexOutOfBoundsException:java.lang.NullPointerException -agentlib=${AGENT_NAME}=output=/proc/pid/0/java.log -agentlib=${AGENT_NAME}=output=/proc/pid/1/java.log
|
|
|
f9a98e |
+)
|
|
|
f9a98e |
+_add_test(run_three_times 2)
|
|
|
f9a98e |
+
|
|
|
f9a98e |
+
|
|
|
f9a98e |
+
|
|
|
f9a98e |
get_directory_property(all_run_targets ALL_RUN_TARGETS)
|
|
|
f9a98e |
add_custom_target(run_all DEPENDS ${all_run_targets})
|
|
|
f9a98e |
diff --git a/test/outputs/run_three_times.log.in b/test/outputs/run_three_times.log.in
|
|
|
f9a98e |
new file mode 100644
|
|
|
f9a98e |
index 0000000..aa8b2c8
|
|
|
f9a98e |
--- /dev/null
|
|
|
f9a98e |
+++ b/test/outputs/run_three_times.log.in
|
|
|
f9a98e |
@@ -0,0 +1,13 @@
|
|
|
f9a98e |
+Caught exception java.lang.ArrayIndexOutOfBoundsException in method SimpleTest.throwIndexOutOfBoundsException()
|
|
|
f9a98e |
+Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42
|
|
|
f9a98e |
+ at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class]
|
|
|
f9a98e |
+ at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class]
|
|
|
f9a98e |
+ at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class]
|
|
|
f9a98e |
+ at SimpleTest.main(SimpleTest.java:81) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class]
|
|
|
f9a98e |
+executable: @CMAKE_BINARY_DIR@/test/SimpleTest.class
|
|
|
f9a98e |
+Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException()
|
|
|
f9a98e |
+Exception in thread "main" java.lang.NullPointerException
|
|
|
f9a98e |
+ at SimpleTest.throwNullPointerException(SimpleTest.java:36) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class]
|
|
|
f9a98e |
+ at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class]
|
|
|
f9a98e |
+ at SimpleTest.main(SimpleTest.java:83) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class]
|
|
|
f9a98e |
+executable: @CMAKE_BINARY_DIR@/test/SimpleTest.class
|
|
|
f9a98e |
--
|
|
|
f9a98e |
1.8.3.1
|
|
|
f9a98e |
|