diff options
author | Jim Meyering <meyering@redhat.com> | 2009-08-28 18:53:39 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-08-28 18:57:43 +0200 |
commit | d16300a88d9200e0f1e08d56e39392e028412611 (patch) | |
tree | 35ecd5fd4394a911e7a481b1da40e8468fc9711c /tests/t4100-dvh-partition-limits.sh | |
parent | f78cfbbe09e8c91d4e904a53e1f3e386d8be6bf5 (diff) | |
download | parted-d16300a88d9200e0f1e08d56e39392e028412611.tar.gz |
tests: make two partition-related tests work for other sector sizes
These two root-only tests would fail with the PARTED_SECTOR_SIZE envvar
set to anything other than 512. Now they also work for multiples.
* tests/t4100-dvh-partition-limits.sh: Make sector-size agnostic.
* tests/t4100-msdos-partition-limits.sh: Likewise.
Diffstat (limited to 'tests/t4100-dvh-partition-limits.sh')
-rwxr-xr-x | tests/t4100-dvh-partition-limits.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/t4100-dvh-partition-limits.sh b/tests/t4100-dvh-partition-limits.sh index 0606a7e..89302f1 100755 --- a/tests/t4100-dvh-partition-limits.sh +++ b/tests/t4100-dvh-partition-limits.sh @@ -23,6 +23,7 @@ privileges_required_=1 : ${srcdir=.} . $srcdir/test-lib.sh require_xfs_ +ss=$sector_size_ #################################################### # Create and mount a file system capable of dealing with >=2TB files. @@ -58,7 +59,7 @@ do_mkpart() start_sector=$1 end_sector=$2 # echo '********' $(echo $end_sector - $start_sector + 1 |bc) - dd if=/dev/zero of=$dev bs=1b count=2k seek=$end_sector 2> /dev/null && + dd if=/dev/zero of=$dev bs=$ss count=2k seek=$end_sector 2> /dev/null && parted -s $dev mklabel $table_type && parted -s $dev mkpart p xfs ${start_sector}s ${end_sector}s } @@ -136,7 +137,7 @@ test_expect_success \ cat > exp <<EOF Model: (file) Disk: 4294970342s -Sector size (logical/physical): 512B/512B +Sector size (logical/physical): ${ss}B/${ss}B Partition Table: $table_type Number Start End Size Type File system Name Flags |