--- old/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java 2018-04-06 15:48:27.704952718 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java 2018-04-06 15:48:27.430926878 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -150,14 +150,16 @@ } } } - output = TestCommon.exec( - appJar + File.pathSeparator + helperJar, + TestCommon.run( + "-cp", appJar + File.pathSeparator + helperJar, "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", bootClassPath, "--limit-modules", limitMods, "LimitModsHelper", BOOT_ARCHIVE_CLASS, PLATFORM_ARCHIVE_CLASS, APP_ARCHIVE_CLASS, - Integer.toString(excludeModIdx)); // last 4 args passed to test - TestCommon.checkExec(output); + Integer.toString(excludeModIdx)) // last 4 args passed to test + .assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0); + }); limitMods = null; } }