From ca614ef8c702f6d5a962bc07b3a590438da1b546 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 27 Feb 2019 12:03:28 +0100 Subject: tests: add fdisk (dos) first sector dialog test The test verifies that the "First sector" dialog offers relevant range in the begin of the device if the end of the device is already used. Signed-off-by: Karel Zak --- tests/ts/fdisk/mbr-nondos-mode | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/ts') diff --git a/tests/ts/fdisk/mbr-nondos-mode b/tests/ts/fdisk/mbr-nondos-mode index 7ac5dae1b..3ae25ba1f 100755 --- a/tests/ts/fdisk/mbr-nondos-mode +++ b/tests/ts/fdisk/mbr-nondos-mode @@ -149,6 +149,24 @@ ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout +# Create a new layout +# +ts_log "Create new DOS partition table (again)" +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_log "Create 1st primary at the end of device" +echo -e "n\np\n1\n20000\n\n${FDISK_CMD_WRITE_CLOSE}" | \ + $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + +print_layout + +ts_log "Create 2nd primary at the begin of device" +echo -e "n\np\n2\n\n\n${FDISK_CMD_WRITE_CLOSE}" | \ + $TS_CMD_FDISK ${TEST_IMAGE_NAME} >> $TS_OUTPUT + +print_layout + ts_fdisk_clean ${TEST_IMAGE_NAME} ts_finalize -- cgit v1.2.3-55-g7522