[PATCH] JDK-8025886: Replace [[ and == bash extensions in tests

David Holmes david.holmes at oracle.com
Mon Dec 10 07:25:17 UTC 2018


Hi Sergey,

Sorry to be a pain but you do need to send the request to the 
appropriate mailing list for the "owner" of the code being changed. In 
this case:

test/jdk/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh

is not hotspot code but JDK Monitoring&Management code, which I think is 
covered by serviceability-dev.

Cheers,
David


On 9/12/2018 6:42 am, Sergey wrote:
> Hi,
> 
> I've recently been working on bug
> https://bugs.openjdk.java.net/browse/JDK-8214052
> that is mainly about cleaning up the [[ and == bash
> extensions from the tests.
> 
> I've discovered, that there's a leftover after hg forest
> consolidation. GeneratePropertyPassword.sh script
> still uses beforementioned bash extensions. That has
> been fixed within the scope of this bug:
> https://bugs.openjdk.java.net/browse/JDK-8025886
> Though fix didn't get to the consolidated forest.
> 
> The fix is trivial and just reapplies the patch from the
> JBS' comments. Change has been tested with `dash`
> and works fine.
> 
> Please find the patch inlined below. That would also be
> great if anyone could sponsor it.
> 
> diff --git
> a/test/jdk/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
> b/test/jdk/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
> ---
> a/test/jdk/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
> +++
> b/test/jdk/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
> @@ -34,12 +34,13 @@
>   OS=`uname -s`
>   UMASK=`umask`
> 
> -if [[ $OS == CYGWIN_NT* ]] ; then
> +case $OS in
> +CYGWIN_NT*)
>       OS="Windows_NT"
>       if [ -z "$SystemRoot" ] ;  then
> -        SystemRoot=`cygpath $SYSTEMROOT`
> +        SystemRoot=$SYSTEMROOT
>       fi
> -fi
> +esac
> 
>   case $OS in
>   SunOS | Linux | Darwin | AIX )
> 
> 
> Thanks,
> Sergei
> 


More information about the hotspot-dev mailing list