From 7b9299c0fc3dd6b1a2cec9ee8753d5fa442b9910 Mon Sep 17 00:00:00 2001 From: Leonid Mesnik Date: Mon, 13 Jan 2025 20:05:48 -0800 Subject: [PATCH 1/3] Add "jtreg.ttf" property to filter tests based on test thread factory value --- .../com/sun/javatest/regtest/config/RegressionContext.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java b/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java index 643ac755..2d78d33a 100644 --- a/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java +++ b/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -101,6 +101,11 @@ static RegressionContext getDefault() { values.put("os.maxMemory", String.valueOf(os.maxMemory)); values.put("os.maxSwap", String.valueOf(os.maxSwap)); + String testThreadFactory = (params == null || params.getTestThreadFactory() == null) + ? "null" + : params.getTestThreadFactory(); + values.put("jtreg.ttf", testThreadFactory); + processVMOptions((params == null) ? Collections.emptyList() : params.getTestVMJavaOptions()); } From 7cbb70ad6c48e5b5cb1dbba77034440a99445e1b Mon Sep 17 00:00:00 2001 From: Leonid Mesnik Date: Tue, 28 Jan 2025 08:40:39 -0800 Subject: [PATCH 2/3] test.thread.factory is set --- .../com/sun/javatest/regtest/config/RegressionContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java b/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java index 2d78d33a..caba7cc7 100644 --- a/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java +++ b/src/share/classes/com/sun/javatest/regtest/config/RegressionContext.java @@ -104,7 +104,7 @@ static RegressionContext getDefault() { String testThreadFactory = (params == null || params.getTestThreadFactory() == null) ? "null" : params.getTestThreadFactory(); - values.put("jtreg.ttf", testThreadFactory); + values.put("test.thread.factory", testThreadFactory); processVMOptions((params == null) ? Collections.emptyList() : params.getTestVMJavaOptions()); } From 338694bccf7b2f00a29e2427cd38970a87151bec Mon Sep 17 00:00:00 2001 From: Leonid Mesnik Date: Tue, 28 Jan 2025 09:43:56 -0800 Subject: [PATCH 3/3] test.thread.factory is not a property for tag spec --- test/tag-spec/TestTagSpec.gmk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/tag-spec/TestTagSpec.gmk b/test/tag-spec/TestTagSpec.gmk index 5a85cec6..3b7318c4 100644 --- a/test/tag-spec/TestTagSpec.gmk +++ b/test/tag-spec/TestTagSpec.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, 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 @@ -43,6 +43,7 @@ $(BUILDTESTDIR)/TestTagSpec_sysProps.ok: \ $(JAVAFILES.com.sun.javatest.regtest-tools) $(GREP) -oh '\(.put(\|put(map, \)"test.[^"]*' $(JAVAFILES.com.sun.javatest.regtest-tools) | \ $(GREP) -v "test.class.path.prefix" | \ + $(GREP) -v "test.thread.factory" | \ $(SED) -e 's/.*"//' | $(SORT) -u > $(@:%.ok=%.src) $(GREP) -o 'test[^<]*' $(JTREG_TAGSPEC) | \ $(SED) -e 's/<[^>]*>//g' | $(SORT) -u > $(@:%.ok=%.spec)