]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: add PMBR sfdisk test
authorKarel Zak <kzak@redhat.com>
Mon, 13 Oct 2014 11:30:28 +0000 (13:30 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 13 Oct 2014 11:30:28 +0000 (13:30 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/sfdisk.c
tests/expected/sfdisk/gpt-list-pmbr [new file with mode: 0644]
tests/ts/sfdisk/gpt

index 1be40caad4bd315494d4c1c3407a985a01f3a608..68df57c0d5fcd1122611a1f8b5e6ebf3f34bdfa0 100644 (file)
@@ -76,7 +76,7 @@ enum {
 };
 
 struct sfdisk {
-       int             act;            /* action */
+       int             act;            /* ACT_* */
        int             partno;         /* -N <partno>, default -1 */
        const char      *label;         /* --label <label> */
        const char      *label_nested;  /* --label-nested <label> */
diff --git a/tests/expected/sfdisk/gpt-list-pmbr b/tests/expected/sfdisk/gpt-list-pmbr
new file mode 100644 (file)
index 0000000..c2a56c7
--- /dev/null
@@ -0,0 +1,9 @@
+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 / 32768 bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device     Boot Start    End Sectors Size Id Type
+<removed>1           1 102399  102399  50M ee GPT
index c09dee2a792506d86fa226268a3f8d4ab9fbe3b7..90cb1a36617b9eed8e065e0f383ec598a8d62c03 100755 (executable)
@@ -102,5 +102,11 @@ ts_fdisk_clean $TS_DEVICE
 ts_finalize_subtest
 
 
+ts_init_subtest "list-pmbr"
+$TS_CMD_SFDISK --list --label-nested dos ${TS_DEVICE} >> $TS_OUTPUT 2>&1
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
 rmmod scsi_debug
 ts_finalize