aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2016-10-26 14:08:29 +0200
committerKarel Zak <kzak@redhat.com>2016-10-26 14:08:29 +0200
commitf4126f98e165f3e3457ecdb2e3777fa79463cb79 (patch)
tree8276dea5df13504a40f1f5c0ce75ce2d3417b28a
parent469acdb4496de69d69344def0adaba3176da7c1e (diff)
downloadutil-linux-f4126f98e165f3e3457ecdb2e3777fa79463cb79.tar.gz
tests: add sfdisk script case-insensitive test
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--tests/expected/sfdisk/dos-read-dump-case21
-rwxr-xr-xtests/ts/sfdisk/dos14
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/expected/sfdisk/dos-read-dump-case b/tests/expected/sfdisk/dos-read-dump-case
new file mode 100644
index 0000000000..5d007f7dbc
--- /dev/null
+++ b/tests/expected/sfdisk/dos-read-dump-case
@@ -0,0 +1,21 @@
+Checking that no-one is using this disk right now ... OK
+
+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
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new <removed>.
+<removed>1: Created a new <removed>.
+<removed>2: Done.
+
+New situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>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/ts/sfdisk/dos b/tests/ts/sfdisk/dos
index 692a717250..ba9d5ccc43 100755
--- a/tests/ts/sfdisk/dos
+++ b/tests/ts/sfdisk/dos
@@ -65,6 +65,20 @@ udevadm settle
ts_finalize_subtest
+ts_init_subtest "read-dump-case"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
+unit: sectors
+label-id: 0x1ddc8a79
+
+${TS_DEVICE}1 : stArt= 2048, sIZe= 6144, id=83, bootAble
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
ts_init_subtest "read-dump"
$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
udevadm settle