test/hotspot/jtreg/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java
changeset 49956 a87f2e7a527c
parent 48105 8d15b1369c7a
child 52270 487bd00f4ea8
--- a/test/hotspot/jtreg/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java	Wed May 02 11:21:27 2018 -0700
+++ b/test/hotspot/jtreg/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java	Wed May 02 16:47:40 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,13 +83,14 @@
     String line = null;
 
     Pattern [] pattern = new Pattern[] {
-        // The "Current thread" line should show a hazard ptr:
-        Pattern.compile("Current thread .* _threads_hazard_ptr=0x.*"),
+        // The "Current thread" line should show a hazard ptr
+        // and no nested hazard ptrs:
+        Pattern.compile("Current thread .* _threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*, _nested_threads_hazard_ptr_cnt=0.*"),
         // We should have a section of Threads class SMR info:
         Pattern.compile("Threads class SMR info:"),
         // The current thread (marked with '=>') in the threads list
-        // should show a hazard ptr:
-        Pattern.compile("=>.* JavaThread \"main\" .*_threads_hazard_ptr=0x.*"),
+        // should show a hazard ptr and no nested hazard ptrs:
+        Pattern.compile("=>.* JavaThread \"main\" .* _threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*, _nested_threads_hazard_ptr_cnt=0.*"),
     };
     int currentPattern = 0;