summaryrefslogtreecommitdiffstats
path: root/tests/expected/sfdisk
diff options
context:
space:
mode:
authorKarel Zak2017-02-15 12:48:06 +0100
committerKarel Zak2017-02-15 12:48:06 +0100
commitf0c60dff1acae21b1729ed4963bd46be3bbaa83e (patch)
tree03a37000343ae4e0f69258e94cee3f0f53abc1b2 /tests/expected/sfdisk
parentlibblkid: (gpt) fix force flag (diff)
downloadkernel-qcow2-util-linux-f0c60dff1acae21b1729ed4963bd46be3bbaa83e.tar.gz
kernel-qcow2-util-linux-f0c60dff1acae21b1729ed4963bd46be3bbaa83e.tar.xz
kernel-qcow2-util-linux-f0c60dff1acae21b1729ed4963bd46be3bbaa83e.zip
tests: add sfdisk --wipe and --wipe-partition tests
Addresses: https://github.com/karelzak/util-linux/issues/410 Addresses: https://github.com/karelzak/util-linux/issues/411 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/expected/sfdisk')
-rw-r--r--tests/expected/sfdisk/wipe-fs-to-dos31
-rw-r--r--tests/expected/sfdisk/wipe-gpt-to-dos51
-rw-r--r--tests/expected/sfdisk/wipe-gpt-to-dos-auto58
-rw-r--r--tests/expected/sfdisk/wipe-partition52
4 files changed, 192 insertions, 0 deletions
diff --git a/tests/expected/sfdisk/wipe-fs-to-dos b/tests/expected/sfdisk/wipe-fs-to-dos
new file mode 100644
index 000000000..ca1184ca8
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-fs-to-dos
@@ -0,0 +1,31 @@
+
+=====Create FS================================
+
+=====Create DOS================================
+
+
+The old swap signature will be removed by a write command.
+Disk <removed>: 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 / <removed> bytes
+
+>>> Created a new <removed>.
+The old swap signature will be removed by a write command.
+<removed>1: Created a new <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 102399 100352 49M 83 Linux
+
+The partition table has been altered.
+
+=====Check content================================
+offset type
+----------------------------------------------------------------
+0x1fe dos [partition table]
+
diff --git a/tests/expected/sfdisk/wipe-gpt-to-dos b/tests/expected/sfdisk/wipe-gpt-to-dos
new file mode 100644
index 000000000..3831671b3
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-gpt-to-dos
@@ -0,0 +1,51 @@
+
+=====Create GPT================================
+Disk <removed>: 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 / <removed> bytes
+
+>>> Created a new <removed>.
+<removed>1: Created a new <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 102366 100319 49M Linux filesystem
+
+The partition table has been altered.
+
+=====Create DOS================================
+Disk <removed>: 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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 102366 100319 49M Linux filesystem
+
+>>> Created a new <removed>.
+<removed>1: Created a new <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 102399 100352 49M 83 Linux
+
+The partition table has been altered.
+
+=====Check content================================
+offset type
+----------------------------------------------------------------
+0x1fe dos [partition table]
+
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 000000000..347a3efc2
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-gpt-to-dos-auto
@@ -0,0 +1,58 @@
+
+=====Create GPT================================
+Disk <removed>: 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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 102399 100352 49M 83 Linux
+
+>>> Created a new <removed>.
+<removed>1: Created a new <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 102366 100319 49M Linux filesystem
+
+The partition table has been altered.
+
+=====Create DOS================================
+Disk <removed>: 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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 102366 100319 49M Linux filesystem
+
+>>> Created a new <removed>.
+<removed>1: Created a new <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 102399 100352 49M 83 Linux
+
+The partition table has been altered.
+
+=====Check content================================
+offset type
+----------------------------------------------------------------
+0x1fe dos [partition table]
+
diff --git a/tests/expected/sfdisk/wipe-partition b/tests/expected/sfdisk/wipe-partition
new file mode 100644
index 000000000..f447c585e
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-partition
@@ -0,0 +1,52 @@
+
+=====Create GPT================================
+Disk <removed>: 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 / <removed> bytes
+
+>>> Created a new <removed>.
+<removed>1: Created a new <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 102366 100319 49M Linux filesystem
+
+The partition table has been altered.
+
+=====Create FS in partition================================
+
+=====Wipe whole-disk device================================
+
+=====Create GPT (again)================================
+Disk <removed>: 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 / <removed> bytes
+
+>>> Created a new <removed>.
+<removed>1: Created a new <removed>.
+Partition #1 contains a ext4 signature.
+The signature will be removed by a write command.
+<removed>2: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 102366 100319 49M Linux filesystem
+
+The partition table has been altered.
+
+=====Check content (disk)================================
+offset type
+----------------------------------------------------------------
+0x200 gpt [partition table]
+
+
+=====Check content (partition)================================