On Tue, 14 Mar 2023 22:05:44 GMT, Alex Menkov <amen...@openjdk.org> wrote:
> The change: > - updates UniqueVtableTest to follow standard SA way - attach to target from > subprocess and use SATestUtils.addPrivilegesIfNeeded for the subprocess; > - updates several tests in the same directory to resolve NoClassDefFoundError > failures; It's known JTReg issue that "@build" actions for part of used > shared classes may cause intermittent NoClassDefFoundError in other tests > which use the same shared library classpath. > > Tested: 100 runs on all platforms, no failures Changes requested by cjplummer (Reviewer). test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 158: > 156: Long.toString(lingeredAppPid)); > 157: SATestUtils.addPrivilegesIfNeeded(processBuilder); > 158: OutputAnalyzer SAOutput = > ProcessTools.executeProcess(processBuilder); `SAOutput`: local variables should start with lower case. test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 168: > 166: try { > 167: app = LingeredApp.startApp(); > 168: createAnotherToAttach(app.getPid()); Did you ever figure out why attaching from the main test process sometimes fails? test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 195: > 193: } else { > 194: runTest(Long.parseLong(args[0])); > 195: } Could use some comments here. Also, I think `SATestUtils.skipIfCannotAttach` is only needed for the `else` part. ------------- PR: https://git.openjdk.org/jdk/pull/13030