**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).
-------------
Commit messages:
- 8338063: Passing "|" as argument to TEST fails
Changes: https://git.openjdk.org/jdk/pull/32841/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32841&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8338063
Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/32841.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/32841/head:pull/32841
PR: https://git.openjdk.org/jdk/pull/32841