]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: add sfdisk resize tests for GPT
authorKarel Zak <kzak@redhat.com>
Thu, 23 Apr 2015 09:37:00 +0000 (11:37 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Apr 2015 09:37:00 +0000 (11:37 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
15 files changed:
tests/expected/sfdisk/resize-gpt-0-move-up-absolute [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-1-move-down-absolute [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-10-down-enlarge [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-11-absolute-move-resize [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-12-reduce-midle [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-13-max-last [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-2-move-up-relative [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-3-move-down-relative [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-4-enlarge-absolute [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-5-reduce-absolute [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-6-enlarge-relative [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-7-reduce-relative [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-8-enlarge-all [new file with mode: 0644]
tests/expected/sfdisk/resize-gpt-9-up-preduce [new file with mode: 0644]
tests/ts/sfdisk/resize

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 (file)
index 0000000..2f84787
--- /dev/null
@@ -0,0 +1,25 @@
+3000,
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 22527   20480  10M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>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 (file)
index 0000000..ad28d6f
--- /dev/null
@@ -0,0 +1,25 @@
+2048,
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   3000 23479   20480  10M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>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 (file)
index 0000000..44b1fb7
--- /dev/null
@@ -0,0 +1,25 @@
+-10M,+10M,,*
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start    End Sectors Size Type
+<removed>1  22528 204766  182239  89M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start    End Sectors Size Type
+<removed>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 (file)
index 0000000..c4dd0cb
--- /dev/null
@@ -0,0 +1,25 @@
+2048,10M,L
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start    End Sectors Size Type
+<removed>1   2048 204766  202719  99M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>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 (file)
index 0000000..fad398e
--- /dev/null
@@ -0,0 +1,29 @@
+,-5M
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 22527   20480  10M Linux filesystem
+<removed>2  22528 43007   20480  10M Linux filesystem
+<removed>3  43008 63487   20480  10M Linux filesystem
+
+<removed>2: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 22527   20480  10M Linux filesystem
+<removed>2  22528 32767   10240   5M Linux filesystem
+<removed>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 (file)
index 0000000..bcbe729
--- /dev/null
@@ -0,0 +1,29 @@
+-5M,+
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 22527   20480  10M Linux filesystem
+<removed>2  22528 32767   10240   5M Linux filesystem
+<removed>3  43008 63487   20480  10M Linux filesystem
+
+<removed>3: 
+New situation:
+
+Device             Start    End Sectors Size Type
+<removed>1   2048  22527   20480  10M Linux filesystem
+<removed>2  22528  32767   10240   5M Linux filesystem
+<removed>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 (file)
index 0000000..deaf777
--- /dev/null
@@ -0,0 +1,25 @@
++1M,
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 22527   20480  10M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>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 (file)
index 0000000..eb7b80b
--- /dev/null
@@ -0,0 +1,25 @@
+-1M,
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   4096 24575   20480  10M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>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 (file)
index 0000000..2a7843e
--- /dev/null
@@ -0,0 +1,25 @@
+-,15M
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 22527   20480  10M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>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 (file)
index 0000000..453f1fe
--- /dev/null
@@ -0,0 +1,25 @@
+,5M,
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 32767   30720  15M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>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 (file)
index 0000000..064f74d
--- /dev/null
@@ -0,0 +1,25 @@
+, +10M
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 12287   10240   5M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>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 (file)
index 0000000..8bb65f1
--- /dev/null
@@ -0,0 +1,25 @@
+, -10M
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 32767   30720  15M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start   End Sectors Size Type
+<removed>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 (file)
index 0000000..85a5c70
--- /dev/null
@@ -0,0 +1,25 @@
+,+
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start   End Sectors Size Type
+<removed>1   2048 12287   10240   5M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start    End Sectors Size Type
+<removed>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 (file)
index 0000000..741f172
--- /dev/null
@@ -0,0 +1,25 @@
++10M,-10M
+
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 32768 bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device             Start    End Sectors Size Type
+<removed>1   2048 204766  202719  99M Linux filesystem
+
+<removed>1: 
+New situation:
+
+Device             Start    End Sectors Size Type
+<removed>1  22528 204766  182239  89M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
index 7083e402adb3be08f76f2f7a6b384fb09d76f1b4..f3cde75c08631e3556540c7f9ea1e32121fa6a4b 100755 (executable)
@@ -118,7 +118,7 @@ function test_label_resize {
 test_label_resize dos
 
 # GPT
-#test_label_resize gpt
+test_label_resize gpt
 
 rmmod scsi_debug
 ts_finalize