mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
tests: avoid false failures on AIX
* tests/ln/sf-1.sh: Limit the symlink size to 1MiB to avoid memory exhaustion seen on NFS on AIX, giving: + printf '%0*d' 4294967296 0 + ./tests/ln/sf-1.sh: line 38: printf: warning: 0: Result too large * tests/id/setgid.sh: Skip the test when the adjusted gid would equal 4294967295, as that's reserved on AIX. Reported by Michael Felt.
This commit is contained in:
@@ -33,9 +33,14 @@ esac
|
||||
|
||||
# Ensure we replace symlinks that don't or can't link to an existing target.
|
||||
# coreutils-8.22 would fail to replace {ENOTDIR,ELOOP,ENAMETOOLONG}_link below.
|
||||
name_max_plus1=$(expr $(stat -f -c %l .) + 1)
|
||||
name_max=$(stat -f -c %l .) || skip_ 'Error determining NAME_MAX'
|
||||
# Apply a limit since AIX returns 2^32-1 which would trigger resource issues.
|
||||
name_limit=$((1024*1024))
|
||||
test "$name_max" -lt "$name_limit" || name_max="$name_limit"
|
||||
name_max_plus1=$(expr $name_max + 1)
|
||||
test $name_max_plus1 -gt 1 || skip_ 'Error determining NAME_MAX'
|
||||
long_name=$(printf '%0*d' $name_max_plus1 0)
|
||||
|
||||
for f in '' f; do
|
||||
ln -s$f missing ENOENT_link || fail=1
|
||||
ln -s$f a/b ENOTDIR_link || fail=1
|
||||
|
||||
Reference in New Issue
Block a user