diff options
author | Zdenek Behan | 2009-08-03 03:54:11 +0200 |
---|---|---|
committer | Karel Zak | 2009-08-17 12:25:21 +0200 |
commit | 9129bc47b04d58c5b12ce804f60381c8d3ba59d6 (patch) | |
tree | 5c2b7b4f138a2e99c2e261448d50986a60ea8332 /tests/ts/fdisk/doslabel | |
parent | tests: fdisk doslabel test also checks changing partition type (diff) | |
download | kernel-qcow2-util-linux-9129bc47b04d58c5b12ce804f60381c8d3ba59d6.tar.gz kernel-qcow2-util-linux-9129bc47b04d58c5b12ce804f60381c8d3ba59d6.tar.xz kernel-qcow2-util-linux-9129bc47b04d58c5b12ce804f60381c8d3ba59d6.zip |
tests: fdisk doslabel test also checks setting partition active
* Yet another test, this time for setting active partition
Signed-off-by: Zdenek Behan <rain@matfyz.cz>
Diffstat (limited to 'tests/ts/fdisk/doslabel')
-rwxr-xr-x | tests/ts/fdisk/doslabel | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ts/fdisk/doslabel b/tests/ts/fdisk/doslabel index 5aba4927e..a7c259eac 100755 --- a/tests/ts/fdisk/doslabel +++ b/tests/ts/fdisk/doslabel @@ -26,6 +26,7 @@ FDISK_CMD_WRITE_CLOSE="w\nq\n" FDISK_CMD_CREATE_DOSLABEL="o\n" #create dos label FDISK_CMD_CREATE_PRIMARY="n\np\n1\n\n+1M\n" # create primary partition 1 of size 1MB FDISK_CMD_CHANGE_PARTTYPE="t\nbf\n" # change partition type to "bf - solaris", this requires that there is only one partition to change +FDISK_CMD_SET_ACTIVE="a\n1\n" # set first partition active FDISK_CMD_CREATE_EXTENDED="n\ne\n2\n\n+10\n" # create extended partition 2 of size 11 cylinders FDISK_CMD_CREATE_LOGICAL="n\nl\n\n+1\n" # create next logical partition of size 2 cyl FDISK_CMD_DELETE_LOGICALS="d\n6\nd\n5\nd\n6\d5\n" # delete middle, head, tail, last partitions @@ -55,6 +56,11 @@ echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CHANGE_PARTTYPE}${FDISK_CMD_WRITE_CLOSE}" $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum 2>&1 >> $TS_OUTPUT +ts_log "Set primary partition active" +echo -e "${FDISK_CMD_INIT}${FDISK_CMD_SET_ACTIVE}${FDISK_CMD_WRITE_CLOSE}" | \ + $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null +ts_image_md5sum 2>&1 >> $TS_OUTPUT + ts_log "Re-create primary partition" echo -e "${FDISK_CMD_INIT}d\n${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null |