Add additional logging to test 1940
Test 1940 occasionally times out on test servers. Add additional
logging to the test so we can figure out where exactly it is getting
stuck.
Test: ./test.py --host -j50
Bug: 70988713
Change-Id: I04e5e9ecbc02907f8606c4a14578994d5f53de45
diff --git a/test/1940-ddms-ext/expected.txt b/test/1940-ddms-ext/expected.txt
index 1a457a0..5af1116 100644
--- a/test/1940-ddms-ext/expected.txt
+++ b/test/1940-ddms-ext/expected.txt
@@ -16,6 +16,10 @@
Sending data [1] to chunk handler 305419896
MyDdmHandler: Chunk received: Chunk(Type: 0x12345678, Len: 1, data: [1])
Got error: JVMTI_ERROR_INTERNAL
+threadNotify started!
+Target thread started!
+Target thread finished!
+threadNotify Disabled!
Saw expected thread events.
Expected chunk type published: 1213221190
Expected chunk type published: 1297109829
diff --git a/test/1940-ddms-ext/src-art/art/Test1940.java b/test/1940-ddms-ext/src-art/art/Test1940.java
index 226fe35..2957f63 100644
--- a/test/1940-ddms-ext/src-art/art/Test1940.java
+++ b/test/1940-ddms-ext/src-art/art/Test1940.java
@@ -178,10 +178,14 @@
}
};
DdmVmInternal.threadNotify(true);
+ System.out.println("threadNotify started!");
final Thread thr = new Thread(() -> { return; }, "THREAD");
thr.start();
+ System.out.println("Target thread started!");
thr.join();
+ System.out.println("Target thread finished!");
DdmVmInternal.threadNotify(false);
+ System.out.println("threadNotify Disabled!");
// Make sure we saw at least one of Thread-create, Thread name, & thread death.
if (!types_seen[0] || !types_seen[1] || !types_seen[2]) {
System.out.println("Didn't see expected chunks for thread creation! got: " +