7200682: TEST_BUG: keytool/autotest.sh still has problems with libsoftokn.so
authorweijun
Fri, 28 Sep 2012 17:15:48 +0800
changeset 14010 24f9f29d5532
parent 14009 21856a20cc1d
child 14011 3d24d5dcf602
7200682: TEST_BUG: keytool/autotest.sh still has problems with libsoftokn.so Reviewed-by: alanb, smarks
jdk/test/sun/security/tools/keytool/autotest.sh
--- a/jdk/test/sun/security/tools/keytool/autotest.sh	Fri Sep 28 14:14:26 2012 +0900
+++ b/jdk/test/sun/security/tools/keytool/autotest.sh	Fri Sep 28 17:15:48 2012 +0800
@@ -58,24 +58,18 @@
     LIBNAME="/usr/lib/mps/libsoftokn3.so"
     ;;
   Linux )
-    ARCH=`uname -m`
     FS="/"
-    case "$ARCH" in
-      i[3-6]86 )
+    ${TESTJAVA}${FS}bin${FS}java -XshowSettings:properties -version 2> allprop
+    cat allprop | grep os.arch | grep 64
+    if [ "$?" != "0" ]; then
         LIBNAME=`find_one \
             "/usr/lib/libsoftokn3.so" \
             "/usr/lib/i386-linux-gnu/nss/libsoftokn3.so"`
-        ;;
-      x86_64 )
+    else
         LIBNAME=`find_one \
             "/usr/lib64/libsoftokn3.so" \
             "/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so"`
-        ;;
-      * )
-        echo "Will not run test on: Linux ${ARCH}"
-        exit 0;
-        ;;
-    esac
+    fi
     ;;
   * )
     echo "Will not run test on: ${OS}"