[parted-devel] [PATCH 7/8] tests: t3310-flags.sh: Add test for dvh table flags
Mike Fleetwood
mike.fleetwood at googlemail.com
Tue Aug 16 19:42:41 UTC 2016
DVH table reserves the first 4 MiB for the volume header information so
move the created test partition to immediately after that.
Exclude testing the boot flag as that can only be set on logical
partitions and this test script only uses primary partitions so far.
---
tests/t3310-flags.sh | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/tests/t3310-flags.sh b/tests/t3310-flags.sh
index 7f1f65b..62be528 100644
--- a/tests/t3310-flags.sh
+++ b/tests/t3310-flags.sh
@@ -22,10 +22,10 @@ dev=dev-file
extract_flags()
{
- perl -nle '/^[^:]*:2048s:4095s:2048s::[^:]*:(.+);$/ and print $1' "$@"
+ perl -nle '/^[^:]*:4096s:6143s:2048s::[^:]*:(.+);$/ and print $1' "$@"
}
-for table_type in bsd gpt mac msdos; do
+for table_type in bsd dvh gpt mac msdos; do
ptn_num=1
# Get the full list of flags to be tested from each table types'
@@ -34,6 +34,12 @@ for table_type in bsd gpt mac msdos; do
bsd) primary_or_name=''
flags='boot raid lvm'
;;
+ dvh) primary_or_name='primary'
+ # FIXME: Exclude boot flag as that can only be set on logical
+ # partitions in the DVH disk label and this test only uses
+ # primary partitions.
+ flags='root swap'
+ ;;
gpt) primary_or_name='PTNNAME'
flags='raid lvm boot bios_grub hp-service msftres msftdata diag atvrecv hidden legacy_boot prep irst esp'
;;
@@ -55,11 +61,11 @@ for table_type in bsd gpt mac msdos; do
;;
esac
- n_sectors=5000
+ n_sectors=8192
dd if=/dev/null of=$dev bs=$ss seek=$n_sectors || fail=1
parted -s $dev mklabel $table_type \
- mkpart $primary_or_name ext2 $((1*2048))s $((2*2048-1))s \
+ mkpart $primary_or_name ext2 $((4*1024))s $((6*1024-1))s \
> out 2> err || fail=1
compare /dev/null out || fail=1
--
1.7.1
More information about the parted-devel
mailing list