On 01/11/2025 23:36, Collin Funk wrote:
I see these tests fail on cfarm119 (AIX 7.3) but not on
cfarm111 (AIX 7.1), so it seems to be to be a behavior change between
those versions. I don't see any way around it in Gnulib, so this patch
just disables them on AIX.
-- 8< --
* tests/install/basic-1.sh: Skip a test case on AIX 7.3 which cannot
make directories if any of its parents are inaccessible.
* tests/mkdir/p-3.sh: Likewise.
---
tests/install/basic-1.sh | 24 +++++++++++++++---------
tests/mkdir/p-3.sh | 16 +++++++++++-----
2 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/tests/install/basic-1.sh b/tests/install/basic-1.sh
index fd13eb68b..fe41f2ec0 100755
--- a/tests/install/basic-1.sh
+++ b/tests/install/basic-1.sh
@@ -96,15 +96,21 @@ test -d xx/rel && fail=1
# inaccessible parent. coreutils 5.97 fails this test.
# Perform this test only if "." is on a local file system.
# Otherwise, it would fail e.g., on an NFS-mounted file system.
-if is_local_dir_ .; then
- mkdir -p sub1/d || fail=1
- (cd sub1/d && chmod a-r . && chmod a-rx .. &&
- ginstall -d "$iwd/xx/zz" rel/a rel/b) || fail=1
- chmod 755 sub1 sub1/d || fail=1
- test -d xx/zz || fail=1
- test -d sub1/d/rel/a || fail=1
- test -d sub1/d/rel/b || fail=1
-fi
+# Also do not perform this test on AIX which cannot make directories if any of
+# its parents are inaccessible.
+case $host_triplet in
+ *aix*) ;;
+ *)
+ if is_local_dir_ .; then
+ mkdir -p sub1/d || fail=1
+ (cd sub1/d && chmod a-r . && chmod a-rx .. &&
+ ginstall -d "$iwd/xx/zz" rel/a rel/b) || fail=1
+ chmod 755 sub1 sub1/d || fail=1
+ test -d xx/zz || fail=1
+ test -d sub1/d/rel/a || fail=1
+ test -d sub1/d/rel/b || fail=1
+ fi
+esac
touch file || fail=1
ginstall -Dv file sub3/a/b/c/file >out 2>&1 || fail=1
diff --git a/tests/mkdir/p-3.sh b/tests/mkdir/p-3.sh
index b1debaa0f..bdb09ee42 100755
--- a/tests/mkdir/p-3.sh
+++ b/tests/mkdir/p-3.sh
@@ -39,11 +39,17 @@ test -d "$p/b/b" && test -d "$p/z" || fail=1
# whose parent is inaccessible. coreutils 5.97 fails this test.
# Perform this test only if "." is on a local file system.
# Otherwise, it would fail e.g., on an NFS-mounted file system.
-if is_local_dir_ .; then
- (cd no-acce3s/d && chmod a-r . && chmod a-rx .. &&
- mkdir -p a/b "$p/b/c" d/e && test -d a/b && test -d d/e) || fail=1
- test -d "$p/b/c" || fail=1
-fi
+# Also do not perform this test on AIX which cannot make directories if any of
+# its parents are inaccessible.
+case $host_triplet in
+ *aix*) ;;
+ *)
+ if is_local_dir_ .; then
+ (cd no-acce3s/d && chmod a-r . && chmod a-rx .. &&
+ mkdir -p a/b "$p/b/c" d/e && test -d a/b && test -d d/e) || fail=1
+ test -d "$p/b/c" || fail=1
+ fi
+esac
b=$(ls "$p/a" | tr -d '\n')
# With coreutils-5.3.0, this would fail with $b=bu.
Is this an acceptable behavior divergence?
I'd be inclined to leave the test failure TBH
unless we know why it happens and we can't workaround it.
cheers,
Padraig