bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#548493: test-yesno.sh failure


From: Jim Meyering
Subject: Re: Bug#548493: test-yesno.sh failure
Date: Mon, 28 Sep 2009 11:36:57 +0200

Bruno Haible wrote:
> Jim Meyering wrote:
>>  # Test with seekable stdin; the followon process must see remaining data.
>> -cat <<EOF > ${p}in.tmp
>> +cat <<EOF |tr @ '\177'> ${p}in.tmp
>
> This can be simplified to:
>
>   tr @ '\177' <<EOF > ${p}in.tmp

Of course!  Thanks.
I've pushed this:

>From a9ab119464cf6faa7551ff0b090072adc660eb67 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 27 Sep 2009 08:41:55 +0200
Subject: [PATCH] test-yesno: work around sparc-dash here-document infelicity

Without this change, the literal \177 byte in a here document
would make dash 0.5.5.1-3 access uninitialized memory.
* tests/test-yesno.sh: Don't put the \177 byte in the here document.
Instead, use a marker, "@", and filter through tr to create the desired
contents.  Reported as <http://bugs.debian.org/548493> by Kurt Roeckx.
---
 ChangeLog           |    9 +++++++++
 tests/test-yesno.sh |    4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 12962ec..f7ef1d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-27  Jim Meyering  <address@hidden>
+
+       test-yesno: work around sparc-dash here-document infelicity
+       Without this change, the literal \177 byte in a here document
+       would make dash 0.5.5.1-3 access uninitialized memory.
+       * tests/test-yesno.sh: Don't put the \177 byte in the here document.
+       Instead, use a marker, "@", and filter through tr to create the desired
+       contents.  Reported as <http://bugs.debian.org/548493> by Kurt Roeckx.
+
 2009-09-27  Bruno Haible  <address@hidden>

        Disable untested support for new flavours of ACLs on AIX.
diff --git a/tests/test-yesno.sh b/tests/test-yesno.sh
index 52b94ef..b1a5b65 100755
--- a/tests/test-yesno.sh
+++ b/tests/test-yesno.sh
@@ -19,9 +19,9 @@ else
 fi

 # Test with seekable stdin; the followon process must see remaining data.
-cat <<EOF > ${p}in.tmp
+tr @ '\177' <<EOF > ${p}in.tmp
 nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn - entire line consumed
-yn - backspace does not change result
address@hidden - backspace does not change result
 y
 does not match either yesexpr or noexpr
 n
--
1.6.5.rc2.177.ga9dd6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]