From 69f28b259034be1e004abc091b9f44498ed2c8f1 Mon Sep 17 00:00:00 2001 From: Babneet Singh Date: Thu, 10 Nov 2022 13:56:12 -0800 Subject: [PATCH] Fix SelfSuspendDisablerTest See eclipse-openj9/openj9#16276. Signed-off-by: Babneet Singh --- .../SelfSuspendDisablerTest/SelfSuspendDisablerTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/serviceability/jvmti/vthread/SelfSuspendDisablerTest/SelfSuspendDisablerTest.java b/test/hotspot/jtreg/serviceability/jvmti/vthread/SelfSuspendDisablerTest/SelfSuspendDisablerTest.java index 5a634c65358..6a8942d4e75 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/vthread/SelfSuspendDisablerTest/SelfSuspendDisablerTest.java +++ b/test/hotspot/jtreg/serviceability/jvmti/vthread/SelfSuspendDisablerTest/SelfSuspendDisablerTest.java @@ -21,6 +21,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2021, 2022 All Rights Reserved + * =========================================================================== + */ + /* * @test * @summary Test verifies that selfsuspend doesn' block unmount by VTMTDisabler @@ -63,7 +69,7 @@ private static void testJvmtiThreadState(Thread thread, int expectedState) { System.out.printf("Expected %s thread state: %06X got: %06X\n", kindStr, expectedState, state); - if (state != expectedState) { + if ((state & expectedState) != expectedState) { throw new RuntimeException("Test FAILED: Unexpected thread state"); } }