From 378c18e5f024ac5a8aef4cb40d7c9aa9633d144c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 16:30:35 +0200 Subject: Adding upstream version 2.38.1. Signed-off-by: Daniel Baumann --- tests/expected/sfdisk/dos-activate | 20 ++++ tests/expected/sfdisk/dos-default-vs-gap1 | 24 +++++ tests/expected/sfdisk/dos-default-vs-gap2 | 30 ++++++ tests/expected/sfdisk/dos-dump-gaps | 27 ++++++ tests/expected/sfdisk/dos-dump-old | 26 ++++++ tests/expected/sfdisk/dos-explicit-size | 36 ++++++++ tests/expected/sfdisk/dos-explicit-size.err | 7 ++ tests/expected/sfdisk/dos-read-dump | 35 +++++++ tests/expected/sfdisk/dos-read-dump-case | 24 +++++ tests/expected/sfdisk/dos-read-dump.err | 2 + tests/expected/sfdisk/dos-reduce-empty-extended | 26 ++++++ tests/expected/sfdisk/dos-resize | 24 +++++ tests/expected/sfdisk/dos-resize-empty-extended | 26 ++++++ tests/expected/sfdisk/dos-resize-extended | 34 +++++++ tests/expected/sfdisk/dos-resize-logical | 34 +++++++ tests/expected/sfdisk/dos-simple-commas | 32 +++++++ tests/expected/sfdisk/dos-simple-space | 26 ++++++ tests/expected/sfdisk/dos-sizes-vs-gaps | 26 ++++++ tests/expected/sfdisk/dos-write-dump | 12 +++ tests/expected/sfdisk/dos-write-json | 43 +++++++++ tests/expected/sfdisk/dump | 0 tests/expected/sfdisk/dump-current | 48 ++++++++++ tests/expected/sfdisk/dump-v2.32 | 47 ++++++++++ tests/expected/sfdisk/dump-v2.35 | 48 ++++++++++ tests/expected/sfdisk/gpt-all-defaults | 32 +++++++ tests/expected/sfdisk/gpt-attrs | 102 +++++++++++++++++++++ tests/expected/sfdisk/gpt-attrs-broken-guid | 0 tests/expected/sfdisk/gpt-attrs-broken-guid.err | 2 + tests/expected/sfdisk/gpt-attrs-broken-nosep | 0 tests/expected/sfdisk/gpt-attrs-broken-nosep.err | 2 + tests/expected/sfdisk/gpt-attrs-guid | 102 +++++++++++++++++++++ tests/expected/sfdisk/gpt-attrs-guid.err | 0 tests/expected/sfdisk/gpt-attrs-space | 102 +++++++++++++++++++++ tests/expected/sfdisk/gpt-attrs-space.err | 0 tests/expected/sfdisk/gpt-attrs-unsupported | 0 tests/expected/sfdisk/gpt-attrs-unsupported.err | 2 + tests/expected/sfdisk/gpt-attrs-with-typo | 102 +++++++++++++++++++++ tests/expected/sfdisk/gpt-attrs-with-typo.err | 0 tests/expected/sfdisk/gpt-attrs.err | 0 tests/expected/sfdisk/gpt-label | 6 ++ tests/expected/sfdisk/gpt-list-pmbr | 10 ++ tests/expected/sfdisk/gpt-list-pmbr.err | 1 + tests/expected/sfdisk/gpt-read-dump | 44 +++++++++ tests/expected/sfdisk/gpt-reorder | 51 +++++++++++ tests/expected/sfdisk/gpt-resize | 24 +++++ tests/expected/sfdisk/gpt-type | 5 + tests/expected/sfdisk/gpt-uuid | 1 + tests/expected/sfdisk/gpt-write-dump | 12 +++ tests/expected/sfdisk/gpt-write-json | 39 ++++++++ tests/expected/sfdisk/movedata-down | 31 +++++++ tests/expected/sfdisk/movedata-non-overlay | 31 +++++++ tests/expected/sfdisk/movedata-up | 31 +++++++ .../expected/sfdisk/resize-dos-0-move-up-absolute | 26 ++++++ .../sfdisk/resize-dos-1-move-down-absolute | 26 ++++++ tests/expected/sfdisk/resize-dos-10-down-enlarge | 26 ++++++ .../sfdisk/resize-dos-11-absolute-move-resize | 26 ++++++ tests/expected/sfdisk/resize-dos-12-reduce-midle | 30 ++++++ tests/expected/sfdisk/resize-dos-13-max-last | 30 ++++++ .../expected/sfdisk/resize-dos-2-move-up-relative | 26 ++++++ .../sfdisk/resize-dos-3-move-down-relative | 26 ++++++ .../expected/sfdisk/resize-dos-4-enlarge-absolute | 26 ++++++ tests/expected/sfdisk/resize-dos-5-reduce-absolute | 26 ++++++ .../expected/sfdisk/resize-dos-6-enlarge-relative | 26 ++++++ tests/expected/sfdisk/resize-dos-7-reduce-relative | 26 ++++++ tests/expected/sfdisk/resize-dos-8-enlarge-all | 26 ++++++ tests/expected/sfdisk/resize-dos-9-up-preduce | 26 ++++++ tests/expected/sfdisk/resize-dos-unsorted | 74 +++++++++++++++ .../expected/sfdisk/resize-gpt-0-move-up-absolute | 26 ++++++ .../sfdisk/resize-gpt-1-move-down-absolute | 26 ++++++ tests/expected/sfdisk/resize-gpt-10-down-enlarge | 26 ++++++ .../sfdisk/resize-gpt-11-absolute-move-resize | 26 ++++++ tests/expected/sfdisk/resize-gpt-12-reduce-midle | 30 ++++++ tests/expected/sfdisk/resize-gpt-13-max-last | 30 ++++++ .../expected/sfdisk/resize-gpt-2-move-up-relative | 26 ++++++ .../sfdisk/resize-gpt-3-move-down-relative | 26 ++++++ .../expected/sfdisk/resize-gpt-4-enlarge-absolute | 26 ++++++ tests/expected/sfdisk/resize-gpt-5-reduce-absolute | 26 ++++++ .../expected/sfdisk/resize-gpt-6-enlarge-relative | 26 ++++++ tests/expected/sfdisk/resize-gpt-7-reduce-relative | 26 ++++++ tests/expected/sfdisk/resize-gpt-8-enlarge-all | 26 ++++++ tests/expected/sfdisk/resize-gpt-9-up-preduce | 26 ++++++ tests/expected/sfdisk/script-broken-1 | 15 +++ tests/expected/sfdisk/script-broken-1.err | 1 + tests/expected/sfdisk/script-broken-2 | 15 +++ tests/expected/sfdisk/script-broken-2.err | 1 + tests/expected/sfdisk/script-broken-3 | 15 +++ tests/expected/sfdisk/script-broken-3.err | 1 + tests/expected/sfdisk/script-broken-4 | 15 +++ tests/expected/sfdisk/script-broken-4.err | 1 + tests/expected/sfdisk/script-broken-5 | 15 +++ tests/expected/sfdisk/script-broken-5.err | 1 + tests/expected/sfdisk/script-quotes | 44 +++++++++ tests/expected/sfdisk/script-separator | 44 +++++++++ tests/expected/sfdisk/script-type-and-id | 44 +++++++++ tests/expected/sfdisk/wipe-fs-to-dos | 28 ++++++ tests/expected/sfdisk/wipe-fs-to-dos.err | 2 + tests/expected/sfdisk/wipe-gpt-to-dos | 51 +++++++++++ tests/expected/sfdisk/wipe-gpt-to-dos-auto | 58 ++++++++++++ tests/expected/sfdisk/wipe-gpt-to-dos-auto.err | 0 tests/expected/sfdisk/wipe-gpt-to-dos.err | 0 tests/expected/sfdisk/wipe-partition | 59 ++++++++++++ tests/expected/sfdisk/wipe-partition.err | 1 + tests/expected/sfdisk/wipe.err | 0 103 files changed, 2618 insertions(+) create mode 100644 tests/expected/sfdisk/dos-activate create mode 100644 tests/expected/sfdisk/dos-default-vs-gap1 create mode 100644 tests/expected/sfdisk/dos-default-vs-gap2 create mode 100644 tests/expected/sfdisk/dos-dump-gaps create mode 100644 tests/expected/sfdisk/dos-dump-old create mode 100644 tests/expected/sfdisk/dos-explicit-size create mode 100644 tests/expected/sfdisk/dos-explicit-size.err create mode 100644 tests/expected/sfdisk/dos-read-dump create mode 100644 tests/expected/sfdisk/dos-read-dump-case create mode 100644 tests/expected/sfdisk/dos-read-dump.err create mode 100644 tests/expected/sfdisk/dos-reduce-empty-extended create mode 100644 tests/expected/sfdisk/dos-resize create mode 100644 tests/expected/sfdisk/dos-resize-empty-extended create mode 100644 tests/expected/sfdisk/dos-resize-extended create mode 100644 tests/expected/sfdisk/dos-resize-logical create mode 100644 tests/expected/sfdisk/dos-simple-commas create mode 100644 tests/expected/sfdisk/dos-simple-space create mode 100644 tests/expected/sfdisk/dos-sizes-vs-gaps create mode 100644 tests/expected/sfdisk/dos-write-dump create mode 100644 tests/expected/sfdisk/dos-write-json create mode 100644 tests/expected/sfdisk/dump create mode 100644 tests/expected/sfdisk/dump-current create mode 100644 tests/expected/sfdisk/dump-v2.32 create mode 100644 tests/expected/sfdisk/dump-v2.35 create mode 100644 tests/expected/sfdisk/gpt-all-defaults create mode 100644 tests/expected/sfdisk/gpt-attrs create mode 100644 tests/expected/sfdisk/gpt-attrs-broken-guid create mode 100644 tests/expected/sfdisk/gpt-attrs-broken-guid.err create mode 100644 tests/expected/sfdisk/gpt-attrs-broken-nosep create mode 100644 tests/expected/sfdisk/gpt-attrs-broken-nosep.err create mode 100644 tests/expected/sfdisk/gpt-attrs-guid create mode 100644 tests/expected/sfdisk/gpt-attrs-guid.err create mode 100644 tests/expected/sfdisk/gpt-attrs-space create mode 100644 tests/expected/sfdisk/gpt-attrs-space.err create mode 100644 tests/expected/sfdisk/gpt-attrs-unsupported create mode 100644 tests/expected/sfdisk/gpt-attrs-unsupported.err create mode 100644 tests/expected/sfdisk/gpt-attrs-with-typo create mode 100644 tests/expected/sfdisk/gpt-attrs-with-typo.err create mode 100644 tests/expected/sfdisk/gpt-attrs.err create mode 100644 tests/expected/sfdisk/gpt-label create mode 100644 tests/expected/sfdisk/gpt-list-pmbr create mode 100644 tests/expected/sfdisk/gpt-list-pmbr.err create mode 100644 tests/expected/sfdisk/gpt-read-dump create mode 100644 tests/expected/sfdisk/gpt-reorder create mode 100644 tests/expected/sfdisk/gpt-resize create mode 100644 tests/expected/sfdisk/gpt-type create mode 100644 tests/expected/sfdisk/gpt-uuid create mode 100644 tests/expected/sfdisk/gpt-write-dump create mode 100644 tests/expected/sfdisk/gpt-write-json create mode 100644 tests/expected/sfdisk/movedata-down create mode 100644 tests/expected/sfdisk/movedata-non-overlay create mode 100644 tests/expected/sfdisk/movedata-up create mode 100644 tests/expected/sfdisk/resize-dos-0-move-up-absolute create mode 100644 tests/expected/sfdisk/resize-dos-1-move-down-absolute create mode 100644 tests/expected/sfdisk/resize-dos-10-down-enlarge create mode 100644 tests/expected/sfdisk/resize-dos-11-absolute-move-resize create mode 100644 tests/expected/sfdisk/resize-dos-12-reduce-midle create mode 100644 tests/expected/sfdisk/resize-dos-13-max-last create mode 100644 tests/expected/sfdisk/resize-dos-2-move-up-relative create mode 100644 tests/expected/sfdisk/resize-dos-3-move-down-relative create mode 100644 tests/expected/sfdisk/resize-dos-4-enlarge-absolute create mode 100644 tests/expected/sfdisk/resize-dos-5-reduce-absolute create mode 100644 tests/expected/sfdisk/resize-dos-6-enlarge-relative create mode 100644 tests/expected/sfdisk/resize-dos-7-reduce-relative create mode 100644 tests/expected/sfdisk/resize-dos-8-enlarge-all create mode 100644 tests/expected/sfdisk/resize-dos-9-up-preduce create mode 100644 tests/expected/sfdisk/resize-dos-unsorted create mode 100644 tests/expected/sfdisk/resize-gpt-0-move-up-absolute create mode 100644 tests/expected/sfdisk/resize-gpt-1-move-down-absolute create mode 100644 tests/expected/sfdisk/resize-gpt-10-down-enlarge create mode 100644 tests/expected/sfdisk/resize-gpt-11-absolute-move-resize create mode 100644 tests/expected/sfdisk/resize-gpt-12-reduce-midle create mode 100644 tests/expected/sfdisk/resize-gpt-13-max-last create mode 100644 tests/expected/sfdisk/resize-gpt-2-move-up-relative create mode 100644 tests/expected/sfdisk/resize-gpt-3-move-down-relative create mode 100644 tests/expected/sfdisk/resize-gpt-4-enlarge-absolute create mode 100644 tests/expected/sfdisk/resize-gpt-5-reduce-absolute create mode 100644 tests/expected/sfdisk/resize-gpt-6-enlarge-relative create mode 100644 tests/expected/sfdisk/resize-gpt-7-reduce-relative create mode 100644 tests/expected/sfdisk/resize-gpt-8-enlarge-all create mode 100644 tests/expected/sfdisk/resize-gpt-9-up-preduce create mode 100644 tests/expected/sfdisk/script-broken-1 create mode 100644 tests/expected/sfdisk/script-broken-1.err create mode 100644 tests/expected/sfdisk/script-broken-2 create mode 100644 tests/expected/sfdisk/script-broken-2.err create mode 100644 tests/expected/sfdisk/script-broken-3 create mode 100644 tests/expected/sfdisk/script-broken-3.err create mode 100644 tests/expected/sfdisk/script-broken-4 create mode 100644 tests/expected/sfdisk/script-broken-4.err create mode 100644 tests/expected/sfdisk/script-broken-5 create mode 100644 tests/expected/sfdisk/script-broken-5.err create mode 100644 tests/expected/sfdisk/script-quotes create mode 100644 tests/expected/sfdisk/script-separator create mode 100644 tests/expected/sfdisk/script-type-and-id create mode 100644 tests/expected/sfdisk/wipe-fs-to-dos create mode 100644 tests/expected/sfdisk/wipe-fs-to-dos.err create mode 100644 tests/expected/sfdisk/wipe-gpt-to-dos create mode 100644 tests/expected/sfdisk/wipe-gpt-to-dos-auto create mode 100644 tests/expected/sfdisk/wipe-gpt-to-dos-auto.err create mode 100644 tests/expected/sfdisk/wipe-gpt-to-dos.err create mode 100644 tests/expected/sfdisk/wipe-partition create mode 100644 tests/expected/sfdisk/wipe-partition.err create mode 100644 tests/expected/sfdisk/wipe.err (limited to 'tests/expected/sfdisk') diff --git a/tests/expected/sfdisk/dos-activate b/tests/expected/sfdisk/dos-activate new file mode 100644 index 0000000..59f460d --- /dev/null +++ b/tests/expected/sfdisk/dos-activate @@ -0,0 +1,20 @@ +The bootable flag on partition 1 is enabled now. + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 8191 6144 3M 83 Linux +2 8192 14335 6144 3M 82 Linux swap / Solaris +3 14336 20479 6144 3M 83 Linux +4 20480 102399 81920 40M 5 Extended +5 22528 28671 6144 3M 83 Linux +6 30720 102399 71680 35M 83 Linux diff --git a/tests/expected/sfdisk/dos-default-vs-gap1 b/tests/expected/sfdisk/dos-default-vs-gap1 new file mode 100644 index 0000000..9539d22 --- /dev/null +++ b/tests/expected/sfdisk/dos-default-vs-gap1 @@ -0,0 +1,24 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 6144 16383 10240 5M 83 Linux +2 16384 28671 12288 6M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-default-vs-gap2 b/tests/expected/sfdisk/dos-default-vs-gap2 new file mode 100644 index 0000000..e76f704 --- /dev/null +++ b/tests/expected/sfdisk/dos-default-vs-gap2 @@ -0,0 +1,30 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +All partitions used. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 8192 14335 6144 3M 83 Linux +2 26624 36863 10240 5M 83 Linux +3 14336 22527 8192 4M 83 Linux +4 2048 6143 4096 2M 83 Linux + +Partition table entries are not in disk order. + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-dump-gaps b/tests/expected/sfdisk/dos-dump-gaps new file mode 100644 index 0000000..ee473e6 --- /dev/null +++ b/tests/expected/sfdisk/dos-dump-gaps @@ -0,0 +1,27 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Ignoring partition. +3: Created a new partition . +4: Ignoring partition. +5: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 52046 49999 24.4M 83 Linux +3 52048 102046 49999 24.4M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-dump-old b/tests/expected/sfdisk/dos-dump-old new file mode 100644 index 0000000..83f5bdd --- /dev/null +++ b/tests/expected/sfdisk/dos-dump-old @@ -0,0 +1,26 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Ignoring partition. +3: Ignoring partition. +4: Ignoring partition. +5: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 52046 49999 24.4M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-explicit-size b/tests/expected/sfdisk/dos-explicit-size new file mode 100644 index 0000000..20f421c --- /dev/null +++ b/tests/expected/sfdisk/dos-explicit-size @@ -0,0 +1,36 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Created a new partition . +6: Created a new partition . +7: Created a new partition . +8: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 1 1000 1000 500K 83 Linux +2 1001 2000 1000 500K 82 Linux swap / Solaris +3 2001 3000 1000 500K 83 Linux +4 3001 102399 99399 48.5M 5 Extended +5 3002 4001 1000 500K 83 Linux +6 4003 5002 1000 500K 83 Linux +7 5004 102399 97396 47.6M 83 Linux + + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-explicit-size.err b/tests/expected/sfdisk/dos-explicit-size.err new file mode 100644 index 0000000..975a4ee --- /dev/null +++ b/tests/expected/sfdisk/dos-explicit-size.err @@ -0,0 +1,7 @@ +Partition 1 does not start on physical sector boundary. +Partition 2 does not start on physical sector boundary. +Partition 3 does not start on physical sector boundary. +Partition 4 does not start on physical sector boundary. +Partition 5 does not start on physical sector boundary. +Partition 6 does not start on physical sector boundary. +Partition 7 does not start on physical sector boundary. diff --git a/tests/expected/sfdisk/dos-read-dump b/tests/expected/sfdisk/dos-read-dump new file mode 100644 index 0000000..a0b0b77 --- /dev/null +++ b/tests/expected/sfdisk/dos-read-dump @@ -0,0 +1,35 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Created a new partition . +6: Created a new partition . +7: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 8191 6144 3M 83 Linux +2 8192 14335 6144 3M 82 Linux swap / Solaris +3 14336 20479 6144 3M 83 Linux +4 20480 102399 81920 40M 5 Extended +5 20481 26624 6144 3M 83 Linux +6 26626 102399 75774 37M 83 Linux + + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-read-dump-case b/tests/expected/sfdisk/dos-read-dump-case new file mode 100644 index 0000000..3486cb2 --- /dev/null +++ b/tests/expected/sfdisk/dos-read-dump-case @@ -0,0 +1,24 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 8191 6144 3M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-read-dump.err b/tests/expected/sfdisk/dos-read-dump.err new file mode 100644 index 0000000..48536f8 --- /dev/null +++ b/tests/expected/sfdisk/dos-read-dump.err @@ -0,0 +1,2 @@ +Partition 5 does not start on physical sector boundary. +Partition 6 does not start on physical sector boundary. diff --git a/tests/expected/sfdisk/dos-reduce-empty-extended b/tests/expected/sfdisk/dos-reduce-empty-extended new file mode 100644 index 0000000..f37cdcf --- /dev/null +++ b/tests/expected/sfdisk/dos-reduce-empty-extended @@ -0,0 +1,26 @@ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 14335 10240 5M 5 Extended + +2: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 10239 6144 3M 5 Extended + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-resize b/tests/expected/sfdisk/dos-resize new file mode 100644 index 0000000..a39b940 --- /dev/null +++ b/tests/expected/sfdisk/dos-resize @@ -0,0 +1,24 @@ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 * 2048 22527 20480 10M 82 Linux swap / Solaris + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 102399 100352 49M 82 Linux swap / Solaris + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-resize-empty-extended b/tests/expected/sfdisk/dos-resize-empty-extended new file mode 100644 index 0000000..14cecbe --- /dev/null +++ b/tests/expected/sfdisk/dos-resize-empty-extended @@ -0,0 +1,26 @@ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 8191 4096 2M 5 Extended + +2: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 102399 98304 48M 5 Extended + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-resize-extended b/tests/expected/sfdisk/dos-resize-extended new file mode 100644 index 0000000..90dce82 --- /dev/null +++ b/tests/expected/sfdisk/dos-resize-extended @@ -0,0 +1,34 @@ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 6143 2048 1M 83 Linux +3 6144 8191 2048 1M 83 Linux +4 8192 18431 10240 5M 5 Extended +5 10240 12287 2048 1M 83 Linux +6 14336 16383 2048 1M 83 Linux + +4: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 6143 2048 1M 83 Linux +3 6144 8191 2048 1M 83 Linux +4 8192 102399 94208 46M 5 Extended +5 10240 12287 2048 1M 83 Linux +6 14336 16383 2048 1M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-resize-logical b/tests/expected/sfdisk/dos-resize-logical new file mode 100644 index 0000000..e3b805a --- /dev/null +++ b/tests/expected/sfdisk/dos-resize-logical @@ -0,0 +1,34 @@ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 6143 2048 1M 83 Linux +3 6144 8191 2048 1M 83 Linux +4 8192 28671 20480 10M 5 Extended +5 10240 12287 2048 1M 83 Linux +6 14336 16383 2048 1M 83 Linux + +6: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 6143 2048 1M 83 Linux +3 6144 8191 2048 1M 83 Linux +4 8192 28671 20480 10M 5 Extended +5 10240 12287 2048 1M 83 Linux +6 14336 28671 14336 7M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-simple-commas b/tests/expected/sfdisk/dos-simple-commas new file mode 100644 index 0000000..b44be41 --- /dev/null +++ b/tests/expected/sfdisk/dos-simple-commas @@ -0,0 +1,32 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Created a new partition . +6: Created a new partition . +7: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 8191 6144 3M 83 Linux +2 8192 14335 6144 3M 82 Linux swap / Solaris +3 14336 20479 6144 3M 83 Linux +4 20480 102399 81920 40M 5 Extended +5 22528 28671 6144 3M 83 Linux +6 30720 102399 71680 35M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-simple-space b/tests/expected/sfdisk/dos-simple-space new file mode 100644 index 0000000..1e22e9a --- /dev/null +++ b/tests/expected/sfdisk/dos-simple-space @@ -0,0 +1,26 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 8191 6144 3M 83 Linux +2 8192 14335 6144 3M 82 Linux swap / Solaris +3 14336 102399 88064 43M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-sizes-vs-gaps b/tests/expected/sfdisk/dos-sizes-vs-gaps new file mode 100644 index 0000000..a3eb790 --- /dev/null +++ b/tests/expected/sfdisk/dos-sizes-vs-gaps @@ -0,0 +1,26 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 3070 1023 511.5K 83 Linux +2 4096 8190 4095 2M 83 Linux +3 8192 16382 8191 4M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/dos-write-dump b/tests/expected/sfdisk/dos-write-dump new file mode 100644 index 0000000..660c932 --- /dev/null +++ b/tests/expected/sfdisk/dos-write-dump @@ -0,0 +1,12 @@ +label: dos +label-id: 0x1ddc8a79 +device: +unit: sectors +sector-size: 512 + +1 : start= 2048, size= 6144, type=83, bootable +2 : start= 8192, size= 6144, type=82 +3 : start= 14336, size= 6144, type=83 +4 : start= 20480, size= 81920, type=5 +5 : start= 20481, size= 6144, type=83 +6 : start= 26626, size= 75774, type=83 diff --git a/tests/expected/sfdisk/dos-write-json b/tests/expected/sfdisk/dos-write-json new file mode 100644 index 0000000..7a8ec4e --- /dev/null +++ b/tests/expected/sfdisk/dos-write-json @@ -0,0 +1,43 @@ +{ + "partitiontable": { + "label": "dos", + "id": "0x1ddc8a79", + "device": "", + "unit": "sectors", + "sectorsize": 512, + "partitions": [ + { + "node": "1", + "start": 2048, + "size": 6144, + "type": "83", + "bootable": true + },{ + "node": "2", + "start": 8192, + "size": 6144, + "type": "82" + },{ + "node": "3", + "start": 14336, + "size": 6144, + "type": "83" + },{ + "node": "4", + "start": 20480, + "size": 81920, + "type": "5" + },{ + "node": "5", + "start": 20481, + "size": 6144, + "type": "83" + },{ + "node": "6", + "start": 26626, + "size": 75774, + "type": "83" + } + ] + } +} diff --git a/tests/expected/sfdisk/dump b/tests/expected/sfdisk/dump new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/dump-current b/tests/expected/sfdisk/dump-current new file mode 100644 index 0000000..86b3f40 --- /dev/null +++ b/tests/expected/sfdisk/dump-current @@ -0,0 +1,48 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem +2 22528 45055 22528 11M Linux filesystem +3 45056 69631 24576 12M Linux filesystem +4 69632 204766 135135 66M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Start End Size UUID Type Name + 2048 22527 10M 28A432A3-8D63-3142-B9F5-68A2BF2BC60B Linux filesystem +22528 45055 11M 6A7D17FC-7252-564A-9B68-5E2107999BF1 Linux filesystem +45056 69631 12M 26C303E4-0321-3346-B9EF-BDD39BEA1166 Linux filesystem +69632 204766 66M AF79D434-C8B3-2445-80FB-317AB157447C Linux filesystem diff --git a/tests/expected/sfdisk/dump-v2.32 b/tests/expected/sfdisk/dump-v2.32 new file mode 100644 index 0000000..2c62295 --- /dev/null +++ b/tests/expected/sfdisk/dump-v2.32 @@ -0,0 +1,47 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem +2 22528 45055 22528 11M Linux filesystem +3 45056 69631 24576 12M Linux filesystem +4 69632 204766 135135 66M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Start End Size UUID Type Name + 2048 22527 10M 28A432A3-8D63-3142-B9F5-68A2BF2BC60B Linux filesystem +22528 45055 11M 6A7D17FC-7252-564A-9B68-5E2107999BF1 Linux filesystem +45056 69631 12M 26C303E4-0321-3346-B9EF-BDD39BEA1166 Linux filesystem +69632 204766 66M AF79D434-C8B3-2445-80FB-317AB157447C Linux filesystem diff --git a/tests/expected/sfdisk/dump-v2.35 b/tests/expected/sfdisk/dump-v2.35 new file mode 100644 index 0000000..86b3f40 --- /dev/null +++ b/tests/expected/sfdisk/dump-v2.35 @@ -0,0 +1,48 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem +2 22528 45055 22528 11M Linux filesystem +3 45056 69631 24576 12M Linux filesystem +4 69632 204766 135135 66M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Start End Size UUID Type Name + 2048 22527 10M 28A432A3-8D63-3142-B9F5-68A2BF2BC60B Linux filesystem +22528 45055 11M 6A7D17FC-7252-564A-9B68-5E2107999BF1 Linux filesystem +45056 69631 12M 26C303E4-0321-3346-B9EF-BDD39BEA1166 Linux filesystem +69632 204766 66M AF79D434-C8B3-2445-80FB-317AB157447C Linux filesystem diff --git a/tests/expected/sfdisk/gpt-all-defaults b/tests/expected/sfdisk/gpt-all-defaults new file mode 100644 index 0000000..66868ed --- /dev/null +++ b/tests/expected/sfdisk/gpt-all-defaults @@ -0,0 +1,32 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Created a new partition . +6: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 12287 10240 5M Linux filesystem +2 12288 22527 10240 5M Linux filesystem +3 22528 32767 10240 5M Linux swap +4 32768 43007 10240 5M Linux root (x86-64) +5 43008 100351 57344 28M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/gpt-attrs b/tests/expected/sfdisk/gpt-attrs new file mode 100644 index 0000000..7cbfee4 --- /dev/null +++ b/tests/expected/sfdisk/gpt-attrs @@ -0,0 +1,102 @@ + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +RequiredPartition NoBlockIOProtocol GUID:48,51 + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): +Expert command (m for help): +PMBR: offset = 0, size = 512 bytes. +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00 +000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa + +GPT Header: offset = 512, size = 512 bytes. +00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 +00000210 9b 58 15 32 00 00 00 00 01 00 00 00 00 00 00 00 +00000220 ff 8f 01 00 00 00 00 00 00 08 00 00 00 00 00 00 +00000230 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c +00000240 8b 65 9e 76 45 41 21 8d 02 00 00 00 00 00 00 00 +00000250 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00 +00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Entries: offset = 1024, size = 16384 bytes. +00000400 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b +00000410 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32 +00000420 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00 +00000430 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00 +00000440 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00 +00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000480 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +00000490 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4 +000004a0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00 +000004b0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 +000004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000500 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f +00000510 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87 +00000520 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00 +00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000580 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09 +00000590 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db +000005a0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00 +000005b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000600 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +00000610 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73 +00000620 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00 +00000630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Backup Entries: offset = 52411904, size = 16384 bytes. +031fbe00 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b +031fbe10 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32 +031fbe20 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00 +031fbe30 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00 +031fbe40 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00 +031fbe50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbe80 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +031fbe90 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4 +031fbea0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00 +031fbeb0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 +031fbec0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbf00 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f +031fbf10 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87 +031fbf20 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00 +031fbf30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbf80 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09 +031fbf90 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db +031fbfa0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00 +031fbfb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fc000 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +031fc010 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73 +031fc020 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00 +031fc030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Backup Header: offset = 52428288, size = 512 bytes. +031ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 +031ffe10 22 e2 97 b2 00 00 00 00 ff 8f 01 00 00 00 00 00 +031ffe20 01 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 +031ffe30 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c +031ffe40 8b 65 9e 76 45 41 21 8d df 8f 01 00 00 00 00 00 +031ffe50 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00 +031ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +Expert command (m for help): diff --git a/tests/expected/sfdisk/gpt-attrs-broken-guid b/tests/expected/sfdisk/gpt-attrs-broken-guid new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/gpt-attrs-broken-guid.err b/tests/expected/sfdisk/gpt-attrs-broken-guid.err new file mode 100644 index 0000000..3e57341 --- /dev/null +++ b/tests/expected/sfdisk/gpt-attrs-broken-guid.err @@ -0,0 +1,2 @@ +unsupported GPT attribute bit 'GUID:NoBlockIOProtocol GUID:GUID:63 RequiredPartiton' +sfdisk: : partition 2: failed to set partition attributes diff --git a/tests/expected/sfdisk/gpt-attrs-broken-nosep b/tests/expected/sfdisk/gpt-attrs-broken-nosep new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/gpt-attrs-broken-nosep.err b/tests/expected/sfdisk/gpt-attrs-broken-nosep.err new file mode 100644 index 0000000..946979c --- /dev/null +++ b/tests/expected/sfdisk/gpt-attrs-broken-nosep.err @@ -0,0 +1,2 @@ +failed to parse GPT attribute string 'NoBlockIOProtocolRequiredPartiton' +sfdisk: : partition 2: failed to set partition attributes diff --git a/tests/expected/sfdisk/gpt-attrs-guid b/tests/expected/sfdisk/gpt-attrs-guid new file mode 100644 index 0000000..9797b49 --- /dev/null +++ b/tests/expected/sfdisk/gpt-attrs-guid @@ -0,0 +1,102 @@ + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +GUID:48,51,52,63 + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): +Expert command (m for help): +PMBR: offset = 0, size = 512 bytes. +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00 +000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa + +GPT Header: offset = 512, size = 512 bytes. +00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 +00000210 5a a7 90 27 00 00 00 00 01 00 00 00 00 00 00 00 +00000220 ff 8f 01 00 00 00 00 00 00 08 00 00 00 00 00 00 +00000230 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c +00000240 8b 65 9e 76 45 41 21 8d 02 00 00 00 00 00 00 00 +00000250 80 00 00 00 80 00 00 00 af 59 5c 2a 00 00 00 00 +00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Entries: offset = 1024, size = 16384 bytes. +00000400 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b +00000410 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32 +00000420 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00 +00000430 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00 +00000440 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00 +00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000480 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +00000490 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4 +000004a0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00 +000004b0 00 00 00 00 00 00 19 80 00 00 00 00 00 00 00 00 +000004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000500 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f +00000510 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87 +00000520 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00 +00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000580 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09 +00000590 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db +000005a0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00 +000005b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000600 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +00000610 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73 +00000620 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00 +00000630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Backup Entries: offset = 52411904, size = 16384 bytes. +031fbe00 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b +031fbe10 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32 +031fbe20 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00 +031fbe30 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00 +031fbe40 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00 +031fbe50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbe80 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +031fbe90 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4 +031fbea0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00 +031fbeb0 00 00 00 00 00 00 19 80 00 00 00 00 00 00 00 00 +031fbec0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbf00 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f +031fbf10 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87 +031fbf20 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00 +031fbf30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbf80 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09 +031fbf90 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db +031fbfa0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00 +031fbfb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fc000 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +031fc010 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73 +031fc020 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00 +031fc030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Backup Header: offset = 52428288, size = 512 bytes. +031ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 +031ffe10 e3 1d 12 a7 00 00 00 00 ff 8f 01 00 00 00 00 00 +031ffe20 01 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 +031ffe30 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c +031ffe40 8b 65 9e 76 45 41 21 8d df 8f 01 00 00 00 00 00 +031ffe50 80 00 00 00 80 00 00 00 af 59 5c 2a 00 00 00 00 +031ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +Expert command (m for help): diff --git a/tests/expected/sfdisk/gpt-attrs-guid.err b/tests/expected/sfdisk/gpt-attrs-guid.err new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/gpt-attrs-space b/tests/expected/sfdisk/gpt-attrs-space new file mode 100644 index 0000000..7cbfee4 --- /dev/null +++ b/tests/expected/sfdisk/gpt-attrs-space @@ -0,0 +1,102 @@ + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +RequiredPartition NoBlockIOProtocol GUID:48,51 + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): +Expert command (m for help): +PMBR: offset = 0, size = 512 bytes. +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00 +000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa + +GPT Header: offset = 512, size = 512 bytes. +00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 +00000210 9b 58 15 32 00 00 00 00 01 00 00 00 00 00 00 00 +00000220 ff 8f 01 00 00 00 00 00 00 08 00 00 00 00 00 00 +00000230 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c +00000240 8b 65 9e 76 45 41 21 8d 02 00 00 00 00 00 00 00 +00000250 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00 +00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Entries: offset = 1024, size = 16384 bytes. +00000400 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b +00000410 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32 +00000420 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00 +00000430 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00 +00000440 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00 +00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000480 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +00000490 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4 +000004a0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00 +000004b0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 +000004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000500 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f +00000510 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87 +00000520 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00 +00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000580 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09 +00000590 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db +000005a0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00 +000005b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000600 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +00000610 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73 +00000620 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00 +00000630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Backup Entries: offset = 52411904, size = 16384 bytes. +031fbe00 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b +031fbe10 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32 +031fbe20 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00 +031fbe30 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00 +031fbe40 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00 +031fbe50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbe80 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +031fbe90 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4 +031fbea0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00 +031fbeb0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 +031fbec0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbf00 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f +031fbf10 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87 +031fbf20 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00 +031fbf30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbf80 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09 +031fbf90 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db +031fbfa0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00 +031fbfb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fc000 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +031fc010 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73 +031fc020 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00 +031fc030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Backup Header: offset = 52428288, size = 512 bytes. +031ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 +031ffe10 22 e2 97 b2 00 00 00 00 ff 8f 01 00 00 00 00 00 +031ffe20 01 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 +031ffe30 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c +031ffe40 8b 65 9e 76 45 41 21 8d df 8f 01 00 00 00 00 00 +031ffe50 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00 +031ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +Expert command (m for help): diff --git a/tests/expected/sfdisk/gpt-attrs-space.err b/tests/expected/sfdisk/gpt-attrs-space.err new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/gpt-attrs-unsupported b/tests/expected/sfdisk/gpt-attrs-unsupported new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/gpt-attrs-unsupported.err b/tests/expected/sfdisk/gpt-attrs-unsupported.err new file mode 100644 index 0000000..8577358 --- /dev/null +++ b/tests/expected/sfdisk/gpt-attrs-unsupported.err @@ -0,0 +1,2 @@ +unsupported GPT attribute bit 'FooBar 48 51' +sfdisk: : partition 2: failed to set partition attributes diff --git a/tests/expected/sfdisk/gpt-attrs-with-typo b/tests/expected/sfdisk/gpt-attrs-with-typo new file mode 100644 index 0000000..7cbfee4 --- /dev/null +++ b/tests/expected/sfdisk/gpt-attrs-with-typo @@ -0,0 +1,102 @@ + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +RequiredPartition NoBlockIOProtocol GUID:48,51 + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): +Expert command (m for help): +PMBR: offset = 0, size = 512 bytes. +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00 +000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa + +GPT Header: offset = 512, size = 512 bytes. +00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 +00000210 9b 58 15 32 00 00 00 00 01 00 00 00 00 00 00 00 +00000220 ff 8f 01 00 00 00 00 00 00 08 00 00 00 00 00 00 +00000230 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c +00000240 8b 65 9e 76 45 41 21 8d 02 00 00 00 00 00 00 00 +00000250 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00 +00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Entries: offset = 1024, size = 16384 bytes. +00000400 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b +00000410 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32 +00000420 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00 +00000430 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00 +00000440 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00 +00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000480 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +00000490 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4 +000004a0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00 +000004b0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 +000004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000500 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f +00000510 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87 +00000520 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00 +00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000580 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09 +00000590 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db +000005a0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00 +000005b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +00000600 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +00000610 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73 +00000620 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00 +00000630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Backup Entries: offset = 52411904, size = 16384 bytes. +031fbe00 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b +031fbe10 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32 +031fbe20 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00 +031fbe30 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00 +031fbe40 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00 +031fbe50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbe80 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +031fbe90 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4 +031fbea0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00 +031fbeb0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 +031fbec0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbf00 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f +031fbf10 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87 +031fbf20 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00 +031fbf30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fbf80 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09 +031fbf90 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db +031fbfa0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00 +031fbfb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +031fc000 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 +031fc010 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73 +031fc020 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00 +031fc030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +GPT Backup Header: offset = 52428288, size = 512 bytes. +031ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 +031ffe10 22 e2 97 b2 00 00 00 00 ff 8f 01 00 00 00 00 00 +031ffe20 01 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 +031ffe30 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c +031ffe40 8b 65 9e 76 45 41 21 8d df 8f 01 00 00 00 00 00 +031ffe50 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00 +031ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* + +Expert command (m for help): diff --git a/tests/expected/sfdisk/gpt-attrs-with-typo.err b/tests/expected/sfdisk/gpt-attrs-with-typo.err new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/gpt-attrs.err b/tests/expected/sfdisk/gpt-attrs.err new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/gpt-label b/tests/expected/sfdisk/gpt-label new file mode 100644 index 0000000..34ee589 --- /dev/null +++ b/tests/expected/sfdisk/gpt-label @@ -0,0 +1,6 @@ +Partition name changed from '' to 'EFI system'. + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +EFI system diff --git a/tests/expected/sfdisk/gpt-list-pmbr b/tests/expected/sfdisk/gpt-list-pmbr new file mode 100644 index 0000000..72f5fff --- /dev/null +++ b/tests/expected/sfdisk/gpt-list-pmbr @@ -0,0 +1,10 @@ +Disk : 50 MiB, 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 / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 1 102399 102399 50M ee GPT + diff --git a/tests/expected/sfdisk/gpt-list-pmbr.err b/tests/expected/sfdisk/gpt-list-pmbr.err new file mode 100644 index 0000000..5d51390 --- /dev/null +++ b/tests/expected/sfdisk/gpt-list-pmbr.err @@ -0,0 +1 @@ +Partition 1 does not start on physical sector boundary. diff --git a/tests/expected/sfdisk/gpt-read-dump b/tests/expected/sfdisk/gpt-read-dump new file mode 100644 index 0000000..a35f2d4 --- /dev/null +++ b/tests/expected/sfdisk/gpt-read-dump @@ -0,0 +1,44 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 8191 6144 3M Linux root (x86) +2 8192 14335 6144 3M Linux filesystem +3 14336 20479 6144 3M Linux filesystem +4 20480 102366 81887 40M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Start End Size UUID Type Name + 2048 8191 3M 4DD6948A-44F8-4E6C-8BDC-064F740704F8 Linux root (x86) + 8192 14335 3M 44B51DEF-5F04-465A-91AA-2889A62D8E49 Linux filesystem +14336 20479 3M 643E1D0D-BC02-4CED-B83B-86121062858F Linux filesystem +20480 102366 40M D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C Linux filesystem GPT is the best diff --git a/tests/expected/sfdisk/gpt-reorder b/tests/expected/sfdisk/gpt-reorder new file mode 100644 index 0000000..184a8ec --- /dev/null +++ b/tests/expected/sfdisk/gpt-reorder @@ -0,0 +1,51 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 8192 14335 6144 3M Linux filesystem +2 2048 8191 6144 3M Linux filesystem +3 20480 102366 81887 40M Linux filesystem +4 14336 20479 6144 3M Linux filesystem + +Partition table entries are not in disk order. + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Partitions order fixed. + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 8191 6144 3M Linux filesystem +2 8192 14335 6144 3M Linux filesystem +3 14336 20479 6144 3M Linux filesystem +4 20480 102366 81887 40M Linux filesystem diff --git a/tests/expected/sfdisk/gpt-resize b/tests/expected/sfdisk/gpt-resize new file mode 100644 index 0000000..6e9d2e5 --- /dev/null +++ b/tests/expected/sfdisk/gpt-resize @@ -0,0 +1,24 @@ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux swap + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 102366 100319 49M Linux swap + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/gpt-type b/tests/expected/sfdisk/gpt-type new file mode 100644 index 0000000..396b75d --- /dev/null +++ b/tests/expected/sfdisk/gpt-type @@ -0,0 +1,5 @@ + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +C12A7328-F81F-11D2-BA4B-00A0C93EC93B diff --git a/tests/expected/sfdisk/gpt-uuid b/tests/expected/sfdisk/gpt-uuid new file mode 100644 index 0000000..d3d11e8 --- /dev/null +++ b/tests/expected/sfdisk/gpt-uuid @@ -0,0 +1 @@ +91DC657B-D7B4-4653-A367-663194FFD432 diff --git a/tests/expected/sfdisk/gpt-write-dump b/tests/expected/sfdisk/gpt-write-dump new file mode 100644 index 0000000..2a00786 --- /dev/null +++ b/tests/expected/sfdisk/gpt-write-dump @@ -0,0 +1,12 @@ +label: gpt +label-id: 3B8559DB-33AF-43E9-BEFC-C331D829B539 +device: +unit: sectors +first-lba: 2048 +last-lba: 102366 +sector-size: 512 + +1 : start= 2048, size= 6144, type=44479540-F297-41B2-9AF7-D131D5F0458A, uuid=4DD6948A-44F8-4E6C-8BDC-064F740704F8 +2 : start= 8192, size= 6144, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=44B51DEF-5F04-465A-91AA-2889A62D8E49 +3 : start= 14336, size= 6144, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=643E1D0D-BC02-4CED-B83B-86121062858F +4 : start= 20480, size= 81887, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C, name="GPT is the best" diff --git a/tests/expected/sfdisk/gpt-write-json b/tests/expected/sfdisk/gpt-write-json new file mode 100644 index 0000000..19e2824 --- /dev/null +++ b/tests/expected/sfdisk/gpt-write-json @@ -0,0 +1,39 @@ +{ + "partitiontable": { + "label": "gpt", + "id": "3B8559DB-33AF-43E9-BEFC-C331D829B539", + "device": "", + "unit": "sectors", + "firstlba": 2048, + "lastlba": 102366, + "sectorsize": 512, + "partitions": [ + { + "node": "1", + "start": 2048, + "size": 6144, + "type": "44479540-F297-41B2-9AF7-D131D5F0458A", + "uuid": "4DD6948A-44F8-4E6C-8BDC-064F740704F8" + },{ + "node": "2", + "start": 8192, + "size": 6144, + "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4", + "uuid": "44B51DEF-5F04-465A-91AA-2889A62D8E49" + },{ + "node": "3", + "start": 14336, + "size": 6144, + "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4", + "uuid": "643E1D0D-BC02-4CED-B83B-86121062858F" + },{ + "node": "4", + "start": 20480, + "size": 81887, + "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4", + "uuid": "D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C", + "name": "GPT is the best" + } + ] + } +} diff --git a/tests/expected/sfdisk/movedata-down b/tests/expected/sfdisk/movedata-down new file mode 100644 index 0000000..af0f6e8 --- /dev/null +++ b/tests/expected/sfdisk/movedata-down @@ -0,0 +1,31 @@ +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 3048 23527 20480 10M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2548 23027 20480 10M 83 Linux + +Data move: + typescript file . + start sector: (from/to) 3048 / 2548 + sectors: 20480 + step size: 1048576 bytes + + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/movedata-non-overlay b/tests/expected/sfdisk/movedata-non-overlay new file mode 100644 index 0000000..753a9c3 --- /dev/null +++ b/tests/expected/sfdisk/movedata-non-overlay @@ -0,0 +1,31 @@ +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2548 23027 20480 10M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 63988 84467 20480 10M 83 Linux + +Data move: + typescript file . + start sector: (from/to) 2548 / 63988 + sectors: 20480 + step size: 1048576 bytes + + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/movedata-up b/tests/expected/sfdisk/movedata-up new file mode 100644 index 0000000..9de06db --- /dev/null +++ b/tests/expected/sfdisk/movedata-up @@ -0,0 +1,31 @@ +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 22527 20480 10M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 3048 23527 20480 10M 83 Linux + +Data move: + typescript file . + start sector: (from/to) 2048 / 3048 + sectors: 20480 + step size: 1048576 bytes + + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-0-move-up-absolute b/tests/expected/sfdisk/resize-dos-0-move-up-absolute new file mode 100644 index 0000000..e1c069f --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-0-move-up-absolute @@ -0,0 +1,26 @@ +3000, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 22527 20480 10M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 3000 23479 20480 10M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-1-move-down-absolute b/tests/expected/sfdisk/resize-dos-1-move-down-absolute new file mode 100644 index 0000000..da88635 --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-1-move-down-absolute @@ -0,0 +1,26 @@ +2048, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 3000 23479 20480 10M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 22527 20480 10M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-10-down-enlarge b/tests/expected/sfdisk/resize-dos-10-down-enlarge new file mode 100644 index 0000000..df392d8 --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-10-down-enlarge @@ -0,0 +1,26 @@ +-10M,+10M,,* + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 22528 204799 182272 89M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 204799 202752 99M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-11-absolute-move-resize b/tests/expected/sfdisk/resize-dos-11-absolute-move-resize new file mode 100644 index 0000000..43e6837 --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-11-absolute-move-resize @@ -0,0 +1,26 @@ +2048,10M,L + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 * 2048 204799 202752 99M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 22527 20480 10M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-12-reduce-midle b/tests/expected/sfdisk/resize-dos-12-reduce-midle new file mode 100644 index 0000000..669fd45 --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-12-reduce-midle @@ -0,0 +1,30 @@ +,-5M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 * 2048 22527 20480 10M 83 Linux +2 22528 43007 20480 10M 83 Linux +3 43008 63487 20480 10M 83 Linux + +2: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 22527 20480 10M 83 Linux +2 22528 32767 10240 5M 83 Linux +3 43008 63487 20480 10M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-13-max-last b/tests/expected/sfdisk/resize-dos-13-max-last new file mode 100644 index 0000000..3664d88 --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-13-max-last @@ -0,0 +1,30 @@ +-5M,+ + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 * 2048 22527 20480 10M 83 Linux +2 22528 32767 10240 5M 83 Linux +3 43008 63487 20480 10M 83 Linux + +3: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 * 2048 22527 20480 10M 83 Linux +2 22528 32767 10240 5M 83 Linux +3 32768 204799 172032 84M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-2-move-up-relative b/tests/expected/sfdisk/resize-dos-2-move-up-relative new file mode 100644 index 0000000..75a95b1 --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-2-move-up-relative @@ -0,0 +1,26 @@ ++1M, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 22527 20480 10M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 4096 24575 20480 10M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-3-move-down-relative b/tests/expected/sfdisk/resize-dos-3-move-down-relative new file mode 100644 index 0000000..b3816e0 --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-3-move-down-relative @@ -0,0 +1,26 @@ +-1M, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 4096 24575 20480 10M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 22527 20480 10M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-4-enlarge-absolute b/tests/expected/sfdisk/resize-dos-4-enlarge-absolute new file mode 100644 index 0000000..0c18f9f --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-4-enlarge-absolute @@ -0,0 +1,26 @@ +-,15M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 22527 20480 10M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 32767 30720 15M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-5-reduce-absolute b/tests/expected/sfdisk/resize-dos-5-reduce-absolute new file mode 100644 index 0000000..557875d --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-5-reduce-absolute @@ -0,0 +1,26 @@ +,5M, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 32767 30720 15M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 12287 10240 5M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-6-enlarge-relative b/tests/expected/sfdisk/resize-dos-6-enlarge-relative new file mode 100644 index 0000000..528d025 --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-6-enlarge-relative @@ -0,0 +1,26 @@ +, +10M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 12287 10240 5M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 32767 30720 15M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-7-reduce-relative b/tests/expected/sfdisk/resize-dos-7-reduce-relative new file mode 100644 index 0000000..6a6fa0c --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-7-reduce-relative @@ -0,0 +1,26 @@ +, -10M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 32767 30720 15M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 12287 10240 5M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-8-enlarge-all b/tests/expected/sfdisk/resize-dos-8-enlarge-all new file mode 100644 index 0000000..2f6b3fb --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-8-enlarge-all @@ -0,0 +1,26 @@ +,+ + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 12287 10240 5M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 204799 202752 99M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-9-up-preduce b/tests/expected/sfdisk/resize-dos-9-up-preduce new file mode 100644 index 0000000..2ca6f3b --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-9-up-preduce @@ -0,0 +1,26 @@ ++10M,-10M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 204799 202752 99M 83 Linux + +1: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 22528 204799 182272 89M 83 Linux + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-dos-unsorted b/tests/expected/sfdisk/resize-dos-unsorted new file mode 100644 index 0000000..a16c326 --- /dev/null +++ b/tests/expected/sfdisk/resize-dos-unsorted @@ -0,0 +1,74 @@ +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Created a new partition . +6: Created a new partition . +7: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 6143 2048 1M 83 Linux +3 6144 108543 102400 50M 5 Extended +4 108544 110591 2048 1M 83 Linux +5 8192 10239 2048 1M 83 Linux +6 12288 108543 96256 47M 83 Linux + +Partition table entries are not in disk order. + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 6143 2048 1M 83 Linux +3 6144 108543 102400 50M 5 Extended +4 108544 110591 2048 1M 83 Linux +5 8192 10239 2048 1M 83 Linux +6 12288 108543 96256 47M 83 Linux + +Partition table entries are not in disk order. + +4: +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 6143 2048 1M 83 Linux +3 6144 108543 102400 50M 5 Extended +4 108544 204799 96256 47M 83 Linux +5 8192 10239 2048 1M 83 Linux +6 12288 108543 96256 47M 83 Linux + +Partition table entries are not in disk order. + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-0-move-up-absolute b/tests/expected/sfdisk/resize-gpt-0-move-up-absolute new file mode 100644 index 0000000..230841d --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-0-move-up-absolute @@ -0,0 +1,26 @@ +3000, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 3000 23479 20480 10M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-1-move-down-absolute b/tests/expected/sfdisk/resize-gpt-1-move-down-absolute new file mode 100644 index 0000000..de2a871 --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-1-move-down-absolute @@ -0,0 +1,26 @@ +2048, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 3000 23479 20480 10M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-10-down-enlarge b/tests/expected/sfdisk/resize-gpt-10-down-enlarge new file mode 100644 index 0000000..037d0ab --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-10-down-enlarge @@ -0,0 +1,26 @@ +-10M,+10M,,* + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 22528 204766 182239 89M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 204766 202719 99M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-11-absolute-move-resize b/tests/expected/sfdisk/resize-gpt-11-absolute-move-resize new file mode 100644 index 0000000..351e858 --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-11-absolute-move-resize @@ -0,0 +1,26 @@ +2048,10M,L + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 204766 202719 99M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-12-reduce-midle b/tests/expected/sfdisk/resize-gpt-12-reduce-midle new file mode 100644 index 0000000..683cede --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-12-reduce-midle @@ -0,0 +1,30 @@ +,-5M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem +2 22528 43007 20480 10M Linux filesystem +3 43008 63487 20480 10M Linux filesystem + +2: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem +2 22528 32767 10240 5M Linux filesystem +3 43008 63487 20480 10M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-13-max-last b/tests/expected/sfdisk/resize-gpt-13-max-last new file mode 100644 index 0000000..b0483f7 --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-13-max-last @@ -0,0 +1,30 @@ +-5M,+ + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem +2 22528 32767 10240 5M Linux filesystem +3 43008 63487 20480 10M Linux filesystem + +3: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem +2 22528 32767 10240 5M Linux filesystem +3 32768 204766 171999 84M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-2-move-up-relative b/tests/expected/sfdisk/resize-gpt-2-move-up-relative new file mode 100644 index 0000000..7669dab --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-2-move-up-relative @@ -0,0 +1,26 @@ ++1M, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 4096 24575 20480 10M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-3-move-down-relative b/tests/expected/sfdisk/resize-gpt-3-move-down-relative new file mode 100644 index 0000000..c8aa63a --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-3-move-down-relative @@ -0,0 +1,26 @@ +-1M, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 4096 24575 20480 10M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-4-enlarge-absolute b/tests/expected/sfdisk/resize-gpt-4-enlarge-absolute new file mode 100644 index 0000000..832e112 --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-4-enlarge-absolute @@ -0,0 +1,26 @@ +-,15M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 22527 20480 10M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 32767 30720 15M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-5-reduce-absolute b/tests/expected/sfdisk/resize-gpt-5-reduce-absolute new file mode 100644 index 0000000..b214183 --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-5-reduce-absolute @@ -0,0 +1,26 @@ +,5M, + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 32767 30720 15M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 12287 10240 5M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-6-enlarge-relative b/tests/expected/sfdisk/resize-gpt-6-enlarge-relative new file mode 100644 index 0000000..a9090e2 --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-6-enlarge-relative @@ -0,0 +1,26 @@ +, +10M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 12287 10240 5M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 32767 30720 15M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-7-reduce-relative b/tests/expected/sfdisk/resize-gpt-7-reduce-relative new file mode 100644 index 0000000..7e391cd --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-7-reduce-relative @@ -0,0 +1,26 @@ +, -10M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 32767 30720 15M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 12287 10240 5M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-8-enlarge-all b/tests/expected/sfdisk/resize-gpt-8-enlarge-all new file mode 100644 index 0000000..d0c4c5e --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-8-enlarge-all @@ -0,0 +1,26 @@ +,+ + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 12287 10240 5M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 204766 202719 99M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/resize-gpt-9-up-preduce b/tests/expected/sfdisk/resize-gpt-9-up-preduce new file mode 100644 index 0000000..16d348a --- /dev/null +++ b/tests/expected/sfdisk/resize-gpt-9-up-preduce @@ -0,0 +1,26 @@ ++10M,-10M + +Disk : 100 MiB, 104857600 bytes, 204800 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 204766 202719 99M Linux filesystem + +1: +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 22528 204766 182239 89M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. diff --git a/tests/expected/sfdisk/script-broken-1 b/tests/expected/sfdisk/script-broken-1 new file mode 100644 index 0000000..5da9777 --- /dev/null +++ b/tests/expected/sfdisk/script-broken-1 @@ -0,0 +1,15 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> +New situation: +Leaving. + diff --git a/tests/expected/sfdisk/script-broken-1.err b/tests/expected/sfdisk/script-broken-1.err new file mode 100644 index 0000000..bee3b2e --- /dev/null +++ b/tests/expected/sfdisk/script-broken-1.err @@ -0,0 +1 @@ +line 5: unsupported command diff --git a/tests/expected/sfdisk/script-broken-2 b/tests/expected/sfdisk/script-broken-2 new file mode 100644 index 0000000..5da9777 --- /dev/null +++ b/tests/expected/sfdisk/script-broken-2 @@ -0,0 +1,15 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> +New situation: +Leaving. + diff --git a/tests/expected/sfdisk/script-broken-2.err b/tests/expected/sfdisk/script-broken-2.err new file mode 100644 index 0000000..bee3b2e --- /dev/null +++ b/tests/expected/sfdisk/script-broken-2.err @@ -0,0 +1 @@ +line 5: unsupported command diff --git a/tests/expected/sfdisk/script-broken-3 b/tests/expected/sfdisk/script-broken-3 new file mode 100644 index 0000000..5da9777 --- /dev/null +++ b/tests/expected/sfdisk/script-broken-3 @@ -0,0 +1,15 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> +New situation: +Leaving. + diff --git a/tests/expected/sfdisk/script-broken-3.err b/tests/expected/sfdisk/script-broken-3.err new file mode 100644 index 0000000..bee3b2e --- /dev/null +++ b/tests/expected/sfdisk/script-broken-3.err @@ -0,0 +1 @@ +line 5: unsupported command diff --git a/tests/expected/sfdisk/script-broken-4 b/tests/expected/sfdisk/script-broken-4 new file mode 100644 index 0000000..5da9777 --- /dev/null +++ b/tests/expected/sfdisk/script-broken-4 @@ -0,0 +1,15 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> +New situation: +Leaving. + diff --git a/tests/expected/sfdisk/script-broken-4.err b/tests/expected/sfdisk/script-broken-4.err new file mode 100644 index 0000000..bee3b2e --- /dev/null +++ b/tests/expected/sfdisk/script-broken-4.err @@ -0,0 +1 @@ +line 5: unsupported command diff --git a/tests/expected/sfdisk/script-broken-5 b/tests/expected/sfdisk/script-broken-5 new file mode 100644 index 0000000..5da9777 --- /dev/null +++ b/tests/expected/sfdisk/script-broken-5 @@ -0,0 +1,15 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> +New situation: +Leaving. + diff --git a/tests/expected/sfdisk/script-broken-5.err b/tests/expected/sfdisk/script-broken-5.err new file mode 100644 index 0000000..bee3b2e --- /dev/null +++ b/tests/expected/sfdisk/script-broken-5.err @@ -0,0 +1 @@ +line 5: unsupported command diff --git a/tests/expected/sfdisk/script-quotes b/tests/expected/sfdisk/script-quotes new file mode 100644 index 0000000..5ae4d4f --- /dev/null +++ b/tests/expected/sfdisk/script-quotes @@ -0,0 +1,44 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 8191 6144 3M Linux filesystem +2 8192 14335 6144 3M Linux filesystem +3 14336 20479 6144 3M Linux filesystem +4 20480 26623 6144 3M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Start End Size UUID Type Name + 2048 8191 3M 4DD6948A-44F8-4E6C-8BDC-064F740704F8 Linux filesystem + 8192 14335 3M 44B51DEF-5F04-465A-91AA-2889A62D8E49 Linux filesystem +14336 20479 3M 643E1D0D-BC02-4CED-B83B-86121062858F Linux filesystem +20480 26623 3M D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C Linux filesystem diff --git a/tests/expected/sfdisk/script-separator b/tests/expected/sfdisk/script-separator new file mode 100644 index 0000000..0ac5453 --- /dev/null +++ b/tests/expected/sfdisk/script-separator @@ -0,0 +1,44 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 8191 6144 3M Linux filesystem +2 8192 14335 6144 3M Linux root (x86) +3 14336 20479 6144 3M Linux filesystem +4 20480 102366 81887 40M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Start End Size UUID Type Name + 2048 8191 3M 4DD6948A-44F8-4E6C-8BDC-064F740704F8 Linux filesystem + 8192 14335 3M 44B51DEF-5F04-465A-91AA-2889A62D8E49 Linux root (x86) +14336 20479 3M 643E1D0D-BC02-4CED-B83B-86121062858F Linux filesystem +20480 102366 40M D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C Linux filesystem diff --git a/tests/expected/sfdisk/script-type-and-id b/tests/expected/sfdisk/script-type-and-id new file mode 100644 index 0000000..ee6dc55 --- /dev/null +++ b/tests/expected/sfdisk/script-type-and-id @@ -0,0 +1,44 @@ +Checking that no-one is using this disk right now ... OK + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Script header accepted. +>>> Script header accepted. +>>> Script header accepted. +>>> Created a new disklabel. +1: Created a new partition . +2: Created a new partition . +3: Created a new partition . +4: Created a new partition . +5: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 8191 6144 3M Linux root (x86) +2 8192 14335 6144 3M Linux root (x86) +3 14336 20479 6144 3M Linux root (x86) +4 20480 102366 81887 40M Linux root (x86) + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Start End Size UUID Type Name + 2048 8191 3M 4DD6948A-44F8-4E6C-8BDC-064F740704F8 Linux root (x86) + 8192 14335 3M 44B51DEF-5F04-465A-91AA-2889A62D8E49 Linux root (x86) +14336 20479 3M 643E1D0D-BC02-4CED-B83B-86121062858F Linux root (x86) +20480 102366 40M D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C Linux root (x86) diff --git a/tests/expected/sfdisk/wipe-fs-to-dos b/tests/expected/sfdisk/wipe-fs-to-dos new file mode 100644 index 0000000..8f97e25 --- /dev/null +++ b/tests/expected/sfdisk/wipe-fs-to-dos @@ -0,0 +1,28 @@ + +=====Create FS================================ + +=====Create DOS================================ + +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. + +1: Created a new partition . +2: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 102399 100352 49M 83 Linux + +The partition table has been altered. + +=====Check content================================ +OFFSET TYPE +0x1fe dos diff --git a/tests/expected/sfdisk/wipe-fs-to-dos.err b/tests/expected/sfdisk/wipe-fs-to-dos.err new file mode 100644 index 0000000..1a08900 --- /dev/null +++ b/tests/expected/sfdisk/wipe-fs-to-dos.err @@ -0,0 +1,2 @@ +The device contains 'swap' signature and it may be removed by a write command. See sfdisk(8) man page and --wipe option for more details. +The device contains 'swap' signature and it may be removed by a write command. See sfdisk(8) man page and --wipe option for more details. diff --git a/tests/expected/sfdisk/wipe-gpt-to-dos b/tests/expected/sfdisk/wipe-gpt-to-dos new file mode 100644 index 0000000..8b9b130 --- /dev/null +++ b/tests/expected/sfdisk/wipe-gpt-to-dos @@ -0,0 +1,51 @@ + +=====Create GPT================================ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +2: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 100351 98304 48M Linux filesystem + +The partition table has been altered. + +=====Create DOS================================ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 100351 98304 48M Linux filesystem + +>>> Created a new disklabel. +1: Created a new partition . +2: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 102399 100352 49M 83 Linux + +The partition table has been altered. + +=====Check content================================ +OFFSET TYPE +0x1fe dos diff --git a/tests/expected/sfdisk/wipe-gpt-to-dos-auto b/tests/expected/sfdisk/wipe-gpt-to-dos-auto new file mode 100644 index 0000000..2047a61 --- /dev/null +++ b/tests/expected/sfdisk/wipe-gpt-to-dos-auto @@ -0,0 +1,58 @@ + +=====Create GPT================================ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: dos +Disk identifier: + +Old situation: + +Device Boot Start End Sectors Size Id Type +1 2048 102399 100352 49M 83 Linux + +>>> Created a new disklabel. +1: Created a new partition . +2: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 100351 98304 48M Linux filesystem + +The partition table has been altered. + +=====Create DOS================================ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Old situation: + +Device Start End Sectors Size Type +1 2048 100351 98304 48M Linux filesystem + +>>> Created a new disklabel. +1: Created a new partition . +2: Done. + +New situation: +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 102399 100352 49M 83 Linux + +The partition table has been altered. + +=====Check content================================ +OFFSET TYPE +0x1fe dos diff --git a/tests/expected/sfdisk/wipe-gpt-to-dos-auto.err b/tests/expected/sfdisk/wipe-gpt-to-dos-auto.err new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/wipe-gpt-to-dos.err b/tests/expected/sfdisk/wipe-gpt-to-dos.err new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/sfdisk/wipe-partition b/tests/expected/sfdisk/wipe-partition new file mode 100644 index 0000000..765a22e --- /dev/null +++ b/tests/expected/sfdisk/wipe-partition @@ -0,0 +1,59 @@ + +=====Create GPT================================ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +2: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 100351 98304 48M Linux filesystem + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. + +=====Create FS in partition================================ + +=====Wipe whole-disk device================================ + +=====Create GPT (again)================================ +Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes + +>>> Created a new disklabel. +1: Created a new partition . +The signature will be removed by a write command. +2: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 100351 98304 48M Linux filesystem + +Filesystem/RAID signature on partition 1 will be wiped. + +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. + +=====Check content (disk)================================ +OFFSET TYPE +0x200 gpt +0x31ffe00 gpt +0x1fe PMBR + +=====Check content (partition)================================ diff --git a/tests/expected/sfdisk/wipe-partition.err b/tests/expected/sfdisk/wipe-partition.err new file mode 100644 index 0000000..bce8a4c --- /dev/null +++ b/tests/expected/sfdisk/wipe-partition.err @@ -0,0 +1 @@ +Partition #1 contains a swap signature. diff --git a/tests/expected/sfdisk/wipe.err b/tests/expected/sfdisk/wipe.err new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3