]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid printf '0*d' construct unsupported by ash
authorPádraig Brady <P@draigBrady.com>
Thu, 31 Aug 2017 03:05:31 +0000 (20:05 -0700)
committerPádraig Brady <P@draigBrady.com>
Thu, 31 Aug 2017 03:39:54 +0000 (20:39 -0700)
* tests/ln/sf-1.sh: Generate specific length with space padding
which is supported.
Reported by Assaf Gordon on Alpine Linux.

tests/ln/sf-1.sh

index c6dafdf704a452680061064cbb2a4c33d16ba032..36d5b29ce8e06a49b31430999ad660906e2ec51c 100755 (executable)
@@ -37,7 +37,7 @@ esac
 name_max=$(stat -f -c %l .) && test "$name_max" -lt $((1024*1024)) ||
   name_max=1 # skip this portion of the test
 name_max_plus1=$(expr $name_max + 1)
-long_name=$(printf '%0*d' $name_max_plus1 0)
+long_name=$(printf '%*s' $name_max_plus1 | tr ' ' '0')
 
 for f in '' f; do
   ln -s$f missing ENOENT_link || fail=1