parted/0102-tests-fix-t2310-dos-extended-2-sector-min-offset.sh.patch
Brian C. Lane 5dcb73843d - Add some missing patches from master and the loop label fixes
- tests: test loop labels (psusi)
- libparted: don't trash filesystem when writing loop label (psusi)
- libparted: give correct partition device name on loop labels (psusi)
- partprobe: do not skip loop labels (psusi)
- libparted: don't create partition on loop label (psusi)
- libparted: fix loop labels to not vanish (psusi)
- libparted: remove all old partitions, even if new label allows less (psusi)
- libparted: remove old partitions *first* before adding new ones (psusi)
- libparted: don't detect fat and ntfs boot sectors as dos MBR (psusi)
- Fix filesystem detection on non 512 byte sectors (psusi)
- tests: fix t2310-dos-extended-2-sector-min-offset.sh (psusi)
- libparted: remove last_usable_if_grown (psusi)
2014-05-22 15:03:30 -07:00

46 lines
1.8 KiB
Diff

From d68ca7fe15915849629c85f5a5476b2173b3af2c Mon Sep 17 00:00:00 2001
From: Phillip Susi <psusi@ubuntu.com>
Date: Sat, 29 Mar 2014 16:29:06 -0400
Subject: [PATCH 102/103] tests: fix t2310-dos-extended-2-sector-min-offset.sh
This test was ignoring the requested sector size and always using
512 bytes per sector. Fix it to use the requested sector size.
---
tests/t2310-dos-extended-2-sector-min-offset.sh | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/tests/t2310-dos-extended-2-sector-min-offset.sh b/tests/t2310-dos-extended-2-sector-min-offset.sh
index f74cba5..53843ab 100644
--- a/tests/t2310-dos-extended-2-sector-min-offset.sh
+++ b/tests/t2310-dos-extended-2-sector-min-offset.sh
@@ -23,7 +23,8 @@ require_root_
require_scsi_debug_module_
# create memory-backed device
-scsi_debug_setup_ dev_size_mb=1 > dev-name ||
+ss=$sector_size_
+scsi_debug_setup_ sector_size=$ss dev_size_mb=1 > dev-name ||
skip_ 'failed to create scsi_debug device'
scsi_dev=$(cat dev-name)
p1=${scsi_dev}1
@@ -31,15 +32,11 @@ p5=${scsi_dev}5
cat <<EOF > exp || framework_failure
BYT;
-$scsi_dev:2048s:scsi:512:512:msdos:Linux scsi_debug:;
+$scsi_dev:$((2048*512/$ss))s:scsi:$ss:$ss:msdos:Linux scsi_debug:;
1:64s:128s:65s:::lba;
5:65s:128s:64s:::;
EOF
-cat <<EOF > err.exp || framework_failure
-Error: Partition(s) 5 on $scsi_dev have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
-EOF
-
# Create a DOS label with an extended partition starting at sector 64.
parted -s $scsi_dev mklabel msdos || fail=1
parted --align=min -s $scsi_dev mkpart extended 64s 128s> out 2>&1 || fail=1
--
1.9.0