From: Pádraig Brady Date: Thu, 31 Aug 2017 03:05:31 +0000 (-0700) Subject: tests: avoid printf '0*d' construct unsupported by ash X-Git-Tag: v8.28~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ee9c8f7a6d3f2cec5eb4b086f05a60f67c8b052;p=thirdparty%2Fcoreutils.git tests: avoid printf '0*d' construct unsupported by ash * tests/ln/sf-1.sh: Generate specific length with space padding which is supported. Reported by Assaf Gordon on Alpine Linux. --- diff --git a/tests/ln/sf-1.sh b/tests/ln/sf-1.sh index c6dafdf704..36d5b29ce8 100755 --- a/tests/ln/sf-1.sh +++ b/tests/ln/sf-1.sh @@ -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