mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8361950: Update to use jtreg 8
Reviewed-by: jpai, iris, joehw, erikj, ihse, liach, alanb
This commit is contained in:
parent
a49856bb04
commit
5db1dfe5c8
@ -28,7 +28,7 @@
|
||||
################################################################################
|
||||
|
||||
# Minimum supported versions
|
||||
JTREG_MINIMUM_VERSION=7.5.2
|
||||
JTREG_MINIMUM_VERSION=8
|
||||
GTEST_MINIMUM_VERSION=1.14.0
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||
|
||||
GTEST_VERSION=1.14.0
|
||||
JTREG_VERSION=7.5.2+1
|
||||
JTREG_VERSION=8+2
|
||||
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_linux-x64_bin.tar.gz
|
||||
|
||||
@ -1174,9 +1174,9 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
jtreg: {
|
||||
server: "jpg",
|
||||
product: "jtreg",
|
||||
version: "7.5.2",
|
||||
build_number: "1",
|
||||
file: "bundles/jtreg-7.5.2+1.zip",
|
||||
version: "8",
|
||||
build_number: "2",
|
||||
file: "bundles/jtreg-8+2.zip",
|
||||
environment_name: "JT_HOME",
|
||||
environment_path: input.get("jtreg", "home_path") + "/bin",
|
||||
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
groups=TEST.groups
|
||||
|
||||
# Minimum jtreg version
|
||||
requiredVersion=7.5.2+1
|
||||
requiredVersion=8+2
|
||||
|
||||
# Use new module options
|
||||
useNewOptions=true
|
||||
|
||||
@ -104,7 +104,7 @@ requires.properties= \
|
||||
jdk.static
|
||||
|
||||
# Minimum jtreg version
|
||||
requiredVersion=7.5.2+1
|
||||
requiredVersion=8+2
|
||||
|
||||
# Path to libraries in the topmost test directory. This is needed so @library
|
||||
# does not need ../../../ notation to reach them
|
||||
|
||||
@ -25,9 +25,10 @@ package nsk.jvmti.ResourceExhausted;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.net.URI;
|
||||
import java.nio.file.Path;
|
||||
import java.security.CodeSource;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import nsk.share.Consts;
|
||||
import nsk.share.test.Stresser;
|
||||
@ -80,24 +81,12 @@ public class resexhausted003 {
|
||||
|
||||
|
||||
public static int run(String args[], PrintStream out) {
|
||||
String testclasspath = System.getProperty("test.class.path");
|
||||
String [] testpaths = testclasspath.split(System.getProperty("path.separator"));
|
||||
String classesDir = "";
|
||||
|
||||
Pattern pattern = Pattern.compile("^(.*)classes(.*)vmTestbase(.*)$");
|
||||
for (int i = 0 ; i < testpaths.length; i++) {
|
||||
if (pattern.matcher(testpaths[i]).matches()) {
|
||||
classesDir = testpaths[i];
|
||||
}
|
||||
}
|
||||
if (classesDir.equals("")) {
|
||||
System.err.println("TEST BUG: Classes directory not found in test,class.path.");
|
||||
return Consts.TEST_FAILED;
|
||||
}
|
||||
Stresser stress = new Stresser(args);
|
||||
|
||||
String className = Helper.class.getName();
|
||||
byte[] bloatBytes = fileBytes(classesDir + File.separator + className.replace('.', '/') + ".class");
|
||||
CodeSource classCodeSource = Helper.class.getProtectionDomain().getCodeSource();
|
||||
Path classFilePath = Path.of(URI.create(classCodeSource.getLocation().toString()));
|
||||
byte[] bloatBytes = fileBytes(classFilePath.resolve(className.replace('.', '/') + ".class").toString());
|
||||
|
||||
int count = 0;
|
||||
Helper.resetExhaustedEvent();
|
||||
|
||||
@ -23,7 +23,7 @@ modules=java.xml
|
||||
groups=TEST.groups
|
||||
|
||||
# Minimum jtreg version
|
||||
requiredVersion=7.5.2+1
|
||||
requiredVersion=8+2
|
||||
|
||||
# Path to libraries in the topmost test directory. This is needed so @library
|
||||
# does not need ../../ notation to reach them
|
||||
|
||||
@ -121,7 +121,7 @@ requires.properties= \
|
||||
jdk.static
|
||||
|
||||
# Minimum jtreg version
|
||||
requiredVersion=7.5.2+1
|
||||
requiredVersion=8+2
|
||||
|
||||
# Path to libraries in the topmost test directory. This is needed so @library
|
||||
# does not need ../../ notation to reach them
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2022, Red Hat, Inc.
|
||||
* Copyright (c) 2025, 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
|
||||
@ -30,6 +31,7 @@ import java.util.Calendar;
|
||||
import java.util.Locale;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.net.URI;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Files;
|
||||
@ -54,12 +56,9 @@ import static java.util.Calendar.WEDNESDAY;
|
||||
*/
|
||||
public class TestSPISigned {
|
||||
|
||||
private static final String TEST_CLASSES = System.getProperty("test.classes", ".");
|
||||
private static final String TEST_SRC = System.getProperty("test.src", ".");
|
||||
|
||||
private static final Path META_INF_DIR = Paths.get(TEST_SRC, "provider", "meta");
|
||||
private static final Path PROVIDER_PARENT = Paths.get(TEST_CLASSES, "..");
|
||||
private static final Path PROVIDER_DIR = PROVIDER_PARENT.resolve("provider");
|
||||
private static final Path MODS_DIR = Paths.get("mods");
|
||||
private static final Path UNSIGNED_JAR = MODS_DIR.resolve("unsigned-with-locale.jar");
|
||||
private static final Path SIGNED_JAR = MODS_DIR.resolve("signed-with-locale.jar");
|
||||
@ -81,7 +80,9 @@ public class TestSPISigned {
|
||||
// Set up signed jar with custom calendar data provider
|
||||
//
|
||||
// 1. Create jar with custom CalendarDataProvider
|
||||
JarUtils.createJarFile(UNSIGNED_JAR, PROVIDER_DIR);
|
||||
var codeSource = baz.CalendarDataProviderImpl.class.getProtectionDomain().getCodeSource();
|
||||
var providerDir = Path.of(URI.create(codeSource.getLocation().toString()));
|
||||
JarUtils.createJarFile(UNSIGNED_JAR, providerDir);
|
||||
JarUtils.updateJarFile(UNSIGNED_JAR, META_INF_DIR);
|
||||
// create signer's keypair
|
||||
SecurityTools.keytool("-genkeypair -keyalg RSA -keystore ks " +
|
||||
|
||||
@ -15,7 +15,7 @@ keys=intermittent randomness needs-src needs-src-jdk_javadoc
|
||||
groups=TEST.groups
|
||||
|
||||
# Minimum jtreg version
|
||||
requiredVersion=7.5.2+1
|
||||
requiredVersion=8+2
|
||||
|
||||
# Use new module options
|
||||
useNewOptions=true
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
keys=randomness
|
||||
|
||||
# Minimum jtreg version
|
||||
requiredVersion=7.5.2+1
|
||||
requiredVersion=8+2
|
||||
|
||||
# Allow querying of various System properties in @requires clauses
|
||||
requires.extraPropDefns = ../jtreg-ext/requires/VMProps.java
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user