summaryrefslogtreecommitdiff
path: root/tests/t4100-msdos-partition-limits.sh
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-04-30 15:59:14 +0200
committerJim Meyering <meyering@redhat.com>2010-04-30 16:20:19 +0200
commit1611f6e9c09d0168f36939e8d22f404cfd9a1f2e (patch)
tree036246bca244b36caf7a8ce9938920187e9decdb /tests/t4100-msdos-partition-limits.sh
parent0f850220b3f26bb969a1a7ff78dc550691a89566 (diff)
downloadparted-1611f6e9c09d0168f36939e8d22f404cfd9a1f2e.tar.gz
tests: avoid root-only/XFS limit test failure on 32-bit system
* tests/t4100-msdos-partition-limits.sh: Due to an inherent XFS limitation on 32-bit systems, this test would fail a set-up file creation step for simulated sector sizes of 4K and up. Skip this test in those cases. Upon dd failure, propagate its diagnostic to output, to make this sort of problem easier to diagnose. * tests/t4100-dvh-partition-limits.sh: Likewise.
Diffstat (limited to 'tests/t4100-msdos-partition-limits.sh')
-rwxr-xr-xtests/t4100-msdos-partition-limits.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/t4100-msdos-partition-limits.sh b/tests/t4100-msdos-partition-limits.sh
index b63a534..db98f2e 100755
--- a/tests/t4100-msdos-partition-limits.sh
+++ b/tests/t4100-msdos-partition-limits.sh
@@ -25,6 +25,13 @@ privileges_required_=1
require_xfs_
ss=$sector_size_
+# On a 32-bit system, we must skip this test when $ss >= 4096.
+# Otherwise, due to an inherent 32-bit-XFS limit, dd would fail to
+# create the file of size > 16TiB
+if test $(uname -m) != x86_64; then
+ test $ss -le 2048 || exit 77
+fi
+
####################################################
# Create and mount a file system capable of dealing with >=2TB files.
# We must be able to create a file with an apparent length of 2TB or larger.
@@ -59,7 +66,8 @@ do_mkpart()
start_sector=$1
end_sector=$2
# echo '********' $(echo $end_sector - $start_sector + 1 |bc)
- dd if=/dev/zero of=$dev bs=$ss count=2k seek=$end_sector 2> /dev/null &&
+ dd if=/dev/zero of=$dev bs=$ss count=2k seek=$end_sector 2> dd-err ||
+ { cat dd-err 1>&2; return 1; }
parted -s $dev mklabel $table_type &&
parted -s $dev mkpart p xfs ${start_sector}s ${end_sector}s
}