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).

@benshuai5D 
Your change (at version 7c0023af582e5be6df7ac9058be758adab3b721e) is now ready 
to be sponsored by a Committer.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/32841#issuecomment-5642046704

Reply via email to