summaryrefslogtreecommitdiff
path: root/tests/expected/fdisk
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-11-02 20:15:39 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-11-02 20:15:39 +0400
commitb13154de3eca5ba28fbb4854d916cd0be5febeed (patch)
tree30f2e9e89ab71a2df837076ac68c3ba770230294 /tests/expected/fdisk
downloadutil-linux-b13154de3eca5ba28fbb4854d916cd0be5febeed.tar.gz
Imported Upstream version 2.22upstream/2.22upstream
Diffstat (limited to 'tests/expected/fdisk')
-rw-r--r--tests/expected/fdisk/align-512-4K83
-rw-r--r--tests/expected/fdisk/align-512-4K-6384
-rw-r--r--tests/expected/fdisk/align-512-4K-md87
-rw-r--r--tests/expected/fdisk/align-512-4K-topology78
-rw-r--r--tests/expected/fdisk/align-512-51268
-rw-r--r--tests/expected/fdisk/align-512-512-topology79
-rw-r--r--tests/expected/fdisk/id5
-rw-r--r--tests/expected/fdisk/mbr-dos-mode182
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode195
-rw-r--r--tests/expected/fdisk/oddinput14
-rw-r--r--tests/expected/fdisk/oddinput.toosmall1
-rw-r--r--tests/expected/fdisk/sunlabel16
12 files changed, 892 insertions, 0 deletions
diff --git a/tests/expected/fdisk/align-512-4K b/tests/expected/fdisk/align-512-4K
new file mode 100644
index 0000000..293f4ae
--- /dev/null
+++ b/tests/expected/fdisk/align-512-4K
@@ -0,0 +1,83 @@
+Create partitions
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+Device does not contain a recognized partition table
+
+
+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.
+
+Command (m for help): Partition type:
+ p primary (0 primary, 0 extended, 4 free)
+ e extended
+Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Using default value 2048
+Last sector, +sectors or +size{K,M,G} (2048-102399, default 102399): Partition 1 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (1 primary, 0 extended, 3 free)
+ e extended
+Select (default p): Partition number (1-4, default 2): First sector (22528-102399, default 22528): Using default value 22528
+Last sector, +sectors or +size{K,M,G} (22528-102399, default 102399): Partition 2 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (2 primary, 0 extended, 2 free)
+ e extended
+Select (default p): Partition number (1-4, default 3): First sector (43008-102399, default 43008): Using default value 43008
+Last sector, +sectors or +size{K,M,G} (43008-102399, default 102399): Partition 3 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (3 primary, 0 extended, 1 free)
+ e extended
+Select (default e): Selected partition 4
+First sector (63488-102399, default 63488): Using default value 63488
+Last sector, +sectors or +size{K,M,G} (63488-102399, default 102399): Using default value 102399
+Partition 4 of type Extended and of size 19 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 5
+First sector (65536-102399, default 65536): Using default value 65536
+Last sector, +sectors or +size{K,M,G} (65536-102399, default 102399): Partition 5 of type Linux and of size 5 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 6
+First sector (77824-102399, default 77824): Using default value 77824
+Last sector, +sectors or +size{K,M,G} (77824-102399, default 102399): Partition 6 of type Linux and of size 5 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 7
+First sector (90112-102399, default 90112): Using default value 90112
+Last sector, +sectors or +size{K,M,G} (90112-102399, default 102399): Using default value 102399
+Partition 7 of type Linux and of size 6 MiB is set
+
+Command (m for help):
+Disk /dev/...: 52 MB, 52428800 bytes, 102400 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / 32768 bytes
+
+
+ Device Boot Start End Blocks Id System
+/dev/...1 2048 22527 10240 83 Linux
+/dev/...2 22528 43007 10240 83 Linux
+/dev/...3 43008 63487 10240 83 Linux
+/dev/...4 63488 102399 19456 5 Extended
+/dev/...5 65536 75775 5120 83 Linux
+/dev/...6 77824 88063 5120 83 Linux
+/dev/...7 90112 102399 6144 83 Linux
+
+Command (m for help): The partition table has been altered!
+
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Alignment offsets:
+0
+0
+0
+0
+0
+0
+0
diff --git a/tests/expected/fdisk/align-512-4K-63 b/tests/expected/fdisk/align-512-4K-63
new file mode 100644
index 0000000..5369ec5
--- /dev/null
+++ b/tests/expected/fdisk/align-512-4K-63
@@ -0,0 +1,84 @@
+Create partitions
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+Device does not contain a recognized partition table
+
+
+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.
+
+Command (m for help): Partition type:
+ p primary (0 primary, 0 extended, 4 free)
+ e extended
+Select (default p): Partition number (1-4, default 1): First sector (7-102399, default 7): Using default value 7
+Last sector, +sectors or +size{K,M,G} (7-102399, default 102399): Partition 1 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (1 primary, 0 extended, 3 free)
+ e extended
+Select (default p): Partition number (1-4, default 2): First sector (20487-102399, default 20487): Using default value 20487
+Last sector, +sectors or +size{K,M,G} (20487-102399, default 102399): Partition 2 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (2 primary, 0 extended, 2 free)
+ e extended
+Select (default p): Partition number (1-4, default 3): First sector (40967-102399, default 40967): Using default value 40967
+Last sector, +sectors or +size{K,M,G} (40967-102399, default 102399): Partition 3 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (3 primary, 0 extended, 1 free)
+ e extended
+Select (default e): Selected partition 4
+First sector (61447-102399, default 61447): Using default value 61447
+Last sector, +sectors or +size{K,M,G} (61447-102399, default 102399): Using default value 102399
+Partition 4 of type Extended and of size 20 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 5
+First sector (61454-102399, default 63487): Using default value 63487
+Last sector, +sectors or +size{K,M,G} (63487-102399, default 102399): Partition 5 of type Linux and of size 5 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 6
+First sector (61454-102399, default 75775): Using default value 75775
+Last sector, +sectors or +size{K,M,G} (75775-102399, default 102399): Partition 6 of type Linux and of size 5 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 7
+First sector (61454-102399, default 88063): Using default value 88063
+Last sector, +sectors or +size{K,M,G} (88063-102399, default 102399): Using default value 102399
+Partition 7 of type Linux and of size 7 MiB is set
+
+Command (m for help):
+Disk /dev/...: 52 MB, 52428800 bytes, 102400 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / 32768 bytes
+Alignment offset: 3584 bytes
+
+
+ Device Boot Start End Blocks Id System
+/dev/...1 7 20486 10240 83 Linux
+/dev/...2 20487 40966 10240 83 Linux
+/dev/...3 40967 61446 10240 83 Linux
+/dev/...4 61447 102399 20476+ 5 Extended
+/dev/...5 63487 73726 5120 83 Linux
+/dev/...6 75775 86014 5120 83 Linux
+/dev/...7 88063 102399 7168+ 83 Linux
+
+Command (m for help): The partition table has been altered!
+
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Alignment offsets:
+0
+0
+0
+0
+0
+0
+0
diff --git a/tests/expected/fdisk/align-512-4K-md b/tests/expected/fdisk/align-512-4K-md
new file mode 100644
index 0000000..7b7e4bf
--- /dev/null
+++ b/tests/expected/fdisk/align-512-4K-md
@@ -0,0 +1,87 @@
+Create partitions
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+Device does not contain a recognized partition table
+
+
+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.
+
+Command (m for help): Partition type:
+ p primary (0 primary, 0 extended, 4 free)
+ e extended
+Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Using default value 2048
+Last sector, +sectors or +size{K,M,G} (2048-102399, default 102399): Partition 1 of type Linux and of size 20 MiB is set
+
+Command (m for help): Partition type:
+ p primary (1 primary, 0 extended, 3 free)
+ e extended
+Select (default p): Partition number (1-4, default 2): First sector (43008-102399, default 43008): Using default value 43008
+Last sector, +sectors or +size{K,M,G} (43008-102399, default 102399): Using default value 102399
+Partition 2 of type Linux and of size 29 MiB is set
+
+Command (m for help):
+Disk /dev/...: 52 MB, 52428800 bytes, 102400 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / 32768 bytes
+
+
+ Device Boot Start End Blocks Id System
+/dev/...1 2048 43007 20480 83 Linux
+/dev/...2 43008 102399 29696 83 Linux
+
+Command (m for help): The partition table has been altered!
+
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Alignment offsets:
+0
+0
+Create partitions (MD)
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+Device does not contain a recognized partition table
+
+
+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.
+
+Command (m for help): Partition type:
+ p primary (0 primary, 0 extended, 4 free)
+ e extended
+Select (default p): Partition number (1-4, default 1): First sector (2048-100095, default 2048): Using default value 2048
+Last sector, +sectors or +size{K,M,G} (2048-100095, default 100095): Partition 1 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (1 primary, 0 extended, 3 free)
+ e extended
+Select (default p): Partition number (1-4, default 2): First sector (22528-100095, default 22528): Using default value 22528
+Last sector, +sectors or +size{K,M,G} (22528-100095, default 100095): Partition 2 of type Linux and of size 10 MiB is set
+
+Command (m for help):
+Disk /dev/md8: 51 MB, 51249152 bytes, 100096 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 65536 bytes / 131072 bytes
+
+
+ Device Boot Start End Blocks Id System
+/dev/md8p1 2048 22527 10240 83 Linux
+/dev/md8p2 22528 43007 10240 83 Linux
+
+Command (m for help): The partition table has been altered!
+
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Alignment offsets (MD):
+0
+0
diff --git a/tests/expected/fdisk/align-512-4K-topology b/tests/expected/fdisk/align-512-4K-topology
new file mode 100644
index 0000000..88f5f37
--- /dev/null
+++ b/tests/expected/fdisk/align-512-4K-topology
@@ -0,0 +1,78 @@
+Create partitions
+Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
+Building a new DOS disklabel with disk identifier 0x817cb84a.
+Changes will remain in memory only, until you decide to write them.
+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)
+
+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)
+Partition number (1-4): First sector (64-102399, default 64): Using default value 64
+Last sector, +sectors or +size{K,M,G} (64-102399, default 102399):
+Command (m for help): Command action
+ e extended
+ p primary partition (1-4)
+Partition number (1-4): First sector (20544-102399, default 20544): Using default value 20544
+Last sector, +sectors or +size{K,M,G} (20544-102399, default 102399):
+Command (m for help): Command action
+ e extended
+ p primary partition (1-4)
+Partition number (1-4): First sector (41024-102399, default 41024): Using default value 41024
+Last sector, +sectors or +size{K,M,G} (41024-102399, default 102399):
+Command (m for help): Command action
+ e extended
+ p primary partition (1-4)
+Selected partition 4
+First sector (61504-102399, default 61504): Using default value 61504
+Last sector, +sectors or +size{K,M,G} (61504-102399, default 102399): Using default value 102399
+
+Command (m for help): First sector (61568-102399, default 61568): Using default value 61568
+Last sector, +sectors or +size{K,M,G} (61568-102399, default 102399):
+Command (m for help): First sector (71872-102399, default 71872): Using default value 71872
+Last sector, +sectors or +size{K,M,G} (71872-102399, default 102399):
+Command (m for help): First sector (82176-102399, default 82176): Using default value 82176
+Last sector, +sectors or +size{K,M,G} (82176-102399, default 102399): Using default value 102399
+
+Command (m for help):
+Disk /dev/sdb: 52 MB, 52428800 bytes
+32 heads, 32 sectors/track, 100 cylinders, total 102400 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / 32768 bytes
+Disk identifier: 0x817cb84a
+
+ Device Boot Start End Blocks Id System
+/dev/sdb1 64 20543 10240 83 Linux
+/dev/sdb2 20544 41023 10240 83 Linux
+/dev/sdb3 41024 61503 10240 83 Linux
+/dev/sdb4 61504 102399 20448 5 Extended
+/dev/sdb5 61568 71807 5120 83 Linux
+/dev/sdb6 71872 82111 5120 83 Linux
+/dev/sdb7 82176 102399 10112 83 Linux
+
+Command (m for help): The partition table has been altered!
+
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Alignment offsets:
+0
+0
+0
+0
+0
+0
+0
diff --git a/tests/expected/fdisk/align-512-512 b/tests/expected/fdisk/align-512-512
new file mode 100644
index 0000000..37cfa71
--- /dev/null
+++ b/tests/expected/fdisk/align-512-512
@@ -0,0 +1,68 @@
+Create partitions
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+Device does not contain a recognized partition table
+
+
+Command (m for help): Partition type:
+ p primary (0 primary, 0 extended, 4 free)
+ e extended
+Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Using default value 2048
+Last sector, +sectors or +size{K,M,G} (2048-102399, default 102399): Partition 1 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (1 primary, 0 extended, 3 free)
+ e extended
+Select (default p): Partition number (1-4, default 2): First sector (22528-102399, default 22528): Using default value 22528
+Last sector, +sectors or +size{K,M,G} (22528-102399, default 102399): Partition 2 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (2 primary, 0 extended, 2 free)
+ e extended
+Select (default p): Partition number (1-4, default 3): First sector (43008-102399, default 43008): Using default value 43008
+Last sector, +sectors or +size{K,M,G} (43008-102399, default 102399): Partition 3 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (3 primary, 0 extended, 1 free)
+ e extended
+Select (default e): Selected partition 4
+First sector (63488-102399, default 63488): Using default value 63488
+Last sector, +sectors or +size{K,M,G} (63488-102399, default 102399): Using default value 102399
+Partition 4 of type Extended and of size 19 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 5
+First sector (65536-102399, default 65536): Using default value 65536
+Last sector, +sectors or +size{K,M,G} (65536-102399, default 102399): Partition 5 of type Linux and of size 5 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 6
+First sector (77824-102399, default 77824): Using default value 77824
+Last sector, +sectors or +size{K,M,G} (77824-102399, default 102399): Partition 6 of type Linux and of size 5 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 7
+First sector (90112-102399, default 90112): Using default value 90112
+Last sector, +sectors or +size{K,M,G} (90112-102399, default 102399): Using default value 102399
+Partition 7 of type Linux and of size 6 MiB is set
+
+Command (m for help):
+Disk /dev/loop0: 52 MB, 52428800 bytes, 102400 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+
+
+ Device Boot Start End Blocks Id System
+/dev/loop0p1 2048 22527 10240 83 Linux
+/dev/loop0p2 22528 43007 10240 83 Linux
+/dev/loop0p3 43008 63487 10240 83 Linux
+/dev/loop0p4 63488 102399 19456 5 Extended
+/dev/loop0p5 65536 75775 5120 83 Linux
+/dev/loop0p6 77824 88063 5120 83 Linux
+/dev/loop0p7 90112 102399 6144 83 Linux
+
+Command (m for help):
diff --git a/tests/expected/fdisk/align-512-512-topology b/tests/expected/fdisk/align-512-512-topology
new file mode 100644
index 0000000..d16233f
--- /dev/null
+++ b/tests/expected/fdisk/align-512-512-topology
@@ -0,0 +1,79 @@
+Create partitions
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+Device does not contain a recognized partition table
+
+
+Command (m for help): Partition type:
+ p primary (0 primary, 0 extended, 4 free)
+ e extended
+Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Using default value 2048
+Last sector, +sectors or +size{K,M,G} (2048-102399, default 102399): Partition 1 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (1 primary, 0 extended, 3 free)
+ e extended
+Select (default p): Partition number (1-4, default 2): First sector (22528-102399, default 22528): Using default value 22528
+Last sector, +sectors or +size{K,M,G} (22528-102399, default 102399): Partition 2 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (2 primary, 0 extended, 2 free)
+ e extended
+Select (default p): Partition number (1-4, default 3): First sector (43008-102399, default 43008): Using default value 43008
+Last sector, +sectors or +size{K,M,G} (43008-102399, default 102399): Partition 3 of type Linux and of size 10 MiB is set
+
+Command (m for help): Partition type:
+ p primary (3 primary, 0 extended, 1 free)
+ e extended
+Select (default e): Selected partition 4
+First sector (63488-102399, default 63488): Using default value 63488
+Last sector, +sectors or +size{K,M,G} (63488-102399, default 102399): Using default value 102399
+Partition 4 of type Extended and of size 19 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 5
+First sector (65536-102399, default 65536): Using default value 65536
+Last sector, +sectors or +size{K,M,G} (65536-102399, default 102399): Partition 5 of type Linux and of size 5 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 6
+First sector (77824-102399, default 77824): Using default value 77824
+Last sector, +sectors or +size{K,M,G} (77824-102399, default 102399): Partition 6 of type Linux and of size 5 MiB is set
+
+Command (m for help): All primary partitions are in use
+Adding logical partition 7
+First sector (90112-102399, default 90112): Using default value 90112
+Last sector, +sectors or +size{K,M,G} (90112-102399, default 102399): Using default value 102399
+Partition 7 of type Linux and of size 6 MiB is set
+
+Command (m for help):
+Disk /dev/...: 52 MB, 52428800 bytes, 102400 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+
+
+ Device Boot Start End Blocks Id System
+/dev/...1 2048 22527 10240 83 Linux
+/dev/...2 22528 43007 10240 83 Linux
+/dev/...3 43008 63487 10240 83 Linux
+/dev/...4 63488 102399 19456 5 Extended
+/dev/...5 65536 75775 5120 83 Linux
+/dev/...6 77824 88063 5120 83 Linux
+/dev/...7 90112 102399 6144 83 Linux
+
+Command (m for help): The partition table has been altered!
+
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Alignment offsets:
+0
+0
+0
+0
+0
+0
+0
diff --git a/tests/expected/fdisk/id b/tests/expected/fdisk/id
new file mode 100644
index 0000000..4801f81
--- /dev/null
+++ b/tests/expected/fdisk/id
@@ -0,0 +1,5 @@
+Initialize empty image
+Create MBR with ID=0x1
+Disk identifier: 0x00000001
+Create MBR with ID=0x2
+Disk identifier: 0x00000002
diff --git a/tests/expected/fdisk/mbr-dos-mode b/tests/expected/fdisk/mbr-dos-mode
new file mode 100644
index 0000000..b04f956
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode
@@ -0,0 +1,182 @@
+Initialize empty image
+f1c9645dbc14efddc7d8a322685f26eb mbr-dos-mode.img
+Create new DOS partition table
+57e721e38d1266c2df055067c18f2cf9 mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 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
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+-------------------
+
+Create primary partition
+ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 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
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 1 1 8001 83 Linux
+-------------------
+
+Set partition type
+4a5dba818f9962a82a086d8b99b89a17 mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 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
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 1 1 8001 bf Solaris
+-------------------
+
+Set primary partition active
+c30e9c761b71cf95c67e758b93706ac5 mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 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
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 * 1 1 8001 bf Solaris
+-------------------
+
+Re-create primary partition
+ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 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
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 1 1 8001 83 Linux
+-------------------
+
+Create extended partition
+76987a00b353687cd1dba3ddea9d66f9 mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 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
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 1 1 8001 83 Linux
+__ts_dev__2 2 12 88357+ 5 Extended
+-------------------
+
+Create logical partitions
+a1cd6708e4a6d2e5f6bc9d5c0da0cf3b mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors
+255 heads, 63 sectors/track, 7 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: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 1 1 8001 83 Linux
+__ts_dev__2 2 12 88357+ 5 Extended
+__ts_dev__5 2 3 16033+ 83 Linux
+__ts_dev__6 4 5 16033+ 83 Linux
+__ts_dev__7 6 7 16033+ 83 Linux
+__ts_dev__8 8 9 16033+ 83 Linux
+-------------------
+
+Delete logical partitions
+4c6937d529ace5661fb82efb9394154a mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors
+255 heads, 63 sectors/track, 7 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: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 1 1 8001 83 Linux
+__ts_dev__2 2 12 88357+ 5 Extended
+__ts_dev__5 6 7 16033+ 83 Linux
+-------------------
+
+Create another logical partition
+9589eaaed698d2402945ab3e513c1eb4 mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors
+255 heads, 63 sectors/track, 7 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: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 1 1 8001 83 Linux
+__ts_dev__2 2 12 88357+ 5 Extended
+__ts_dev__5 6 7 16033+ 83 Linux
+__ts_dev__6 2 3 16033+ 83 Linux
+
+Partition table entries are not in disk order
+-------------------
+
+Delete primary partition
+1e6d646e5df66a2664cfbbb13fa9a08a mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors
+255 heads, 63 sectors/track, 7 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: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__2 2 12 88357+ 5 Extended
+__ts_dev__5 6 7 16033+ 83 Linux
+__ts_dev__6 2 3 16033+ 83 Linux
+
+Partition table entries are not in disk order
+-------------------
+
+Delete extended partition
+fc3cdb12326656d7996b09b6f76973e7 mbr-dos-mode.img
+
+---layout----------
+__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors
+255 heads, 63 sectors/track, 7 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: 0x00000001
+
+ Device Boot Start End Blocks Id System
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode b/tests/expected/fdisk/mbr-nondos-mode
new file mode 100644
index 0000000..6ded30f
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode
@@ -0,0 +1,195 @@
+Initialize empty image
+8f4e33f3dc3e414ff94e5fb6905cba8c mbr-nondos-mode.img
+Create new DOS partition table
+4e23561dcb81678bb1bd678722c7cbb7 mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+-------------------
+
+Create 1st primary partition
+e21e16b7452d82e2a2810a1de8c3db05 mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 2048 8191 3072 83 Linux
+-------------------
+
+Set primary partition active
+47f024f3b406598a0159400af7382e2c mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 * 2048 8191 3072 83 Linux
+-------------------
+
+Re-create 1st primary partition
+a5543ee1e3d2cf79913a56bae893a0f0 mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 2048 8191 3072 83 Linux
+-------------------
+
+Create 2nd primary partition
+9d31ee977e26e72ebce78e8e543cd4ce mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 2048 8191 3072 83 Linux
+__ts_dev__2 8192 12287 2048 83 Linux
+-------------------
+
+Create extended partition
+9528631b198e44564f67f8ca97fa51b8 mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 2048 8191 3072 83 Linux
+__ts_dev__2 8192 12287 2048 83 Linux
+__ts_dev__3 12288 40959 14336 5 Extended
+-------------------
+
+Create logical partitions
+db4406e7bc0773f234fd1db1b58b5997 mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 2048 8191 3072 83 Linux
+__ts_dev__2 8192 12287 2048 83 Linux
+__ts_dev__3 12288 40959 14336 5 Extended
+__ts_dev__5 14336 18431 2048 83 Linux
+__ts_dev__6 20480 24575 2048 83 Linux
+__ts_dev__7 26624 30719 2048 83 Linux
+__ts_dev__8 32768 36863 2048 83 Linux
+-------------------
+
+Delete logical partitions
+de85b8d74f52f307b9467ea4c33438cb mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 2048 8191 3072 83 Linux
+__ts_dev__2 8192 12287 2048 83 Linux
+__ts_dev__3 12288 40959 14336 5 Extended
+__ts_dev__5 26624 30719 2048 83 Linux
+-------------------
+
+Create another logical partition
+28d0cbe795535ee025dc7a4781516965 mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__1 2048 8191 3072 83 Linux
+__ts_dev__2 8192 12287 2048 83 Linux
+__ts_dev__3 12288 40959 14336 5 Extended
+__ts_dev__5 26624 30719 2048 83 Linux
+__ts_dev__6 14336 18431 2048 83 Linux
+
+Partition table entries are not in disk order
+-------------------
+
+Delete primary partition
+6f1b62718cf8d83602d51de8944cee51 mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__2 8192 12287 2048 83 Linux
+__ts_dev__3 12288 40959 14336 5 Extended
+__ts_dev__5 26624 30719 2048 83 Linux
+__ts_dev__6 14336 18431 2048 83 Linux
+
+Partition table entries are not in disk order
+-------------------
+
+Delete primary partition
+7b29a3cda33e990e8a7877b81988b933 mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+__ts_dev__3 12288 40959 14336 5 Extended
+__ts_dev__5 26624 30719 2048 83 Linux
+__ts_dev__6 14336 18431 2048 83 Linux
+
+Partition table entries are not in disk order
+-------------------
+
+Delete extended partition
+e1ef48d3d42f4ebcfd5bf4baf5e370e9 mbr-nondos-mode.img
+
+---layout----------
+__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors
+Units = sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk identifier: 0x00000001
+
+ Device Boot Start End Blocks Id System
+-------------------
+
diff --git a/tests/expected/fdisk/oddinput b/tests/expected/fdisk/oddinput
new file mode 100644
index 0000000..a681d0d
--- /dev/null
+++ b/tests/expected/fdisk/oddinput
@@ -0,0 +1,14 @@
+Initialize empty image
+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
+
+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
diff --git a/tests/expected/fdisk/oddinput.toosmall b/tests/expected/fdisk/oddinput.toosmall
new file mode 100644
index 0000000..06c75ed
--- /dev/null
+++ b/tests/expected/fdisk/oddinput.toosmall
@@ -0,0 +1 @@
+This file is too small
diff --git a/tests/expected/fdisk/sunlabel b/tests/expected/fdisk/sunlabel
new file mode 100644
index 0000000..03ad0c7
--- /dev/null
+++ b/tests/expected/fdisk/sunlabel
@@ -0,0 +1,16 @@
+Initialize empty image
+f1c9645dbc14efddc7d8a322685f26eb sunlabel.img
+Create new SUN partition table
+0a32b3a8da607252eda8cdb240cce9fe sunlabel.img
+Create first partition
+10da37badd1a702ff7e3d3f7a84cd879 sunlabel.img
+Set partition sysid
+414df1b428e2f7ec1b3d0fbdf9a28264 sunlabel.img
+Set first partition readonly
+2bc64800c541254e87643262bd9ccc85 sunlabel.img
+Set first partition mountable
+2f5087a60c3aee42c3bc7c681e2f8e0d sunlabel.img
+Create second partition
+5d1557c0d29167f4186d73abd0dcb2f3 sunlabel.img
+Delete all partitions
+f7e309657add78ea53696e2746df9f29 sunlabel.img