From cc0976bf7fc41caa5abdaa23f4df00b1a5d5bfba Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Fri, 26 May 2023 13:51:31 +0000 Subject: [PATCH] 8308589: gc/cslocker/TestCSLocker.java timed out Reviewed-by: eosterlund --- test/hotspot/jtreg/gc/cslocker/TestCSLocker.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/hotspot/jtreg/gc/cslocker/TestCSLocker.java b/test/hotspot/jtreg/gc/cslocker/TestCSLocker.java index 1627ae89e2610..69b67684fabdc 100644 --- a/test/hotspot/jtreg/gc/cslocker/TestCSLocker.java +++ b/test/hotspot/jtreg/gc/cslocker/TestCSLocker.java @@ -32,6 +32,13 @@ * @summary This short test check RFE 6186200 changes. One thread locked * @summary completely in JNI CS, while other is trying to allocate memory * @summary provoking GC. OOM means FAIL, deadlock means PASS. + * + * @comment This test assumes that no allocation happens during the sleep loop, \ + * which is something that we can't guarantee. With Generational ZGC we \ + * see test timeouts because the main thread allocates and waits for the \ + * GC, which waits for the CSLocker, which waits for the main thread. \ + * @requires !vm.opt.final.ZGenerational + * * @run main/native/othervm -Xmx256m gc.cslocker.TestCSLocker */