On 02/01/18 10:40, Michael wrote:
> +shred: 00: renamed to _

Interesting. I see that AIX xargs defaults to having
'_' mean end of input if no -E is specified.
The attached simplifies by removing sed and xargs altogether.

cheers,
Pádraig.

From dd0b0b21e53c6a884e73c28689f698597ea573f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Tue, 2 Jan 2018 12:52:11 +0000
Subject: [PATCH] tests: avoid false failure on AIX

* tests/misc/shred-remove.sh: AIX xargs defaults to using
'_' to indicate end of input, thus ignoring it.
Rather than specifying -E to avoid this behavior, simplify
by removing sed and xargs usage.
---
 tests/misc/shred-remove.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/misc/shred-remove.sh b/tests/misc/shred-remove.sh
index f70a1f7..5894ea7 100755
--- a/tests/misc/shred-remove.sh
+++ b/tests/misc/shred-remove.sh
@@ -47,10 +47,11 @@ returns_ 1 shred -n0 --remove=none $file 2>/dev/null || fail=1
 # Ensure rename passes complete.
 # coreutils-8.28 did not do the decreasing length rename
 # which may have leaked the length of the removed file name
-NL="
-"
-printf 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ |
-sed "s/./&\\$NL/g" | xargs touch || framework_failure_  # test level exhaustion
+ # test level exhaustion
+touch \
+ 0 1 2 3 4 5 6 7 8 9 \
+ a b c d e f g h i j k l m n o p q r s t u v w x y z \
+ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ || framework_failure_
 touch test 000 || framework_failure_  # test level increment
 shred -vu test 2>out || fail=1
 cat <<\EOF >exp || framework_failure_
-- 
2.9.3

Reply via email to