bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

port long-from-unreadable and long-sloop to Solaris 8


From: Paul Eggert
Subject: port long-from-unreadable and long-sloop to Solaris 8
Date: Wed, 12 Apr 2006 00:10:16 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

"make check" failed on Solaris 8 so I installed this:

2006-04-11  Paul Eggert  <address@hidden>


        Port to Solaris 8.
        * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
        "if !".  Do not assume that 'sed' can handle long, newline-free input.
        * tests/du/long-sloop: Likewise.  Evaluate expr once, not $n times.

Index: tests/du/long-from-unreadable
===================================================================
RCS file: /fetish/cu/tests/du/long-from-unreadable,v
retrieving revision 1.1
diff -p -u -r1.1 long-from-unreadable
--- tests/du/long-from-unreadable       17 Jan 2006 17:26:32 -0000      1.1
+++ tests/du/long-from-unreadable       12 Apr 2006 06:54:36 -0000
@@ -19,7 +19,7 @@ fi
 . $srcdir/../envvar-check
 
 proc_file=/proc/self/fd
-if ! test -d $proc_file; then
+if test ! -d $proc_file; then
   cat <<EOF >&2
 $0: Skipping this test.
 It would fail, since your system lacks /proc support.
@@ -36,7 +36,7 @@ framework_failure=0
 mkdir -p $tmp || framework_failure=1
 cd $tmp || framework_failure=1
 
-dir=`printf %200s ' '|sed 's/ /x/g'`
+dir=`printf '%200s\n' ' '|tr ' ' x`
 
 # Construct a hierarchy containing a relative file with a name
 # longer than PATH_MAX.
Index: tests/du/long-sloop
===================================================================
RCS file: /fetish/cu/tests/du/long-sloop,v
retrieving revision 1.7
diff -p -u -r1.7 long-sloop
--- tests/du/long-sloop 14 Feb 2006 22:21:56 -0000      1.7
+++ tests/du/long-sloop 12 Apr 2006 06:54:36 -0000
@@ -29,9 +29,16 @@ n=400
 
 dir_list=`seq $n`
 mkdir $dir_list || framework_failure=1
-for i in $dir_list; do
-  ip1=`expr $i + 1`
-  ln -s ../$ip1 $i/s || framework_failure=1
+file=1
+i_minus_1=0
+for i in $dir_list `expr $n + 1`; do
+  case $i_minus_1 in
+  0) ;;
+  *)
+    ln -s ../$i $i_minus_1/s || framework_failure=1
+    file=$file/s;;
+  esac
+  i_minus_1=$i
 done
 echo foo > $ip1
 
@@ -49,7 +56,6 @@ fi
 # renders it as `Number of symbolic links encountered during path
 # name traversal exceeds MAXSYMLINKS'.
 
-file=1`printf %${n}s ' '|sed 's, ,/s,g'`
 cat $file > /dev/null 2> err && \
   {
     cat <<EOF >&2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]