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"); } }