8305962: update jcstress to 0.16
Reviewed-by: shade
This commit is contained in:
parent
12e9430910
commit
292ee630ae
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2023, 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
|
||||
@ -42,11 +42,15 @@ import java.util.List;
|
||||
* jcstress tests wrapper
|
||||
*/
|
||||
@Artifact(organization = "org.openjdk.jcstress", name = "jcstress-tests-all",
|
||||
revision = "0.5", extension = "jar", unpack = false)
|
||||
revision = "0.16", extension = "jar", unpack = false)
|
||||
public class JcstressRunner {
|
||||
|
||||
public static final String MAIN_CLASS = "org.openjdk.jcstress.Main";
|
||||
|
||||
// Allow to configure jcstress mode parameter.
|
||||
// Test mode preset: sanity, quick, default, tough, stress.
|
||||
public static final String MODE_PROPERTY = "jcstress.mode";
|
||||
|
||||
public static Path pathToArtifact() {
|
||||
Map<String, Path> artifacts;
|
||||
try {
|
||||
@ -55,7 +59,7 @@ public class JcstressRunner {
|
||||
throw new Error("TESTBUG: Can not resolve artifacts for "
|
||||
+ JcstressRunner.class.getName(), e);
|
||||
}
|
||||
return artifacts.get("org.openjdk.jcstress.jcstress-tests-all-0.5")
|
||||
return artifacts.get("org.openjdk.jcstress.jcstress-tests-all-0.16")
|
||||
.toAbsolutePath();
|
||||
}
|
||||
|
||||
@ -104,11 +108,29 @@ public class JcstressRunner {
|
||||
|
||||
extraFlags.add("--jvmArgs");
|
||||
extraFlags.add("-Djava.io.tmpdir=" + System.getProperty("user.dir"));
|
||||
|
||||
// The "default" preset might take days for some tests
|
||||
// so use quick testing by default.
|
||||
String mode = "quick";
|
||||
for (String jvmArg : Utils.getTestJavaOpts()) {
|
||||
if(jvmArg.startsWith("-D" + MODE_PROPERTY)) {
|
||||
String[] pair = jvmArg.split("=", 2);
|
||||
mode = pair[1];
|
||||
continue;
|
||||
}
|
||||
extraFlags.add("--jvmArgs");
|
||||
extraFlags.add(jvmArg);
|
||||
}
|
||||
|
||||
extraFlags.add("-m");
|
||||
extraFlags.add(mode);
|
||||
|
||||
extraFlags.add("-sc");
|
||||
extraFlags.add("false");
|
||||
|
||||
extraFlags.add("-af");
|
||||
extraFlags.add("GLOBAL");
|
||||
|
||||
String[] result = new String[extraFlags.size() + args.length];
|
||||
extraFlags.toArray(result);
|
||||
System.arraycopy(args, 0, result, extraFlags.size(), args.length);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2023, 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
|
||||
@ -122,7 +122,7 @@ public class TestGenerator {
|
||||
BufferedReader reader = Files.newBufferedReader(output);
|
||||
|
||||
reader.lines()
|
||||
.skip(4) // skip first 4 lines: name, -{80}, revision and empty line
|
||||
.filter(s -> s.startsWith("org.openjdk.jcstress.tests"))
|
||||
.map(s -> s.split("\\.")[4]) // group by the package name following "org.openjdk.jcstress.tests."
|
||||
.distinct()
|
||||
.filter(s -> !s.startsWith("sample")) // skip sample test
|
||||
|
31
test/hotspot/jtreg/applications/jcstress/collections.java
Normal file
31
test/hotspot/jtreg/applications/jcstress/collections.java
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2023, 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
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
|
||||
|
||||
/**
|
||||
* @test collections
|
||||
* @library /test/lib /
|
||||
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.collections\.
|
||||
*/
|
||||
|
31
test/hotspot/jtreg/applications/jcstress/mxbeans.java
Normal file
31
test/hotspot/jtreg/applications/jcstress/mxbeans.java
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2023, 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
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
|
||||
|
||||
/**
|
||||
* @test mxbeans
|
||||
* @library /test/lib /
|
||||
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.mxbeans\.
|
||||
*/
|
||||
|
31
test/hotspot/jtreg/applications/jcstress/oota.java
Normal file
31
test/hotspot/jtreg/applications/jcstress/oota.java
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2023, 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
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
|
||||
|
||||
/**
|
||||
* @test oota
|
||||
* @library /test/lib /
|
||||
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.oota\.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user