Here are two patches. Together, since they address the
same underlying portability problem.
Signed-off-by: Jim Meyering <[EMAIL PROTECTED]>
---
tests/t0100-print.sh | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/t0100-print.sh b/tests/t0100-print.sh
index 74c478e..cbb7f75 100755
--- a/tests/t0100-print.sh
+++ b/tests/t0100-print.sh
@@ -25,9 +25,15 @@ dev=loop-file
msdos_magic='\x55\xaa'
+# 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.
+# Note that the minimum number of appended zero bytes required to avoid
+# the failure was 3465. Here, we append a little more to make the resulting
+# file have a total size of exactly 4kB.
test_expect_success \
"setup: create the most basic partition table, manually" \
- '{ dd if=/dev/zero bs=510 count=1; printf "$msdos_magic"; } > $dev'
+ '{ dd if=/dev/zero bs=510 count=1; printf "$msdos_magic"
+ dd if=/dev/zero bs=3584 count=1; } > $dev'
test_expect_success \
'print the empty table' \
@@ -39,7 +45,7 @@ fail=0
{
cat <<EOF
Model: (file)
-Disk .../$dev: 512B
+Disk .../$dev: 4096B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
--
1.5.2.1.280.g38570
>From 4ddfb17fb12cde5802545b6fcdae08300341be27 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[EMAIL PROTECTED]>
Date: Fri, 22 Jun 2007 19:44:27 +0200
Subject: [PATCH] Avoid test failure on Linux-2.6.8 due to too small underlying
file.
Overwrite the label creating a 4KB file; 1KB was too small and would
trigger the failure. Reported by Bob Proulx.
Signed-off-by: Jim Meyering <[EMAIL PROTECTED]>
---
tests/t0000-basic.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/t0000-basic.sh b/tests/t0000-basic.sh
index 83abcea..317ba03 100755
--- a/tests/t0000-basic.sh
+++ b/tests/t0000-basic.sh
@@ -50,7 +50,7 @@ test_expect_success 'expect no output' '$compare out
/dev/null'
test_expect_success \
'erase the left-over label' \
- 'dd if=/dev/zero of=$dev bs=1K count=1 2> /dev/null'
+ 'dd if=/dev/zero of=$dev bs=4K count=1 2> /dev/null'
# First iteration works with no prompting, since there is no preexisting label.
test_expect_success \
--
1.5.2.1.280.g38570
_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel