]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ORIG_HEAD
authorKarel Zak <kzak@redhat.com>
Wed, 25 Sep 2013 15:41:26 +0000 (17:41 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 25 Sep 2013 15:41:43 +0000 (17:41 +0200)
tests: update sun label test

 * add fdisk -l outputs (to make the test more usable)
 * use more usable geometry
 * don't expect that 'create sun label' oprations asks for C/H/S (we
   follows fdisk_context defaults)

Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/fdisk/sunlabel
tests/ts/fdisk/sunlabel

index e76a90f367b8f2c3944cf022f449d7bf376e501f..15ff6edd0adf073aa33491d3fee393d98fbca98b 100644 (file)
@@ -1,16 +1,93 @@
 Initialize empty image
 f1c9645dbc14efddc7d8a322685f26eb sunlabel.img
 Create new SUN partition table
-b65dc433dfa0afa8983db30b94b0ce9c sunlabel.img
+f050fd2beb99f8d968bf17450f655f06 sunlabel.img
+
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk label type: sun
+
+
 Create first partition
-9e19c0c3704ab6902b2f912d8b862ad2 sunlabel.img
+e730c7ec8208601f41963f0485147248 sunlabel.img
+
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk label type: sun
+
+Device     Flag Start       End Blocks  Id System
+<removed>1          0       128   4032  83 Linux native
+
 Set partition sysid
-df091a0bfe7ba8ac30d8030d369bea6a sunlabel.img
+df75defdb97fbd56222aed18631a22d0 sunlabel.img
+
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk label type: sun
+
+Device     Flag Start       End Blocks  Id System
+<removed>1          0       128   4032   4 SunOS usr
+
 Set first partition readonly
-34b580eb58d91c1212898a05b49fb8df sunlabel.img
+da23f66698d9a553162887621d4c7490 sunlabel.img
+
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk label type: sun
+
+Device     Flag Start       End Blocks  Id System
+<removed>1    r     0       128   4032   4 SunOS usr
+
 Set first partition mountable
-bc40afb4effe2f76ea0a7c4014dac45c sunlabel.img
+3ab76e8491b103eab52b2ae1856c1e30 sunlabel.img
+
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk label type: sun
+
+Device     Flag Start       End Blocks  Id System
+<removed>1   ur     0       128   4032   4 SunOS usr
+
 Create second partition
-6c74817a6ed45bad0640ff445d4a9dd5 sunlabel.img
+
+Welcome to fdisk <removed>.
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+
+Command (m for help): Partition number (2-8, default 2): First cylinder (128-325, default 128): Last cylinder or +cylinders or +size{K,M,G,T,P} (128-325, default 325): 
+Created a new <removed>.
+
+Command (m for help): The partition table has been altered.
+Syncing disks.
+
+a87e80830aa13d2d68b766962f052750 sunlabel.img
+
+Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors
+Geometry: 1 heads, 63 sectors/track, 325 cylinders
+Units: cylinders of 63 * 512 = 32256 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disk label type: sun
+
+Device     Flag Start       End Blocks  Id System
+<removed>1   ur     0       128   4032   4 SunOS usr
+<removed>2        128       325   6205+ 83 Linux native
+
 Delete all partitions
-7b930443ac53307eb8823ffc1ce9d65e sunlabel.img
+502ba7a0cfdce2849c3a99881f0590c3 sunlabel.img
index b129a3c6f7c4664f46ce20beb209baa4eaf12c68..f610ad8f58b4011b51b17aca928fbbd84210482e 100755 (executable)
@@ -30,7 +30,7 @@ FDISK_CMD_TOGGLE_MOUNTABLE="c\n1\n" # sets first partition as mountable
 FDISK_CMD_CHANGE_SYSID="t\n4\n" # changes sysid to 4 (SunOS usr)
 FDISK_CMD_CREATE_SECONDARY="n\n2\n128\n\n" # create secondary partition to the end of disk
 
-FDISK_OPTIONS="-C 1024 -u=cylinders"
+FDISK_OPTIONS="-H 1 -S 63 -u=cylinders"
 
 #set -x