|
21 | 21 | *******************************************************************************/
|
22 | 22 | package org.openj9.criu;
|
23 | 23 |
|
| 24 | +import java.util.Date; |
24 | 25 | import jdk.internal.misc.Unsafe;
|
25 | 26 | import openj9.internal.criu.InternalCRIUSupport;
|
26 | 27 | import org.eclipse.openj9.criu.CRIUSupport;
|
@@ -57,21 +58,25 @@ private void test(String testName) throws InterruptedException {
|
57 | 58 | switch (testName) {
|
58 | 59 | case "testThreadPark":
|
59 | 60 | testThreadParkHelper("testThreadPark NO C/R");
|
| 61 | + testResult.lockStatus.set(0); |
60 | 62 | testThread = testThreadPark();
|
61 | 63 | break;
|
62 | 64 | case "testThreadSleep":
|
63 | 65 | testThreadSleepHelper("testThreadSleep NO C/R");
|
| 66 | + testResult.lockStatus.set(0); |
64 | 67 | testThread = testThreadSleep();
|
65 | 68 | break;
|
66 | 69 | case "testObjectWaitNotify":
|
67 | 70 | testThread = testObjectWaitNotify();
|
68 | 71 | break;
|
69 | 72 | case "testObjectWaitTimedNoNanoSecond":
|
70 | 73 | testObjectWaitTimedHelper("testObjectWaitTimedNoNanoSecond NO C/R", msTime2s, 0);
|
| 74 | + testResult.lockStatus.set(0); |
71 | 75 | testThread = testObjectWaitTimedNoNanoSecond();
|
72 | 76 | break;
|
73 | 77 | case "testObjectWaitTimedWithNanoSecond":
|
74 | 78 | testObjectWaitTimedHelper("testObjectWaitTimedWithNanoSecond NO C/R", msTime2s, nsTime500kns);
|
| 79 | + testResult.lockStatus.set(0); |
75 | 80 | testThread = testObjectWaitTimedWithNanoSecond();
|
76 | 81 | break;
|
77 | 82 | default:
|
@@ -129,7 +134,8 @@ private void test(String testName) throws InterruptedException {
|
129 | 134 | public static void showMessages(String logStr, long expectedTime, boolean isMillis, long elapsedTime,
|
130 | 135 | long startNanoTime, long endNanoTime) {
|
131 | 136 | long crDeltaNs = InternalCRIUSupport.getCheckpointRestoreNanoTimeDelta();
|
132 |
| - System.out.println(logStr + expectedTime + " " + (isMillis ? "ms" : "ns") |
| 137 | + System.out.println(Thread.currentThread().getName() + ": " + new Date() + ", " |
| 138 | + + logStr + expectedTime + " " + (isMillis ? "ms" : "ns") |
133 | 139 | + ", but the actual elapsed time was: " + elapsedTime + "ns (~" + (elapsedTime / NANOS_PER_MILLI)
|
134 | 140 | + "ms) with startNanoTime = " + startNanoTime + "ns, and endNanoTime = " + endNanoTime
|
135 | 141 | + "ns, CheckpointRestoreNanoTimeDelta: " + crDeltaNs + "ns (~" + (crDeltaNs / NANOS_PER_MILLI) + "ms)");
|
|
0 commit comments