From 5c7cd9ab507a1f49da541711959aa0062cea2ad6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 16 Jun 2010 11:04:39 +0200 Subject: [PATCH] tests: update fdisk tests Signed-off-by: Karel Zak --- tests/expected/blkid/md-raid1-part | 8 -------- tests/expected/blkid/md-raid1-whole | 8 -------- tests/expected/fdisk/align-512-4K | 8 -------- tests/expected/fdisk/align-512-4K-63 | 8 -------- tests/expected/fdisk/align-512-4K-md | 16 --------------- tests/expected/fdisk/align-512-512 | 8 -------- tests/expected/fdisk/align-512-512-topology | 8 -------- tests/ts/blkid/md-raid1-part | 2 -- tests/ts/blkid/md-raid1-whole | 2 -- tests/ts/fdisk/align-512-4K | 2 -- tests/ts/fdisk/align-512-4K-63 | 2 -- tests/ts/fdisk/align-512-4K-md | 4 ---- tests/ts/fdisk/align-512-512 | 2 -- tests/ts/fdisk/align-512-512-topology | 2 -- tests/ts/fdisk/doslabel | 22 ++++++++++----------- tests/ts/fdisk/oddinput | 6 +++--- 16 files changed, 14 insertions(+), 94 deletions(-) diff --git a/tests/expected/blkid/md-raid1-part b/tests/expected/blkid/md-raid1-part index 08b49bd4..f1d4cbbb 100644 --- a/tests/expected/blkid/md-raid1-part +++ b/tests/expected/blkid/md-raid1-part @@ -6,14 +6,6 @@ After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) -WARNING: DOS-compatible mode is deprecated. It's strongly recommended to - switch off the mode (command 'c') and change display units to - sectors (command 'u'). - -Command (m for help): DOS Compatibility flag is not set - -Command (m for help): Changing display/entry units to sectors - Command (m for help): Command action e extended p primary partition (1-4) diff --git a/tests/expected/blkid/md-raid1-whole b/tests/expected/blkid/md-raid1-whole index 670a6023..32281c61 100644 --- a/tests/expected/blkid/md-raid1-whole +++ b/tests/expected/blkid/md-raid1-whole @@ -8,14 +8,6 @@ After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) -WARNING: DOS-compatible mode is deprecated. It's strongly recommended to - switch off the mode (command 'c') and change display units to - sectors (command 'u'). - -Command (m for help): DOS Compatibility flag is not set - -Command (m for help): Changing display/entry units to sectors - Command (m for help): Command action e extended p primary partition (1-4) diff --git a/tests/expected/fdisk/align-512-4K b/tests/expected/fdisk/align-512-4K index 0857e378..7be7c039 100644 --- a/tests/expected/fdisk/align-512-4K +++ b/tests/expected/fdisk/align-512-4K @@ -10,14 +10,6 @@ The device presents a logical sector size that is smaller than the physical sector size. Aligning to a physical sector (or optimal I/O) size boundary is recommended, or performance may be impacted. -WARNING: DOS-compatible mode is deprecated. It's strongly recommended to - switch off the mode (command 'c') and change display units to - sectors (command 'u'). - -Command (m for help): DOS Compatibility flag is not set - -Command (m for help): Changing display/entry units to sectors - Command (m for help): Command action e extended p primary partition (1-4) diff --git a/tests/expected/fdisk/align-512-4K-63 b/tests/expected/fdisk/align-512-4K-63 index 75998891..51e75f95 100644 --- a/tests/expected/fdisk/align-512-4K-63 +++ b/tests/expected/fdisk/align-512-4K-63 @@ -10,14 +10,6 @@ The device presents a logical sector size that is smaller than the physical sector size. Aligning to a physical sector (or optimal I/O) size boundary is recommended, or performance may be impacted. -WARNING: DOS-compatible mode is deprecated. It's strongly recommended to - switch off the mode (command 'c') and change display units to - sectors (command 'u'). - -Command (m for help): DOS Compatibility flag is not set - -Command (m for help): Changing display/entry units to sectors - Command (m for help): Command action e extended p primary partition (1-4) diff --git a/tests/expected/fdisk/align-512-4K-md b/tests/expected/fdisk/align-512-4K-md index 4ac8ccc7..db43ec6d 100644 --- a/tests/expected/fdisk/align-512-4K-md +++ b/tests/expected/fdisk/align-512-4K-md @@ -10,14 +10,6 @@ The device presents a logical sector size that is smaller than the physical sector size. Aligning to a physical sector (or optimal I/O) size boundary is recommended, or performance may be impacted. -WARNING: DOS-compatible mode is deprecated. It's strongly recommended to - switch off the mode (command 'c') and change display units to - sectors (command 'u'). - -Command (m for help): DOS Compatibility flag is not set - -Command (m for help): Changing display/entry units to sectors - Command (m for help): Command action e extended p primary partition (1-4) @@ -60,14 +52,6 @@ The device presents a logical sector size that is smaller than the physical sector size. Aligning to a physical sector (or optimal I/O) size boundary is recommended, or performance may be impacted. -WARNING: DOS-compatible mode is deprecated. It's strongly recommended to - switch off the mode (command 'c') and change display units to - sectors (command 'u'). - -Command (m for help): DOS Compatibility flag is not set - -Command (m for help): Changing display/entry units to sectors - Command (m for help): Command action e extended p primary partition (1-4) diff --git a/tests/expected/fdisk/align-512-512 b/tests/expected/fdisk/align-512-512 index 6f49256e..c940f806 100644 --- a/tests/expected/fdisk/align-512-512 +++ b/tests/expected/fdisk/align-512-512 @@ -6,14 +6,6 @@ After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) -WARNING: DOS-compatible mode is deprecated. It's strongly recommended to - switch off the mode (command 'c') and change display units to - sectors (command 'u'). - -Command (m for help): DOS Compatibility flag is not set - -Command (m for help): Changing display/entry units to sectors - Command (m for help): Command action e extended p primary partition (1-4) diff --git a/tests/expected/fdisk/align-512-512-topology b/tests/expected/fdisk/align-512-512-topology index c99a1745..f37b5a3b 100644 --- a/tests/expected/fdisk/align-512-512-topology +++ b/tests/expected/fdisk/align-512-512-topology @@ -6,14 +6,6 @@ After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) -WARNING: DOS-compatible mode is deprecated. It's strongly recommended to - switch off the mode (command 'c') and change display units to - sectors (command 'u'). - -Command (m for help): DOS Compatibility flag is not set - -Command (m for help): Changing display/entry units to sectors - Command (m for help): Command action e extended p primary partition (1-4) diff --git a/tests/ts/blkid/md-raid1-part b/tests/ts/blkid/md-raid1-part index 1d55f6bb..909edd03 100755 --- a/tests/ts/blkid/md-raid1-part +++ b/tests/ts/blkid/md-raid1-part @@ -40,8 +40,6 @@ DEVICE="/dev/${DEVNAME}" ts_log "Create partitions" $TS_CMD_FDISK ${DEVICE} >> $TS_OUTPUT 2>&1 <> $TS_OUTPUT 2>&1 <> $TS_OUTPUT 2>&1 <> $TS_OUTPUT 2>&1 <> $TS_OUTPUT 2>&1 <> $TS_OUTPUT 2>&1 <> $TS_OUTPUT 2>&1 <> $TS_OUTPUT 2>&1 <> $TS_OUTPUT 2>&1 # 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null 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_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 ts_finalize diff --git a/tests/ts/fdisk/oddinput b/tests/ts/fdisk/oddinput index 9d5c4762..ceb6102c 100755 --- a/tests/ts/fdisk/oddinput +++ b/tests/ts/fdisk/oddinput @@ -28,12 +28,12 @@ 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 -$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} 2>&1 | sed -e "s/${TEST_IMAGE_NAME//\//\\/}/testimage/" >> $TS_OUTPUT +$TS_CMD_FDISK -c=dos -u=cylinders -l ${TEST_IMAGE_NAME} 2>&1 | sed -e "s/${TEST_IMAGE_NAME//\//\\/}/testimage/" >> $TS_OUTPUT ts_log "Nonexistant file" # this originally does absolutely nothing -$TS_CMD_FDISK -l _a_file_that_does_not_exist_ >> $TS_OUTPUT 2>&1 +$TS_CMD_FDISK -c=dos -u=cylinders -l _a_file_that_does_not_exist_ >> $TS_OUTPUT 2>&1 ts_log "Too small file" # same here -$TS_CMD_FDISK -l $TS_TOPDIR/expected/fdisk/oddinput.toosmall >> $TS_OUTPUT 2>&1 +$TS_CMD_FDISK -c=dos -u=cylinders -l $TS_TOPDIR/expected/fdisk/oddinput.toosmall >> $TS_OUTPUT 2>&1 ts_finalize -- 2.39.5