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