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

Sergei Ustimenko merkel05 at gmail.com
Mon Dec 10 12:57:39 UTC 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20181210/99860f52/attachment.html>


More information about the serviceability-dev mailing list