[PATCH][TESTBUG] JDK-8214052: Wrong shell used
Sergey
merkel05 at gmail.com
Sat Dec 8 01:19:52 UTC 2018
Hi everyone,
Could anyone please review that tiny fix for test script below?
That would be extremely great if anyone could sponsor the change as well.
Thanks and regards,
Sergei
On Thu, Dec 6, 2018, 08:37 Sergey <merkel05 at gmail.com wrote:
> Hi,
>
> I've posted the original mail to the wrong mailing list and thanks to
> David for guidance.
>
> Problem goes as follows: as stated in the bug description [1] there are few
> places in the tests where extended bash syntax is being used.
>
> First one is (as per ticket in the headline):
>
> - vmTestbase/vm/compiler/CodeCacheInfoOnCompilation
>
> I've made a quick fix for that one and patch could be found
> inlined below.
>
> Moreover what I've noticed is that grep gives me
> another test script:
>
> - GeneratePropertyPassword.sh [2]
>
> that seems to be linked with another ticket [3] which is closed,
> though it still uses the bash "[[" extension. Perhaps this [4] fix
> needs to be reapplied.
>
> In regards to the patch below, please let me know if I've missed
> something. Changes were successfully tested with `dash v0.5.10.2-1`.
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8214052
> [2]
> http://hg.openjdk.java.net/jdk/sandbox/file/413c28945e0f/test/jdk/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh#l37
> [3] https://bugs.openjdk.java.net/browse/JDK-8025886
> [4] http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/a2551e12a9ea0.5.10.2-1
>
> Regards,
> su -
>
> diff --git
> a/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfoOnCompilation/run.sh
> b/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfoOnCompilation/run.sh
> ---
> a/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfoOnCompilation/run.sh
> +++
> b/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfoOnCompilation/run.sh
> @@ -27,7 +27,7 @@
>
> ver=$(${TESTED_JAVA_HOME}/bin/java ${JAVA_OPTS} -version 2>&1)
> isComp=$( echo ${ver} | grep -c "compiled mode")
> -if [[ $isComp != 1 ]]; then
> +if [ "$isComp" -ne 1 ]; then
> echo "skipped. This test works only with -Xcomp"
> exit
> fi
> @@ -40,7 +40,7 @@
> res=$(${TESTED_JAVA_HOME}/bin/java ${JAVA_OPTS}
> -XX:+PrintCodeCacheOnCompilation -XX:-Inline
> vm.compiler.CodeCacheInfoOnCompilation.PrintOnCall | egrep -ce "${pattern}")
> echo "res: " ${res}
>
> -if (( "${res}" != "0" )); then
> +if [ "$res" != "0" ]; then
> echo "passed"
> true
> else
>
More information about the hotspot-dev
mailing list