summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhillip Susi <psusi@ubuntu.com>2014-01-05 23:02:44 -0500
committerPhillip Susi <psusi@ubuntu.com>2014-05-22 19:56:36 -0400
commit7eac0588b68a4d991a0f861bb9f4553f44557e14 (patch)
tree3b31ad15458857867163f4efb88bc5fbc2c9d512 /tests
parent5adae27101565a5d6fed4aadf28ddb39872e41f5 (diff)
downloadparted-7eac0588b68a4d991a0f861bb9f4553f44557e14.tar.gz
parted: don't reload partition table on every command
gpt was using a static local variable to suppress repeatedly reporting an error if you chose to ignore it. This is incorrect as the variable is global to all disks, and ignoring the error on one should not suppress its reporting on another. Moving the flag to the PedDisk object made it effectively useless because parted was destroying the PedDisk and reloading the partition table on every command. Parted has been reworked to cache the PedDisk once loaded, and only discard it when changing disks, or creating a new disklabel.
Diffstat (limited to 'tests')
-rw-r--r--tests/t0283-overlap-partitions.sh6
-rwxr-xr-xtests/t3300-palo-prep.sh8
2 files changed, 4 insertions, 10 deletions
diff --git a/tests/t0283-overlap-partitions.sh b/tests/t0283-overlap-partitions.sh
index 221332d..76b2740 100644
--- a/tests/t0283-overlap-partitions.sh
+++ b/tests/t0283-overlap-partitions.sh
@@ -30,7 +30,6 @@ parted ---pretend-input-tty $dev <<EOF > out 2>&1 || fail=1
print
ignore
rm
-ignore
2
EOF
@@ -59,8 +58,6 @@ Number Start End Size Type File system Flags
2 5242kB 8000kB 2758kB primary
(parted) rm
-Error: Can't have overlapping partitions.
-Ignore/Cancel? ignore
Partition number? 2
(parted)
EOF
@@ -73,7 +70,6 @@ parted ---pretend-input-tty $dev <<EOF > out 2>&1 || fail=1
print
ignore
rm
-ignore
1
EOF
@@ -101,8 +97,6 @@ Number Start End Size Type File system Flags
1 1049kB 5243kB 4194kB primary
(parted) rm
-Error: Can't have a partition outside the disk!
-Ignore/Cancel? ignore
Partition number? 1
(parted)
EOF
diff --git a/tests/t3300-palo-prep.sh b/tests/t3300-palo-prep.sh
index 4050414..88b2c55 100755
--- a/tests/t3300-palo-prep.sh
+++ b/tests/t3300-palo-prep.sh
@@ -20,9 +20,9 @@
ss=$sector_size_
cat > exp <<EOF || framework_failure
-1:2048s:4095s:2048s:::palo;
-1:2048s:4095s:2048s:::prep;
-1:2048s:4095s:2048s:::palo;
+1:2048s:4095s:2048s:ext2::lba, palo;
+1:2048s:4095s:2048s:ext2::lba, prep;
+1:2048s:4095s:2048s:ext2::lba, palo;
EOF
dev=dev-file
@@ -37,7 +37,7 @@ parted -m -s $dev mklabel msdos \
set 1 palo on u s print \
> out 2> err || fail=1
-grep -E '^1:2048s:4095s:2048s:::p...;$' out > k; mv k out
+grep -E '^1:2048s:4095s:2048s:ext2::lba, p...;$' out > k; mv k out
compare exp out || fail=1