]> err.no Git - util-linux/commitdiff
tests: fdisk doslabel test also checks setting partition active
authorZdenek Behan <rain@matfyz.cz>
Mon, 3 Aug 2009 01:54:11 +0000 (03:54 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 17 Aug 2009 10:25:21 +0000 (12:25 +0200)
* Yet another test, this time for setting active partition

Signed-off-by: Zdenek Behan <rain@matfyz.cz>
tests/expected/fdisk/doslabel
tests/ts/fdisk/doslabel

index 6f763605209ed9a692bff643fd0ba68eb26bafe0..9f11f4e22771352a265ac18389edc2912d35c918 100644 (file)
@@ -6,6 +6,8 @@ Create primary partition
 ae4f9b12f4a768849f72ea36938c30c7 doslabel.img
 Set partition type
 4a5dba818f9962a82a086d8b99b89a17 doslabel.img
+Set primary partition active
+c30e9c761b71cf95c67e758b93706ac5 doslabel.img
 Re-create primary partition
 ae4f9b12f4a768849f72ea36938c30c7 doslabel.img
 Create extended partition
index 5aba4927e0039cb98280821e8a9a98b83f6ba28d..a7c259eac4ef949187147950ac209c3e029a9e48 100755 (executable)
@@ -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