From c1d2fc5201eab586251ab61f53b8baa6826f8178 Mon Sep 17 00:00:00 2001 From: Harold Seigel Date: Fri, 17 Mar 2017 08:40:12 -0400 Subject: [PATCH] 8175288: [TESTBUG] sun/tools/jcmd/TestJcmdDefaults.java failed to parse output of other java process Enable dotall mode so test can parse Java process names containing line terminators Reviewed-by: ctornqvi, mseledtsov, gtriantafill --- jdk/test/sun/tools/jcmd/TestJcmdDefaults.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java b/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java index 36481d6ebce..21dc0939ebe 100644 --- a/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java +++ b/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, 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 @@ -50,7 +50,7 @@ public class TestJcmdDefaults { private static final String TEST_SRC = System.getProperty("test.src").trim(); private static final String[] VM_ARGS = new String[] { "-XX:+UsePerfData" }; - private static final String JCMD_LIST_REGEX = "^\\d+\\s*.*"; + private static final String JCMD_LIST_REGEX = "(?s)^\\d+\\s*.*"; public static void main(String[] args) throws Exception { testJcmdUsage("-h");