On Fri, 11 Sep 2026 16:20:07 GMT, Yunbo Zhang <[email protected]> wrote:
> **Problem**:
> `make test
> TEST="micro:java.lang.invoke.LazyStaticColdStart.methodHandleCreate(Eager|Lazy)"`
> fails
>
> Test selection
> 'micro:java.lang.invoke.LazyStaticColdStart.methodHandleCreate(Eager|Lazy)',
> will run:
> * micro:java.lang.invoke.LazyStaticColdStart.methodHandleCreate(Eager|Lazy)
> /usr/bin/bash: -c: line 1: syntax error near unexpected token `('
>
>
> **Fix:**
>
> Use the existing `ShellQuote` helper when passing test names through
> `make/RunTests.gmk`, including:
>
> - the command used to run microbenchmarks;
> - generation of the internal `TEST_ID`;
> - test result summary generation;
> - generation of the report `NAME_PATTERN`.
>
> **Testing**:
> - `make test-make`: passed
> - Microbenchmark selection with `|` and parentheses: passed.
> - Non-matching selection with special characters: reported the expected JMH
> error without a shell syntax error.
>
> `make test
> TEST="micro:java.lang.invoke.LazyStaticColdStart.methodHandleCreate(Eager|Lazy)"`
>
> Benchmark Mode Cnt Score Error Units
> LazyStaticColdStart.methodHandleCreateEager ss 10 62.816 ± 3.862 us/op
> LazyStaticColdStart.methodHandleCreateLazy ss 10 33.069 ± 2.383 us/op
> Finished running test
> 'micro:java.lang.invoke.LazyStaticColdStart.methodHandleCreate(Eager|Lazy)'
> Test report is stored in
> build/linux-aarch64-server-release/test-results/micro_java_lang_invoke_LazyStaticColdStart_methodHandleCreate_Eager_Lazy_
>
> ==============================
> Test summary
> ==============================
> TEST TOTAL PASS FAIL ERROR
> SKIP
> micro:java.lang.invoke.LazyStaticColdStart.methodHandleCreate(Eager|Lazy)
> 1 1 0 0
> 0
> ==============================
> TEST SUCCESS
>
> Finished building target 'test' in configuration
> 'linux-aarch64-server-release'
>
>
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK
> Interim AI Policy](https://openjdk.org/legal/ai).
This pull request has now been integrated.
Changeset: 8eec211e
Author: Yunbo Zhang <[email protected]>
Committer: Erik Joelsson <[email protected]>
URL:
https://git.openjdk.org/jdk/commit/8eec211e26e4b76c19734766b703c4cb4f5802bb
Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
8338063: Passing "|" as argument to TEST fails
Reviewed-by: erikj
-------------
PR: https://git.openjdk.org/jdk/pull/32841