test/java/nio/file/Files/walkFileTree/find.sh

Print this page
rev 8975 : 8028537: PPC64: Updated the JDK regression tests to run on AIX
Reviewed-by: alanb
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, volker.simonis@gmail.com

@@ -41,11 +41,18 @@
 case "$OS" in
     Windows_* | CYGWIN* )
         echo "This test does not run on Windows" 
         exit 0
         ;;
+    AIX )
+        CLASSPATH=${TESTCLASSES}:${TESTSRC}
+        # On AIX "find -follow" may core dump on recursive links without '-L'
+        # see: http://www-01.ibm.com/support/docview.wss?uid=isg1IV28143
+        FIND_FOLLOW_OPT="-L"
+        ;;
     * )
+        FIND_FOLLOW_OPT=
         CLASSPATH=${TESTCLASSES}:${TESTSRC}
         ;;
 esac
 export CLASSPATH
 

@@ -63,11 +70,11 @@
 
 # repeat test following links. Some versions of find(1) output
 # cycles (sym links to ancestor directories), other versions do
 # not. For that reason we run PrintFileTree with the -printCycles
 # option when the output without this option differs to find(1).
-find "$ROOT" -follow > out1
+find $FIND_FOLLOW_OPT "$ROOT" -follow > out1
 $JAVA ${TESTVMOPTS} PrintFileTree -follow "$ROOT" > out2
 diff out1 out2
 if [ $? != 0 ];
   then 
     # re-run printing cycles to stdout