[parted-devel] [PATCH] Avoid test failure with dash's builtin printf
Jim Meyering
jim at meyering.net
Tue Aug 14 09:08:43 UTC 2007
FYI: I've just pushed this to fix a test failure
when using dash as /bin/sh.
* tests/t0100-print.sh (msdos_magic): Use more-portable octal escapes,
not hexadecimal ones.
Signed-off-by: Jim Meyering <jim at meyering.net>
---
tests/t0100-print.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tests/t0100-print.sh b/tests/t0100-print.sh
index bc6a19b..edaa282 100755
--- a/tests/t0100-print.sh
+++ b/tests/t0100-print.sh
@@ -21,7 +21,9 @@ test_description="the most basic 'print' test"
dev=loop-file
-msdos_magic='\x55\xaa'
+# Using msdos_magic='\x55\xaa' looks nicer, but isn't portable.
+# dash's builtin printf doesn't recognize such \xHH hexadecimal escapes.
+msdos_magic='\125\252'
# The extra 3KB+ zero bytes at the end are to avoid triggering a failure
# on linux-2.6.8 that's probably related to opening with O_DIRECT.
--
1.5.3.rc4.67.gf9286
More information about the parted-devel
mailing list