From: Karel Zak Date: Mon, 11 Mar 2013 15:05:29 +0000 (+0100) Subject: tests: update 'odd input' fdisk test X-Git-Tag: v2.23-rc1~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23ce9df745fd33e87b3ac409f3845d2da297005d;p=thirdparty%2Futil-linux.git tests: update 'odd input' fdisk test Signed-off-by: Karel Zak --- diff --git a/tests/expected/fdisk/oddinput b/tests/expected/fdisk/oddinput index a681d0d2f8..19bf365fdd 100644 --- a/tests/expected/fdisk/oddinput +++ b/tests/expected/fdisk/oddinput @@ -3,7 +3,6 @@ f1c9645dbc14efddc7d8a322685f26eb oddinput.img Empty image listing Disk testimage: 10 MB, 10485760 bytes, 20480 sectors -255 heads, 63 sectors/track, 1 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 @@ -11,4 +10,4 @@ I/O size (minimum/optimal): 512 bytes / 512 bytes Nonexistant file fdisk: cannot open _a_file_that_does_not_exist_: No such file or directory Too small file -fdisk: cannot open oddinput.toosmall: Invalid argument +fdisk: cannot open oddinput.toosmall: Inappropriate ioctl for device diff --git a/tests/ts/fdisk/oddinput b/tests/ts/fdisk/oddinput index 799eca054e..5b9bb31084 100755 --- a/tests/ts/fdisk/oddinput +++ b/tests/ts/fdisk/oddinput @@ -26,6 +26,10 @@ ts_log "Initialize empty image" TEST_IMAGE_NAME=$(ts_image_init 10) ts_image_md5sum >> $TS_OUTPUT 2>&1 +# +# Note that since 2.23 the DOS-mode has effect only if there is a MBR on the device. +# + 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 -c=dos -u=cylinders -l ${TEST_IMAGE_NAME} 2>&1 | sed -e "s/${TEST_IMAGE_NAME//\//\\/}/testimage/" >> $TS_OUTPUT