--- old/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/Simple.java 2018-04-09 12:06:59.337140316 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/Simple.java 2018-04-09 12:06:59.059114071 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -68,7 +68,8 @@ "-Xlog:class+load", "-Xlog:class+path=info", "PatchMain", "javax.naming.spi.NamingManager"); - TestCommon.checkDump(output, "Loading classes to share"); + output.shouldHaveExitValue(1) + .shouldContain("Cannot use the following option when dumping the shared archive: --patch-module"); TestCommon.run( "-XX:+UnlockDiagnosticVMOptions", @@ -76,6 +77,6 @@ "-Xlog:class+load", "-Xlog:class+path=info", "PatchMain", "javax.naming.spi.NamingManager") - .assertNormalExit("I pass!"); + .assertSilentlyDisabledCDS(0, "I pass!"); } }