]> err.no Git - util-linux/commitdiff
tests: fix and update old fdisk tests
authorKarel Zak <kzak@redhat.com>
Tue, 9 Feb 2010 15:24:51 +0000 (16:24 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 16 Feb 2010 08:58:57 +0000 (09:58 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/fdisk/oddinput
tests/ts/fdisk/doslabel
tests/ts/fdisk/oddinput
tests/ts/fdisk/sunlabel

index f1bfda55d19c20ec122f3eb11b5c29019dcfa003..e05713c641629850bee760f1b0252cf142306a44 100644 (file)
@@ -7,6 +7,7 @@ Disk testimage: 0 MB, 0 bytes
 255 heads, 63 sectors/track, 0 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0x00000000
 
 Nonexistant file
index a7c259eac4ef949187147950ac209c3e029a9e48..762cdaac996895bdfabb195d10112b8d96788af7 100755 (executable)
@@ -37,63 +37,63 @@ FDISK_CMD_DELETE_EXTENDED="d\n2\n" # delete second primary
 
 ts_log "Initialize empty image"
 TEST_IMAGE_NAME=$(ts_image_init 10)
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 # need to run init twice, to change system ID after new label, otherwise system
 # ID will be random and will screw up md5's
 ts_log "Create new DOS partition table"
 echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_INIT}${FDISK_CMD_WRITE_CLOSE}" \
         | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Create primary partition"
 echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
        $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Set partition type"
 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_image_md5sum >> $TS_OUTPUT 2>&1
 
 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_image_md5sum >> $TS_OUTPUT 2>&1
 
 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
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Create extended partition"
 echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" | \
        $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Create logical partitions"
 echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
        | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Delete logical partitions"
 echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_LOGICALS}${FDISK_CMD_WRITE_CLOSE}" \
        | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Create another logical partition"
 echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
        | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum  2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Delete primary partition"
 echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \
        | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Delete extended partition"
 echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \
        | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_finalize
index c86984169f832d2839ed3da134386fc2c34c03bd..9d5c476282b718de5faadf6fd2eb63c954c3e6ea 100755 (executable)
@@ -24,7 +24,7 @@ ts_init "$*"
 
 ts_log "Initialize empty image"
 TEST_IMAGE_NAME=$(ts_image_init 10)
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Empty image listing" # this should report empty partition table
 # TEST_IMAGE_NAME has absolute path, and is by definition different on each computer, we need to sed it away
index 9c2b018891503bd9fdfe9db08dfaec73fc031f32..6bf7e0ed1c4bde17f20fa4eed9a709959e5dbbe4 100755 (executable)
@@ -34,41 +34,41 @@ FDISK_CMD_CREATE_SECONDARY="n\n2\n128\n\n" # create secondary partition cylinder
 
 ts_log "Initialize empty image"
 TEST_IMAGE_NAME=$(ts_image_init 10)
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Create new SUN partition table"
 echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" \
         | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Create first partition"
 echo -e "${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
        $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Set partition sysid"
 echo -e "${FDISK_CMD_CHANGE_SYSID}${FDISK_CMD_WRITE_CLOSE}" | \
        $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Set first partition readonly"
 echo -e "${FDISK_CMD_TOGGLE_READONLY}${FDISK_CMD_WRITE_CLOSE}" | \
        $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Set first partition mountable"
 echo -e "${FDISK_CMD_TOGGLE_MOUNTABLE}${FDISK_CMD_WRITE_CLOSE}" | \
        $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Create second partition"
 echo -e "${FDISK_CMD_CREATE_SECONDARY}${FDISK_CMD_WRITE_CLOSE}" | \
        $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_log "Delete all partitions"
 echo -e "${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" | \
        $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
-ts_image_md5sum 2>&1 >> $TS_OUTPUT
+ts_image_md5sum >> $TS_OUTPUT 2>&1
 
 ts_finalize