diff options
Diffstat (limited to 'tests')
178 files changed, 3993 insertions, 2012 deletions
diff --git a/tests/commands.sh b/tests/commands.sh index a2948c911..fcd74dcf5 100644 --- a/tests/commands.sh +++ b/tests/commands.sh @@ -13,6 +13,9 @@ TS_HELPER_LIBMOUNT_TABDIFF="$top_builddir/test_mount_tab_diff" TS_HELPER_LIBMOUNT_TAB="$top_builddir/test_mount_tab" TS_HELPER_LIBMOUNT_UPDATE="$top_builddir/test_mount_tab_update" TS_HELPER_LIBMOUNT_UTILS="$top_builddir/test_mount_utils" +TS_HELPER_PYLIBMOUNT_CONTEXT="$top_builddir/libmount/python/test_mount_context.py" +TS_HELPER_PYLIBMOUNT_TAB="$top_builddir/libmount/python/test_mount_tab.py" +TS_HELPER_PYLIBMOUNT_UPDATE="$top_builddir/libmount/python/test_mount_tab_update.py" TS_HELPER_LOGINDEFS="$top_builddir/test_logindefs" TS_HELPER_MD5="$top_builddir/test_md5" TS_HELPER_MORE=${TS_HELPER_MORE-"$top_builddir/test_more"} @@ -22,6 +25,8 @@ TS_HELPER_STRUTILS="$top_builddir/test_strutils" TS_HELPER_SYSINFO="$top_builddir/test_sysinfo" # paths to commands +TS_CMD_ADDPART=${TS_CMD_ADDPART:-"$top_builddir/addpart"} +TS_CMD_DELPART=${TS_CMD_DELPART:-"$top_builddir/delpart"} TS_CMD_BLKID=${TS_CMD_BLKID-"$top_builddir/blkid"} TS_CMD_CAL=${TS_CMD_CAL-"$top_builddir/cal"} TS_CMD_COLRM=${TS_CMD_COLRM:-"$top_builddir/colrm"} @@ -42,9 +47,11 @@ TS_CMD_IPCMK=${TS_CMD_IPCMK-"$top_builddir/ipcmk"} TS_CMD_IPCRM=${TS_CMD_IPCRM-"$top_builddir/ipcrm"} TS_CMD_IPCS=${TS_CMD_IPCS:-"$top_builddir/ipcs"} TS_CMD_ISOSIZE=${TS_CMD_ISOSIZE-"$top_builddir/isosize"} +TS_CMD_LAST=${TS_CMD_LAST-"$top_builddir/last"} TS_CMD_LINE=${TS_CMD_LINE-"$top_builddir/line"} TS_CMD_LOOK=${TS_CMD_LOOK-"$top_builddir/look"} TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"$top_builddir/losetup"} +TS_CMD_LSBLK=${TS_CMD_LSBLK-"$top_builddir/lsblk"} TS_CMD_LSCPU=${TS_CMD_LSCPU-"$top_builddir/lscpu"} TS_CMD_MCOOKIE=${TS_CMD_MCOOKIE-"$top_builddir/mcookie"} TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"$top_builddir/mkfs.cramfs"} @@ -64,3 +71,4 @@ TS_CMD_UL=${TS_CMD_UL-"$top_builddir/ul"} TS_CMD_UMOUNT=${TS_CMD_UMOUNT:-"$top_builddir/umount"} TS_CMD_UTMPDUMP=${TS_CMD_UTMPDUMP-"$top_builddir/utmpdump"} TS_CMD_WHEREIS=${TS_CMD_WHEREIS-"$top_builddir/whereis"} +TS_CMD_WIPEFS=${TS_CMD_WIPEFS-"$top_builddir/wipefs"} diff --git a/tests/expected/blkid/low-probe-bcache-B b/tests/expected/blkid/low-probe-bcache-B new file mode 100644 index 000000000..739663208 --- /dev/null +++ b/tests/expected/blkid/low-probe-bcache-B @@ -0,0 +1,4 @@ +ID_FS_TYPE=bcache +ID_FS_USAGE=other +ID_FS_UUID=8fb7f716-4c19-4517-bfbb-6f4a2becad60 +ID_FS_UUID_ENC=8fb7f716-4c19-4517-bfbb-6f4a2becad60 diff --git a/tests/expected/blkid/low-probe-bcache-C b/tests/expected/blkid/low-probe-bcache-C new file mode 100644 index 000000000..b3c5f88f9 --- /dev/null +++ b/tests/expected/blkid/low-probe-bcache-C @@ -0,0 +1,4 @@ +ID_FS_TYPE=bcache +ID_FS_USAGE=other +ID_FS_UUID=7a343627-ac87-4bf0-b76f-46067cbc9b8c +ID_FS_UUID_ENC=7a343627-ac87-4bf0-b76f-46067cbc9b8c diff --git a/tests/expected/blkid/low-probe-jbd b/tests/expected/blkid/low-probe-jbd index 6c6217d03..8dbcdbce0 100644 --- a/tests/expected/blkid/low-probe-jbd +++ b/tests/expected/blkid/low-probe-jbd @@ -1,3 +1,4 @@ +ID_FS_LOGUUID=0d7a07df-7b06-4829-bce7-3b9c3ece570c ID_FS_TYPE=jbd ID_FS_USAGE=other ID_FS_UUID=0d7a07df-7b06-4829-bce7-3b9c3ece570c diff --git a/tests/expected/blkid/low-probe-swap0 b/tests/expected/blkid/low-probe-swap0 index bbd949517..cbcd9981a 100644 --- a/tests/expected/blkid/low-probe-swap0 +++ b/tests/expected/blkid/low-probe-swap0 @@ -1,3 +1,3 @@ ID_FS_TYPE=swap ID_FS_USAGE=other -ID_FS_VERSION=1 +ID_FS_VERSION=0 diff --git a/tests/expected/blkid/low-probe-swap1 b/tests/expected/blkid/low-probe-swap1 index e078d9993..bfac28e3e 100644 --- a/tests/expected/blkid/low-probe-swap1 +++ b/tests/expected/blkid/low-probe-swap1 @@ -4,4 +4,4 @@ ID_FS_TYPE=swap ID_FS_USAGE=other ID_FS_UUID=8ff8e77f-8553-485e-8656-58be67a81666 ID_FS_UUID_ENC=8ff8e77f-8553-485e-8656-58be67a81666 -ID_FS_VERSION=2 +ID_FS_VERSION=1 diff --git a/tests/expected/blkid/low-probe-xfs-log b/tests/expected/blkid/low-probe-xfs-log new file mode 100644 index 000000000..6cfb18065 --- /dev/null +++ b/tests/expected/blkid/low-probe-xfs-log @@ -0,0 +1,3 @@ +ID_FS_LOGUUID=4063d453-5c01-46ce-b92f-9523d64aecc7 +ID_FS_TYPE=xfs_external_log +ID_FS_USAGE=other diff --git a/tests/expected/blkid/lowprobe-pt-dos+bsd b/tests/expected/blkid/lowprobe-pt-dos+bsd index 0f992a526..099e98c23 100644 --- a/tests/expected/blkid/lowprobe-pt-dos+bsd +++ b/tests/expected/blkid/lowprobe-pt-dos+bsd @@ -1,6 +1,6 @@ -size: 8388608, sector size: 512, PT: dos, offset: 446, id=0x8f8378c0 +size: 8388608, sector size: 512, PT: dos, offset: 446, id=8f8378c0 --- -#1: 32 7648 0x83 -#2: 7680 8704 0xa5 +#1: 32 7648 0x83 uuid='8f8378c0-01' +#2: 7680 8704 0xa5 uuid='8f8378c0-02' #5: 7936 4864 0x7 (freebsd) #6: 12544 3584 0x7 (freebsd) diff --git a/tests/expected/blkid/md-raid0-whole b/tests/expected/blkid/md-raid0-whole index 37dabf3fb..f0b3e81b3 100644 --- a/tests/expected/blkid/md-raid0-whole +++ b/tests/expected/blkid/md-raid0-whole @@ -2,42 +2,44 @@ Initialize devices Create RAID device Create partitions on RAID device - +Welcome to fdisk <removed>. Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table +Device does not contain a recognized partition table. +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (0 primary, 0 extended, 4 free) e extended -Select (default p): Partition number (1-4, default 1): First sector (2048-204543, default 2048): Using default value 2048 -Last sector, +sectors or +size{K,M,G} (2048-204543, default 204543): Partition 1 of type Linux and of size 10 MiB is set +Select (default p): Partition number (1-4, default 1): First sector (2048-204543, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-204543, default 204543): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (1 primary, 0 extended, 3 free) e extended -Select (default p): Partition number (2-4, default 2): First sector (22528-204543, default 22528): Using default value 22528 -Last sector, +sectors or +size{K,M,G} (22528-204543, default 204543): Using default value 204543 -Partition 2 of type Linux and of size 88.9 MiB is set +Select (default p): Partition number (2-4, default 2): First sector (22528-204543, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-204543, default 204543): +Created a new <removed>. -Command (m for help): -Disk /dev/md8: 104 MB, 104726528 bytes, 204544 sectors -Units = sectors of 1 * 512 = 512 bytes +Command (m for help): Disk <removed>: 99.9 MiB, 104726528 bytes, 204544 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 65536 bytes / 131072 bytes -Disk label type: dos +Disklabel type: dos +Disk identifier: <removed> +Device Boot Start End Blocks Id System +<removed>p1 2048 22527 10240 83 Linux +<removed>p2 22528 204543 91008 83 Linux - Device Boot Start End Blocks Id System -/dev/md8p1 2048 22527 10240 83 Linux -/dev/md8p2 22528 204543 91008 83 Linux - -Command (m for help): The partition table has been altered! - +Command (m for help): +The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. + Probe first RAID member ID_FS_TYPE=linux_raid_member ID_FS_USAGE=raid diff --git a/tests/expected/blkid/md-raid1-part b/tests/expected/blkid/md-raid1-part index f40995220..7b206cf66 100644 --- a/tests/expected/blkid/md-raid1-part +++ b/tests/expected/blkid/md-raid1-part @@ -1,44 +1,47 @@ Create partitions - +Welcome to fdisk <removed>. Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table +Device does not contain a recognized partition table. +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (0 primary, 0 extended, 4 free) e extended -Select (default p): Partition number (1-4, default 1): First sector (2048-104447, default 2048): Using default value 2048 -Last sector, +sectors or +size{K,M,G} (2048-104447, default 104447): Partition 1 of type Linux and of size 25 MiB is set +Select (default p): Partition number (1-4, default 1): First sector (2048-104447, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-104447, default 104447): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (1 primary, 0 extended, 3 free) e extended -Select (default p): Partition number (2-4, default 2): First sector (53248-104447, default 53248): Using default value 53248 -Last sector, +sectors or +size{K,M,G} (53248-104447, default 104447): Using default value 104447 -Partition 2 of type Linux and of size 25 MiB is set +Select (default p): Partition number (2-4, default 2): First sector (53248-104447, default 53248): Last sector, +sectors or +size{K,M,G,T,P} (53248-104447, default 104447): +Created a new <removed>. -Command (m for help): -Disk /dev/...: 53 MB, 53477376 bytes, 104448 sectors -Units = sectors of 1 * 512 = 512 bytes +Command (m for help): Disk <removed>: 51 MiB, 53477376 bytes, 104448 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 -Disk label type: dos +Disklabel type: dos +Disk identifier: <removed> +Device Boot Start End Blocks Id System +<removed>1 2048 53247 25600 83 Linux +<removed>2 53248 104447 25600 83 Linux - Device Boot Start End Blocks Id System -/dev/...1 2048 53247 25600 83 Linux -/dev/...2 53248 104447 25600 83 Linux - -Command (m for help): The partition table has been altered! - +Command (m for help): +The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. + Create RAID1 device Probe whole-disk ID_PART_TABLE_TYPE=dos +ID_PART_TABLE_UUID=00000001 Probe first RAID member ID_FS_TYPE=linux_raid_member ID_FS_USAGE=raid @@ -51,6 +54,7 @@ ID_PART_ENTRY_OFFSET=2048 ID_PART_ENTRY_SCHEME=dos ID_PART_ENTRY_SIZE=51200 ID_PART_ENTRY_TYPE=0x83 +ID_PART_ENTRY_UUID=00000001-01 Probe second RAID member ID_FS_TYPE=linux_raid_member ID_FS_USAGE=raid @@ -63,3 +67,4 @@ ID_PART_ENTRY_OFFSET=53248 ID_PART_ENTRY_SCHEME=dos ID_PART_ENTRY_SIZE=51200 ID_PART_ENTRY_TYPE=0x83 +ID_PART_ENTRY_UUID=00000001-02 diff --git a/tests/expected/blkid/md-raid1-whole b/tests/expected/blkid/md-raid1-whole index 89773120e..6a0333fb3 100644 --- a/tests/expected/blkid/md-raid1-whole +++ b/tests/expected/blkid/md-raid1-whole @@ -2,41 +2,44 @@ Initialize devices Create RAID device Create partitions on RAID device - +Welcome to fdisk <removed>. Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table +Device does not contain a recognized partition table. +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (0 primary, 0 extended, 4 free) e extended -Select (default p): Partition number (1-4, default 1): First sector (2048-102271, default 2048): Using default value 2048 -Last sector, +sectors or +size{K,M,G} (2048-102271, default 102271): Partition 1 of type Linux and of size 10 MiB is set +Select (default p): Partition number (1-4, default 1): First sector (2048-102271, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-102271, default 102271): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (1 primary, 0 extended, 3 free) e extended -Select (default p): Partition number (2-4, default 2): First sector (22528-102271, default 22528): Using default value 22528 -Last sector, +sectors or +size{K,M,G} (22528-102271, default 102271): Partition 2 of type Linux and of size 10 MiB is set +Select (default p): Partition number (2-4, default 2): First sector (22528-102271, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-102271, default 102271): +Created a new <removed>. -Command (m for help): -Disk /dev/md8: 52 MB, 52363264 bytes, 102272 sectors -Units = sectors of 1 * 512 = 512 bytes +Command (m for help): Disk /dev/md8: 50 MiB, 52363264 bytes, 102272 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos +Disklabel type: dos +Disk identifier: <removed> +Device Boot Start End Blocks Id System +/dev/md8p1 2048 22527 10240 83 Linux +/dev/md8p2 22528 43007 10240 83 Linux - Device Boot Start End Blocks Id System -/dev/md8p1 2048 22527 10240 83 Linux -/dev/md8p2 22528 43007 10240 83 Linux - -Command (m for help): The partition table has been altered! - +Command (m for help): +The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. + Probe first RAID member ID_FS_TYPE=linux_raid_member ID_FS_USAGE=raid diff --git a/tests/expected/build-sys/config-all b/tests/expected/build-sys/config-all index 36757775a..2b2a48717 100644 --- a/tests/expected/build-sys/config-all +++ b/tests/expected/build-sys/config-all @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libudev libuuid fsck: libblkid libmount libuuid +fstrim: libblkid libmount libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libuuid libuuid.so.1.3.0: @@ -14,6 +15,7 @@ mkswap: libblkid libuuid mount: libblkid libmount libuuid mountpoint: libblkid libmount libuuid partx: libblkid libuuid +pylibmount.so: libblkid libmount libpython2 libuuid swaplabel: libblkid libuuid swapoff: libblkid libmount libuuid swapon: libblkid libmount libuuid @@ -37,15 +39,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: -elvtune: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -72,6 +72,7 @@ mkfs.minix: more: libtinfo namei: newgrp: rypt +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-all-devel b/tests/expected/build-sys/config-all-devel index 1be319bc6..4890e52bc 100644 --- a/tests/expected/build-sys/config-all-devel +++ b/tests/expected/build-sys/config-all-devel @@ -1,7 +1,6 @@ mkswap: libblkid libselinux libuuid swaplabel: libblkid libuuid blockdev: -elvtune: fdformat: fsck.cramfs: libz fsck.minix: diff --git a/tests/expected/build-sys/config-all-non-nls b/tests/expected/build-sys/config-all-non-nls index 36757775a..2b2a48717 100644 --- a/tests/expected/build-sys/config-all-non-nls +++ b/tests/expected/build-sys/config-all-non-nls @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libudev libuuid fsck: libblkid libmount libuuid +fstrim: libblkid libmount libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libuuid libuuid.so.1.3.0: @@ -14,6 +15,7 @@ mkswap: libblkid libuuid mount: libblkid libmount libuuid mountpoint: libblkid libmount libuuid partx: libblkid libuuid +pylibmount.so: libblkid libmount libpython2 libuuid swaplabel: libblkid libuuid swapoff: libblkid libmount libuuid swapon: libblkid libmount libuuid @@ -37,15 +39,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: -elvtune: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -72,6 +72,7 @@ mkfs.minix: more: libtinfo namei: newgrp: rypt +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-audit b/tests/expected/build-sys/config-audit index d09539200..4f37b1c86 100644 --- a/tests/expected/build-sys/config-audit +++ b/tests/expected/build-sys/config-audit @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libudev libuuid fsck: libblkid libmount libuuid +fstrim: libblkid libmount libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libuuid libuuid.so.1.3.0: @@ -35,14 +36,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: libaudit @@ -52,6 +52,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libaudit libpam libpam_misc @@ -59,12 +60,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-chfnsh-libuser b/tests/expected/build-sys/config-chfnsh-libuser index bbadeb505..4863257de 100644 --- a/tests/expected/build-sys/config-chfnsh-libuser +++ b/tests/expected/build-sys/config-chfnsh-libuser @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libselinux libudev libuuid fsck: libblkid libmount libselinux libuuid +fstrim: libblkid libmount libselinux libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libselinux libuuid libuuid.so.1.3.0: @@ -37,14 +38,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: libaudit @@ -54,6 +54,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libaudit libpam libpam_misc libselinux @@ -61,12 +62,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-chfnsh-no-password b/tests/expected/build-sys/config-chfnsh-no-password index e3c954eb7..09831b6b8 100644 --- a/tests/expected/build-sys/config-chfnsh-no-password +++ b/tests/expected/build-sys/config-chfnsh-no-password @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libselinux libudev libuuid fsck: libblkid libmount libselinux libuuid +fstrim: libblkid libmount libselinux libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libselinux libuuid libuuid.so.1.3.0: @@ -37,14 +38,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: libaudit @@ -54,6 +54,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libaudit libpam libpam_misc libselinux @@ -61,12 +62,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-chfnsh-pam b/tests/expected/build-sys/config-chfnsh-pam index 0dc504868..ccf072845 100644 --- a/tests/expected/build-sys/config-chfnsh-pam +++ b/tests/expected/build-sys/config-chfnsh-pam @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libselinux libudev libuuid fsck: libblkid libmount libselinux libuuid +fstrim: libblkid libmount libselinux libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libselinux libuuid libuuid.so.1.3.0: @@ -37,14 +38,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: libaudit @@ -54,6 +54,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libaudit libpam libpam_misc libselinux @@ -61,12 +62,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-core b/tests/expected/build-sys/config-core index 8ebe0c8ec..1d1468233 100644 --- a/tests/expected/build-sys/config-core +++ b/tests/expected/build-sys/config-core @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libudev libuuid fsck: libblkid libmount libuuid +fstrim: libblkid libmount libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libuuid libuuid.so.1.3.0: @@ -35,14 +36,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -52,6 +52,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc @@ -59,12 +60,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-devel b/tests/expected/build-sys/config-devel index 1906af17e..ef6c556cd 100644 --- a/tests/expected/build-sys/config-devel +++ b/tests/expected/build-sys/config-devel @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libselinux libudev libuuid fsck: libblkid libmount libselinux libuuid +fstrim: libblkid libmount libselinux libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libselinux libuuid libuuid.so.1.3.0: @@ -14,6 +15,7 @@ mkswap: libblkid libselinux libuuid mount: libblkid libmount libselinux libuuid mountpoint: libblkid libmount libselinux libuuid partx: libblkid libuuid +pylibmount.so: libblkid libmount libpython2 libselinux libuuid swaplabel: libblkid libuuid swapoff: libblkid libmount libselinux libuuid swapon: libblkid libmount libselinux libuuid @@ -37,15 +39,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: -elvtune: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: libaudit @@ -72,6 +72,7 @@ mkfs.minix: more: libtinfo namei: newgrp: rypt +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-devel-new-mount b/tests/expected/build-sys/config-devel-new-mount index 7e83630b8..f7c0f8655 100644 --- a/tests/expected/build-sys/config-devel-new-mount +++ b/tests/expected/build-sys/config-devel-new-mount @@ -1,7 +1,6 @@ mkswap: libblkid libselinux libuuid swaplabel: libblkid libuuid blockdev: -elvtune: fdformat: fsck.cramfs: libz fsck.minix: diff --git a/tests/expected/build-sys/config-devel-non-docs b/tests/expected/build-sys/config-devel-non-docs index 1906af17e..ef6c556cd 100644 --- a/tests/expected/build-sys/config-devel-non-docs +++ b/tests/expected/build-sys/config-devel-non-docs @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libselinux libudev libuuid fsck: libblkid libmount libselinux libuuid +fstrim: libblkid libmount libselinux libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libselinux libuuid libuuid.so.1.3.0: @@ -14,6 +15,7 @@ mkswap: libblkid libselinux libuuid mount: libblkid libmount libselinux libuuid mountpoint: libblkid libmount libselinux libuuid partx: libblkid libuuid +pylibmount.so: libblkid libmount libpython2 libselinux libuuid swaplabel: libblkid libuuid swapoff: libblkid libmount libselinux libuuid swapon: libblkid libmount libselinux libuuid @@ -37,15 +39,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: -elvtune: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: libaudit @@ -72,6 +72,7 @@ mkfs.minix: more: libtinfo namei: newgrp: rypt +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-non-libblkid b/tests/expected/build-sys/config-non-libblkid index b1447e1b5..c284f0836 100644 --- a/tests/expected/build-sys/config-non-libblkid +++ b/tests/expected/build-sys/config-non-libblkid @@ -16,14 +16,13 @@ colrm: column: ctrlaltdel: cytune: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -33,6 +32,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc @@ -40,12 +40,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-non-libmount b/tests/expected/build-sys/config-non-libmount index 7932d26a6..22e1f9637 100644 --- a/tests/expected/build-sys/config-non-libmount +++ b/tests/expected/build-sys/config-non-libmount @@ -24,14 +24,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -41,6 +40,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc @@ -48,12 +48,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-non-libs b/tests/expected/build-sys/config-non-libs index ed1c3485d..46cc7bef9 100644 --- a/tests/expected/build-sys/config-non-libs +++ b/tests/expected/build-sys/config-non-libs @@ -11,14 +11,13 @@ colrm: column: ctrlaltdel: cytune: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -28,6 +27,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc @@ -35,6 +35,7 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz @@ -42,6 +43,7 @@ mkfs.minix: mkswap: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-non-libuuid b/tests/expected/build-sys/config-non-libuuid index 54a7cb826..6279aa590 100644 --- a/tests/expected/build-sys/config-non-libuuid +++ b/tests/expected/build-sys/config-non-libuuid @@ -4,6 +4,7 @@ eject: libblkid libmount findfs: libblkid findmnt: libblkid libmount libudev fsck: libblkid libmount +fstrim: libblkid libmount libblkid.so.1.1.0: libmount.so.1.1.0: libblkid lsblk: libblkid libmount libudev @@ -31,14 +32,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -48,6 +48,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc @@ -55,12 +56,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-non-nls b/tests/expected/build-sys/config-non-nls index 8ebe0c8ec..1d1468233 100644 --- a/tests/expected/build-sys/config-non-nls +++ b/tests/expected/build-sys/config-non-nls @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libudev libuuid fsck: libblkid libmount libuuid +fstrim: libblkid libmount libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libuuid libuuid.so.1.3.0: @@ -35,14 +36,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -52,6 +52,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc @@ -59,12 +60,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-old-mount b/tests/expected/build-sys/config-old-mount index 5f8f91d0b..a9f2d606e 100644 --- a/tests/expected/build-sys/config-old-mount +++ b/tests/expected/build-sys/config-old-mount @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libudev libuuid fsck: libblkid libmount libuuid +fstrim: libblkid libmount libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libuuid libuuid.so.1.3.0: @@ -35,14 +36,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -52,6 +52,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc @@ -59,12 +60,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-selinux b/tests/expected/build-sys/config-selinux index 31ba2dad3..c0faa85dd 100644 --- a/tests/expected/build-sys/config-selinux +++ b/tests/expected/build-sys/config-selinux @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libselinux libudev libuuid fsck: libblkid libmount libselinux libuuid +fstrim: libblkid libmount libselinux libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libselinux libuuid libuuid.so.1.3.0: @@ -35,14 +36,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -52,6 +52,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc libselinux @@ -59,12 +60,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-slang b/tests/expected/build-sys/config-slang index fc6db081d..7baebb95f 100644 --- a/tests/expected/build-sys/config-slang +++ b/tests/expected/build-sys/config-slang @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libudev libuuid fsck: libblkid libmount libuuid +fstrim: libblkid libmount libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libuuid libuuid.so.1.3.0: @@ -35,14 +36,13 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -52,6 +52,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc @@ -59,12 +60,14 @@ look: losetup: lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz mkfs.minix: more: libtinfo namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/build-sys/config-static b/tests/expected/build-sys/config-static index b3fd3372f..5b91300b7 100644 --- a/tests/expected/build-sys/config-static +++ b/tests/expected/build-sys/config-static @@ -5,6 +5,7 @@ fdisk: libblkid libuuid findfs: libblkid libuuid findmnt: libblkid libmount libudev libuuid fsck: libblkid libmount libuuid +fstrim: libblkid libmount libuuid libblkid.so.1.1.0: libuuid libmount.so.1.1.0: libblkid libuuid libuuid.so.1.3.0: @@ -36,7 +37,7 @@ column: ctrlaltdel: cytune: delpart: -dmesg: +dmesg: librt fallocate: fdformat: fdisk.static: STATIC @@ -44,7 +45,6 @@ flock: fsck.cramfs: libz fsck.minix: fsfreeze: -fstrim: getopt: hexdump: hwclock: @@ -54,6 +54,7 @@ ipcrm: ipcs: isosize: kill: +last: ldattach: logger: login: libpam libpam_misc @@ -62,6 +63,7 @@ losetup: losetup.static: STATIC lscpu: mcookie: +mesg: mkfs: mkfs.bfs: mkfs.cramfs: libz @@ -69,6 +71,7 @@ mkfs.minix: more: libtinfo mount.static: STATIC namei: +nologin: nsenter: pg: libncursesw libtinfo pivot_root: diff --git a/tests/expected/cal/1m b/tests/expected/cal/1m index f657875bc..afe7f71a6 100644 --- a/tests/expected/cal/1m +++ b/tests/expected/cal/1m @@ -2,36 +2,36 @@ Gregorian - Monday-based week September 2006 Mo Tu We Th Fr Sa Su - 1 2 3 - 4 5 6 7 8 9 10 -11 12 13 14 15 16 17 -18 19 20 21 22 23 24 -25 26 27 28 29 30 - + 1 2 3 + 4 5 6 7 8 9 10 +11 12 13 14 15 16 17 +18 19 20 21 22 23 24 +25 26 27 28 29 30 + Gregorian - Sunday-based week September 2006 Su Mo Tu We Th Fr Sa - 1 2 - 3 4 5 6 7 8 9 -10 11 12 13 14 15 16 -17 18 19 20 21 22 23 -24 25 26 27 28 29 30 - + 1 2 + 3 4 5 6 7 8 9 +10 11 12 13 14 15 16 +17 18 19 20 21 22 23 +24 25 26 27 28 29 30 + Julian - Monday-based week September 2006 Mon Tue Wed Thu Fri Sat Sun - 244 245 246 -247 248 249 250 251 252 253 -254 255 256 257 258 259 260 -261 262 263 264 265 266 267 -268 269 270 271 272 273 - + 244 245 246 +247 248 249 250 251 252 253 +254 255 256 257 258 259 260 +261 262 263 264 265 266 267 +268 269 270 271 272 273 + Julian - Sunday-based week September 2006 Sun Mon Tue Wed Thu Fri Sat - 244 245 -246 247 248 249 250 251 252 -253 254 255 256 257 258 259 -260 261 262 263 264 265 266 -267 268 269 270 271 272 273 - + 244 245 +246 247 248 249 250 251 252 +253 254 255 256 257 258 259 +260 261 262 263 264 265 266 +267 268 269 270 271 272 273 + diff --git a/tests/expected/cal/3m b/tests/expected/cal/3m index ba9657dd2..21b6d3131 100644 --- a/tests/expected/cal/3m +++ b/tests/expected/cal/3m @@ -2,36 +2,36 @@ Gregorian - Monday-based week August 2006 September 2006 October 2006 Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 2 3 4 5 6 1 2 3 1 - 7 8 9 10 11 12 13 4 5 6 7 8 9 10 2 3 4 5 6 7 8 -14 15 16 17 18 19 20 11 12 13 14 15 16 17 9 10 11 12 13 14 15 -21 22 23 24 25 26 27 18 19 20 21 22 23 24 16 17 18 19 20 21 22 -28 29 30 31 25 26 27 28 29 30 23 24 25 26 27 28 29 - 30 31 + 1 2 3 4 5 6 1 2 3 1 + 7 8 9 10 11 12 13 4 5 6 7 8 9 10 2 3 4 5 6 7 8 +14 15 16 17 18 19 20 11 12 13 14 15 16 17 9 10 11 12 13 14 15 +21 22 23 24 25 26 27 18 19 20 21 22 23 24 16 17 18 19 20 21 22 +28 29 30 31 25 26 27 28 29 30 23 24 25 26 27 28 29 + 30 31 Gregorian - Sunday-based week August 2006 September 2006 October 2006 Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 2 3 4 5 1 2 1 2 3 4 5 6 7 - 6 7 8 9 10 11 12 3 4 5 6 7 8 9 8 9 10 11 12 13 14 -13 14 15 16 17 18 19 10 11 12 13 14 15 16 15 16 17 18 19 20 21 -20 21 22 23 24 25 26 17 18 19 20 21 22 23 22 23 24 25 26 27 28 -27 28 29 30 31 24 25 26 27 28 29 30 29 30 31 - + 1 2 3 4 5 1 2 1 2 3 4 5 6 7 + 6 7 8 9 10 11 12 3 4 5 6 7 8 9 8 9 10 11 12 13 14 +13 14 15 16 17 18 19 10 11 12 13 14 15 16 15 16 17 18 19 20 21 +20 21 22 23 24 25 26 17 18 19 20 21 22 23 22 23 24 25 26 27 28 +27 28 29 30 31 24 25 26 27 28 29 30 29 30 31 + Julian - Monday-based week August 2006 September 2006 October 2006 Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 213 214 215 216 217 218 244 245 246 274 -219 220 221 222 223 224 225 247 248 249 250 251 252 253 275 276 277 278 279 280 281 -226 227 228 229 230 231 232 254 255 256 257 258 259 260 282 283 284 285 286 287 288 -233 234 235 236 237 238 239 261 262 263 264 265 266 267 289 290 291 292 293 294 295 -240 241 242 243 268 269 270 271 272 273 296 297 298 299 300 301 302 - 303 304 + 213 214 215 216 217 218 244 245 246 274 +219 220 221 222 223 224 225 247 248 249 250 251 252 253 275 276 277 278 279 280 281 +226 227 228 229 230 231 232 254 255 256 257 258 259 260 282 283 284 285 286 287 288 +233 234 235 236 237 238 239 261 262 263 264 265 266 267 289 290 291 292 293 294 295 +240 241 242 243 268 269 270 271 272 273 296 297 298 299 300 301 302 + 303 304 Julian - Sunday-based week August 2006 September 2006 October 2006 Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 213 214 215 216 217 244 245 274 275 276 277 278 279 280 -218 219 220 221 222 223 224 246 247 248 249 250 251 252 281 282 283 284 285 286 287 -225 226 227 228 229 230 231 253 254 255 256 257 258 259 288 289 290 291 292 293 294 -232 233 234 235 236 237 238 260 261 262 263 264 265 266 295 296 297 298 299 300 301 -239 240 241 242 243 267 268 269 270 271 272 273 302 303 304 - + 213 214 215 216 217 244 245 274 275 276 277 278 279 280 +218 219 220 221 222 223 224 246 247 248 249 250 251 252 281 282 283 284 285 286 287 +225 226 227 228 229 230 231 253 254 255 256 257 258 259 288 289 290 291 292 293 294 +232 233 234 235 236 237 238 260 261 262 263 264 265 266 295 296 297 298 299 300 301 +239 240 241 242 243 267 268 269 270 271 272 273 302 303 304 + diff --git a/tests/expected/cal/bigyear b/tests/expected/cal/bigyear new file mode 100644 index 000000000..fa99fe115 --- /dev/null +++ b/tests/expected/cal/bigyear @@ -0,0 +1,206 @@ + +Gregorian - Monday-based month + December + 1234567890123456789 +Mo Tu We Th Fr Sa Su + 1 2 3 + 4 5 6 7 8 9 10 +11 12 13 14 15 16 17 +18 19 20 21 22 23 24 +25 26 27 28 29 30 31 + +Gregorian - Sunday-based month + December + 1234567890123456789 +Su Mo Tu We Th Fr Sa + 1 2 + 3 4 5 6 7 8 9 +10 11 12 13 14 15 16 +17 18 19 20 21 22 23 +24 25 26 27 28 29 30 +31 +Julian - Monday-based month + December + 1234567890123456789 +Mon Tue Wed Thu Fri Sat Sun + 335 336 337 +338 339 340 341 342 343 344 +345 346 347 348 349 350 351 +352 353 354 355 356 357 358 +359 360 361 362 363 364 365 + +Julian - Sunday-based month + December + 1234567890123456789 +Sun Mon Tue Wed Thu Fri Sat + 335 336 +337 338 339 340 341 342 343 +344 345 346 347 348 349 350 +351 352 353 354 355 356 357 +358 359 360 361 362 363 364 +365 +Gregorian - Monday-based three months + November December January + 1234567890123456789 1234567890123456789 1234567890123456790 +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 3 4 5 1 2 3 1 2 3 4 5 6 7 + 6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14 +13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21 +20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28 +27 28 29 30 25 26 27 28 29 30 31 29 30 31 + +Gregorian - Sunday-based three months + November December January + 1234567890123456789 1234567890123456789 1234567890123456790 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 2 1 2 3 4 5 6 + 5 6 7 8 9 10 11 3 4 5 6 7 8 9 7 8 9 10 11 12 13 +12 13 14 15 16 17 18 10 11 12 13 14 15 16 14 15 16 17 18 19 20 +19 20 21 22 23 24 25 17 18 19 20 21 22 23 21 22 23 24 25 26 27 +26 27 28 29 30 24 25 26 27 28 29 30 28 29 30 31 + 31 +Julian - Monday-based three months + November December January + 1234567890123456789 1234567890123456789 1234567890123456790 +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 305 306 307 308 309 335 336 337 1 2 3 4 5 6 7 +310 311 312 313 314 315 316 338 339 340 341 342 343 344 8 9 10 11 12 13 14 +317 318 319 320 321 322 323 345 346 347 348 349 350 351 15 16 17 18 19 20 21 +324 325 326 327 328 329 330 352 353 354 355 356 357 358 22 23 24 25 26 27 28 +331 332 333 334 359 360 361 362 363 364 365 29 30 31 + +Julian - Sunday-based three months + November December January + 1234567890123456789 1234567890123456789 1234567890123456790 +Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat + 305 306 307 308 335 336 1 2 3 4 5 6 +309 310 311 312 313 314 315 337 338 339 340 341 342 343 7 8 9 10 11 12 13 +316 317 318 319 320 321 322 344 345 346 347 348 349 350 14 15 16 17 18 19 20 +323 324 325 326 327 328 329 351 352 353 354 355 356 357 21 22 23 24 25 26 27 +330 331 332 333 334 358 359 360 361 362 363 364 28 29 30 31 + 365 +Gregorian - Monday-based year + 1234567890123456789 + + January February March +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 1 2 3 4 5 1 2 3 4 5 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 6 7 8 9 10 11 12 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 13 14 15 16 17 18 19 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 20 21 22 23 24 25 26 +23 24 25 26 27 28 29 27 28 27 28 29 30 31 +30 31 + April May June +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 1 2 3 4 5 6 7 1 2 3 4 + 3 4 5 6 7 8 9 8 9 10 11 12 13 14 5 6 7 8 9 10 11 +10 11 12 13 14 15 16 15 16 17 18 19 20 21 12 13 14 15 16 17 18 +17 18 19 20 21 22 23 22 23 24 25 26 27 28 19 20 21 22 23 24 25 +24 25 26 27 28 29 30 29 30 31 26 27 28 29 30 + + July August September +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 1 2 3 4 5 6 1 2 3 + 3 4 5 6 7 8 9 7 8 9 10 11 12 13 4 5 6 7 8 9 10 +10 11 12 13 14 15 16 14 15 16 17 18 19 20 11 12 13 14 15 16 17 +17 18 19 20 21 22 23 21 22 23 24 25 26 27 18 19 20 21 22 23 24 +24 25 26 27 28 29 30 28 29 30 31 25 26 27 28 29 30 +31 + October November December +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 1 2 3 4 5 1 2 3 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 4 5 6 7 8 9 10 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 11 12 13 14 15 16 17 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 18 19 20 21 22 23 24 +23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31 +30 31 + +Gregorian - Sunday-based year + 1234567890123456789 + + January February March +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 7 1 2 3 4 1 2 3 4 + 8 9 10 11 12 13 14 5 6 7 8 9 10 11 5 6 7 8 9 10 11 +15 16 17 18 19 20 21 12 13 14 15 16 17 18 12 13 14 15 16 17 18 +22 23 24 25 26 27 28 19 20 21 22 23 24 25 19 20 21 22 23 24 25 +29 30 31 26 27 28 26 27 28 29 30 31 + + April May June +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 1 2 3 4 5 6 1 2 3 + 2 3 4 5 6 7 8 7 8 9 10 11 12 13 4 5 6 7 8 9 10 + 9 10 11 12 13 14 15 14 15 16 17 18 19 20 11 12 13 14 15 16 17 +16 17 18 19 20 21 22 21 22 23 24 25 26 27 18 19 20 21 22 23 24 +23 24 25 26 27 28 29 28 29 30 31 25 26 27 28 29 30 +30 + July August September +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 1 2 3 4 5 1 2 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 3 4 5 6 7 8 9 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 10 11 12 13 14 15 16 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 17 18 19 20 21 22 23 +23 24 25 26 27 28 29 27 28 29 30 31 24 25 26 27 28 29 30 +30 31 + October November December +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 7 1 2 3 4 1 2 + 8 9 10 11 12 13 14 5 6 7 8 9 10 11 3 4 5 6 7 8 9 +15 16 17 18 19 20 21 12 13 14 15 16 17 18 10 11 12 13 14 15 16 +22 23 24 25 26 27 28 19 20 21 22 23 24 25 17 18 19 20 21 22 23 +29 30 31 26 27 28 29 30 24 25 26 27 28 29 30 + 31 + +Julian - Monday-based year + 1234567890123456789 + + January February +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 1 32 33 34 35 36 + 2 3 4 5 6 7 8 37 38 39 40 41 42 43 + 9 10 11 12 13 14 15 44 45 46 47 48 49 50 + 16 17 18 19 20 21 22 51 52 53 54 55 56 57 + 23 24 25 26 27 28 29 58 59 + 30 31 + March April +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 60 61 62 63 64 91 92 + 65 66 67 68 69 70 71 93 94 95 96 97 98 99 + 72 73 74 75 76 77 78 100 101 102 103 104 105 106 + 79 80 81 82 83 84 85 107 108 109 110 111 112 113 + 86 87 88 89 90 114 115 116 117 118 119 120 + + May June +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun +121 122 123 124 125 126 127 152 153 154 155 +128 129 130 131 132 133 134 156 157 158 159 160 161 162 +135 136 137 138 139 140 141 163 164 165 166 167 168 169 +142 143 144 145 146 147 148 170 171 172 173 174 175 176 +149 150 151 177 178 179 180 181 + + July August +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 182 183 213 214 215 216 217 218 +184 185 186 187 188 189 190 219 220 221 222 223 224 225 +191 192 193 194 195 196 197 226 227 228 229 230 231 232 +198 199 200 201 202 203 204 233 234 235 236 237 238 239 +205 206 207 208 209 210 211 240 241 242 243 +212 + September October +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 244 245 246 274 +247 248 249 250 251 252 253 275 276 277 278 279 280 281 +254 255 256 257 258 259 260 282 283 284 285 286 287 288 +261 262 263 264 265 266 267 289 290 291 292 293 294 295 +268 269 270 271 272 273 296 297 298 299 300 301 302 + 303 304 + November December +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 305 306 307 308 309 335 336 337 +310 311 312 313 314 315 316 338 339 340 341 342 343 344 +317 318 319 320 321 322 323 345 346 347 348 349 350 351 +324 325 326 327 328 329 330 352 353 354 355 356 357 358 +331 332 333 334 359 360 361 362 363 364 365 + + +Julian - Sunday-based year diff --git a/tests/expected/cal/color b/tests/expected/cal/color new file mode 100644 index 000000000..a46bdfcac --- /dev/null +++ b/tests/expected/cal/color @@ -0,0 +1,55 @@ + +First day + January 1 +Su Mo Tu We Th Fr Sa + [7m 1[27m + 2 3 4 5 6 7 8 + 9 10 11 12 13 14 15 +16 17 18 19 20 21 22 +23 24 25 26 27 28 29 +30 31 +Reformation corner cases 1 + September 1752 +Su Mo Tu We Th Fr Sa + 1 [7m 2[27m 14 15 16 +17 18 19 20 21 22 23 +24 25 26 27 28 29 30 + + + +Reformation corner cases 2 + September 1752 +Su Mo Tu We Th Fr Sa + 1 2 14 15 16 +17 18 19 20 21 22 23 +24 25 26 27 28 29 30 + + + +Reformation corner cases 3 + September 1752 +Su Mo Tu We Th Fr Sa + 1 2 14 15 16 +17 18 19 20 21 22 23 +24 25 26 27 28 29 30 + + + +Reformation corner cases 4 + September 1752 +Su Mo Tu We Th Fr Sa + 1 2 [7m14[27m 15 16 +17 18 19 20 21 22 23 +24 25 26 27 28 29 30 + + + +Last day + November 9999 December 9999 January 10000 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 1 2 3 4 1 + 7 8 9 10 11 12 13 5 6 7 8 9 10 11 2 3 4 5 6 7 8 +14 15 16 17 18 19 20 12 13 14 15 16 17 18 9 10 11 12 13 14 15 +21 22 23 24 25 26 27 19 20 21 22 23 24 25 16 17 18 19 20 21 22 +28 29 30 26 27 28 29 30 [7m31[27m 23 24 25 26 27 28 29 + 30 31 diff --git a/tests/expected/cal/sep1752 b/tests/expected/cal/sep1752 new file mode 100644 index 000000000..1e7328408 --- /dev/null +++ b/tests/expected/cal/sep1752 @@ -0,0 +1,198 @@ + +Gregorian - Monday-based month + September 1752 +Mo Tu We Th Fr Sa Su + 1 2 14 15 16 17 +18 19 20 21 22 23 24 +25 26 27 28 29 30 + + + +Gregorian - Sunday-based month + September 1752 +Su Mo Tu We Th Fr Sa + 1 2 14 15 16 +17 18 19 20 21 22 23 +24 25 26 27 28 29 30 + + + +Julian - Monday-based month + September 1752 +Mon Tue Wed Thu Fri Sat Sun + 245 246 258 259 260 261 +262 263 264 265 266 267 268 +269 270 271 272 273 274 + + + +Julian - Sunday-based month + September 1752 +Sun Mon Tue Wed Thu Fri Sat + 245 246 258 259 260 +261 262 263 264 265 266 267 +268 269 270 271 272 273 274 + + + +Gregorian - Monday-based three months + August 1752 September 1752 October 1752 +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 1 2 14 15 16 17 1 + 3 4 5 6 7 8 9 18 19 20 21 22 23 24 2 3 4 5 6 7 8 +10 11 12 13 14 15 16 25 26 27 28 29 30 9 10 11 12 13 14 15 +17 18 19 20 21 22 23 16 17 18 19 20 21 22 +24 25 26 27 28 29 30 23 24 25 26 27 28 29 +31 30 31 +Gregorian - Sunday-based three months + August 1752 September 1752 October 1752 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 1 2 14 15 16 1 2 3 4 5 6 7 + 2 3 4 5 6 7 8 17 18 19 20 21 22 23 8 9 10 11 12 13 14 + 9 10 11 12 13 14 15 24 25 26 27 28 29 30 15 16 17 18 19 20 21 +16 17 18 19 20 21 22 22 23 24 25 26 27 28 +23 24 25 26 27 28 29 29 30 31 +30 31 +Julian - Monday-based three months + August 1752 September 1752 October 1752 +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 214 215 245 246 258 259 260 261 275 +216 217 218 219 220 221 222 262 263 264 265 266 267 268 276 277 278 279 280 281 282 +223 224 225 226 227 228 229 269 270 271 272 273 274 283 284 285 286 287 288 289 +230 231 232 233 234 235 236 290 291 292 293 294 295 296 +237 238 239 240 241 242 243 297 298 299 300 301 302 303 +244 304 305 +Julian - Sunday-based three months + August 1752 September 1752 October 1752 +Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat + 214 245 246 258 259 260 275 276 277 278 279 280 281 +215 216 217 218 219 220 221 261 262 263 264 265 266 267 282 283 284 285 286 287 288 +222 223 224 225 226 227 228 268 269 270 271 272 273 274 289 290 291 292 293 294 295 +229 230 231 232 233 234 235 296 297 298 299 300 301 302 +236 237 238 239 240 241 242 303 304 305 +243 244 +Gregorian - Monday-based year + 1752 + + January February March +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 3 4 5 1 2 1 + 6 7 8 9 10 11 12 3 4 5 6 7 8 9 2 3 4 5 6 7 8 +13 14 15 16 17 18 19 10 11 12 13 14 15 16 9 10 11 12 13 14 15 +20 21 22 23 24 25 26 17 18 19 20 21 22 23 16 17 18 19 20 21 22 +27 28 29 30 31 24 25 26 27 28 29 23 24 25 26 27 28 29 + 30 31 + April May June +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 3 4 5 1 2 3 1 2 3 4 5 6 7 + 6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14 +13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21 +20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28 +27 28 29 30 25 26 27 28 29 30 31 29 30 + + July August September +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 3 4 5 1 2 1 2 14 15 16 17 + 6 7 8 9 10 11 12 3 4 5 6 7 8 9 18 19 20 21 22 23 24 +13 14 15 16 17 18 19 10 11 12 13 14 15 16 25 26 27 28 29 30 +20 21 22 23 24 25 26 17 18 19 20 21 22 23 +27 28 29 30 31 24 25 26 27 28 29 30 + 31 + October November December +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 1 2 3 4 5 1 2 3 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 4 5 6 7 8 9 10 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 11 12 13 14 15 16 17 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 18 19 20 21 22 23 24 +23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31 +30 31 + +Gregorian - Sunday-based year + 1752 + + January February March +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 1 2 3 4 5 6 7 + 5 6 7 8 9 10 11 2 3 4 5 6 7 8 8 9 10 11 12 13 14 +12 13 14 15 16 17 18 9 10 11 12 13 14 15 15 16 17 18 19 20 21 +19 20 21 22 23 24 25 16 17 18 19 20 21 22 22 23 24 25 26 27 28 +26 27 28 29 30 31 23 24 25 26 27 28 29 29 30 31 + + April May June +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 2 1 2 3 4 5 6 + 5 6 7 8 9 10 11 3 4 5 6 7 8 9 7 8 9 10 11 12 13 +12 13 14 15 16 17 18 10 11 12 13 14 15 16 14 15 16 17 18 19 20 +19 20 21 22 23 24 25 17 18 19 20 21 22 23 21 22 23 24 25 26 27 +26 27 28 29 30 24 25 26 27 28 29 30 28 29 30 + 31 + July August September +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 1 2 14 15 16 + 5 6 7 8 9 10 11 2 3 4 5 6 7 8 17 18 19 20 21 22 23 +12 13 14 15 16 17 18 9 10 11 12 13 14 15 24 25 26 27 28 29 30 +19 20 21 22 23 24 25 16 17 18 19 20 21 22 +26 27 28 29 30 31 23 24 25 26 27 28 29 + 30 31 + October November December +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 7 1 2 3 4 1 2 + 8 9 10 11 12 13 14 5 6 7 8 9 10 11 3 4 5 6 7 8 9 +15 16 17 18 19 20 21 12 13 14 15 16 17 18 10 11 12 13 14 15 16 +22 23 24 25 26 27 28 19 20 21 22 23 24 25 17 18 19 20 21 22 23 +29 30 31 26 27 28 29 30 24 25 26 27 28 29 30 + 31 + +Julian - Monday-based year + 1752 + + January February +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 1 2 3 4 5 32 33 + 6 7 8 9 10 11 12 34 35 36 37 38 39 40 + 13 14 15 16 17 18 19 41 42 43 44 45 46 47 + 20 21 22 23 24 25 26 48 49 50 51 52 53 54 + 27 28 29 30 31 55 56 57 58 59 60 + + March April +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 61 92 93 94 95 96 + 62 63 64 65 66 67 68 97 98 99 100 101 102 103 + 69 70 71 72 73 74 75 104 105 106 107 108 109 110 + 76 77 78 79 80 81 82 111 112 113 114 115 116 117 + 83 84 85 86 87 88 89 118 119 120 121 + 90 91 + May June +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 122 123 124 153 154 155 156 157 158 159 +125 126 127 128 129 130 131 160 161 162 163 164 165 166 +132 133 134 135 136 137 138 167 168 169 170 171 172 173 +139 140 141 142 143 144 145 174 175 176 177 178 179 180 +146 147 148 149 150 151 152 181 182 + + July August +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 183 184 185 186 187 214 215 +188 189 190 191 192 193 194 216 217 218 219 220 221 222 +195 196 197 198 199 200 201 223 224 225 226 227 228 229 +202 203 204 205 206 207 208 230 231 232 233 234 235 236 +209 210 211 212 213 237 238 239 240 241 242 243 + 244 + September October +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 245 246 258 259 260 261 275 +262 263 264 265 266 267 268 276 277 278 279 280 281 282 +269 270 271 272 273 274 283 284 285 286 287 288 289 + 290 291 292 293 294 295 296 + 297 298 299 300 301 302 303 + 304 305 + November December +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 306 307 308 309 310 336 337 338 +311 312 313 314 315 316 317 339 340 341 342 343 344 345 +318 319 320 321 322 323 324 346 347 348 349 350 351 352 +325 326 327 328 329 330 331 353 354 355 356 357 358 359 +332 333 334 335 360 361 362 363 364 365 366 + + +Julian - Sunday-based year diff --git a/tests/expected/cal/year b/tests/expected/cal/year index 616d61a0c..0fd88d3dc 100644 --- a/tests/expected/cal/year +++ b/tests/expected/cal/year @@ -4,174 +4,174 @@ Gregorian - Monday-based week January February March Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 1 2 3 4 5 1 2 3 4 5 - 2 3 4 5 6 7 8 6 7 8 9 10 11 12 6 7 8 9 10 11 12 - 9 10 11 12 13 14 15 13 14 15 16 17 18 19 13 14 15 16 17 18 19 -16 17 18 19 20 21 22 20 21 22 23 24 25 26 20 21 22 23 24 25 26 -23 24 25 26 27 28 29 27 28 27 28 29 30 31 -30 31 + 1 1 2 3 4 5 1 2 3 4 5 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 6 7 8 9 10 11 12 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 13 14 15 16 17 18 19 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 20 21 22 23 24 25 26 +23 24 25 26 27 28 29 27 28 27 28 29 30 31 +30 31 April May June Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 2 1 2 3 4 5 6 7 1 2 3 4 - 3 4 5 6 7 8 9 8 9 10 11 12 13 14 5 6 7 8 9 10 11 -10 11 12 13 14 15 16 15 16 17 18 19 20 21 12 13 14 15 16 17 18 -17 18 19 20 21 22 23 22 23 24 25 26 27 28 19 20 21 22 23 24 25 -24 25 26 27 28 29 30 29 30 31 26 27 28 29 30 - + 1 2 1 2 3 4 5 6 7 1 2 3 4 + 3 4 5 6 7 8 9 8 9 10 11 12 13 14 5 6 7 8 9 10 11 +10 11 12 13 14 15 16 15 16 17 18 19 20 21 12 13 14 15 16 17 18 +17 18 19 20 21 22 23 22 23 24 25 26 27 28 19 20 21 22 23 24 25 +24 25 26 27 28 29 30 29 30 31 26 27 28 29 30 + July August September Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 2 1 2 3 4 5 6 1 2 3 - 3 4 5 6 7 8 9 7 8 9 10 11 12 13 4 5 6 7 8 9 10 -10 11 12 13 14 15 16 14 15 16 17 18 19 20 11 12 13 14 15 16 17 -17 18 19 20 21 22 23 21 22 23 24 25 26 27 18 19 20 21 22 23 24 -24 25 26 27 28 29 30 28 29 30 31 25 26 27 28 29 30 -31 + 1 2 1 2 3 4 5 6 1 2 3 + 3 4 5 6 7 8 9 7 8 9 10 11 12 13 4 5 6 7 8 9 10 +10 11 12 13 14 15 16 14 15 16 17 18 19 20 11 12 13 14 15 16 17 +17 18 19 20 21 22 23 21 22 23 24 25 26 27 18 19 20 21 22 23 24 +24 25 26 27 28 29 30 28 29 30 31 25 26 27 28 29 30 +31 October November December Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 1 2 3 4 5 1 2 3 - 2 3 4 5 6 7 8 6 7 8 9 10 11 12 4 5 6 7 8 9 10 - 9 10 11 12 13 14 15 13 14 15 16 17 18 19 11 12 13 14 15 16 17 -16 17 18 19 20 21 22 20 21 22 23 24 25 26 18 19 20 21 22 23 24 -23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31 -30 31 + 1 1 2 3 4 5 1 2 3 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 4 5 6 7 8 9 10 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 11 12 13 14 15 16 17 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 18 19 20 21 22 23 24 +23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31 +30 31 Gregorian - Sunday-based week 2006 January February March Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 2 3 4 5 6 7 1 2 3 4 1 2 3 4 - 8 9 10 11 12 13 14 5 6 7 8 9 10 11 5 6 7 8 9 10 11 -15 16 17 18 19 20 21 12 13 14 15 16 17 18 12 13 14 15 16 17 18 -22 23 24 25 26 27 28 19 20 21 22 23 24 25 19 20 21 22 23 24 25 -29 30 31 26 27 28 26 27 28 29 30 31 - + 1 2 3 4 5 6 7 1 2 3 4 1 2 3 4 + 8 9 10 11 12 13 14 5 6 7 8 9 10 11 5 6 7 8 9 10 11 +15 16 17 18 19 20 21 12 13 14 15 16 17 18 12 13 14 15 16 17 18 +22 23 24 25 26 27 28 19 20 21 22 23 24 25 19 20 21 22 23 24 25 +29 30 31 26 27 28 26 27 28 29 30 31 + April May June Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 1 2 3 4 5 6 1 2 3 - 2 3 4 5 6 7 8 7 8 9 10 11 12 13 4 5 6 7 8 9 10 - 9 10 11 12 13 14 15 14 15 16 17 18 19 20 11 12 13 14 15 16 17 -16 17 18 19 20 21 22 21 22 23 24 25 26 27 18 19 20 21 22 23 24 -23 24 25 26 27 28 29 28 29 30 31 25 26 27 28 29 30 -30 + 1 1 2 3 4 5 6 1 2 3 + 2 3 4 5 6 7 8 7 8 9 10 11 12 13 4 5 6 7 8 9 10 + 9 10 11 12 13 14 15 14 15 16 17 18 19 20 11 12 13 14 15 16 17 +16 17 18 19 20 21 22 21 22 23 24 25 26 27 18 19 20 21 22 23 24 +23 24 25 26 27 28 29 28 29 30 31 25 26 27 28 29 30 +30 July August September Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 1 2 3 4 5 1 2 - 2 3 4 5 6 7 8 6 7 8 9 10 11 12 3 4 5 6 7 8 9 - 9 10 11 12 13 14 15 13 14 15 16 17 18 19 10 11 12 13 14 15 16 -16 17 18 19 20 21 22 20 21 22 23 24 25 26 17 18 19 20 21 22 23 -23 24 25 26 27 28 29 27 28 29 30 31 24 25 26 27 28 29 30 -30 31 + 1 1 2 3 4 5 1 2 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 3 4 5 6 7 8 9 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 10 11 12 13 14 15 16 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 17 18 19 20 21 22 23 +23 24 25 26 27 28 29 27 28 29 30 31 24 25 26 27 28 29 30 +30 31 October November December Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 2 3 4 5 6 7 1 2 3 4 1 2 - 8 9 10 11 12 13 14 5 6 7 8 9 10 11 3 4 5 6 7 8 9 -15 16 17 18 19 20 21 12 13 14 15 16 17 18 10 11 12 13 14 15 16 -22 23 24 25 26 27 28 19 20 21 22 23 24 25 17 18 19 20 21 22 23 -29 30 31 26 27 28 29 30 24 25 26 27 28 29 30 - 31 + 1 2 3 4 5 6 7 1 2 3 4 1 2 + 8 9 10 11 12 13 14 5 6 7 8 9 10 11 3 4 5 6 7 8 9 +15 16 17 18 19 20 21 12 13 14 15 16 17 18 10 11 12 13 14 15 16 +22 23 24 25 26 27 28 19 20 21 22 23 24 25 17 18 19 20 21 22 23 +29 30 31 26 27 28 29 30 24 25 26 27 28 29 30 + 31 Julian - Monday-based week 2006 January February Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 1 32 33 34 35 36 - 2 3 4 5 6 7 8 37 38 39 40 41 42 43 - 9 10 11 12 13 14 15 44 45 46 47 48 49 50 - 16 17 18 19 20 21 22 51 52 53 54 55 56 57 - 23 24 25 26 27 28 29 58 59 - 30 31 + 1 32 33 34 35 36 + 2 3 4 5 6 7 8 37 38 39 40 41 42 43 + 9 10 11 12 13 14 15 44 45 46 47 48 49 50 + 16 17 18 19 20 21 22 51 52 53 54 55 56 57 + 23 24 25 26 27 28 29 58 59 + 30 31 March April Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 60 61 62 63 64 91 92 - 65 66 67 68 69 70 71 93 94 95 96 97 98 99 - 72 73 74 75 76 77 78 100 101 102 103 104 105 106 - 79 80 81 82 83 84 85 107 108 109 110 111 112 113 - 86 87 88 89 90 114 115 116 117 118 119 120 - + 60 61 62 63 64 91 92 + 65 66 67 68 69 70 71 93 94 95 96 97 98 99 + 72 73 74 75 76 77 78 100 101 102 103 104 105 106 + 79 80 81 82 83 84 85 107 108 109 110 111 112 113 + 86 87 88 89 90 114 115 116 117 118 119 120 + May June Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun -121 122 123 124 125 126 127 152 153 154 155 -128 129 130 131 132 133 134 156 157 158 159 160 161 162 -135 136 137 138 139 140 141 163 164 165 166 167 168 169 -142 143 144 145 146 147 148 170 171 172 173 174 175 176 -149 150 151 177 178 179 180 181 - +121 122 123 124 125 126 127 152 153 154 155 +128 129 130 131 132 133 134 156 157 158 159 160 161 162 +135 136 137 138 139 140 141 163 164 165 166 167 168 169 +142 143 144 145 146 147 148 170 171 172 173 174 175 176 +149 150 151 177 178 179 180 181 + July August Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 182 183 213 214 215 216 217 218 -184 185 186 187 188 189 190 219 220 221 222 223 224 225 -191 192 193 194 195 196 197 226 227 228 229 230 231 232 -198 199 200 201 202 203 204 233 234 235 236 237 238 239 -205 206 207 208 209 210 211 240 241 242 243 -212 + 182 183 213 214 215 216 217 218 +184 185 186 187 188 189 190 219 220 221 222 223 224 225 +191 192 193 194 195 196 197 226 227 228 229 230 231 232 +198 199 200 201 202 203 204 233 234 235 236 237 238 239 +205 206 207 208 209 210 211 240 241 242 243 +212 September October Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 244 245 246 274 -247 248 249 250 251 252 253 275 276 277 278 279 280 281 -254 255 256 257 258 259 260 282 283 284 285 286 287 288 -261 262 263 264 265 266 267 289 290 291 292 293 294 295 -268 269 270 271 272 273 296 297 298 299 300 301 302 - 303 304 + 244 245 246 274 +247 248 249 250 251 252 253 275 276 277 278 279 280 281 +254 255 256 257 258 259 260 282 283 284 285 286 287 288 +261 262 263 264 265 266 267 289 290 291 292 293 294 295 +268 269 270 271 272 273 296 297 298 299 300 301 302 + 303 304 November December Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 305 306 307 308 309 335 336 337 -310 311 312 313 314 315 316 338 339 340 341 342 343 344 -317 318 319 320 321 322 323 345 346 347 348 349 350 351 -324 325 326 327 328 329 330 352 353 354 355 356 357 358 -331 332 333 334 359 360 361 362 363 364 365 - + 305 306 307 308 309 335 336 337 +310 311 312 313 314 315 316 338 339 340 341 342 343 344 +317 318 319 320 321 322 323 345 346 347 348 349 350 351 +324 325 326 327 328 329 330 352 353 354 355 356 357 358 +331 332 333 334 359 360 361 362 363 364 365 + Julian - Sunday-based week 2006 January February Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 1 2 3 4 5 6 7 32 33 34 35 - 8 9 10 11 12 13 14 36 37 38 39 40 41 42 - 15 16 17 18 19 20 21 43 44 45 46 47 48 49 - 22 23 24 25 26 27 28 50 51 52 53 54 55 56 - 29 30 31 57 58 59 - + 1 2 3 4 5 6 7 32 33 34 35 + 8 9 10 11 12 13 14 36 37 38 39 40 41 42 + 15 16 17 18 19 20 21 43 44 45 46 47 48 49 + 22 23 24 25 26 27 28 50 51 52 53 54 55 56 + 29 30 31 57 58 59 + March April Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 60 61 62 63 91 - 64 65 66 67 68 69 70 92 93 94 95 96 97 98 - 71 72 73 74 75 76 77 99 100 101 102 103 104 105 - 78 79 80 81 82 83 84 106 107 108 109 110 111 112 - 85 86 87 88 89 90 113 114 115 116 117 118 119 - 120 + 60 61 62 63 91 + 64 65 66 67 68 69 70 92 93 94 95 96 97 98 + 71 72 73 74 75 76 77 99 100 101 102 103 104 105 + 78 79 80 81 82 83 84 106 107 108 109 110 111 112 + 85 86 87 88 89 90 113 114 115 116 117 118 119 + 120 May June Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 121 122 123 124 125 126 152 153 154 -127 128 129 130 131 132 133 155 156 157 158 159 160 161 -134 135 136 137 138 139 140 162 163 164 165 166 167 168 -141 142 143 144 145 146 147 169 170 171 172 173 174 175 -148 149 150 151 176 177 178 179 180 181 - + 121 122 123 124 125 126 152 153 154 +127 128 129 130 131 132 133 155 156 157 158 159 160 161 +134 135 136 137 138 139 140 162 163 164 165 166 167 168 +141 142 143 144 145 146 147 169 170 171 172 173 174 175 +148 149 150 151 176 177 178 179 180 181 + July August Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 182 213 214 215 216 217 -183 184 185 186 187 188 189 218 219 220 221 222 223 224 -190 191 192 193 194 195 196 225 226 227 228 229 230 231 -197 198 199 200 201 202 203 232 233 234 235 236 237 238 -204 205 206 207 208 209 210 239 240 241 242 243 -211 212 + 182 213 214 215 216 217 +183 184 185 186 187 188 189 218 219 220 221 222 223 224 +190 191 192 193 194 195 196 225 226 227 228 229 230 231 +197 198 199 200 201 202 203 232 233 234 235 236 237 238 +204 205 206 207 208 209 210 239 240 241 242 243 +211 212 September October Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 244 245 274 275 276 277 278 279 280 -246 247 248 249 250 251 252 281 282 283 284 285 286 287 -253 254 255 256 257 258 259 288 289 290 291 292 293 294 -260 261 262 263 264 265 266 295 296 297 298 299 300 301 -267 268 269 270 271 272 273 302 303 304 - + 244 245 274 275 276 277 278 279 280 +246 247 248 249 250 251 252 281 282 283 284 285 286 287 +253 254 255 256 257 258 259 288 289 290 291 292 293 294 +260 261 262 263 264 265 266 295 296 297 298 299 300 301 +267 268 269 270 271 272 273 302 303 304 + November December Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 305 306 307 308 335 336 -309 310 311 312 313 314 315 337 338 339 340 341 342 343 -316 317 318 319 320 321 322 344 345 346 347 348 349 350 -323 324 325 326 327 328 329 351 352 353 354 355 356 357 -330 331 332 333 334 358 359 360 361 362 363 364 - 365 + 305 306 307 308 335 336 +309 310 311 312 313 314 315 337 338 339 340 341 342 343 +316 317 318 319 320 321 322 344 345 346 347 348 349 350 +323 324 325 326 327 328 329 351 352 353 354 355 356 357 +330 331 332 333 334 358 359 360 361 362 363 364 + 365 diff --git a/tests/expected/fdisk/align-512-4K b/tests/expected/fdisk/align-512-4K index e5a28f54a..08da6a20b 100644 --- a/tests/expected/fdisk/align-512-4K +++ b/tests/expected/fdisk/align-512-4K @@ -1,79 +1,79 @@ Create partitions - +Welcome to fdisk <removed>. Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table - +Device does not contain a recognized partition table. -The device presents a logical sector size that is smaller than -the physical sector size. Aligning to a physical sector (or optimal -I/O) size boundary is recommended, or performance may be impacted. +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (0 primary, 0 extended, 4 free) e extended -Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Using default value 2048 -Last sector, +sectors or +size{K,M,G} (2048-102399, default 102399): Partition 1 of type Linux and of size 10 MiB is set +Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (1 primary, 0 extended, 3 free) e extended -Select (default p): Partition number (2-4, default 2): First sector (22528-102399, default 22528): Using default value 22528 -Last sector, +sectors or +size{K,M,G} (22528-102399, default 102399): Partition 2 of type Linux and of size 10 MiB is set +Select (default p): Partition number (2-4, default 2): First sector (22528-102399, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (2 primary, 0 extended, 2 free) e extended -Select (default p): Partition number (3,4, default 3): First sector (43008-102399, default 43008): Using default value 43008 -Last sector, +sectors or +size{K,M,G} (43008-102399, default 102399): Partition 3 of type Linux and of size 10 MiB is set +Select (default p): Partition number (3,4, default 3): First sector (43008-102399, default 43008): Last sector, +sectors or +size{K,M,G,T,P} (43008-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (3 primary, 0 extended, 1 free) e extended -Select (default e): Selected partition 4 -First sector (63488-102399, default 63488): Using default value 63488 -Last sector, +sectors or +size{K,M,G} (63488-102399, default 102399): Using default value 102399 -Partition 4 of type Extended and of size 19 MiB is set +Select (default e): +Selected partition 4 +First sector (63488-102399, default 63488): Last sector, +sectors or +size{K,M,G,T,P} (63488-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 5 -First sector (65536-102399, default 65536): Using default value 65536 -Last sector, +sectors or +size{K,M,G} (65536-102399, default 102399): Partition 5 of type Linux and of size 5 MiB is set +First sector (65536-102399, default 65536): Last sector, +sectors or +size{K,M,G,T,P} (65536-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 6 -First sector (77824-102399, default 77824): Using default value 77824 -Last sector, +sectors or +size{K,M,G} (77824-102399, default 102399): Partition 6 of type Linux and of size 5 MiB is set +First sector (77824-102399, default 77824): Last sector, +sectors or +size{K,M,G,T,P} (77824-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 7 -First sector (90112-102399, default 90112): Using default value 90112 -Last sector, +sectors or +size{K,M,G} (90112-102399, default 102399): Using default value 102399 -Partition 7 of type Linux and of size 6 MiB is set +First sector (90112-102399, default 90112): Last sector, +sectors or +size{K,M,G,T,P} (90112-102399, default 102399): +Created a new <removed>. -Command (m for help): -Disk /dev/...: 52 MB, 52428800 bytes, 102400 sectors -Units = sectors of 1 * 512 = 512 bytes +Command (m for help): 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 -Disk label type: dos - - - Device Boot Start End Blocks Id System -/dev/...1 2048 22527 10240 83 Linux -/dev/...2 22528 43007 10240 83 Linux -/dev/...3 43008 63487 10240 83 Linux -/dev/...4 63488 102399 19456 5 Extended -/dev/...5 65536 75775 5120 83 Linux -/dev/...6 77824 88063 5120 83 Linux -/dev/...7 90112 102399 6144 83 Linux - -Command (m for help): The partition table has been altered! +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 22527 10240 83 Linux +<removed>2 22528 43007 10240 83 Linux +<removed>3 43008 63487 10240 83 Linux +<removed>4 63488 102399 19456 5 Extended +<removed>5 65536 75775 5120 83 Linux +<removed>6 77824 88063 5120 83 Linux +<removed>7 90112 102399 6144 83 Linux +Command (m for help): +The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. + Alignment offsets: 0 0 diff --git a/tests/expected/fdisk/align-512-4K-63 b/tests/expected/fdisk/align-512-4K-63 index 7e236ce55..f2515ac78 100644 --- a/tests/expected/fdisk/align-512-4K-63 +++ b/tests/expected/fdisk/align-512-4K-63 @@ -1,80 +1,80 @@ Create partitions - +Welcome to fdisk <removed>. Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table - +Device does not contain a recognized partition table. -The device presents a logical sector size that is smaller than -the physical sector size. Aligning to a physical sector (or optimal -I/O) size boundary is recommended, or performance may be impacted. +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (0 primary, 0 extended, 4 free) e extended -Select (default p): Partition number (1-4, default 1): First sector (7-102399, default 7): Using default value 7 -Last sector, +sectors or +size{K,M,G} (7-102399, default 102399): Partition 1 of type Linux and of size 10 MiB is set +Select (default p): Partition number (1-4, default 1): First sector (7-102399, default 7): Last sector, +sectors or +size{K,M,G,T,P} (7-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (1 primary, 0 extended, 3 free) e extended -Select (default p): Partition number (2-4, default 2): First sector (20487-102399, default 20487): Using default value 20487 -Last sector, +sectors or +size{K,M,G} (20487-102399, default 102399): Partition 2 of type Linux and of size 10 MiB is set +Select (default p): Partition number (2-4, default 2): First sector (20487-102399, default 20487): Last sector, +sectors or +size{K,M,G,T,P} (20487-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (2 primary, 0 extended, 2 free) e extended -Select (default p): Partition number (3,4, default 3): First sector (40967-102399, default 40967): Using default value 40967 -Last sector, +sectors or +size{K,M,G} (40967-102399, default 102399): Partition 3 of type Linux and of size 10 MiB is set +Select (default p): Partition number (3,4, default 3): First sector (40967-102399, default 40967): Last sector, +sectors or +size{K,M,G,T,P} (40967-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (3 primary, 0 extended, 1 free) e extended -Select (default e): Selected partition 4 -First sector (61447-102399, default 61447): Using default value 61447 -Last sector, +sectors or +size{K,M,G} (61447-102399, default 102399): Using default value 102399 -Partition 4 of type Extended and of size 20 MiB is set +Select (default e): +Selected partition 4 +First sector (61447-102399, default 61447): Last sector, +sectors or +size{K,M,G,T,P} (61447-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 5 -First sector (61454-102399, default 63487): Using default value 63487 -Last sector, +sectors or +size{K,M,G} (63487-102399, default 102399): Partition 5 of type Linux and of size 5 MiB is set +First sector (61454-102399, default 63487): Last sector, +sectors or +size{K,M,G,T,P} (63487-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 6 -First sector (61454-102399, default 75775): Using default value 75775 -Last sector, +sectors or +size{K,M,G} (75775-102399, default 102399): Partition 6 of type Linux and of size 5 MiB is set +First sector (61454-102399, default 75775): Last sector, +sectors or +size{K,M,G,T,P} (75775-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 7 -First sector (61454-102399, default 88063): Using default value 88063 -Last sector, +sectors or +size{K,M,G} (88063-102399, default 102399): Using default value 102399 -Partition 7 of type Linux and of size 7 MiB is set +First sector (61454-102399, default 88063): Last sector, +sectors or +size{K,M,G,T,P} (88063-102399, default 102399): +Created a new <removed>. -Command (m for help): -Disk /dev/...: 52 MB, 52428800 bytes, 102400 sectors -Units = sectors of 1 * 512 = 512 bytes +Command (m for help): 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 Alignment offset: 3584 bytes -Disk label type: dos - - - Device Boot Start End Blocks Id System -/dev/...1 7 20486 10240 83 Linux -/dev/...2 20487 40966 10240 83 Linux -/dev/...3 40967 61446 10240 83 Linux -/dev/...4 61447 102399 20476+ 5 Extended -/dev/...5 63487 73726 5120 83 Linux -/dev/...6 75775 86014 5120 83 Linux -/dev/...7 88063 102399 7168+ 83 Linux - -Command (m for help): The partition table has been altered! +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 7 20486 10240 83 Linux +<removed>2 20487 40966 10240 83 Linux +<removed>3 40967 61446 10240 83 Linux +<removed>4 61447 102399 20476+ 5 Extended +<removed>5 63487 73726 5120 83 Linux +<removed>6 75775 86014 5120 83 Linux +<removed>7 88063 102399 7168+ 83 Linux +Command (m for help): +The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. + Alignment offsets: 0 0 diff --git a/tests/expected/fdisk/align-512-4K-md b/tests/expected/fdisk/align-512-4K-md index dbbbc05e3..03ebcccd5 100644 --- a/tests/expected/fdisk/align-512-4K-md +++ b/tests/expected/fdisk/align-512-4K-md @@ -1,89 +1,86 @@ Create partitions - +Welcome to fdisk <removed>. Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table - +Device does not contain a recognized partition table. -The device presents a logical sector size that is smaller than -the physical sector size. Aligning to a physical sector (or optimal -I/O) size boundary is recommended, or performance may be impacted. +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (0 primary, 0 extended, 4 free) e extended -Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Using default value 2048 -Last sector, +sectors or +size{K,M,G} (2048-102399, default 102399): Partition 1 of type Linux and of size 20 MiB is set +Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (1 primary, 0 extended, 3 free) e extended -Select (default p): Partition number (2-4, default 2): First sector (43008-102399, default 43008): Using default value 43008 -Last sector, +sectors or +size{K,M,G} (43008-102399, default 102399): Using default value 102399 -Partition 2 of type Linux and of size 29 MiB is set +Select (default p): Partition number (2-4, default 2): First sector (43008-102399, default 43008): Last sector, +sectors or +size{K,M,G,T,P} (43008-102399, default 102399): +Created a new <removed>. -Command (m for help): -Disk /dev/...: 52 MB, 52428800 bytes, 102400 sectors -Units = sectors of 1 * 512 = 512 bytes +Command (m for help): 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 -Disk label type: dos +Disklabel type: dos +Disk identifier: <removed> +Device Boot Start End Blocks Id System +<removed>1 2048 43007 20480 83 Linux +<removed>2 43008 102399 29696 83 Linux - Device Boot Start End Blocks Id System -/dev/...1 2048 43007 20480 83 Linux -/dev/...2 43008 102399 29696 83 Linux - -Command (m for help): The partition table has been altered! - +Command (m for help): +The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. + Alignment offsets: 0 0 Create partitions (MD) - +Welcome to fdisk <removed>. Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table - +Device does not contain a recognized partition table. -The device presents a logical sector size that is smaller than -the physical sector size. Aligning to a physical sector (or optimal -I/O) size boundary is recommended, or performance may be impacted. +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (0 primary, 0 extended, 4 free) e extended -Select (default p): Partition number (1-4, default 1): First sector (2048-100095, default 2048): Using default value 2048 -Last sector, +sectors or +size{K,M,G} (2048-100095, default 100095): Partition 1 of type Linux and of size 10 MiB is set +Select (default p): Partition number (1-4, default 1): First sector (2048-100095, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-100095, default 100095): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (1 primary, 0 extended, 3 free) e extended -Select (default p): Partition number (2-4, default 2): First sector (22528-100095, default 22528): Using default value 22528 -Last sector, +sectors or +size{K,M,G} (22528-100095, default 100095): Partition 2 of type Linux and of size 10 MiB is set +Select (default p): Partition number (2-4, default 2): First sector (22528-100095, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-100095, default 100095): +Created a new <removed>. -Command (m for help): -Disk /dev/md8: 51 MB, 51249152 bytes, 100096 sectors -Units = sectors of 1 * 512 = 512 bytes +Command (m for help): Disk <removed>: 48.9 MiB, 51249152 bytes, 100096 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 65536 bytes / 131072 bytes -Disk label type: dos +Disklabel type: dos +Disk identifier: <removed> +Device Boot Start End Blocks Id System +<removed>p1 2048 22527 10240 83 Linux +<removed>p2 22528 43007 10240 83 Linux - Device Boot Start End Blocks Id System -/dev/md8p1 2048 22527 10240 83 Linux -/dev/md8p2 22528 43007 10240 83 Linux - -Command (m for help): The partition table has been altered! - +Command (m for help): +The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. + Alignment offsets (MD): 0 0 diff --git a/tests/expected/fdisk/align-512-512 b/tests/expected/fdisk/align-512-512 index 018322f1d..498fc6560 100644 --- a/tests/expected/fdisk/align-512-512 +++ b/tests/expected/fdisk/align-512-512 @@ -1,69 +1,72 @@ Create partitions - +Welcome to fdisk <removed>. Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table +Device does not contain a recognized partition table. +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (0 primary, 0 extended, 4 free) e extended -Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Using default value 2048 -Last sector, +sectors or +size{K,M,G} (2048-102399, default 102399): Partition 1 of type Linux and of size 10 MiB is set +Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (1 primary, 0 extended, 3 free) e extended -Select (default p): Partition number (2-4, default 2): First sector (22528-102399, default 22528): Using default value 22528 -Last sector, +sectors or +size{K,M,G} (22528-102399, default 102399): Partition 2 of type Linux and of size 10 MiB is set +Select (default p): Partition number (2-4, default 2): First sector (22528-102399, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (2 primary, 0 extended, 2 free) e extended -Select (default p): Partition number (3,4, default 3): First sector (43008-102399, default 43008): Using default value 43008 -Last sector, +sectors or +size{K,M,G} (43008-102399, default 102399): Partition 3 of type Linux and of size 10 MiB is set +Select (default p): Partition number (3,4, default 3): First sector (43008-102399, default 43008): Last sector, +sectors or +size{K,M,G,T,P} (43008-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (3 primary, 0 extended, 1 free) e extended -Select (default e): Selected partition 4 -First sector (63488-102399, default 63488): Using default value 63488 -Last sector, +sectors or +size{K,M,G} (63488-102399, default 102399): Using default value 102399 -Partition 4 of type Extended and of size 19 MiB is set +Select (default e): +Selected partition 4 +First sector (63488-102399, default 63488): Last sector, +sectors or +size{K,M,G,T,P} (63488-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 5 -First sector (65536-102399, default 65536): Using default value 65536 -Last sector, +sectors or +size{K,M,G} (65536-102399, default 102399): Partition 5 of type Linux and of size 5 MiB is set +First sector (65536-102399, default 65536): Last sector, +sectors or +size{K,M,G,T,P} (65536-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 6 -First sector (77824-102399, default 77824): Using default value 77824 -Last sector, +sectors or +size{K,M,G} (77824-102399, default 102399): Partition 6 of type Linux and of size 5 MiB is set +First sector (77824-102399, default 77824): Last sector, +sectors or +size{K,M,G,T,P} (77824-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 7 -First sector (90112-102399, default 90112): Using default value 90112 -Last sector, +sectors or +size{K,M,G} (90112-102399, default 102399): Using default value 102399 -Partition 7 of type Linux and of size 6 MiB is set +First sector (90112-102399, default 90112): Last sector, +sectors or +size{K,M,G,T,P} (90112-102399, default 102399): +Created a new <removed>. -Command (m for help): -Disk /dev/loop0: 52 MB, 52428800 bytes, 102400 sectors -Units = sectors of 1 * 512 = 512 bytes +Command (m for help): Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos - +Disklabel type: dos +Disk identifier: <removed> - Device Boot Start End Blocks Id System -/dev/loop0p1 2048 22527 10240 83 Linux -/dev/loop0p2 22528 43007 10240 83 Linux -/dev/loop0p3 43008 63487 10240 83 Linux -/dev/loop0p4 63488 102399 19456 5 Extended -/dev/loop0p5 65536 75775 5120 83 Linux -/dev/loop0p6 77824 88063 5120 83 Linux -/dev/loop0p7 90112 102399 6144 83 Linux +Device Boot Start End Blocks Id System +<removed>p1 2048 22527 10240 83 Linux +<removed>p2 22528 43007 10240 83 Linux +<removed>p3 43008 63487 10240 83 Linux +<removed>p4 63488 102399 19456 5 Extended +<removed>p5 65536 75775 5120 83 Linux +<removed>p6 77824 88063 5120 83 Linux +<removed>p7 90112 102399 6144 83 Linux Command (m for help): diff --git a/tests/expected/fdisk/align-512-512-topology b/tests/expected/fdisk/align-512-512-topology index b3d31146c..7f4f851db 100644 --- a/tests/expected/fdisk/align-512-512-topology +++ b/tests/expected/fdisk/align-512-512-topology @@ -1,75 +1,79 @@ Create partitions - +Welcome to fdisk <removed>. Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Device does not contain a recognized partition table +Device does not contain a recognized partition table. +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (0 primary, 0 extended, 4 free) e extended -Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Using default value 2048 -Last sector, +sectors or +size{K,M,G} (2048-102399, default 102399): Partition 1 of type Linux and of size 10 MiB is set +Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (1 primary, 0 extended, 3 free) e extended -Select (default p): Partition number (2-4, default 2): First sector (22528-102399, default 22528): Using default value 22528 -Last sector, +sectors or +size{K,M,G} (22528-102399, default 102399): Partition 2 of type Linux and of size 10 MiB is set +Select (default p): Partition number (2-4, default 2): First sector (22528-102399, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (2 primary, 0 extended, 2 free) e extended -Select (default p): Partition number (3,4, default 3): First sector (43008-102399, default 43008): Using default value 43008 -Last sector, +sectors or +size{K,M,G} (43008-102399, default 102399): Partition 3 of type Linux and of size 10 MiB is set +Select (default p): Partition number (3,4, default 3): First sector (43008-102399, default 43008): Last sector, +sectors or +size{K,M,G,T,P} (43008-102399, default 102399): +Created a new <removed>. -Command (m for help): Partition type: +Command (m for help): +Partition type: p primary (3 primary, 0 extended, 1 free) e extended -Select (default e): Selected partition 4 -First sector (63488-102399, default 63488): Using default value 63488 -Last sector, +sectors or +size{K,M,G} (63488-102399, default 102399): Using default value 102399 -Partition 4 of type Extended and of size 19 MiB is set +Select (default e): +Selected partition 4 +First sector (63488-102399, default 63488): Last sector, +sectors or +size{K,M,G,T,P} (63488-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 5 -First sector (65536-102399, default 65536): Using default value 65536 -Last sector, +sectors or +size{K,M,G} (65536-102399, default 102399): Partition 5 of type Linux and of size 5 MiB is set +First sector (65536-102399, default 65536): Last sector, +sectors or +size{K,M,G,T,P} (65536-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 6 -First sector (77824-102399, default 77824): Using default value 77824 -Last sector, +sectors or +size{K,M,G} (77824-102399, default 102399): Partition 6 of type Linux and of size 5 MiB is set +First sector (77824-102399, default 77824): Last sector, +sectors or +size{K,M,G,T,P} (77824-102399, default 102399): +Created a new <removed>. -Command (m for help): All primary partitions are in use +Command (m for help): All primary partitions are in use. Adding logical partition 7 -First sector (90112-102399, default 90112): Using default value 90112 -Last sector, +sectors or +size{K,M,G} (90112-102399, default 102399): Using default value 102399 -Partition 7 of type Linux and of size 6 MiB is set +First sector (90112-102399, default 90112): Last sector, +sectors or +size{K,M,G,T,P} (90112-102399, default 102399): +Created a new <removed>. -Command (m for help): -Disk /dev/...: 52 MB, 52428800 bytes, 102400 sectors -Units = sectors of 1 * 512 = 512 bytes +Command (m for help): Disk <removed>: 50 MiB, 52428800 bytes, 102400 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 -Disk label type: dos - - - Device Boot Start End Blocks Id System -/dev/...1 2048 22527 10240 83 Linux -/dev/...2 22528 43007 10240 83 Linux -/dev/...3 43008 63487 10240 83 Linux -/dev/...4 63488 102399 19456 5 Extended -/dev/...5 65536 75775 5120 83 Linux -/dev/...6 77824 88063 5120 83 Linux -/dev/...7 90112 102399 6144 83 Linux - -Command (m for help): The partition table has been altered! +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 22527 10240 83 Linux +<removed>2 22528 43007 10240 83 Linux +<removed>3 43008 63487 10240 83 Linux +<removed>4 63488 102399 19456 5 Extended +<removed>5 65536 75775 5120 83 Linux +<removed>6 77824 88063 5120 83 Linux +<removed>7 90112 102399 6144 83 Linux +Command (m for help): +The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. + Alignment offsets: 0 0 diff --git a/tests/expected/fdisk/bsd b/tests/expected/fdisk/bsd index 85ff3b63c..addc7459e 100644 --- a/tests/expected/fdisk/bsd +++ b/tests/expected/fdisk/bsd @@ -4,29 +4,30 @@ Create new DOS partition table 57e721e38d1266c2df055067c18f2cf9 bsd.img ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + - Device Boot Start End Blocks Id System ------------------- Create 1st primary partition ada64ace122978d00d1d1c0e5ee45d26 bsd.img ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 4095 1024 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__1 2048 4095 1024 83 Linux ------------------- Create 2st primary partition @@ -35,57 +36,74 @@ Set 2nd partition type 2d8e8dff51a88a045db233418dd73fbe bsd.img ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 4095 1024 83 Linux +<removed>2 4096 20479 8192 a5 FreeBSD - Device Boot Start End Blocks Id System -__ts_dev__1 2048 4095 1024 83 Linux -__ts_dev__2 4096 20479 8192 a5 FreeBSD ------------------- Create default BSD 2e1cee529cb59c9341afef0443f196a1 bsd.img ---layout---------- - +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): +Command (m for help): Entering nested BSD disklabel. -BSD disklabel command (m for help): -4 partitions: -# start end size fstype [fsize bsize cpg] - c: 4096 20479 16384 unused 0 0 - d: 0 16064 16065 unused 0 0 +Command (m for help): Disk <removed>2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: bsd +partitions: 4 + +# Start End Size Type fsize bsize cpg +c 4096 20479 16384 unused 0 0 +d 0 16064 16065 unused 0 0 + +Command (m for help): +Leaving nested disklabel. -BSD disklabel command (m for help): Command (m for help): ------------------- b5c121c2091b2ff26b880551feac7112 bsd.img ---layout---------- - +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): +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk <removed>2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: bsd +partitions: 4 -BSD disklabel command (m for help): -4 partitions: -# start end size fstype [fsize bsize cpg] - a: 4096 6144 2049 4.2BSD 0 0 0 - c: 4096 20479 16384 unused 0 0 - d: 0 16064 16065 unused 0 0 +# Start End Size Type fsize bsize cpg +a 4096 6144 2049 4.2BSD 0 0 0 +c 4096 20479 16384 unused 0 0 +d 0 16064 16065 unused 0 0 + +Command (m for help): +Leaving nested disklabel. -BSD disklabel command (m for help): Command (m for help): ------------------- @@ -95,13 +113,13 @@ Changes will remain in memory only, until you decide to write them. Be careful before using the write command. -Command (m for help): +Command (m for help): Entering nested BSD disklabel. -BSD disklabel command (m for help): +Command (m for help): 0 unused 5 4.1BSD 9 4.4LFS d boot 1 swap 6 Eighth Edition a unknown e ADOS 2 Version 6 7 4.2BSD b HPFS f HFS 3 Version 7 8 MS-DOS c ISO-9660 10 AdvFS 4 System V -BSD disklabel command (m for help):
\ No newline at end of file +Command (m for help): diff --git a/tests/expected/fdisk/gpt b/tests/expected/fdisk/gpt index b73d5c339..db0d92ff2 100644 --- a/tests/expected/fdisk/gpt +++ b/tests/expected/fdisk/gpt @@ -2,97 +2,101 @@ Initialize empty image Create new GPT partition table ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: gpt +Disklabel type: gpt +Disk identifier: <removed> -# Start End Size Type Name ------------------- Create partitions Change partition type by number ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: gpt - - -# Start End Size Type Name - 1 2048 4095 1M EFI System - 2 4096 6143 1M Linux filesyste - 3 6144 8191 1M Linux filesyste - 4 8192 10239 1M Linux filesyste - 5 10240 12287 1M Linux filesyste - 6 12288 14335 1M Linux filesyste - 7 14336 16383 1M Linux filesyste - 8 16384 18431 1M Linux filesyste +Disklabel type: gpt +Disk identifier: <removed> + +Device Start End Size Type +<removed>1 2048 4095 1M EFI System +<removed>2 4096 6143 1M Linux filesystem +<removed>3 6144 8191 1M Linux filesystem +<removed>4 8192 10239 1M Linux filesystem +<removed>5 10240 12287 1M Linux filesystem +<removed>6 12288 14335 1M Linux filesystem +<removed>7 14336 16383 1M Linux filesystem +<removed>8 16384 18431 1M Linux filesystem + ------------------- Change partition type by UUID ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: gpt - - -# Start End Size Type Name - 1 2048 4095 1M EFI System - 2 4096 6143 1M Linux filesyste - 3 6144 8191 1M Linux filesyste - 4 8192 10239 1M Linux filesyste - 5 10240 12287 1M Linux swap - 6 12288 14335 1M Linux filesyste - 7 14336 16383 1M Linux filesyste - 8 16384 18431 1M Linux filesyste +Disklabel type: gpt +Disk identifier: <removed> + +Device Start End Size Type +<removed>1 2048 4095 1M EFI System +<removed>2 4096 6143 1M Linux filesystem +<removed>3 6144 8191 1M Linux filesystem +<removed>4 8192 10239 1M Linux filesystem +<removed>5 10240 12287 1M Linux swap +<removed>6 12288 14335 1M Linux filesystem +<removed>7 14336 16383 1M Linux filesystem +<removed>8 16384 18431 1M Linux filesystem + ------------------- Delete partition ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: gpt +Disklabel type: gpt +Disk identifier: <removed> + +Device Start End Size Type +<removed>1 2048 4095 1M EFI System +<removed>3 6144 8191 1M Linux filesystem +<removed>4 8192 10239 1M Linux filesystem +<removed>5 10240 12287 1M Linux swap +<removed>6 12288 14335 1M Linux filesystem +<removed>7 14336 16383 1M Linux filesystem +<removed>8 16384 18431 1M Linux filesystem - -# Start End Size Type Name - 1 2048 4095 1M EFI System - 3 6144 8191 1M Linux filesyste - 4 8192 10239 1M Linux filesyste - 5 10240 12287 1M Linux swap - 6 12288 14335 1M Linux filesyste - 7 14336 16383 1M Linux filesyste - 8 16384 18431 1M Linux filesyste ------------------- Create again partition ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: gpt - - -# Start End Size Type Name - 1 2048 4095 1M EFI System - 2 4096 6143 1M Linux filesyste - 3 6144 8191 1M Linux filesyste - 4 8192 10239 1M Linux filesyste - 5 10240 12287 1M Linux swap - 6 12288 14335 1M Linux filesyste - 7 14336 16383 1M Linux filesyste - 8 16384 18431 1M Linux filesyste +Disklabel type: gpt +Disk identifier: <removed> + +Device Start End Size Type +<removed>1 2048 4095 1M EFI System +<removed>2 4096 6143 1M Linux filesystem +<removed>3 6144 8191 1M Linux filesystem +<removed>4 8192 10239 1M Linux filesystem +<removed>5 10240 12287 1M Linux swap +<removed>6 12288 14335 1M Linux filesystem +<removed>7 14336 16383 1M Linux filesystem +<removed>8 16384 18431 1M Linux filesystem + ------------------- diff --git a/tests/expected/fdisk/mbr-dos-mode b/tests/expected/fdisk/mbr-dos-mode index 3330303a1..2a0460b62 100644 --- a/tests/expected/fdisk/mbr-dos-mode +++ b/tests/expected/fdisk/mbr-dos-mode @@ -4,190 +4,199 @@ Create new DOS partition table 57e721e38d1266c2df055067c18f2cf9 mbr-dos-mode.img ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -255 heads, 63 sectors/track, 1 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + - Device Boot Start End Blocks Id System ------------------- Create primary partition ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -255 heads, 63 sectors/track, 1 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 1 1 8001 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__1 1 1 8001 83 Linux ------------------- Set partition type 4a5dba818f9962a82a086d8b99b89a17 mbr-dos-mode.img ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -255 heads, 63 sectors/track, 1 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 1 1 8001 bf Solaris - Device Boot Start End Blocks Id System -__ts_dev__1 1 1 8001 bf Solaris ------------------- Set primary partition active c30e9c761b71cf95c67e758b93706ac5 mbr-dos-mode.img ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -255 heads, 63 sectors/track, 1 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 * 1 1 8001 bf Solaris - Device Boot Start End Blocks Id System -__ts_dev__1 * 1 1 8001 bf Solaris ------------------- Re-create primary partition ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -255 heads, 63 sectors/track, 1 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 1 1 8001 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__1 1 1 8001 83 Linux ------------------- Create extended partition 76987a00b353687cd1dba3ddea9d66f9 mbr-dos-mode.img ---layout---------- -__ts_dev__: 10 MB, 10485760 bytes, 20480 sectors -255 heads, 63 sectors/track, 1 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 1 1 8001 83 Linux +<removed>2 2 12 88357+ 5 Extended - Device Boot Start End Blocks Id System -__ts_dev__1 1 1 8001 83 Linux -__ts_dev__2 2 12 88357+ 5 Extended ------------------- Create logical partitions a1cd6708e4a6d2e5f6bc9d5c0da0cf3b mbr-dos-mode.img ---layout---------- -__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors -255 heads, 63 sectors/track, 7 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 54.9 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 - - Device Boot Start End Blocks Id System -__ts_dev__1 1 1 8001 83 Linux -__ts_dev__2 2 12 88357+ 5 Extended -__ts_dev__5 2 3 16033+ 83 Linux -__ts_dev__6 4 5 16033+ 83 Linux -__ts_dev__7 6 7 16033+ 83 Linux -__ts_dev__8 8 9 16033+ 83 Linux +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 1 1 8001 83 Linux +<removed>2 2 12 88357+ 5 Extended +<removed>5 2 3 16033+ 83 Linux +<removed>6 4 5 16033+ 83 Linux +<removed>7 6 7 16033+ 83 Linux +<removed>8 8 9 16033+ 83 Linux + ------------------- Delete logical partitions 4c6937d529ace5661fb82efb9394154a mbr-dos-mode.img ---layout---------- -__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors -255 heads, 63 sectors/track, 7 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 54.9 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 1 1 8001 83 Linux +<removed>2 2 12 88357+ 5 Extended +<removed>5 6 7 16033+ 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__1 1 1 8001 83 Linux -__ts_dev__2 2 12 88357+ 5 Extended -__ts_dev__5 6 7 16033+ 83 Linux ------------------- Create another logical partition 9589eaaed698d2402945ab3e513c1eb4 mbr-dos-mode.img ---layout---------- -__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors -255 heads, 63 sectors/track, 7 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 54.9 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> - Device Boot Start End Blocks Id System -__ts_dev__1 1 1 8001 83 Linux -__ts_dev__2 2 12 88357+ 5 Extended -__ts_dev__5 6 7 16033+ 83 Linux -__ts_dev__6 2 3 16033+ 83 Linux +Device Boot Start End Blocks Id System +<removed>1 1 1 8001 83 Linux +<removed>2 2 12 88357+ 5 Extended +<removed>5 6 7 16033+ 83 Linux +<removed>6 2 3 16033+ 83 Linux + +Partition table entries are not in disk order. -Partition table entries are not in disk order ------------------- Delete primary partition 1e6d646e5df66a2664cfbbb13fa9a08a mbr-dos-mode.img ---layout---------- -__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors -255 heads, 63 sectors/track, 7 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 54.9 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>2 2 12 88357+ 5 Extended +<removed>5 6 7 16033+ 83 Linux +<removed>6 2 3 16033+ 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__2 2 12 88357+ 5 Extended -__ts_dev__5 6 7 16033+ 83 Linux -__ts_dev__6 2 3 16033+ 83 Linux +Partition table entries are not in disk order. -Partition table entries are not in disk order ------------------- Delete extended partition fc3cdb12326656d7996b09b6f76973e7 mbr-dos-mode.img ---layout---------- -__ts_dev__: 57 MB, 57577472 bytes, 112456 sectors -255 heads, 63 sectors/track, 7 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk <removed>: 54.9 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + - Device Boot Start End Blocks Id System ------------------- diff --git a/tests/expected/fdisk/mbr-nondos-mode b/tests/expected/fdisk/mbr-nondos-mode index 060008302..b3f28ff7b 100644 --- a/tests/expected/fdisk/mbr-nondos-mode +++ b/tests/expected/fdisk/mbr-nondos-mode @@ -4,204 +4,214 @@ Create new DOS partition table 4e23561dcb81678bb1bd678722c7cbb7 mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + - Device Boot Start End Blocks Id System ------------------- Create 1st primary partition e21e16b7452d82e2a2810a1de8c3db05 mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 8191 3072 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__1 2048 8191 3072 83 Linux ------------------- Set primary partition active 47f024f3b406598a0159400af7382e2c mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 * 2048 8191 3072 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__1 * 2048 8191 3072 83 Linux ------------------- Re-create 1st primary partition a5543ee1e3d2cf79913a56bae893a0f0 mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 8191 3072 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__1 2048 8191 3072 83 Linux ------------------- Create 2nd primary partition 9d31ee977e26e72ebce78e8e543cd4ce mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 8191 3072 83 Linux +<removed>2 8192 12287 2048 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__1 2048 8191 3072 83 Linux -__ts_dev__2 8192 12287 2048 83 Linux ------------------- Create extended partition 9528631b198e44564f67f8ca97fa51b8 mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 8191 3072 83 Linux +<removed>2 8192 12287 2048 83 Linux +<removed>3 12288 40959 14336 5 Extended - Device Boot Start End Blocks Id System -__ts_dev__1 2048 8191 3072 83 Linux -__ts_dev__2 8192 12287 2048 83 Linux -__ts_dev__3 12288 40959 14336 5 Extended ------------------- Create logical partitions db4406e7bc0773f234fd1db1b58b5997 mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 - - Device Boot Start End Blocks Id System -__ts_dev__1 2048 8191 3072 83 Linux -__ts_dev__2 8192 12287 2048 83 Linux -__ts_dev__3 12288 40959 14336 5 Extended -__ts_dev__5 14336 18431 2048 83 Linux -__ts_dev__6 20480 24575 2048 83 Linux -__ts_dev__7 26624 30719 2048 83 Linux -__ts_dev__8 32768 36863 2048 83 Linux +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 8191 3072 83 Linux +<removed>2 8192 12287 2048 83 Linux +<removed>3 12288 40959 14336 5 Extended +<removed>5 14336 18431 2048 83 Linux +<removed>6 20480 24575 2048 83 Linux +<removed>7 26624 30719 2048 83 Linux +<removed>8 32768 36863 2048 83 Linux + ------------------- Delete logical partitions de85b8d74f52f307b9467ea4c33438cb mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 - - Device Boot Start End Blocks Id System -__ts_dev__1 2048 8191 3072 83 Linux -__ts_dev__2 8192 12287 2048 83 Linux -__ts_dev__3 12288 40959 14336 5 Extended -__ts_dev__5 26624 30719 2048 83 Linux +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 8191 3072 83 Linux +<removed>2 8192 12287 2048 83 Linux +<removed>3 12288 40959 14336 5 Extended +<removed>5 26624 30719 2048 83 Linux + ------------------- Create another logical partition 28d0cbe795535ee025dc7a4781516965 mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 8191 3072 83 Linux +<removed>2 8192 12287 2048 83 Linux +<removed>3 12288 40959 14336 5 Extended +<removed>5 26624 30719 2048 83 Linux +<removed>6 14336 18431 2048 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__1 2048 8191 3072 83 Linux -__ts_dev__2 8192 12287 2048 83 Linux -__ts_dev__3 12288 40959 14336 5 Extended -__ts_dev__5 26624 30719 2048 83 Linux -__ts_dev__6 14336 18431 2048 83 Linux +Partition table entries are not in disk order. -Partition table entries are not in disk order ------------------- Delete primary partition 6f1b62718cf8d83602d51de8944cee51 mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> - Device Boot Start End Blocks Id System -__ts_dev__2 8192 12287 2048 83 Linux -__ts_dev__3 12288 40959 14336 5 Extended -__ts_dev__5 26624 30719 2048 83 Linux -__ts_dev__6 14336 18431 2048 83 Linux +Device Boot Start End Blocks Id System +<removed>2 8192 12287 2048 83 Linux +<removed>3 12288 40959 14336 5 Extended +<removed>5 26624 30719 2048 83 Linux +<removed>6 14336 18431 2048 83 Linux + +Partition table entries are not in disk order. -Partition table entries are not in disk order ------------------- Delete primary partition 7b29a3cda33e990e8a7877b81988b933 mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>3 12288 40959 14336 5 Extended +<removed>5 26624 30719 2048 83 Linux +<removed>6 14336 18431 2048 83 Linux - Device Boot Start End Blocks Id System -__ts_dev__3 12288 40959 14336 5 Extended -__ts_dev__5 26624 30719 2048 83 Linux -__ts_dev__6 14336 18431 2048 83 Linux +Partition table entries are not in disk order. -Partition table entries are not in disk order ------------------- Delete extended partition e1ef48d3d42f4ebcfd5bf4baf5e370e9 mbr-nondos-mode.img ---layout---------- -__ts_dev__: 20 MB, 20971520 bytes, 40960 sectors -Units = sectors of 1 * 512 = 512 bytes +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk label type: dos -Disk identifier: 0x00000001 +Disklabel type: dos +Disk identifier: <removed> + - Device Boot Start End Blocks Id System ------------------- diff --git a/tests/expected/fdisk/mbr-sort b/tests/expected/fdisk/mbr-sort new file mode 100644 index 000000000..26eaea336 --- /dev/null +++ b/tests/expected/fdisk/mbr-sort @@ -0,0 +1,77 @@ +Initialize empty image +Create new DOS partition table + +---layout---------- +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes + +------------------- + +Create primary partitions + +---layout---------- +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 4096 6143 1024 83 Linux +<removed>2 2048 4095 1024 83 Linux +<removed>3 6144 8191 1024 83 Linux +<removed>4 8192 40959 16384 5 Extended + +Partition table entries are not in disk order. + +------------------- + +Create logical partitions + +---layout---------- +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 4096 6143 1024 83 Linux +<removed>2 2048 4095 1024 83 Linux +<removed>3 6144 8191 1024 83 Linux +<removed>4 8192 40959 16384 5 Extended +<removed>5 14336 16383 1024 83 Linux +<removed>6 22528 24575 1024 83 Linux +<removed>7 18432 20479 1024 83 Linux +<removed>8 10240 12287 1024 83 Linux + +Partition table entries are not in disk order. + +------------------- + +Fix order. + +---layout---------- +Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: <removed> + +Device Boot Start End Blocks Id System +<removed>1 2048 4095 1024 83 Linux +<removed>2 4096 6143 1024 83 Linux +<removed>3 6144 8191 1024 83 Linux +<removed>4 8192 40959 16384 5 Extended +<removed>5 10240 12287 1024 83 Linux +<removed>6 14336 16383 1024 83 Linux +<removed>7 18432 20479 1024 83 Linux +<removed>8 22528 24575 1024 83 Linux + +------------------- + diff --git a/tests/expected/fdisk/oddinput b/tests/expected/fdisk/oddinput index 19bf365fd..a1dbdb6e0 100644 --- a/tests/expected/fdisk/oddinput +++ b/tests/expected/fdisk/oddinput @@ -2,8 +2,9 @@ Initialize empty image f1c9645dbc14efddc7d8a322685f26eb oddinput.img Empty image listing -Disk testimage: 10 MB, 10485760 bytes, 20480 sectors -Units = cylinders of 16065 * 512 = 8225280 bytes +Disk testimage: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes diff --git a/tests/expected/fdisk/sunlabel b/tests/expected/fdisk/sunlabel index 03ad0c77d..f83361367 100644 --- a/tests/expected/fdisk/sunlabel +++ b/tests/expected/fdisk/sunlabel @@ -1,16 +1,93 @@ Initialize empty image f1c9645dbc14efddc7d8a322685f26eb sunlabel.img Create new SUN partition table -0a32b3a8da607252eda8cdb240cce9fe 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 +Disklabel type: sun + + Create first partition -10da37badd1a702ff7e3d3f7a84cd879 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 +Disklabel type: sun + +Device Flag Start End Blocks Id System +<removed>1 0 128 4032 83 Linux native + Set partition sysid -414df1b428e2f7ec1b3d0fbdf9a28264 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 +Disklabel type: sun + +Device Flag Start End Blocks Id System +<removed>1 0 128 4032 4 SunOS usr + Set first partition readonly -2bc64800c541254e87643262bd9ccc85 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 +Disklabel type: sun + +Device Flag Start End Blocks Id System +<removed>1 r 0 128 4032 4 SunOS usr + Set first partition mountable -2f5087a60c3aee42c3bc7c681e2f8e0d 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 +Disklabel type: sun + +Device Flag Start End Blocks Id System +<removed>1 ur 0 128 4032 4 SunOS usr + Create second partition -5d1557c0d29167f4186d73abd0dcb2f3 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 +Disklabel 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 -f7e309657add78ea53696e2746df9f29 sunlabel.img +502ba7a0cfdce2849c3a99881f0590c3 sunlabel.img diff --git a/tests/expected/last/ipv6 b/tests/expected/last/ipv6 new file mode 100644 index 000000000..0fa234c1f --- /dev/null +++ b/tests/expected/last/ipv6 @@ -0,0 +1,20 @@ +~~~ dns short ~~~ +IPv6 root a.root-servers.n Wed Aug 28 20:30 - 20:40 (00:10) + +ipv6-input begins Wed Aug 28 20:30:40 2013 +~~~ dns long ~~~ +IPv6 root a.root-servers.net Wed Aug 28 20:30 - 20:40 (00:10) + +ipv6-input begins Wed Aug 28 20:30:40 2013 +~~~ dns host last ~~~ +IPv6 root Wed Aug 28 20:30 - 20:40 (00:10) a.root-servers.net + +ipv6-input begins Wed Aug 28 20:30:40 2013 +~~~ show ip ~~~ +IPv6 root 2001:503:ba3e::2 Wed Aug 28 20:30 - 20:40 (00:10) + +ipv6-input begins Wed Aug 28 20:30:40 2013 +~~~ show ip last ~~~ +IPv6 root Wed Aug 28 20:30 - 20:40 (00:10) 2001:503:ba3e::2:30 + +ipv6-input begins Wed Aug 28 20:30:40 2013 diff --git a/tests/expected/last/last b/tests/expected/last/last new file mode 100644 index 000000000..2ff5cc19b --- /dev/null +++ b/tests/expected/last/last @@ -0,0 +1,121 @@ +~~~ basic output ~~~ +rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14) +torvalds linux hobby Mon Aug 26 00:57 still logged in +reboot system boot system-name Wed Aug 28 18:00 still running +reboot system boot system-name Wed Aug 28 16:00 - 17:00 (01:00) +IPv4 root dns-server Wed Aug 28 13:00 - 14:00 (01:00) +nonvalid foo zero Wed Aug 28 12:00 - down (03:00) +runlevel foo one Wed Aug 28 11:00 - 12:00 (01:00) +sysboot foo two Wed Aug 28 10:00 - 11:00 (01:00) +newtime foo three Wed Aug 28 09:00 - 10:00 (01:00) +oldtime foo four Wed Aug 28 08:00 - 09:00 (01:00) +init foo five Wed Aug 28 07:00 - 08:00 (01:00) +login foo six Wed Aug 28 06:00 - 07:00 (01:00) +user_pro foo seven Wed Aug 28 05:00 - 06:00 (01:00) +accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ include system ~~~ +rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14) +torvalds linux hobby Mon Aug 26 00:57 still logged in +reboot system boot system-name Wed Aug 28 18:00 still running +shutdown system down system-name Wed Aug 28 17:00 - 18:00 (01:00) +reboot system boot system-name Wed Aug 28 16:00 - 17:00 (01:00) +shutdown system down system-name Wed Aug 28 15:00 - 16:00 (01:00) +IPv4 root dns-server Wed Aug 28 13:00 - 14:00 (01:00) +nonvalid foo zero Wed Aug 28 12:00 - down (03:00) +runlevel foo one Wed Aug 28 11:00 - 12:00 (01:00) +sysboot foo two Wed Aug 28 10:00 - 11:00 (01:00) +newtime foo three Wed Aug 28 09:00 - 10:00 (01:00) +oldtime foo four Wed Aug 28 08:00 - 09:00 (01:00) +init foo five Wed Aug 28 07:00 - 08:00 (01:00) +login foo six Wed Aug 28 06:00 - 07:00 (01:00) +user_pro foo seven Wed Aug 28 05:00 - 06:00 (01:00) +accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ dns short ~~~ +IPv4 root a.root-servers.n Wed Aug 28 13:00 - 14:00 (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ dns long ~~~ +IPv4 root a.root-servers.net Wed Aug 28 13:00 - 14:00 (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ dns host last ~~~ +IPv4 root Wed Aug 28 13:00 - 14:00 (01:00) a.root-servers.net + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ show ip ~~~ +torvalds linux 128.214.205.14 Mon Aug 26 00:57 still logged in + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ no host ~~~ +torvalds linux Mon Aug 26 00:57 still logged in + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ full times ~~~ +rick long never-gonna-logo Thu Jan 1 00:00:00 1970 - Tue Jan 19 03:14:07 2038 (24855+03:14) +torvalds linux hobby Mon Aug 26 00:57:08 1991 still logged in +reboot system boot system-name Wed Aug 28 18:00:00 2013 still running +reboot system boot system-name Wed Aug 28 16:00:00 2013 - Wed Aug 28 17:00:00 2013 (01:00) +IPv4 root dns-server Wed Aug 28 13:00:00 2013 - Wed Aug 28 14:00:00 2013 (01:00) +nonvalid foo zero Wed Aug 28 12:00:00 2013 - down (03:00) +runlevel foo one Wed Aug 28 11:00:00 2013 - Wed Aug 28 12:00:00 2013 (01:00) +sysboot foo two Wed Aug 28 10:00:00 2013 - Wed Aug 28 11:00:00 2013 (01:00) +newtime foo three Wed Aug 28 09:00:00 2013 - Wed Aug 28 10:00:00 2013 (01:00) +oldtime foo four Wed Aug 28 08:00:00 2013 - Wed Aug 28 09:00:00 2013 (01:00) +init foo five Wed Aug 28 07:00:00 2013 - Wed Aug 28 08:00:00 2013 (01:00) +login foo six Wed Aug 28 06:00:00 2013 - Wed Aug 28 07:00:00 2013 (01:00) +user_pro foo seven Wed Aug 28 05:00:00 2013 - Wed Aug 28 06:00:00 2013 (01:00) +accounti foo nine Wed Aug 28 03:00:00 2013 - Wed Aug 28 04:00:00 2013 (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ no time ~~~ +rick long never-gonna-logo (24855+03:14) +torvalds linux hobby logged in +reboot system boot system-name running +reboot system boot system-name (01:00) +IPv4 root dns-server (01:00) +nonvalid foo zero (03:00) +runlevel foo one (01:00) +sysboot foo two (01:00) +newtime foo three (01:00) +oldtime foo four (01:00) +init foo five (01:00) +login foo six (01:00) +user_pro foo seven (01:00) +accounti foo nine (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ iso-8601 time ~~~ +rick long never-gonna-logout 1970-01-01T00:00:00+0000 - 2038-01-19T03:14:07+0000 (24855+03:14) +torvalds linux hobby 1991-08-26T00:57:08+0000 still logged in +reboot system boot system-name 2013-08-28T18:00:00+0000 still running +reboot system boot system-name 2013-08-28T16:00:00+0000 - 2013-08-28T17:00:00+0000 (01:00) +IPv4 root dns-server 2013-08-28T13:00:00+0000 - 2013-08-28T14:00:00+0000 (01:00) +nonvalid foo zero 2013-08-28T12:00:00+0000 - down (03:00) +runlevel foo one 2013-08-28T11:00:00+0000 - 2013-08-28T12:00:00+0000 (01:00) +sysboot foo two 2013-08-28T10:00:00+0000 - 2013-08-28T11:00:00+0000 (01:00) +newtime foo three 2013-08-28T09:00:00+0000 - 2013-08-28T10:00:00+0000 (01:00) +oldtime foo four 2013-08-28T08:00:00+0000 - 2013-08-28T09:00:00+0000 (01:00) +init foo five 2013-08-28T07:00:00+0000 - 2013-08-28T08:00:00+0000 (01:00) +login foo six 2013-08-28T06:00:00+0000 - 2013-08-28T07:00:00+0000 (01:00) +user_process foo seven 2013-08-28T05:00:00+0000 - 2013-08-28T06:00:00+0000 (01:00) +accounting foo nine 2013-08-28T03:00:00+0000 - 2013-08-28T04:00:00+0000 (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ since and until ~~~ +oldtime foo four Wed Aug 28 08:00 gone - no logout +init foo five Wed Aug 28 07:00 - 08:00 (01:00) +login foo six Wed Aug 28 06:00 - 07:00 (01:00) +user_pro foo seven Wed Aug 28 05:00 - 06:00 (01:00) +accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ present ~~~ +rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14) +torvalds linux hobby Mon Aug 26 00:57 still logged in +runlevel foo one Wed Aug 28 11:00 - 12:00 (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 diff --git a/tests/expected/libmount/context-py b/tests/expected/libmount/context-py new file mode 100644 index 000000000..5e268a319 --- /dev/null +++ b/tests/expected/libmount/context-py @@ -0,0 +1,5 @@ +Init device +Create partitions +Create filesystem +Do tests... +...done. diff --git a/tests/expected/libmount/context-py-mount-by-devname b/tests/expected/libmount/context-py-mount-by-devname new file mode 100644 index 000000000..7504a7e83 --- /dev/null +++ b/tests/expected/libmount/context-py-mount-by-devname @@ -0,0 +1 @@ +successfully mounted diff --git a/tests/expected/libmount/context-py-mount-by-label b/tests/expected/libmount/context-py-mount-by-label new file mode 100644 index 000000000..7504a7e83 --- /dev/null +++ b/tests/expected/libmount/context-py-mount-by-label @@ -0,0 +1 @@ +successfully mounted diff --git a/tests/expected/libmount/context-py-mount-by-uuid b/tests/expected/libmount/context-py-mount-by-uuid new file mode 100644 index 000000000..2f44fc47a --- /dev/null +++ b/tests/expected/libmount/context-py-mount-by-uuid @@ -0,0 +1,2 @@ +successfully mounted +successfully umounted diff --git a/tests/expected/libmount/context-py-mount-flags b/tests/expected/libmount/context-py-mount-flags new file mode 100644 index 000000000..960641863 --- /dev/null +++ b/tests/expected/libmount/context-py-mount-flags @@ -0,0 +1,5 @@ +successfully mounted +ro,nosuid,noexec +successfully mounted +rw,nosuid,noexec +successfully umounted diff --git a/tests/expected/libmount/context-py-mount-loopdev b/tests/expected/libmount/context-py-mount-loopdev new file mode 100644 index 000000000..2f44fc47a --- /dev/null +++ b/tests/expected/libmount/context-py-mount-loopdev @@ -0,0 +1,2 @@ +successfully mounted +successfully umounted diff --git a/tests/expected/libmount/context-py-umount-by-devname b/tests/expected/libmount/context-py-umount-by-devname new file mode 100644 index 000000000..319236f1d --- /dev/null +++ b/tests/expected/libmount/context-py-umount-by-devname @@ -0,0 +1 @@ +successfully umounted diff --git a/tests/expected/libmount/context-py-umount-by-mountpoint b/tests/expected/libmount/context-py-umount-by-mountpoint new file mode 100644 index 000000000..319236f1d --- /dev/null +++ b/tests/expected/libmount/context-py-umount-by-mountpoint @@ -0,0 +1 @@ +successfully umounted diff --git a/tests/expected/libmount/context-py-x-mount.mkdir b/tests/expected/libmount/context-py-x-mount.mkdir new file mode 100644 index 000000000..7504a7e83 --- /dev/null +++ b/tests/expected/libmount/context-py-x-mount.mkdir @@ -0,0 +1 @@ +successfully mounted diff --git a/tests/expected/libmount/context-utab-py b/tests/expected/libmount/context-utab-py new file mode 100644 index 000000000..cde2e3fbb --- /dev/null +++ b/tests/expected/libmount/context-utab-py @@ -0,0 +1,9 @@ +Init device +Create partitions +Create filesystem +Do tests... +Create filesystem [btrfs] +All mount options (btrfs subvolume + utab) --- +rw,relatime,ssd,uhelper=foo +--- +...done. diff --git a/tests/expected/libmount/context-utab-py-mount-by-devname b/tests/expected/libmount/context-utab-py-mount-by-devname new file mode 100644 index 000000000..7504a7e83 --- /dev/null +++ b/tests/expected/libmount/context-utab-py-mount-by-devname @@ -0,0 +1 @@ +successfully mounted diff --git a/tests/expected/libmount/context-utab-py-mount-uhelper b/tests/expected/libmount/context-utab-py-mount-uhelper new file mode 100644 index 000000000..7504a7e83 --- /dev/null +++ b/tests/expected/libmount/context-utab-py-mount-uhelper @@ -0,0 +1 @@ +successfully mounted diff --git a/tests/expected/libmount/context-utab-py-mount-uhelper-subvol b/tests/expected/libmount/context-utab-py-mount-uhelper-subvol new file mode 100644 index 000000000..7504a7e83 --- /dev/null +++ b/tests/expected/libmount/context-utab-py-mount-uhelper-subvol @@ -0,0 +1 @@ +successfully mounted diff --git a/tests/expected/libmount/context-utab-py-umount b/tests/expected/libmount/context-utab-py-umount new file mode 100644 index 000000000..319236f1d --- /dev/null +++ b/tests/expected/libmount/context-utab-py-umount @@ -0,0 +1 @@ +successfully umounted diff --git a/tests/expected/libmount/context-utab-py-umount-by-devname b/tests/expected/libmount/context-utab-py-umount-by-devname new file mode 100644 index 000000000..319236f1d --- /dev/null +++ b/tests/expected/libmount/context-utab-py-umount-by-devname @@ -0,0 +1 @@ +successfully umounted diff --git a/tests/expected/libmount/context-utab-py-umount-subvol b/tests/expected/libmount/context-utab-py-umount-subvol new file mode 100644 index 000000000..319236f1d --- /dev/null +++ b/tests/expected/libmount/context-utab-py-umount-subvol @@ -0,0 +1 @@ +successfully umounted diff --git a/tests/expected/libmount/tabdiff-mount b/tests/expected/libmount/tabdiff-mount index e42c58b3d..dc1c4bd10 100644 --- a/tests/expected/libmount/tabdiff-mount +++ b/tests/expected/libmount/tabdiff-mount @@ -1 +1,2 @@ /dev/mapper/kzak-home on /home/kzak: MOUNTED +/fooooo on /mnt/foo: MOUNTED diff --git a/tests/expected/libmount/tabdiff-move b/tests/expected/libmount/tabdiff-move index 4bed70486..3618498bc 100644 --- a/tests/expected/libmount/tabdiff-move +++ b/tests/expected/libmount/tabdiff-move @@ -1 +1,2 @@ //foo.home/bar/ on /mnt/music: MOVED to /mnt/music +/fooooo on /mnt/foo: UMOUNTED diff --git a/tests/expected/libmount/tabdiff-remount b/tests/expected/libmount/tabdiff-remount index c23ee959f..c175fdb76 100644 --- a/tests/expected/libmount/tabdiff-remount +++ b/tests/expected/libmount/tabdiff-remount @@ -1,2 +1,3 @@ /dev/mapper/kzak-home on /home/kzak: REMOUNTED from 'rw,noatime,barrier=1,data=ordered' to 'ro,noatime,barrier=1,data=ordered' //foo.home/bar/ on /mnt/sounds: REMOUNTED from 'rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344' to 'ro,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344' +/fooooo on /mnt/foo: UMOUNTED diff --git a/tests/expected/libmount/tabdiff-umount b/tests/expected/libmount/tabdiff-umount index 753f48443..7e39af21d 100644 --- a/tests/expected/libmount/tabdiff-umount +++ b/tests/expected/libmount/tabdiff-umount @@ -1 +1,2 @@ /dev/mapper/kzak-home on /home/kzak: UMOUNTED +/fooooo on /mnt/foo: UMOUNTED diff --git a/tests/expected/libmount/tabfiles-parse-fstab-full b/tests/expected/libmount/tabfiles-parse-fstab-full new file mode 100644 index 000000000..f1caff6d9 --- /dev/null +++ b/tests/expected/libmount/tabfiles-parse-fstab-full @@ -0,0 +1,83 @@ +Initial comment: +"# + # this is a leading comment +# + +" +------ fs: +source: UUID=d3a8f783-df75-4dc8-9163-975a891052c0 +target: / +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 1 +comment: '# this comments belongs to the first fs +' +------ fs: +source: UUID=fef7ccb3-821c-4de8-88dc-71472be5946f +target: /boot +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 2 +------ fs: +source: UUID=1f2aa318-9c34-462e-8d29-260819ffd657 +target: swap +fstype: swap +optstr: defaults +comment: ' +# 3rd fs comment + newline padding + +' +------ fs: +source: tmpfs +target: /dev/shm +fstype: tmpfs +optstr: defaults +------ fs: +source: devpts +target: /dev/pts +fstype: devpts +optstr: gid=5,mode=620 +FS-opstr: gid=5,mode=620 +------ fs: +source: sysfs +target: /sys +fstype: sysfs +optstr: defaults +------ fs: +source: proc +target: /proc +fstype: proc +optstr: defaults +------ fs: +source: /dev/mapper/foo +target: /home/foo +fstype: ext4 +optstr: noatime,defaults +VFS-optstr: noatime +comment: '# this is comment +' +------ fs: +source: foo.com:/mnt/share +target: /mnt/remote +fstype: nfs +optstr: noauto +user-optstr: noauto +------ fs: +source: //bar.com/gogogo +target: /mnt/gogogo +fstype: cifs +optstr: user=SRGROUP/baby,noauto +user-optstr: user=SRGROUP/baby,noauto +------ fs: +source: /dev/foo +target: /any/foo/ +fstype: auto +optstr: defaults +Trailing comment: +" +#this is a trailing comment +" diff --git a/tests/expected/libmount/tabfiles-parse-mountinfo b/tests/expected/libmount/tabfiles-parse-mountinfo index 44708011d..c8390ac4e 100644 --- a/tests/expected/libmount/tabfiles-parse-mountinfo +++ b/tests/expected/libmount/tabfiles-parse-mountinfo @@ -350,3 +350,14 @@ root: / id: 47 parent: 20 devno: 0:38 +------ fs: +source: /fooooo +target: /mnt/foo +fstype: bar +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 48 +parent: 20 +devno: 0:39 diff --git a/tests/expected/libmount/tabfiles-py-copy b/tests/expected/libmount/tabfiles-py-copy new file mode 100644 index 000000000..0054586bf --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-copy @@ -0,0 +1,18 @@ +ORIGINAL: +------ fs: +source: UUID=d3a8f783-df75-4dc8-9163-975a891052c0 +target: / +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 1 +COPY: +------ fs: +source: UUID=d3a8f783-df75-4dc8-9163-975a891052c0 +target: / +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 1 diff --git a/tests/expected/libmount/tabfiles-py-find-pair b/tests/expected/libmount/tabfiles-py-find-pair new file mode 100644 index 000000000..fbd730a60 --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-find-pair @@ -0,0 +1,6 @@ +------ fs: +source: /dev/mapper/kzak-home +target: /home/kzak +fstype: ext4 +optstr: rw,noatime +VFS-optstr: rw,noatime diff --git a/tests/expected/libmount/tabfiles-py-find-source b/tests/expected/libmount/tabfiles-py-find-source new file mode 100644 index 000000000..474652cbd --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-find-source @@ -0,0 +1,8 @@ +------ fs: +source: UUID=fef7ccb3-821c-4de8-88dc-71472be5946f +target: /boot +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 2 diff --git a/tests/expected/libmount/tabfiles-py-find-target b/tests/expected/libmount/tabfiles-py-find-target new file mode 100644 index 000000000..1a51bd5b0 --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-find-target @@ -0,0 +1,6 @@ +------ fs: +source: /dev/mapper/foo +target: /home/foo +fstype: ext4 +optstr: noatime,defaults +VFS-optstr: noatime diff --git a/tests/expected/libmount/tabfiles-py-find-target2 b/tests/expected/libmount/tabfiles-py-find-target2 new file mode 100644 index 000000000..8a6c57b5e --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-find-target2 @@ -0,0 +1,5 @@ +------ fs: +source: /dev/foo +target: /any/foo/ +fstype: auto +optstr: defaults diff --git a/tests/expected/libmount/tabfiles-py-find-target3 b/tests/expected/libmount/tabfiles-py-find-target3 new file mode 100644 index 000000000..8a6c57b5e --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-find-target3 @@ -0,0 +1,5 @@ +------ fs: +source: /dev/foo +target: /any/foo/ +fstype: auto +optstr: defaults diff --git a/tests/expected/libmount/tabfiles-py-parse-fstab b/tests/expected/libmount/tabfiles-py-parse-fstab new file mode 100644 index 000000000..d66152676 --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-parse-fstab @@ -0,0 +1,65 @@ +------ fs: +source: UUID=d3a8f783-df75-4dc8-9163-975a891052c0 +target: / +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 1 +------ fs: +source: UUID=fef7ccb3-821c-4de8-88dc-71472be5946f +target: /boot +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 2 +------ fs: +source: UUID=1f2aa318-9c34-462e-8d29-260819ffd657 +target: swap +fstype: swap +optstr: defaults +------ fs: +source: tmpfs +target: /dev/shm +fstype: tmpfs +optstr: defaults +------ fs: +source: devpts +target: /dev/pts +fstype: devpts +optstr: gid=5,mode=620 +FS-opstr: gid=5,mode=620 +------ fs: +source: sysfs +target: /sys +fstype: sysfs +optstr: defaults +------ fs: +source: proc +target: /proc +fstype: proc +optstr: defaults +------ fs: +source: /dev/mapper/foo +target: /home/foo +fstype: ext4 +optstr: noatime,defaults +VFS-optstr: noatime +------ fs: +source: foo.com:/mnt/share +target: /mnt/remote +fstype: nfs +optstr: noauto +user-optstr: noauto +------ fs: +source: //bar.com/gogogo +target: /mnt/gogogo +fstype: cifs +optstr: user=SRGROUP/baby,noauto +user-optstr: user=SRGROUP/baby,noauto +------ fs: +source: /dev/foo +target: /any/foo/ +fstype: auto +optstr: defaults diff --git a/tests/expected/libmount/tabfiles-py-parse-fstab-broken b/tests/expected/libmount/tabfiles-py-parse-fstab-broken new file mode 100644 index 000000000..b838fbcc7 --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-parse-fstab-broken @@ -0,0 +1,63 @@ + + +------ fs: +source: UUID=d3a8f783-df75-4dc8-9163-975a891052c0 +target: / +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 1 +------ fs: +source: UUID=fef7ccb3-821c-4de8-88dc-71472be5946f +target: /boot +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 2 +------ fs: +source: UUID=1f2aa318-9c34-462e-8d29-260819ffd657 +target: swap +fstype: swap +optstr: defaults +------ fs: +source: tmpfs +target: /dev/shm +fstype: tmpfs +optstr: defaults +------ fs: +source: devpts +target: /dev/pts +fstype: devpts +optstr: gid=5,mode=620 +FS-opstr: gid=5,mode=620 +------ fs: +source: sysfs +target: /sys +fstype: sysfs +optstr: defaults +------ fs: +source: proc +target: /proc +fstype: proc +optstr: defaults +------ fs: +source: /dev/mapper/foo +target: /home/foo +fstype: ext4 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +------ fs: +source: foo.com:/mnt/share +target: /mnt/remote +fstype: nfs +optstr: noauto +user-optstr: noauto +------ fs: +source: //bar.com/gogogo +target: /mnt/gogogo +fstype: cifs +optstr: user=SRGROUP/baby,noauto +user-optstr: user=SRGROUP/baby,noauto diff --git a/tests/expected/libmount/tabfiles-py-parse-fstab-full b/tests/expected/libmount/tabfiles-py-parse-fstab-full new file mode 100644 index 000000000..f1caff6d9 --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-parse-fstab-full @@ -0,0 +1,83 @@ +Initial comment: +"# + # this is a leading comment +# + +" +------ fs: +source: UUID=d3a8f783-df75-4dc8-9163-975a891052c0 +target: / +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 1 +comment: '# this comments belongs to the first fs +' +------ fs: +source: UUID=fef7ccb3-821c-4de8-88dc-71472be5946f +target: /boot +fstype: ext3 +optstr: noatime,defaults +VFS-optstr: noatime +freq: 1 +pass: 2 +------ fs: +source: UUID=1f2aa318-9c34-462e-8d29-260819ffd657 +target: swap +fstype: swap +optstr: defaults +comment: ' +# 3rd fs comment + newline padding + +' +------ fs: +source: tmpfs +target: /dev/shm +fstype: tmpfs +optstr: defaults +------ fs: +source: devpts +target: /dev/pts +fstype: devpts +optstr: gid=5,mode=620 +FS-opstr: gid=5,mode=620 +------ fs: +source: sysfs +target: /sys +fstype: sysfs +optstr: defaults +------ fs: +source: proc +target: /proc +fstype: proc +optstr: defaults +------ fs: +source: /dev/mapper/foo +target: /home/foo +fstype: ext4 +optstr: noatime,defaults +VFS-optstr: noatime +comment: '# this is comment +' +------ fs: +source: foo.com:/mnt/share +target: /mnt/remote +fstype: nfs +optstr: noauto +user-optstr: noauto +------ fs: +source: //bar.com/gogogo +target: /mnt/gogogo +fstype: cifs +optstr: user=SRGROUP/baby,noauto +user-optstr: user=SRGROUP/baby,noauto +------ fs: +source: /dev/foo +target: /any/foo/ +fstype: auto +optstr: defaults +Trailing comment: +" +#this is a trailing comment +" diff --git a/tests/expected/libmount/tabfiles-py-parse-mountinfo b/tests/expected/libmount/tabfiles-py-parse-mountinfo new file mode 100644 index 000000000..c8390ac4e --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-parse-mountinfo @@ -0,0 +1,363 @@ +------ fs: +source: /proc +target: /proc +fstype: proc +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 15 +parent: 20 +devno: 0:3 +------ fs: +source: /sys +target: /sys +fstype: sysfs +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 16 +parent: 20 +devno: 0:15 +------ fs: +source: udev +target: /dev +fstype: devtmpfs +optstr: rw,relatime,size=1983516k,nr_inodes=495879,mode=755 +VFS-optstr: rw,relatime +FS-opstr: rw,size=1983516k,nr_inodes=495879,mode=755 +root: / +id: 17 +parent: 20 +devno: 0:5 +------ fs: +source: devpts +target: /dev/pts +fstype: devpts +optstr: rw,relatime,gid=5,mode=620,ptmxmode=000 +VFS-optstr: rw,relatime +FS-opstr: rw,gid=5,mode=620,ptmxmode=000 +root: / +id: 18 +parent: 17 +devno: 0:10 +------ fs: +source: tmpfs +target: /dev/shm +fstype: tmpfs +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 19 +parent: 17 +devno: 0:16 +------ fs: +source: /dev/sda4 +target: / +fstype: ext3 +optstr: rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered +VFS-optstr: rw,noatime +FS-opstr: rw,errors=continue,user_xattr,acl,barrier=0,data=ordered +root: / +id: 20 +parent: 1 +devno: 8:4 +------ fs: +source: tmpfs +target: /sys/fs/cgroup +fstype: tmpfs +optstr: rw,nosuid,nodev,noexec,relatime,mode=755 +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,mode=755 +root: / +id: 21 +parent: 16 +devno: 0:17 +------ fs: +source: cgroup +target: /sys/fs/cgroup/systemd +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd +root: / +id: 22 +parent: 21 +devno: 0:18 +------ fs: +source: cgroup +target: /sys/fs/cgroup/cpuset +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,cpuset +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,cpuset +root: / +id: 23 +parent: 21 +devno: 0:19 +------ fs: +source: cgroup +target: /sys/fs/cgroup/ns +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,ns +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,ns +root: / +id: 24 +parent: 21 +devno: 0:20 +------ fs: +source: cgroup +target: /sys/fs/cgroup/cpu +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,cpu +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,cpu +root: / +id: 25 +parent: 21 +devno: 0:21 +------ fs: +source: cgroup +target: /sys/fs/cgroup/cpuacct +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,cpuacct +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,cpuacct +root: / +id: 26 +parent: 21 +devno: 0:22 +------ fs: +source: cgroup +target: /sys/fs/cgroup/memory +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,memory +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,memory +root: / +id: 27 +parent: 21 +devno: 0:23 +------ fs: +source: cgroup +target: /sys/fs/cgroup/devices +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,devices +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,devices +root: / +id: 28 +parent: 21 +devno: 0:24 +------ fs: +source: cgroup +target: /sys/fs/cgroup/freezer +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,freezer +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,freezer +root: / +id: 29 +parent: 21 +devno: 0:25 +------ fs: +source: cgroup +target: /sys/fs/cgroup/net_cls +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,net_cls +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,net_cls +root: / +id: 30 +parent: 21 +devno: 0:26 +------ fs: +source: cgroup +target: /sys/fs/cgroup/blkio +fstype: cgroup +optstr: rw,nosuid,nodev,noexec,relatime,blkio +VFS-optstr: rw,nosuid,nodev,noexec,relatime +FS-opstr: rw,blkio +root: / +id: 31 +parent: 21 +devno: 0:27 +------ fs: +source: systemd-1 +target: /sys/kernel/security +fstype: autofs +optstr: rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +VFS-optstr: rw,relatime +FS-opstr: rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +root: / +id: 32 +parent: 16 +devno: 0:28 +------ fs: +source: systemd-1 +target: /dev/hugepages +fstype: autofs +optstr: rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +VFS-optstr: rw,relatime +FS-opstr: rw,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +root: / +id: 33 +parent: 17 +devno: 0:29 +------ fs: +source: systemd-1 +target: /sys/kernel/debug +fstype: autofs +optstr: rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +VFS-optstr: rw,relatime +FS-opstr: rw,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +root: / +id: 34 +parent: 16 +devno: 0:30 +------ fs: +source: systemd-1 +target: /proc/sys/fs/binfmt_misc +fstype: autofs +optstr: rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +VFS-optstr: rw,relatime +FS-opstr: rw,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +root: / +id: 35 +parent: 15 +devno: 0:31 +------ fs: +source: systemd-1 +target: /dev/mqueue +fstype: autofs +optstr: rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +VFS-optstr: rw,relatime +FS-opstr: rw,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct +root: / +id: 36 +parent: 17 +devno: 0:32 +------ fs: +source: /proc/bus/usb +target: /proc/bus/usb +fstype: usbfs +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 37 +parent: 15 +devno: 0:14 +------ fs: +source: hugetlbfs +target: /dev/hugepages +fstype: hugetlbfs +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 38 +parent: 33 +devno: 0:33 +------ fs: +source: mqueue +target: /dev/mqueue +fstype: mqueue +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 39 +parent: 36 +devno: 0:12 +------ fs: +source: /dev/sda6 +target: /boot +fstype: ext3 +optstr: rw,noatime,errors=continue,barrier=0,data=ordered +VFS-optstr: rw,noatime +FS-opstr: rw,errors=continue,barrier=0,data=ordered +root: / +id: 40 +parent: 20 +devno: 8:6 +------ fs: +source: /dev/mapper/kzak-home +target: /home/kzak +fstype: ext4 +optstr: rw,noatime,barrier=1,data=ordered +VFS-optstr: rw,noatime +FS-opstr: rw,barrier=1,data=ordered +root: / +id: 41 +parent: 20 +devno: 253:0 +------ fs: +source: none +target: /proc/sys/fs/binfmt_misc +fstype: binfmt_misc +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 42 +parent: 35 +devno: 0:34 +------ fs: +source: fusectl +target: /sys/fs/fuse/connections +fstype: fusectl +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 43 +parent: 16 +devno: 0:35 +------ fs: +source: gvfs-fuse-daemon +target: /home/kzak/.gvfs +fstype: fuse.gvfs-fuse-daemon +optstr: rw,nosuid,nodev,relatime,user_id=500,group_id=500 +VFS-optstr: rw,nosuid,nodev,relatime +FS-opstr: rw,user_id=500,group_id=500 +root: / +id: 44 +parent: 41 +devno: 0:36 +------ fs: +source: sunrpc +target: /var/lib/nfs/rpc_pipefs +fstype: rpc_pipefs +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 45 +parent: 20 +devno: 0:37 +------ fs: +source: //foo.home/bar/ +target: /mnt/sounds +fstype: cifs +optstr: rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344 +VFS-optstr: rw,relatime +FS-opstr: rw,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344 +root: / +id: 47 +parent: 20 +devno: 0:38 +------ fs: +source: /fooooo +target: /mnt/foo +fstype: bar +optstr: rw,relatime +VFS-optstr: rw,relatime +FS-opstr: rw +root: / +id: 48 +parent: 20 +devno: 0:39 diff --git a/tests/expected/libmount/tabfiles-py-parse-mtab b/tests/expected/libmount/tabfiles-py-parse-mtab new file mode 100644 index 000000000..ffd0c139d --- /dev/null +++ b/tests/expected/libmount/tabfiles-py-parse-mtab @@ -0,0 +1,68 @@ +------ fs: +source: /dev/sda4 +target: / +fstype: ext3 +optstr: rw,noatime +VFS-optstr: rw,noatime +------ fs: +source: proc +target: /proc +fstype: proc +optstr: rw +VFS-optstr: rw +------ fs: +source: sysfs +target: /sys +fstype: sysfs +optstr: rw +VFS-optstr: rw +------ fs: +source: devpts +target: /dev/pts +fstype: devpts +optstr: rw,gid=5,mode=620 +VFS-optstr: rw +FS-opstr: gid=5,mode=620 +------ fs: +source: tmpfs +target: /dev/shm +fstype: tmpfs +optstr: rw +VFS-optstr: rw +------ fs: +source: /dev/sda6 +target: /boot +fstype: ext3 +optstr: rw,noatime +VFS-optstr: rw,noatime +------ fs: +source: /dev/mapper/kzak-home +target: /home/kzak +fstype: ext4 +optstr: rw,noatime +VFS-optstr: rw,noatime +------ fs: +source: none +target: /proc/sys/fs/binfmt_misc +fstype: binfmt_misc +optstr: rw +VFS-optstr: rw +------ fs: +source: fusectl +target: /sys/fs/fuse/connections +fstype: fusectl +optstr: rw +VFS-optstr: rw +------ fs: +source: gvfs-fuse-daemon +target: /home/kzak/.gvfs +fstype: fuse.gvfs-fuse-daemon +optstr: rw,nosuid,nodev,user=kzak +VFS-optstr: rw,nosuid,nodev +user-optstr: user=kzak +------ fs: +source: sunrpc +target: /var/lib/nfs/rpc_pipefs +fstype: rpc_pipefs +optstr: rw +VFS-optstr: rw diff --git a/tests/expected/libmount/tabfiles-tags-py-fstab-dev b/tests/expected/libmount/tabfiles-tags-py-fstab-dev new file mode 100644 index 000000000..823a19cac --- /dev/null +++ b/tests/expected/libmount/tabfiles-tags-py-fstab-dev @@ -0,0 +1,5 @@ +------ fs: + +target: /mnt/mountpoint3 +fstype: auto +optstr: defaults diff --git a/tests/expected/libmount/tabfiles-tags-py-fstab-dev2label b/tests/expected/libmount/tabfiles-tags-py-fstab-dev2label new file mode 100644 index 000000000..78d04a4be --- /dev/null +++ b/tests/expected/libmount/tabfiles-tags-py-fstab-dev2label @@ -0,0 +1,5 @@ +------ fs: +source: LABEL=testLibmount +target: /mnt/mountpoint +fstype: auto +optstr: defaults diff --git a/tests/expected/libmount/tabfiles-tags-py-fstab-label b/tests/expected/libmount/tabfiles-tags-py-fstab-label new file mode 100644 index 000000000..78d04a4be --- /dev/null +++ b/tests/expected/libmount/tabfiles-tags-py-fstab-label @@ -0,0 +1,5 @@ +------ fs: +source: LABEL=testLibmount +target: /mnt/mountpoint +fstype: auto +optstr: defaults diff --git a/tests/expected/libmount/tabfiles-tags-py-fstab-label2dev b/tests/expected/libmount/tabfiles-tags-py-fstab-label2dev new file mode 100644 index 000000000..78d04a4be --- /dev/null +++ b/tests/expected/libmount/tabfiles-tags-py-fstab-label2dev @@ -0,0 +1,5 @@ +------ fs: +source: LABEL=testLibmount +target: /mnt/mountpoint +fstype: auto +optstr: defaults diff --git a/tests/expected/libmount/tabfiles-tags-py-fstab-label2uuid b/tests/expected/libmount/tabfiles-tags-py-fstab-label2uuid new file mode 100644 index 000000000..78d04a4be --- /dev/null +++ b/tests/expected/libmount/tabfiles-tags-py-fstab-label2uuid @@ -0,0 +1,5 @@ +------ fs: +source: LABEL=testLibmount +target: /mnt/mountpoint +fstype: auto +optstr: defaults diff --git a/tests/expected/libmount/tabfiles-tags-py-fstab-uuid b/tests/expected/libmount/tabfiles-tags-py-fstab-uuid new file mode 100644 index 000000000..67d4e7ba3 --- /dev/null +++ b/tests/expected/libmount/tabfiles-tags-py-fstab-uuid @@ -0,0 +1,5 @@ +------ fs: +source: UUID=de1bc6e9-34ab-4151-a1d7-900042eee8d9 +target: /mnt/mountpoint2 +fstype: auto +optstr: defaults diff --git a/tests/expected/libmount/update-fstab-replace b/tests/expected/libmount/update-fstab-replace new file mode 100644 index 000000000..dc8d1dfbc --- /dev/null +++ b/tests/expected/libmount/update-fstab-replace @@ -0,0 +1,24 @@ +# + # this is a leading comment +# + +# this comments belongs to the first fs +UUID=d3a8f783-df75-4dc8-9163-975a891052c0 / ext3 noatime,defaults 1 1 +UUID=fef7ccb3-821c-4de8-88dc-71472be5946f /boot ext3 noatime,defaults 1 2 + +# 3rd fs comment + newline padding + +UUID=1f2aa318-9c34-462e-8d29-260819ffd657 swap swap defaults 0 0 +tmpfs /dev/shm tmpfs defaults 0 0 +devpts /dev/pts devpts gid=5,mode=620 0 0 +sysfs /sys sysfs defaults 0 0 +proc /proc proc defaults 0 0 +# this is comment +/dev/mapper/foo /home/foo ext4 noatime,defaults 0 0 +foo.com:/mnt/share /mnt/remote nfs noauto 0 0 +//bar.com/gogogo /mnt/gogogo cifs user=SRGROUP/baby,noauto 0 0 +/dev/foo /any/foo/ auto defaults 0 0 +# this is new filesystem +LABEL=foo /mnt/foo none rw 0 0 + +#this is a trailing comment diff --git a/tests/expected/libmount/update-py-fstab-replace b/tests/expected/libmount/update-py-fstab-replace new file mode 100644 index 000000000..dc8d1dfbc --- /dev/null +++ b/tests/expected/libmount/update-py-fstab-replace @@ -0,0 +1,24 @@ +# + # this is a leading comment +# + +# this comments belongs to the first fs +UUID=d3a8f783-df75-4dc8-9163-975a891052c0 / ext3 noatime,defaults 1 1 +UUID=fef7ccb3-821c-4de8-88dc-71472be5946f /boot ext3 noatime,defaults 1 2 + +# 3rd fs comment + newline padding + +UUID=1f2aa318-9c34-462e-8d29-260819ffd657 swap swap defaults 0 0 +tmpfs /dev/shm tmpfs defaults 0 0 +devpts /dev/pts devpts gid=5,mode=620 0 0 +sysfs /sys sysfs defaults 0 0 +proc /proc proc defaults 0 0 +# this is comment +/dev/mapper/foo /home/foo ext4 noatime,defaults 0 0 +foo.com:/mnt/share /mnt/remote nfs noauto 0 0 +//bar.com/gogogo /mnt/gogogo cifs user=SRGROUP/baby,noauto 0 0 +/dev/foo /any/foo/ auto defaults 0 0 +# this is new filesystem +LABEL=foo /mnt/foo none rw 0 0 + +#this is a trailing comment diff --git a/tests/expected/losetup/losetup b/tests/expected/losetup/losetup new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/expected/losetup/losetup diff --git a/tests/expected/losetup/losetup-blkdev b/tests/expected/losetup/losetup-blkdev new file mode 100644 index 000000000..2afc15105 --- /dev/null +++ b/tests/expected/losetup/losetup-blkdev @@ -0,0 +1,3 @@ +offset: 0 +sizelimit: 0 +size: 11534336 diff --git a/tests/expected/losetup/losetup-blkdev-offset b/tests/expected/losetup/losetup-blkdev-offset new file mode 100644 index 000000000..7b37b6fb0 --- /dev/null +++ b/tests/expected/losetup/losetup-blkdev-offset @@ -0,0 +1,3 @@ +offset: 1048576 +sizelimit: 0 +size: 10485760 diff --git a/tests/expected/losetup/losetup-blkdev-section b/tests/expected/losetup/losetup-blkdev-section new file mode 100644 index 000000000..b480d6654 --- /dev/null +++ b/tests/expected/losetup/losetup-blkdev-section @@ -0,0 +1,3 @@ +offset: 1048576 +sizelimit: 3145728 +size: 3145728 diff --git a/tests/expected/losetup/losetup-blkdev-sizelimit b/tests/expected/losetup/losetup-blkdev-sizelimit new file mode 100644 index 000000000..d220d48da --- /dev/null +++ b/tests/expected/losetup/losetup-blkdev-sizelimit @@ -0,0 +1,3 @@ +offset: 0 +sizelimit: 3145728 +size: 3145728 diff --git a/tests/expected/losetup/losetup-file b/tests/expected/losetup/losetup-file new file mode 100644 index 000000000..09d11473f --- /dev/null +++ b/tests/expected/losetup/losetup-file @@ -0,0 +1,3 @@ +offset: 0 +sizelimit: 0 +size: 10485760 diff --git a/tests/expected/losetup/losetup-file-offset b/tests/expected/losetup/losetup-file-offset new file mode 100644 index 000000000..b416f8e01 --- /dev/null +++ b/tests/expected/losetup/losetup-file-offset @@ -0,0 +1,3 @@ +offset: 1048576 +sizelimit: 0 +size: 9437184 diff --git a/tests/expected/losetup/losetup-file-section b/tests/expected/losetup/losetup-file-section new file mode 100644 index 000000000..b480d6654 --- /dev/null +++ b/tests/expected/losetup/losetup-file-section @@ -0,0 +1,3 @@ +offset: 1048576 +sizelimit: 3145728 +size: 3145728 diff --git a/tests/expected/losetup/losetup-file-secton b/tests/expected/losetup/losetup-file-secton new file mode 100644 index 000000000..b480d6654 --- /dev/null +++ b/tests/expected/losetup/losetup-file-secton @@ -0,0 +1,3 @@ +offset: 1048576 +sizelimit: 3145728 +size: 3145728 diff --git a/tests/expected/losetup/losetup-file-sizelimit b/tests/expected/losetup/losetup-file-sizelimit new file mode 100644 index 000000000..d220d48da --- /dev/null +++ b/tests/expected/losetup/losetup-file-sizelimit @@ -0,0 +1,3 @@ +offset: 0 +sizelimit: 3145728 +size: 3145728 diff --git a/tests/expected/lscpu/lscpu-armv7 b/tests/expected/lscpu/lscpu-armv7 index a1b691cfb..84ae4b5da 100644 --- a/tests/expected/lscpu/lscpu-armv7 +++ b/tests/expected/lscpu/lscpu-armv7 @@ -3,6 +3,8 @@ On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 +CPU max MHz: 1700.0000 +CPU min MHz: 200.0000 # The following is the parsable format, which can be fed to other # programs. Each different item in every column has an unique ID diff --git a/tests/expected/lscpu/lscpu-i386-amdshanghai b/tests/expected/lscpu/lscpu-i386-amdshanghai deleted file mode 100644 index 25dcaa974..000000000 --- a/tests/expected/lscpu/lscpu-i386-amdshanghai +++ /dev/null @@ -1,29 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 8 -Thread(s) per core: 1 -Core(s) per socket: 4 -Socket(s): 2 -Vendor ID: AuthenticAMD -CPU family: 16 -Model: 4 -Stepping: 0 -CPU MHz: 1995.158 -BogoMIPS: 3989.99 -Virtualization: AMD-V -L1d cache: 512K -L1i cache: 512K -L2 cache: 512K -L3 cache: 6144K - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2,L3 -0,0,0,,,0,0,0,0 -1,1,0,,,1,1,1,1 -2,2,0,,,2,2,2,2 -3,3,0,,,3,3,3,3 -4,4,1,,,4,4,4,4 -5,5,1,,,5,5,5,5 -6,6,1,,,6,6,6,6 -7,7,1,,,7,7,7,7 diff --git a/tests/expected/lscpu/lscpu-i386-dellpe700 b/tests/expected/lscpu/lscpu-i386-dellpe700 deleted file mode 100644 index 77c30afc6..000000000 --- a/tests/expected/lscpu/lscpu-i386-dellpe700 +++ /dev/null @@ -1,17 +0,0 @@ -CPU(s): 2 -Thread(s) per core: 2 -Core(s) per socket: 1 -Socket(s): 1 -Vendor ID: GenuineIntel -CPU family: 15 -Model: 2 -Stepping: 9 -CPU MHz: 3391.773 -BogoMIPS: 6781.99 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node -0,0,0, -1,0,0, diff --git a/tests/expected/lscpu/lscpu-i386-intels5000phb b/tests/expected/lscpu/lscpu-i386-intels5000phb deleted file mode 100644 index bc6456573..000000000 --- a/tests/expected/lscpu/lscpu-i386-intels5000phb +++ /dev/null @@ -1,28 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 8 -Thread(s) per core: 1 -Core(s) per socket: 4 -Socket(s): 2 -Vendor ID: GenuineIntel -CPU family: 6 -Model: 15 -Stepping: 7 -CPU MHz: 1596.044 -BogoMIPS: 3191.91 -Virtualization: VT-x -L1d cache: 32K -L1i cache: 32K -L2 cache: 4096K - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2 -0,0,0,,,0,0,0 -1,1,0,,,1,1,0 -2,2,0,,,2,2,1 -3,3,0,,,3,3,1 -4,4,1,,,4,4,2 -5,5,1,,,5,5,2 -6,6,1,,,6,6,3 -7,7,1,,,7,7,3 diff --git a/tests/expected/lscpu/lscpu-i386-xenpara b/tests/expected/lscpu/lscpu-i386-xenpara deleted file mode 100644 index ae3fa2c1a..000000000 --- a/tests/expected/lscpu/lscpu-i386-xenpara +++ /dev/null @@ -1,19 +0,0 @@ -CPU(s): 2 -Vendor ID: GenuineIntel -CPU family: 6 -Model: 23 -Stepping: 6 -CPU MHz: 2493.776 -Virtualization: VT-x -Hypervisor vendor: Xen -Virtualization type: para -L1d cache: 32K -L1i cache: 32K -L2 cache: 6144K - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2 -0,,,,,0,0,0 -1,,,,,1,1,0 diff --git a/tests/expected/lscpu/lscpu-ia64-512cpus b/tests/expected/lscpu/lscpu-ia64-512cpus deleted file mode 100644 index 0de3ff417..000000000 --- a/tests/expected/lscpu/lscpu-ia64-512cpus +++ /dev/null @@ -1,654 +0,0 @@ -CPU(s): 512 -Thread(s) per core: 1 -Core(s) per socket: 2 -Socket(s): 256 -NUMA node(s): 128 -Vendor ID: GenuineIntel -CPU family: 32 -Model: 0 -CPU MHz: 1594.000007 -NUMA node0 CPU(s): 0-3 -NUMA node1 CPU(s): 4-7 -NUMA node2 CPU(s): 8-11 -NUMA node3 CPU(s): 12-15 -NUMA node4 CPU(s): 16-19 -NUMA node5 CPU(s): 20-23 -NUMA node6 CPU(s): 24-27 -NUMA node7 CPU(s): 28-31 -NUMA node8 CPU(s): 32-35 -NUMA node9 CPU(s): 36-39 -NUMA node10 CPU(s): 40-43 -NUMA node11 CPU(s): 44-47 -NUMA node12 CPU(s): 48-51 -NUMA node13 CPU(s): 52-55 -NUMA node14 CPU(s): 56-59 -NUMA node15 CPU(s): 60-63 -NUMA node16 CPU(s): 64-67 -NUMA node17 CPU(s): 68-71 -NUMA node18 CPU(s): 72-75 -NUMA node19 CPU(s): 76-79 -NUMA node20 CPU(s): 80-83 -NUMA node21 CPU(s): 84-87 -NUMA node22 CPU(s): 88-91 -NUMA node23 CPU(s): 92-95 -NUMA node24 CPU(s): 96-99 -NUMA node25 CPU(s): 100-103 -NUMA node26 CPU(s): 104-107 -NUMA node27 CPU(s): 108-111 -NUMA node28 CPU(s): 112-115 -NUMA node29 CPU(s): 116-119 -NUMA node30 CPU(s): 120-123 -NUMA node31 CPU(s): 124-127 -NUMA node32 CPU(s): 128-131 -NUMA node33 CPU(s): 132-135 -NUMA node34 CPU(s): 136-139 -NUMA node35 CPU(s): 140-143 -NUMA node36 CPU(s): 144-147 -NUMA node37 CPU(s): 148-151 -NUMA node38 CPU(s): 152-155 -NUMA node39 CPU(s): 156-159 -NUMA node40 CPU(s): 160-163 -NUMA node41 CPU(s): 164-167 -NUMA node42 CPU(s): 168-171 -NUMA node43 CPU(s): 172-175 -NUMA node44 CPU(s): 176-179 -NUMA node45 CPU(s): 180-183 -NUMA node46 CPU(s): 184-187 -NUMA node47 CPU(s): 188-191 -NUMA node48 CPU(s): 192-195 -NUMA node49 CPU(s): 196-199 -NUMA node50 CPU(s): 200-203 -NUMA node51 CPU(s): 204-207 -NUMA node52 CPU(s): 208-211 -NUMA node53 CPU(s): 212-215 -NUMA node54 CPU(s): 216-219 -NUMA node55 CPU(s): 220-223 -NUMA node56 CPU(s): 224-227 -NUMA node57 CPU(s): 228-231 -NUMA node58 CPU(s): 232-235 -NUMA node59 CPU(s): 236-239 -NUMA node60 CPU(s): 240-243 -NUMA node61 CPU(s): 244-247 -NUMA node62 CPU(s): 248-251 -NUMA node63 CPU(s): 252-255 -NUMA node64 CPU(s): 256-259 -NUMA node65 CPU(s): 260-263 -NUMA node66 CPU(s): 264-267 -NUMA node67 CPU(s): 268-271 -NUMA node68 CPU(s): 272-275 -NUMA node69 CPU(s): 276-279 -NUMA node70 CPU(s): 280-283 -NUMA node71 CPU(s): 284-287 -NUMA node72 CPU(s): 288-291 -NUMA node73 CPU(s): 292-295 -NUMA node74 CPU(s): 296-299 -NUMA node75 CPU(s): 300-303 -NUMA node76 CPU(s): 304-307 -NUMA node77 CPU(s): 308-311 -NUMA node78 CPU(s): 312-315 -NUMA node79 CPU(s): 316-319 -NUMA node80 CPU(s): 320-323 -NUMA node81 CPU(s): 324-327 -NUMA node82 CPU(s): 328-331 -NUMA node83 CPU(s): 332-335 -NUMA node84 CPU(s): 336-339 -NUMA node85 CPU(s): 340-343 -NUMA node86 CPU(s): 344-347 -NUMA node87 CPU(s): 348-351 -NUMA node88 CPU(s): 352-355 -NUMA node89 CPU(s): 356-359 -NUMA node90 CPU(s): 360-363 -NUMA node91 CPU(s): 364-367 -NUMA node92 CPU(s): 368-371 -NUMA node93 CPU(s): 372-375 -NUMA node94 CPU(s): 376-379 -NUMA node95 CPU(s): 380-383 -NUMA node96 CPU(s): 384-387 -NUMA node97 CPU(s): 388-391 -NUMA node98 CPU(s): 392-395 -NUMA node99 CPU(s): 396-399 -NUMA node100 CPU(s): 400-403 -NUMA node101 CPU(s): 404-407 -NUMA node102 CPU(s): 408-411 -NUMA node103 CPU(s): 412-415 -NUMA node104 CPU(s): 416-419 -NUMA node105 CPU(s): 420-423 -NUMA node106 CPU(s): 424-427 -NUMA node107 CPU(s): 428-431 -NUMA node108 CPU(s): 432-435 -NUMA node109 CPU(s): 436-439 -NUMA node110 CPU(s): 440-443 -NUMA node111 CPU(s): 444-447 -NUMA node112 CPU(s): 448-451 -NUMA node113 CPU(s): 452-455 -NUMA node114 CPU(s): 456-459 -NUMA node115 CPU(s): 460-463 -NUMA node116 CPU(s): 464-467 -NUMA node117 CPU(s): 468-471 -NUMA node118 CPU(s): 472-475 -NUMA node119 CPU(s): 476-479 -NUMA node120 CPU(s): 480-483 -NUMA node121 CPU(s): 484-487 -NUMA node122 CPU(s): 488-491 -NUMA node123 CPU(s): 492-495 -NUMA node124 CPU(s): 496-499 -NUMA node125 CPU(s): 500-503 -NUMA node126 CPU(s): 504-507 -NUMA node127 CPU(s): 508-511 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node -0,0,0,0 -1,1,0,0 -2,2,1,0 -3,3,1,0 -4,4,2,1 -5,5,2,1 -6,6,3,1 -7,7,3,1 -8,8,4,2 -9,9,4,2 -10,10,5,2 -11,11,5,2 -12,12,6,3 -13,13,6,3 -14,14,7,3 -15,15,7,3 -16,16,8,4 -17,17,8,4 -18,18,9,4 -19,19,9,4 -20,20,10,5 -21,21,10,5 -22,22,11,5 -23,23,11,5 -24,24,12,6 -25,25,12,6 -26,26,13,6 -27,27,13,6 -28,28,14,7 -29,29,14,7 -30,30,15,7 -31,31,15,7 -32,32,16,8 -33,33,16,8 -34,34,17,8 -35,35,17,8 -36,36,18,9 -37,37,18,9 -38,38,19,9 -39,39,19,9 -40,40,20,10 -41,41,20,10 -42,42,21,10 -43,43,21,10 -44,44,22,11 -45,45,22,11 -46,46,23,11 -47,47,23,11 -48,48,24,12 -49,49,24,12 -50,50,25,12 -51,51,25,12 -52,52,26,13 -53,53,26,13 -54,54,27,13 -55,55,27,13 -56,56,28,14 -57,57,28,14 -58,58,29,14 -59,59,29,14 -60,60,30,15 -61,61,30,15 -62,62,31,15 -63,63,31,15 -64,64,32,16 -65,65,32,16 -66,66,33,16 -67,67,33,16 -68,68,34,17 -69,69,34,17 -70,70,35,17 -71,71,35,17 -72,72,36,18 -73,73,36,18 -74,74,37,18 -75,75,37,18 -76,76,38,19 -77,77,38,19 -78,78,39,19 -79,79,39,19 -80,80,40,20 -81,81,40,20 -82,82,41,20 -83,83,41,20 -84,84,42,21 -85,85,42,21 -86,86,43,21 -87,87,43,21 -88,88,44,22 -89,89,44,22 -90,90,45,22 -91,91,45,22 -92,92,46,23 -93,93,46,23 -94,94,47,23 -95,95,47,23 -96,96,48,24 -97,97,48,24 -98,98,49,24 -99,99,49,24 -100,100,50,25 -101,101,50,25 -102,102,51,25 -103,103,51,25 -104,104,52,26 -105,105,52,26 -106,106,53,26 -107,107,53,26 -108,108,54,27 -109,109,54,27 -110,110,55,27 -111,111,55,27 -112,112,56,28 -113,113,56,28 -114,114,57,28 -115,115,57,28 -116,116,58,29 -117,117,58,29 -118,118,59,29 -119,119,59,29 -120,120,60,30 -121,121,60,30 -122,122,61,30 -123,123,61,30 -124,124,62,31 -125,125,62,31 -126,126,63,31 -127,127,63,31 -128,128,64,32 -129,129,64,32 -130,130,65,32 -131,131,65,32 -132,132,66,33 -133,133,66,33 -134,134,67,33 -135,135,67,33 -136,136,68,34 -137,137,68,34 -138,138,69,34 -139,139,69,34 -140,140,70,35 -141,141,70,35 -142,142,71,35 -143,143,71,35 -144,144,72,36 -145,145,72,36 -146,146,73,36 -147,147,73,36 -148,148,74,37 -149,149,74,37 -150,150,75,37 -151,151,75,37 -152,152,76,38 -153,153,76,38 -154,154,77,38 -155,155,77,38 -156,156,78,39 -157,157,78,39 -158,158,79,39 -159,159,79,39 -160,160,80,40 -161,161,80,40 -162,162,81,40 -163,163,81,40 -164,164,82,41 -165,165,82,41 -166,166,83,41 -167,167,83,41 -168,168,84,42 -169,169,84,42 -170,170,85,42 -171,171,85,42 -172,172,86,43 -173,173,86,43 -174,174,87,43 -175,175,87,43 -176,176,88,44 -177,177,88,44 -178,178,89,44 -179,179,89,44 -180,180,90,45 -181,181,90,45 -182,182,91,45 -183,183,91,45 -184,184,92,46 -185,185,92,46 -186,186,93,46 -187,187,93,46 -188,188,94,47 -189,189,94,47 -190,190,95,47 -191,191,95,47 -192,192,96,48 -193,193,96,48 -194,194,97,48 -195,195,97,48 -196,196,98,49 -197,197,98,49 -198,198,99,49 -199,199,99,49 -200,200,100,50 -201,201,100,50 -202,202,101,50 -203,203,101,50 -204,204,102,51 -205,205,102,51 -206,206,103,51 -207,207,103,51 -208,208,104,52 -209,209,104,52 -210,210,105,52 -211,211,105,52 -212,212,106,53 -213,213,106,53 -214,214,107,53 -215,215,107,53 -216,216,108,54 -217,217,108,54 -218,218,109,54 -219,219,109,54 -220,220,110,55 -221,221,110,55 -222,222,111,55 -223,223,111,55 -224,224,112,56 -225,225,112,56 -226,226,113,56 -227,227,113,56 -228,228,114,57 -229,229,114,57 -230,230,115,57 -231,231,115,57 -232,232,116,58 -233,233,116,58 -234,234,117,58 -235,235,117,58 -236,236,118,59 -237,237,118,59 -238,238,119,59 -239,239,119,59 -240,240,120,60 -241,241,120,60 -242,242,121,60 -243,243,121,60 -244,244,122,61 -245,245,122,61 -246,246,123,61 -247,247,123,61 -248,248,124,62 -249,249,124,62 -250,250,125,62 -251,251,125,62 -252,252,126,63 -253,253,126,63 -254,254,127,63 -255,255,127,63 -256,256,128,64 -257,257,128,64 -258,258,129,64 -259,259,129,64 -260,260,130,65 -261,261,130,65 -262,262,131,65 -263,263,131,65 -264,264,132,66 -265,265,132,66 -266,266,133,66 -267,267,133,66 -268,268,134,67 -269,269,134,67 -270,270,135,67 -271,271,135,67 -272,272,136,68 -273,273,136,68 -274,274,137,68 -275,275,137,68 -276,276,138,69 -277,277,138,69 -278,278,139,69 -279,279,139,69 -280,280,140,70 -281,281,140,70 -282,282,141,70 -283,283,141,70 -284,284,142,71 -285,285,142,71 -286,286,143,71 -287,287,143,71 -288,288,144,72 -289,289,144,72 -290,290,145,72 -291,291,145,72 -292,292,146,73 -293,293,146,73 -294,294,147,73 -295,295,147,73 -296,296,148,74 -297,297,148,74 -298,298,149,74 -299,299,149,74 -300,300,150,75 -301,301,150,75 -302,302,151,75 -303,303,151,75 -304,304,152,76 -305,305,152,76 -306,306,153,76 -307,307,153,76 -308,308,154,77 -309,309,154,77 -310,310,155,77 -311,311,155,77 -312,312,156,78 -313,313,156,78 -314,314,157,78 -315,315,157,78 -316,316,158,79 -317,317,158,79 -318,318,159,79 -319,319,159,79 -320,320,160,80 -321,321,160,80 -322,322,161,80 -323,323,161,80 -324,324,162,81 -325,325,162,81 -326,326,163,81 -327,327,163,81 -328,328,164,82 -329,329,164,82 -330,330,165,82 -331,331,165,82 -332,332,166,83 -333,333,166,83 -334,334,167,83 -335,335,167,83 -336,336,168,84 -337,337,168,84 -338,338,169,84 -339,339,169,84 -340,340,170,85 -341,341,170,85 -342,342,171,85 -343,343,171,85 -344,344,172,86 -345,345,172,86 -346,346,173,86 -347,347,173,86 -348,348,174,87 -349,349,174,87 -350,350,175,87 -351,351,175,87 -352,352,176,88 -353,353,176,88 -354,354,177,88 -355,355,177,88 -356,356,178,89 -357,357,178,89 -358,358,179,89 -359,359,179,89 -360,360,180,90 -361,361,180,90 -362,362,181,90 -363,363,181,90 -364,364,182,91 -365,365,182,91 -366,366,183,91 -367,367,183,91 -368,368,184,92 -369,369,184,92 -370,370,185,92 -371,371,185,92 -372,372,186,93 -373,373,186,93 -374,374,187,93 -375,375,187,93 -376,376,188,94 -377,377,188,94 -378,378,189,94 -379,379,189,94 -380,380,190,95 -381,381,190,95 -382,382,191,95 -383,383,191,95 -384,384,192,96 -385,385,192,96 -386,386,193,96 -387,387,193,96 -388,388,194,97 -389,389,194,97 -390,390,195,97 -391,391,195,97 -392,392,196,98 -393,393,196,98 -394,394,197,98 -395,395,197,98 -396,396,198,99 -397,397,198,99 -398,398,199,99 -399,399,199,99 -400,400,200,100 -401,401,200,100 -402,402,201,100 -403,403,201,100 -404,404,202,101 -405,405,202,101 -406,406,203,101 -407,407,203,101 -408,408,204,102 -409,409,204,102 -410,410,205,102 -411,411,205,102 -412,412,206,103 -413,413,206,103 -414,414,207,103 -415,415,207,103 -416,416,208,104 -417,417,208,104 -418,418,209,104 -419,419,209,104 -420,420,210,105 -421,421,210,105 -422,422,211,105 -423,423,211,105 -424,424,212,106 -425,425,212,106 -426,426,213,106 -427,427,213,106 -428,428,214,107 -429,429,214,107 -430,430,215,107 -431,431,215,107 -432,432,216,108 -433,433,216,108 -434,434,217,108 -435,435,217,108 -436,436,218,109 -437,437,218,109 -438,438,219,109 -439,439,219,109 -440,440,220,110 -441,441,220,110 -442,442,221,110 -443,443,221,110 -444,444,222,111 -445,445,222,111 -446,446,223,111 -447,447,223,111 -448,448,224,112 -449,449,224,112 -450,450,225,112 -451,451,225,112 -452,452,226,113 -453,453,226,113 -454,454,227,113 -455,455,227,113 -456,456,228,114 -457,457,228,114 -458,458,229,114 -459,459,229,114 -460,460,230,115 -461,461,230,115 -462,462,231,115 -463,463,231,115 -464,464,232,116 -465,465,232,116 -466,466,233,116 -467,467,233,116 -468,468,234,117 -469,469,234,117 -470,470,235,117 -471,471,235,117 -472,472,236,118 -473,473,236,118 -474,474,237,118 -475,475,237,118 -476,476,238,119 -477,477,238,119 -478,478,239,119 -479,479,239,119 -480,480,240,120 -481,481,240,120 -482,482,241,120 -483,483,241,120 -484,484,242,121 -485,485,242,121 -486,486,243,121 -487,487,243,121 -488,488,244,122 -489,489,244,122 -490,490,245,122 -491,491,245,122 -492,492,246,123 -493,493,246,123 -494,494,247,123 -495,495,247,123 -496,496,248,124 -497,497,248,124 -498,498,249,124 -499,499,249,124 -500,500,250,125 -501,501,250,125 -502,502,251,125 -503,503,251,125 -504,504,252,126 -505,505,252,126 -506,506,253,126 -507,507,253,126 -508,508,254,127 -509,509,254,127 -510,510,255,127 -511,511,255,127 diff --git a/tests/expected/lscpu/lscpu-ia64-hpmatterhorn b/tests/expected/lscpu/lscpu-ia64-hpmatterhorn deleted file mode 100644 index 03226226f..000000000 --- a/tests/expected/lscpu/lscpu-ia64-hpmatterhorn +++ /dev/null @@ -1,29 +0,0 @@ -CPU(s): 8 -Thread(s) per core: 1 -Core(s) per socket: 1 -Socket(s): 8 -NUMA node(s): 3 -Vendor ID: GenuineIntel -CPU family: Itanium 2 -Model: 1 -CPU MHz: 1300.000000 -L1d cache: 16K -L1i cache: 16K -L2 cache: 256K -L3 cache: 3072K -NUMA node0 CPU(s): 4-7 -NUMA node1 CPU(s): 0-3 -NUMA node2 CPU(s): - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2,L3 -0,0,0,1,,0,0,0,0 -1,1,1,1,,1,1,1,1 -2,2,2,1,,2,2,2,2 -3,3,3,1,,3,3,3,3 -4,4,4,0,,4,4,4,4 -5,5,5,0,,5,5,5,5 -6,6,6,0,,6,6,6,6 -7,7,7,0,,7,7,7,7 diff --git a/tests/expected/lscpu/lscpu-ia64-hprx1620 b/tests/expected/lscpu/lscpu-ia64-hprx1620 deleted file mode 100644 index 92aa9079b..000000000 --- a/tests/expected/lscpu/lscpu-ia64-hprx1620 +++ /dev/null @@ -1,21 +0,0 @@ -CPU(s): 2 -Thread(s) per core: 1 -Core(s) per socket: 1 -Socket(s): 2 -NUMA node(s): 1 -Vendor ID: GenuineIntel -CPU family: Itanium 2 -Model: 2 -CPU MHz: 1599.000967 -L1d cache: 16K -L1i cache: 16K -L2 cache: 256K -L3 cache: 3072K -NUMA node0 CPU(s): 0,1 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2,L3 -0,0,0,0,,0,0,0,0 -1,1,1,0,,1,1,1,1 diff --git a/tests/expected/lscpu/lscpu-ia64-pg0 b/tests/expected/lscpu/lscpu-ia64-pg0 deleted file mode 100644 index 50942ccc0..000000000 --- a/tests/expected/lscpu/lscpu-ia64-pg0 +++ /dev/null @@ -1,37 +0,0 @@ -CPU(s): 16 -Thread(s) per core: 1 -Core(s) per socket: 2 -Socket(s): 8 -NUMA node(s): 2 -Vendor ID: GenuineIntel -CPU family: Itanium 2 -Model: 0 -CPU MHz: 1418.000227 -L1d cache: 16K -L1i cache: 16K -L2d cache: 256K -L2i cache: 1024K -L3 cache: 6144K -NUMA node0 CPU(s): 0-7 -NUMA node1 CPU(s): 8-15 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2d,L2i,L3 -0,0,0,0,,0,0,0,, -1,1,0,0,,1,1,1,, -2,2,1,0,,2,2,2,, -3,3,1,0,,3,3,3,, -4,4,2,0,,4,4,4,, -5,5,2,0,,5,5,5,, -6,6,3,0,,6,6,6,, -7,7,3,0,,7,7,7,, -8,8,4,1,,8,8,8,, -9,9,4,1,,9,9,9,, -10,10,5,1,,10,10,10,, -11,11,5,1,,11,11,11,, -12,12,6,1,,12,12,12,, -13,13,6,1,,13,13,13,, -14,14,7,1,,14,14,14,, -15,15,7,1,,15,15,15,, diff --git a/tests/expected/lscpu/lscpu-ppc-qemu b/tests/expected/lscpu/lscpu-ppc-qemu new file mode 100644 index 000000000..b3ea4a728 --- /dev/null +++ b/tests/expected/lscpu/lscpu-ppc-qemu @@ -0,0 +1,15 @@ +CPU(s): 1 +On-line CPU(s) list: 0 +Thread(s) per core: 1 +Core(s) per socket: 1 +Socket(s): 1 +Model: Power Macintosh +BogoMIPS: 33.25 +L1d cache: unknown size +L1i cache: unknown size + +# The following is the parsable format, which can be fed to other +# programs. Each different item in every column has an unique ID +# starting from zero. +# CPU,Core,Socket,Node,,L1d,L1i +0,0,0,,,0,0 diff --git a/tests/expected/lscpu/lscpu-sparc64-UltraSparc-T1 b/tests/expected/lscpu/lscpu-sparc64-UltraSparc-T1 deleted file mode 100644 index 639a7de20..000000000 --- a/tests/expected/lscpu/lscpu-sparc64-UltraSparc-T1 +++ /dev/null @@ -1,38 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 32 -On-line CPU(s) list: 0-23 -Off-line CPU(s) list: 24-31 -Thread(s) per core: 4 -Core(s) per socket: 1 -Socket(s): 6 -NUMA node(s): 1 -NUMA node0 CPU(s): 0-35 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node -0,0,0,0 -1,0,0,0 -2,0,0,0 -3,0,0,0 -4,1,1,0 -5,1,1,0 -6,1,1,0 -7,1,1,0 -8,2,2,0 -9,2,2,0 -10,2,2,0 -11,2,2,0 -12,3,3,0 -13,3,3,0 -14,3,3,0 -15,3,3,0 -16,4,4,0 -17,4,4,0 -18,4,4,0 -19,4,4,0 -20,5,5,0 -21,5,5,0 -22,5,5,0 -23,5,5,0 diff --git a/tests/expected/lscpu/lscpu-x86_64-64cpu b/tests/expected/lscpu/lscpu-x86_64-64cpu index 45890b560..471fdd3dd 100644 --- a/tests/expected/lscpu/lscpu-x86_64-64cpu +++ b/tests/expected/lscpu/lscpu-x86_64-64cpu @@ -4,13 +4,15 @@ On-line CPU(s) list: 0-63 Thread(s) per core: 2 Core(s) per socket: 8 Socket(s): 4 -NUMA node(s): 1 +NUMA node(s): 3 Vendor ID: GenuineIntel CPU family: 6 Model: 46 Model name: Intel(R) Xeon(R) CPU X7550 @ 2.00GHz Stepping: 6 CPU MHz: 1064.000 +CPU max MHz: 1996.0000 +CPU min MHz: 1064.0000 BogoMIPS: 3989.44 Virtualization: VT-x L1d cache: 32K @@ -18,72 +20,74 @@ L1i cache: 32K L2 cache: 256K L3 cache: 18432K NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62 +NUMA node2 CPU(s): 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61 +NUMA node3 CPU(s): 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63 # The following is the parsable format, which can be fed to other # programs. Each different item in every column has an unique ID # starting from zero. # CPU,Core,Socket,Node,,L1d,L1i,L2,L3 0,0,0,0,,0,0,0,0 -1,1,1,,,1,1,1,1 +1,1,1,2,,1,1,1,1 2,2,2,0,,2,2,2,2 -3,3,3,,,3,3,3,3 +3,3,3,3,,3,3,3,3 4,4,0,0,,4,4,4,0 -5,5,1,,,5,5,5,1 +5,5,1,2,,5,5,5,1 6,6,2,0,,6,6,6,2 -7,7,3,,,7,7,7,3 +7,7,3,3,,7,7,7,3 8,8,0,0,,8,8,8,0 -9,9,1,,,9,9,9,1 +9,9,1,2,,9,9,9,1 10,10,2,0,,10,10,10,2 -11,11,3,,,11,11,11,3 +11,11,3,3,,11,11,11,3 12,12,0,0,,12,12,12,0 -13,13,1,,,13,13,13,1 +13,13,1,2,,13,13,13,1 14,14,2,0,,14,14,14,2 -15,15,3,,,15,15,15,3 +15,15,3,3,,15,15,15,3 16,16,0,0,,16,16,16,0 -17,17,1,,,17,17,17,1 +17,17,1,2,,17,17,17,1 18,18,2,0,,18,18,18,2 -19,19,3,,,19,19,19,3 +19,19,3,3,,19,19,19,3 20,20,0,0,,20,20,20,0 -21,21,1,,,21,21,21,1 +21,21,1,2,,21,21,21,1 22,22,2,0,,22,22,22,2 -23,23,3,,,23,23,23,3 +23,23,3,3,,23,23,23,3 24,24,0,0,,24,24,24,0 -25,25,1,,,25,25,25,1 +25,25,1,2,,25,25,25,1 26,26,2,0,,26,26,26,2 -27,27,3,,,27,27,27,3 +27,27,3,3,,27,27,27,3 28,28,0,0,,28,28,28,0 -29,29,1,,,29,29,29,1 +29,29,1,2,,29,29,29,1 30,30,2,0,,30,30,30,2 -31,31,3,,,31,31,31,3 +31,31,3,3,,31,31,31,3 32,0,0,0,,0,0,0,0 -33,1,1,,,1,1,1,1 +33,1,1,2,,1,1,1,1 34,2,2,0,,2,2,2,2 -35,3,3,,,3,3,3,3 +35,3,3,3,,3,3,3,3 36,4,0,0,,4,4,4,0 -37,5,1,,,5,5,5,1 +37,5,1,2,,5,5,5,1 38,6,2,0,,6,6,6,2 -39,7,3,,,7,7,7,3 +39,7,3,3,,7,7,7,3 40,8,0,0,,8,8,8,0 -41,9,1,,,9,9,9,1 +41,9,1,2,,9,9,9,1 42,10,2,0,,10,10,10,2 -43,11,3,,,11,11,11,3 +43,11,3,3,,11,11,11,3 44,12,0,0,,12,12,12,0 -45,13,1,,,13,13,13,1 +45,13,1,2,,13,13,13,1 46,14,2,0,,14,14,14,2 -47,15,3,,,15,15,15,3 +47,15,3,3,,15,15,15,3 48,16,0,0,,16,16,16,0 -49,17,1,,,17,17,17,1 +49,17,1,2,,17,17,17,1 50,18,2,0,,18,18,18,2 -51,19,3,,,19,19,19,3 +51,19,3,3,,19,19,19,3 52,20,0,0,,20,20,20,0 -53,21,1,,,21,21,21,1 +53,21,1,2,,21,21,21,1 54,22,2,0,,22,22,22,2 -55,23,3,,,23,23,23,3 +55,23,3,3,,23,23,23,3 56,24,0,0,,24,24,24,0 -57,25,1,,,25,25,25,1 +57,25,1,2,,25,25,25,1 58,26,2,0,,26,26,26,2 -59,27,3,,,27,27,27,3 +59,27,3,3,,27,27,27,3 60,28,0,0,,28,28,28,0 -61,29,1,,,29,29,29,1 +61,29,1,2,,29,29,29,1 62,30,2,0,,30,30,30,2 -63,31,3,,,31,31,31,3 +63,31,3,3,,31,31,31,3 diff --git a/tests/expected/lscpu/lscpu-x86_64-dell_e4310 b/tests/expected/lscpu/lscpu-x86_64-dell_e4310 index a81878d89..900199d00 100644 --- a/tests/expected/lscpu/lscpu-x86_64-dell_e4310 +++ b/tests/expected/lscpu/lscpu-x86_64-dell_e4310 @@ -11,6 +11,8 @@ Model: 37 Model name: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz Stepping: 5 CPU MHz: 1199.000 +CPU max MHz: 2667.0000 +CPU min MHz: 1199.0000 BogoMIPS: 5319.97 Virtualization: VT-x L1d cache: 32K diff --git a/tests/expected/lscpu/lscpu-x86_64-dell_poweredge1950 b/tests/expected/lscpu/lscpu-x86_64-dell_poweredge1950 deleted file mode 100644 index 64c5a9cd0..000000000 --- a/tests/expected/lscpu/lscpu-x86_64-dell_poweredge1950 +++ /dev/null @@ -1,23 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 8 -NUMA node(s): 1 -Vendor ID: GenuineIntel -CPU family: 6 -Model: 15 -Stepping: 7 -CPU MHz: 2327.526 -BogoMIPS: 4655.08 -NUMA node0 CPU(s): 0-7 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node -0,,,0 -1,,,0 -2,,,0 -3,,,0 -4,,,0 -5,,,0 -6,,,0 -7,,,0 diff --git a/tests/expected/lscpu/lscpu-x86_64-dell_poweredgeR610 b/tests/expected/lscpu/lscpu-x86_64-dell_poweredgeR610 deleted file mode 100644 index bdd839f41..000000000 --- a/tests/expected/lscpu/lscpu-x86_64-dell_poweredgeR610 +++ /dev/null @@ -1,40 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 16 -Thread(s) per core: 2 -Core(s) per socket: 4 -Socket(s): 2 -NUMA node(s): 2 -Vendor ID: GenuineIntel -CPU family: 6 -Model: 26 -Stepping: 5 -CPU MHz: 2261.056 -BogoMIPS: 4522.04 -Virtualization: VT-x -L1d cache: 32K -L1i cache: 32K -L2 cache: 256K -L3 cache: 8192K -NUMA node0 CPU(s): 0,2,4,6,8,10,12,14 -NUMA node1 CPU(s): 1,3,5,7,9,11,13,15 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2,L3 -0,0,0,0,,0,0,0,0 -1,1,1,1,,1,1,1,1 -2,2,0,0,,2,2,2,0 -3,3,1,1,,3,3,3,1 -4,4,0,0,,4,4,4,0 -5,5,1,1,,5,5,5,1 -6,6,0,0,,6,6,6,0 -7,7,1,1,,7,7,7,1 -8,0,0,0,,0,0,0,0 -9,1,1,1,,1,1,1,1 -10,2,0,0,,2,2,2,0 -11,3,1,1,,3,3,3,1 -12,4,0,0,,4,4,4,0 -13,5,1,1,,5,5,5,1 -14,6,0,0,,6,6,6,0 -15,7,1,1,,7,7,7,1 diff --git a/tests/expected/lscpu/lscpu-x86_64-dellr710 b/tests/expected/lscpu/lscpu-x86_64-dellr710 deleted file mode 100644 index 3b52c6de3..000000000 --- a/tests/expected/lscpu/lscpu-x86_64-dellr710 +++ /dev/null @@ -1,40 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 16 -Thread(s) per core: 2 -Core(s) per socket: 4 -Socket(s): 2 -NUMA node(s): 2 -Vendor ID: GenuineIntel -CPU family: 6 -Model: 26 -Stepping: 5 -CPU MHz: 2527.073 -BogoMIPS: 5053.32 -Virtualization: VT-x -L1d cache: 32K -L1i cache: 32K -L2 cache: 256K -L3 cache: 8192K -NUMA node0 CPU(s): 0,2,4,6,8,10,12,14 -NUMA node1 CPU(s): 1,3,5,7,9,11,13,15 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2,L3 -0,0,0,0,,0,0,0,0 -1,1,1,1,,1,1,1,1 -2,2,0,0,,2,2,2,0 -3,3,1,1,,3,3,3,1 -4,4,0,0,,4,4,4,0 -5,5,1,1,,5,5,5,1 -6,6,0,0,,6,6,6,0 -7,7,1,1,,7,7,7,1 -8,0,0,0,,0,0,0,0 -9,1,1,1,,1,1,1,1 -10,2,0,0,,2,2,2,0 -11,3,1,1,,3,3,3,1 -12,4,0,0,,4,4,4,0 -13,5,1,1,,5,5,5,1 -14,6,0,0,,6,6,6,0 -15,7,1,1,,7,7,7,1 diff --git a/tests/expected/lscpu/lscpu-x86_64-el5xen b/tests/expected/lscpu/lscpu-x86_64-el5xen deleted file mode 100644 index 454ca35de..000000000 --- a/tests/expected/lscpu/lscpu-x86_64-el5xen +++ /dev/null @@ -1,30 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 8 -Thread(s) per core: 1 -Core(s) per socket: 1 -Socket(s): 8 -Vendor ID: GenuineIntel -CPU family: 6 -Model: 26 -Stepping: 5 -CPU MHz: 2393.998 -BogoMIPS: 5986.29 -Hypervisor vendor: Xen -Virtualization type: para -L1d cache: 32K -L1i cache: 32K -L2 cache: 256K -L3 cache: 8192K - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2,L3 -0,0,0,,,0,0,0,0 -1,1,1,,,0,0,0,0 -2,2,2,,,1,1,1,0 -3,3,3,,,1,1,1,0 -4,4,4,,,2,2,2,0 -5,5,5,,,2,2,2,0 -6,6,6,,,3,3,3,0 -7,7,7,,,3,3,3,0 diff --git a/tests/expected/lscpu/lscpu-x86_64-hpdl585 b/tests/expected/lscpu/lscpu-x86_64-hpdl585 deleted file mode 100644 index 347ee62ba..000000000 --- a/tests/expected/lscpu/lscpu-x86_64-hpdl585 +++ /dev/null @@ -1,42 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 16 -Thread(s) per core: 1 -Core(s) per socket: 4 -Socket(s): 4 -NUMA node(s): 4 -Vendor ID: AuthenticAMD -CPU family: 16 -Model: 2 -Stepping: 3 -CPU MHz: 2210.188 -BogoMIPS: 4420.50 -Virtualization: AMD-V -L1d cache: 512K -L1i cache: 512K -L2 cache: 512K -L3 cache: 2048K -NUMA node0 CPU(s): 0,4,8,12 -NUMA node1 CPU(s): 1,5,9,13 -NUMA node2 CPU(s): 2,6,10,14 -NUMA node3 CPU(s): 3,7,11,15 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2,L3 -0,0,0,0,,0,0,0,0 -1,1,1,1,,1,1,1,1 -2,2,2,2,,2,2,2,2 -3,3,3,3,,3,3,3,3 -4,4,0,0,,4,4,4,4 -5,5,1,1,,5,5,5,5 -6,6,2,2,,6,6,6,6 -7,7,3,3,,7,7,7,7 -8,8,0,0,,8,8,8,8 -9,9,1,1,,9,9,9,9 -10,10,2,2,,10,10,10,10 -11,11,3,3,,11,11,11,11 -12,12,0,0,,12,12,12,12 -13,13,1,1,,13,13,13,13 -14,14,2,2,,14,14,14,14 -15,15,3,3,,15,15,15,15 diff --git a/tests/expected/lscpu/lscpu-x86_64-ibme326m b/tests/expected/lscpu/lscpu-x86_64-ibme326m deleted file mode 100644 index 8e5e37542..000000000 --- a/tests/expected/lscpu/lscpu-x86_64-ibme326m +++ /dev/null @@ -1,23 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 2 -Thread(s) per core: 1 -Core(s) per socket: 2 -Socket(s): 1 -NUMA node(s): 1 -Vendor ID: AuthenticAMD -CPU family: 15 -Model: 33 -Stepping: 2 -CPU MHz: 1995.058 -BogoMIPS: 3989.41 -L1d cache: 1024K -L1i cache: 1024K -L2 cache: 1024K -NUMA node0 CPU(s): 0,1 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2 -0,0,0,0,,0,0,0 -1,1,0,0,,1,1,1 diff --git a/tests/expected/lscpu/lscpu-x86_64-necem14 b/tests/expected/lscpu/lscpu-x86_64-necem14 deleted file mode 100644 index 91d626e10..000000000 --- a/tests/expected/lscpu/lscpu-x86_64-necem14 +++ /dev/null @@ -1,22 +0,0 @@ -CPU op-mode(s): 32-bit, 64-bit -CPU(s): 2 -Thread(s) per core: 2 -Core(s) per socket: 1 -Socket(s): 1 -NUMA node(s): 1 -Vendor ID: GenuineIntel -CPU family: 15 -Model: 4 -Stepping: 3 -CPU MHz: 3790.599 -BogoMIPS: 7579.94 -L1d cache: 16K -L2 cache: 2048K -NUMA node0 CPU(s): 0,1 - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L2 -0,0,0,0,,0,0 -1,0,0,0,,0,0 diff --git a/tests/expected/lscpu/lscpu-x86_64-xenfull b/tests/expected/lscpu/lscpu-x86_64-xenfull deleted file mode 100644 index 1a5c46a79..000000000 --- a/tests/expected/lscpu/lscpu-x86_64-xenfull +++ /dev/null @@ -1,22 +0,0 @@ -CPU(s): 2 -Thread(s) per core: 1 -Core(s) per socket: 1 -CPU socket(s): 2 -NUMA node(s): 1 -Vendor ID: GenuineIntel -CPU family: 6 -Model: 23 -Stepping: 6 -CPU MHz: 2493.900 -Hypervisor vendor: Xen -Virtualization type: full -L1d cache: 32K -L1i cache: 32K -L2 cache: 6144K - -# The following is the parsable format, which can be fed to other -# programs. Each different item in every column has an unique ID -# starting from zero. -# CPU,Core,Socket,Node,,L1d,L1i,L2 -0,0,0,0,,0,0,0 -1,1,1,0,,1,1,1 diff --git a/tests/expected/misc/rev b/tests/expected/misc/rev index 263923f75..41fdf4c13 100644 --- a/tests/expected/misc/rev +++ b/tests/expected/misc/rev @@ -1,2 +1,4 @@ 53bbf0d98205319cee2ba589e205c68b - -b407c257ed73b43cb992e778f925f7a3 - +35484965b7a2fd45a471c0d80cb9752c - +cba +321
\ No newline at end of file diff --git a/tests/expected/partx/partx-add-all b/tests/expected/partx/partx-add-all new file mode 100644 index 000000000..ce3894698 --- /dev/null +++ b/tests/expected/partx/partx-add-all @@ -0,0 +1 @@ +partitions added diff --git a/tests/expected/partx/partx-add-existing b/tests/expected/partx/partx-add-existing new file mode 100644 index 000000000..1c281de05 --- /dev/null +++ b/tests/expected/partx/partx-add-existing @@ -0,0 +1 @@ +partx: OK diff --git a/tests/expected/partx/partx-addpart b/tests/expected/partx/partx-addpart new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/tests/expected/partx/partx-addpart @@ -0,0 +1 @@ +OK diff --git a/tests/expected/partx/partx-change-by-range b/tests/expected/partx/partx-change-by-range new file mode 100644 index 000000000..ba9de05bc --- /dev/null +++ b/tests/expected/partx/partx-change-by-range @@ -0,0 +1,2 @@ +partitions deleted +partitions added diff --git a/tests/expected/partx/partx-delete-all b/tests/expected/partx/partx-delete-all new file mode 100644 index 000000000..ee6da6eb2 --- /dev/null +++ b/tests/expected/partx/partx-delete-all @@ -0,0 +1 @@ +partitions deleted diff --git a/tests/expected/partx/partx-delete-non-existent b/tests/expected/partx/partx-delete-non-existent new file mode 100644 index 000000000..1c281de05 --- /dev/null +++ b/tests/expected/partx/partx-delete-non-existent @@ -0,0 +1 @@ +partx: OK diff --git a/tests/expected/partx/partx-delete-one b/tests/expected/partx/partx-delete-one new file mode 100644 index 000000000..da85ea12b --- /dev/null +++ b/tests/expected/partx/partx-delete-one @@ -0,0 +1 @@ +last partition removed diff --git a/tests/expected/partx/partx-delpart b/tests/expected/partx/partx-delpart new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/tests/expected/partx/partx-delpart @@ -0,0 +1 @@ +OK diff --git a/tests/expected/partx/partx-detect-parts b/tests/expected/partx/partx-detect-parts new file mode 100644 index 000000000..70f7ba812 --- /dev/null +++ b/tests/expected/partx/partx-detect-parts @@ -0,0 +1,4 @@ +NR START END SECTORS SIZE NAME UUID + 1 32 33791 33760 16.5M + 2 33792 67583 33792 16.5M + 3 67584 102399 34816 17M diff --git a/tests/expected/partx/partx-dos+bsd b/tests/expected/partx/partx-dos+bsd index 75cdfe85b..379633d9d 100644 --- a/tests/expected/partx/partx-dos+bsd +++ b/tests/expected/partx/partx-dos+bsd @@ -1,5 +1,5 @@ NR START END SECTORS SIZE NAME UUID - 1 32 7679 7648 3.8M - 2 7680 16383 8704 4.3M + 1 32 7679 7648 3.8M 8f8378c0-01 + 2 7680 16383 8704 4.3M 8f8378c0-02 5 7936 12799 4864 2.4M 6 12544 16127 3584 1.8M diff --git a/tests/expected/utmpdump/ipv6tobin b/tests/expected/utmpdump/ipv6tobin Binary files differnew file mode 100644 index 000000000..342553bb9 --- /dev/null +++ b/tests/expected/utmpdump/ipv6tobin diff --git a/tests/expected/utmpdump/ipv6totxt b/tests/expected/utmpdump/ipv6totxt new file mode 100644 index 000000000..5cce1506b --- /dev/null +++ b/tests/expected/utmpdump/ipv6totxt @@ -0,0 +1,2 @@ +[7] [00010] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [Wed Aug 28 20:30:40 2013 GMT] +[8] [00011] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [Wed Aug 28 20:40:50 2013 GMT] diff --git a/tests/expected/wipefs/wipefs b/tests/expected/wipefs/wipefs new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/tests/expected/wipefs/wipefs @@ -0,0 +1 @@ +OK diff --git a/tests/functions.sh b/tests/functions.sh index 2ca98f8ca..f210204e2 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -242,6 +242,20 @@ function ts_init_suid { chmod u+s $PROG &> /dev/null } +function ts_init_py { + LIBNAME="$1" + + [ -f "$TS_TOPDIR/../py${LIBNAME}.la" ] || ts_skip "py${LIBNAME} not compiled" + + export LD_LIBRARY_PATH="$TS_TOPDIR/../.libs" + export PYTHONPATH="$TS_TOPDIR/../$LIBNAME/python:$TS_TOPDIR/../.libs" + + export PYTHON_VERSION=$(awk '/^PYTHON_VERSION/ { print $3 }' $top_builddir/Makefile) + export PYTHON_MAJOR_VERSION=$(echo $PYTHON_VERSION | sed 's/\..*//') + + export PYTHON="python${PYTHON_MAJOR_VERSION}" +} + function ts_valgrind { if [ -z "$TS_VALGRIND_CMD" ]; then $* @@ -461,16 +475,19 @@ s/# <!-- util-linux.*-->//; } function ts_fdisk_clean { - local DEVNAME=$(basename "$1") + local DEVNAME=$1 # remove non comparable parts of fdisk output if [ x"${DEVNAME}" != x"" ]; then - sed -i -e "s/\/dev\/${DEVNAME}/\/dev\/.../g" $TS_OUTPUT + sed -i -e "s:${DEVNAME}:<removed>:g" $TS_OUTPUT fi - sed -i -e 's/Disk identifier:.*//g' \ - -e 's/Building a new.*//g' \ - -e 's/Welcome to fdisk.*//g' \ + sed -i -e 's/Disk identifier:.*/Disk identifier: <removed>/g' \ + -e 's/Created a new.*/Created a new <removed>./g' \ + -e 's/^Device[[:blank:]]*Start/Device Start/g' \ + -e 's/^Device[[:blank:]]*Boot/Device Boot/g' \ + -e 's/^Device[[:blank:]]*Flag/Device Flag/g' \ + -e 's/Welcome to fdisk.*/Welcome to fdisk <removed>./g' \ $TS_OUTPUT } @@ -483,7 +500,7 @@ function ts_scsi_debug_init { modprobe scsi_debug $* [ "$?" == 0 ] || ts_die "Cannot init device" - DEVNAME=$(grep scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') + DEVNAME=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') [ "x${DEVNAME}" == "x" ] && ts_die "Cannot find device" DEVICE="/dev/${DEVNAME}" diff --git a/tests/ts/blkid/images-fs/bcache-B.img.bz2 b/tests/ts/blkid/images-fs/bcache-B.img.bz2 Binary files differnew file mode 100644 index 000000000..71fe1eeb7 --- /dev/null +++ b/tests/ts/blkid/images-fs/bcache-B.img.bz2 diff --git a/tests/ts/blkid/images-fs/bcache-C.img.bz2 b/tests/ts/blkid/images-fs/bcache-C.img.bz2 Binary files differnew file mode 100644 index 000000000..97afedbae --- /dev/null +++ b/tests/ts/blkid/images-fs/bcache-C.img.bz2 diff --git a/tests/ts/blkid/images-fs/xfs-log.img.bz2 b/tests/ts/blkid/images-fs/xfs-log.img.bz2 Binary files differnew file mode 100644 index 000000000..660846c81 --- /dev/null +++ b/tests/ts/blkid/images-fs/xfs-log.img.bz2 diff --git a/tests/ts/blkid/md-raid0-whole b/tests/ts/blkid/md-raid0-whole index 45c5bb0ec..bf95f77f5 100755 --- a/tests/ts/blkid/md-raid0-whole +++ b/tests/ts/blkid/md-raid0-whole @@ -78,7 +78,7 @@ ts_log "Deinitialize devices" ts_device_deinit $DEVICE1 ts_device_deinit $DEVICE2 -ts_fdisk_clean +ts_fdisk_clean $MD_DEVICE # remove generated UUIDs sed -i -e 's/ID_FS_UUID.*//g' $TS_OUTPUT diff --git a/tests/ts/blkid/md-raid1-part b/tests/ts/blkid/md-raid1-part index 46bde0ec8..30900eae6 100755 --- a/tests/ts/blkid/md-raid1-part +++ b/tests/ts/blkid/md-raid1-part @@ -42,6 +42,16 @@ w q EOF +# replace generated ID with something stable +$TS_CMD_FDISK ${DEVICE} &> /dev/null <<EOF +x +i +0x1 +r +w +q +EOF + udevadm settle MD_DEVNAME=md8 MD_DEVICE=/dev/${MD_DEVNAME} diff --git a/tests/ts/cal/bigyear b/tests/ts/cal/bigyear new file mode 100755 index 000000000..69023dece --- /dev/null +++ b/tests/ts/cal/bigyear @@ -0,0 +1,95 @@ +#!/bin/bash + +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="Year 1234567890123456789" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +set -o pipefail + +USETERM=$( ts_has_option "useterm" "$*" ) +MYMONTH="12 1234567890123456789" +MYYEAR="1234567890123456789" + +[ "$USETERM" == "yes" ] && TS_VERBOSE="yes" +ts_log "" + + +ts_log "Gregorian - Monday-based month" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1m +fi +$TS_CMD_CAL -1m $MYMONTH >> $TS_OUTPUT +ts_log "Gregorian - Sunday-based month" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1s $MYMONTH +fi +$TS_CMD_CAL -1s $MYMONTH >> $TS_OUTPUT +ts_log "Julian - Monday-based month" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1mj $MYMONTH +fi +$TS_CMD_CAL -1mj $MYMONTH >> $TS_OUTPUT +ts_log "Julian - Sunday-based month" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1sj $MYMONTH +fi +$TS_CMD_CAL -1sj $MYMONTH >> $TS_OUTPUT + + +ts_log "Gregorian - Monday-based three months" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3m +fi +$TS_CMD_CAL -3m $MYMONTH >> $TS_OUTPUT +ts_log "Gregorian - Sunday-based three months" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3s $MYMONTH +fi +$TS_CMD_CAL -3s $MYMONTH >> $TS_OUTPUT +ts_log "Julian - Monday-based three months" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3mj $MYMONTH +fi +$TS_CMD_CAL -3mj $MYMONTH >> $TS_OUTPUT +ts_log "Julian - Sunday-based three months" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3sj $MYMONTH +fi +$TS_CMD_CAL -3sj $MYMONTH >> $TS_OUTPUT + + +ts_log "Gregorian - Monday-based year" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1m $MYYEAR +fi +$TS_CMD_CAL -1m $MYYEAR >> $TS_OUTPUT +ts_log "Gregorian - Sunday-based year" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1s $MYYEAR +fi +$TS_CMD_CAL -1s $MYYEAR >> $TS_OUTPUT +ts_log "Julian - Monday-based year" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1mj $MYYEAR +fi +$TS_CMD_CAL -1mj $MYYEAR >> $TS_OUTPUT +ts_log "Julian - Sunday-based year" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1sj $MYYEAR +fi + +ts_finalize diff --git a/tests/ts/cal/color b/tests/ts/cal/color new file mode 100755 index 000000000..12a48b3bf --- /dev/null +++ b/tests/ts/cal/color @@ -0,0 +1,71 @@ +#!/bin/bash + +# +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="color" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +# --color output depends on terminal type +export TERM=linux + +set -o pipefail + +USETERM=$( ts_has_option "useterm" "$*" ) + +[ "$USETERM" == "yes" ] && TS_VERBOSE="yes" +ts_log "" + +ts_log "First day" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL --color=always 1 1 1 +fi +$TS_CMD_CAL --color=always 1 1 1 >> $TS_OUTPUT + +ts_log "Reformation corner cases 1" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL --color=always 2 9 1752 +fi +$TS_CMD_CAL --color=always 2 9 1752 >> $TS_OUTPUT + +ts_log "Reformation corner cases 2" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL --color=always 3 9 1752 +fi +$TS_CMD_CAL --color=always 3 9 1752 >> $TS_OUTPUT + +ts_log "Reformation corner cases 3" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL --color=always 13 9 1752 +fi +$TS_CMD_CAL --color=always 13 9 1752 >> $TS_OUTPUT + +ts_log "Reformation corner cases 4" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL --color=always 14 9 1752 +fi +$TS_CMD_CAL --color=always 14 9 1752 >> $TS_OUTPUT + +ts_log "Last day" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL --color=always 31 12 9999 +fi +$TS_CMD_CAL --color=always -3 31 12 9999 >> $TS_OUTPUT + + +ts_finalize + diff --git a/tests/ts/cal/sep1752 b/tests/ts/cal/sep1752 new file mode 100755 index 000000000..68ea3423c --- /dev/null +++ b/tests/ts/cal/sep1752 @@ -0,0 +1,95 @@ +#!/bin/bash + +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="September 1752" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +set -o pipefail + +USETERM=$( ts_has_option "useterm" "$*" ) +MYMONTH="09 1752" +MYYEAR="1752" + +[ "$USETERM" == "yes" ] && TS_VERBOSE="yes" +ts_log "" + + +ts_log "Gregorian - Monday-based month" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1m +fi +$TS_CMD_CAL -1m $MYMONTH >> $TS_OUTPUT +ts_log "Gregorian - Sunday-based month" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1s $MYMONTH +fi +$TS_CMD_CAL -1s $MYMONTH >> $TS_OUTPUT +ts_log "Julian - Monday-based month" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1mj $MYMONTH +fi +$TS_CMD_CAL -1mj $MYMONTH >> $TS_OUTPUT +ts_log "Julian - Sunday-based month" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1sj $MYMONTH +fi +$TS_CMD_CAL -1sj $MYMONTH >> $TS_OUTPUT + + +ts_log "Gregorian - Monday-based three months" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3m +fi +$TS_CMD_CAL -3m $MYMONTH >> $TS_OUTPUT +ts_log "Gregorian - Sunday-based three months" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3s $MYMONTH +fi +$TS_CMD_CAL -3s $MYMONTH >> $TS_OUTPUT +ts_log "Julian - Monday-based three months" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3mj $MYMONTH +fi +$TS_CMD_CAL -3mj $MYMONTH >> $TS_OUTPUT +ts_log "Julian - Sunday-based three months" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3sj $MYMONTH +fi +$TS_CMD_CAL -3sj $MYMONTH >> $TS_OUTPUT + + +ts_log "Gregorian - Monday-based year" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1m $MYYEAR +fi +$TS_CMD_CAL -1m $MYYEAR >> $TS_OUTPUT +ts_log "Gregorian - Sunday-based year" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1s $MYYEAR +fi +$TS_CMD_CAL -1s $MYYEAR >> $TS_OUTPUT +ts_log "Julian - Monday-based year" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1mj $MYYEAR +fi +$TS_CMD_CAL -1mj $MYYEAR >> $TS_OUTPUT +ts_log "Julian - Sunday-based year" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1sj $MYYEAR +fi + +ts_finalize diff --git a/tests/ts/cramfs/mkfs b/tests/ts/cramfs/mkfs index e5fa47ffc..5facfe9a5 100755 --- a/tests/ts/cramfs/mkfs +++ b/tests/ts/cramfs/mkfs @@ -80,7 +80,7 @@ cd $TS_MOUNTPOINT ts_log "list the image" export TZ='GMT-1' -ls -laR --time-style=long-iso . >> $TS_OUTPUT +ls -laR --time-style=long-iso . | sed 's:\. : :g' >> $TS_OUTPUT echo >> $TS_OUTPUT ts_log "list checksums from new data" diff --git a/tests/ts/fdisk/align-512-4K-md b/tests/ts/fdisk/align-512-4K-md index 09947ff9e..ad5568a04 100755 --- a/tests/ts/fdisk/align-512-4K-md +++ b/tests/ts/fdisk/align-512-4K-md @@ -86,5 +86,6 @@ udevadm settle rmmod scsi_debug ts_fdisk_clean $DEVICE +ts_fdisk_clean $MD_DEVICE ts_finalize diff --git a/tests/ts/fdisk/align-512-512 b/tests/ts/fdisk/align-512-512 index 82a6268cf..03133a6d1 100755 --- a/tests/ts/fdisk/align-512-512 +++ b/tests/ts/fdisk/align-512-512 @@ -64,7 +64,6 @@ q EOF ts_device_deinit $DEVICE - -ts_fdisk_clean +ts_fdisk_clean $DEVICE ts_finalize diff --git a/tests/ts/fdisk/bsd b/tests/ts/fdisk/bsd index b9b2a0fea..288388d8e 100755 --- a/tests/ts/fdisk/bsd +++ b/tests/ts/fdisk/bsd @@ -39,17 +39,14 @@ FDISK_CMD_BSD_LIST_TYPES="b\nl\nq\n" # list supported PT types and quit function print_layout { echo -ne "\n---layout----------" >> $TS_OUTPUT - $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} | \ - sed 's/^.*\.img/__ts_dev__/g; - s/^[[:blank:]]*Device Boot/ Device Boot/g' >> $TS_OUTPUT 2>&1 + $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT echo -ne "-------------------\n\n" >> $TS_OUTPUT } function print_bsd_layout { echo -ne "\n---layout----------" >> $TS_OUTPUT - echo -e "${FDISK_CMD_BSD_LIST}" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} | \ - sed 's/Reading .*//g; - s/Welcome to fdisk .*//' >> $TS_OUTPUT 2>&1 + echo -e "${FDISK_CMD_BSD_LIST}" | \ + $TS_CMD_FDISK ${TEST_IMAGE_NAME} >> $TS_OUTPUT echo -ne "-------------------\n\n" >> $TS_OUTPUT } @@ -103,4 +100,5 @@ echo -e "${FDISK_CMD_BSD_LIST_TYPES}" | \ $TS_CMD_FDISK ${TEST_IMAGE_NAME} | \ sed 's/Reading .*//g; s/Welcome to fdisk .*//' >> $TS_OUTPUT 2>&1 +ts_fdisk_clean ${TEST_IMAGE_NAME} ts_finalize diff --git a/tests/ts/fdisk/gpt b/tests/ts/fdisk/gpt index a0902ca9f..e725f6d54 100755 --- a/tests/ts/fdisk/gpt +++ b/tests/ts/fdisk/gpt @@ -32,13 +32,9 @@ FDISK_CMD_CHANGE_TYPE_BY_UUID="t\n5\n0657FD6D-A4AB-43C4-84E5-0933C84B4F4F\n" FDISK_CMD_DELETE_PART="d\n2\n" # delete 2nd partition FDISK_CMD_CREATE_PART="n\n2\n\n\n" # create 2nd partition -#set -x - function print_layout { echo -ne "\n---layout----------" >> $TS_OUTPUT - $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} 2> /dev/null | \ - sed 's/^.*\.img/__ts_dev__/g; - s/^[[:blank:]]*Device Boot/ Device Boot/g' >> $TS_OUTPUT 2>&1 + $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT echo -ne "-------------------\n\n" >> $TS_OUTPUT } @@ -81,4 +77,5 @@ echo -e "${FDISK_CMD_CREATE_PART}${FDISK_CMD_WRITE_CLOSE}" \ print_layout +ts_fdisk_clean ${TEST_IMAGE_NAME} ts_finalize diff --git a/tests/ts/fdisk/mbr-dos-mode b/tests/ts/fdisk/mbr-dos-mode index 713ec905f..b16e95c13 100755 --- a/tests/ts/fdisk/mbr-dos-mode +++ b/tests/ts/fdisk/mbr-dos-mode @@ -22,8 +22,7 @@ TS_DESC="MBR - dos mode" . $TS_TOPDIR/functions.sh ts_init "$*" -# cmd to change number of cylinders to 1024 and changes system id to 0x1 -FDISK_CMD_INIT="x\nc\n1024\ni\n0x1\nr\n" +FDISK_CMD_INIT="x\ni\n0x1\nr\n" FDISK_CMD_WRITE_CLOSE="w\nq\n" FDISK_CMD_CREATE_DOSLABEL="o\n" #create dos label FDISK_CMD_CREATE_PRIMARY="n\np\n1\n\n+1M\n" # create primary partition 1 of size 1MB @@ -35,13 +34,11 @@ FDISK_CMD_DELETE_LOGICALS="d\n6\nd\n5\nd\n6\n" # delete middle, head, tail, last FDISK_CMD_DELETE_PRIMARY="d\n1\n" # delete first primary FDISK_CMD_DELETE_EXTENDED="d\n2\n" # delete second primary -#set -x +FDISK_OPTIONS="-C 1024 -c=dos -u=cylinders" function print_layout { echo -ne "\n---layout----------" >> $TS_OUTPUT - $TS_CMD_FDISK -c=dos -u=cylinders -l ${TEST_IMAGE_NAME} | \ - sed 's/^.*\.img/__ts_dev__/g; - s/^[[:blank:]]*Device Boot/ Device Boot/g' >> $TS_OUTPUT 2>&1 + $TS_CMD_FDISK ${FDISK_OPTIONS} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT echo -ne "-------------------\n\n" >> $TS_OUTPUT } @@ -53,83 +50,82 @@ ts_log "Initialize empty image" TEST_IMAGE_NAME=$(ts_image_init 10) ts_image_md5sum >> $TS_OUTPUT 2>&1 -# need to run init twice, to change system ID after new label, otherwise system -# ID will be random and will screw up md5's ts_log "Create new DOS partition table" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_INIT}${FDISK_CMD_WRITE_CLOSE}" \ - | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_INIT}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Create primary partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Set partition type" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CHANGE_PARTTYPE}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_CHANGE_PARTTYPE}${FDISK_CMD_WRITE_CLOSE}" | \ + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Set primary partition active" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_SET_ACTIVE}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_SET_ACTIVE}${FDISK_CMD_WRITE_CLOSE}" | \ + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Re-create primary partition" -echo -e "${FDISK_CMD_INIT}d\n${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "d\n${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Create extended partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" | \ + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Create logical partitions" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \ - | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Delete logical partitions" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_LOGICALS}${FDISK_CMD_WRITE_CLOSE}" \ - | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_DELETE_LOGICALS}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Create another logical partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \ - | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Delete primary partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \ - | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_DELETE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Delete extended partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \ - | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null +echo -e "${FDISK_CMD_DELETE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout +ts_fdisk_clean ${TEST_IMAGE_NAME} ts_finalize diff --git a/tests/ts/fdisk/mbr-nondos-mode b/tests/ts/fdisk/mbr-nondos-mode index 4df302d90..88a80e636 100755 --- a/tests/ts/fdisk/mbr-nondos-mode +++ b/tests/ts/fdisk/mbr-nondos-mode @@ -36,9 +36,7 @@ FDISK_CMD_DELETE_EXTENDED="d\n3\n" # delete second primary function print_layout { echo -ne "\n---layout----------" >> $TS_OUTPUT - $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} | \ - sed 's/^.*\.img/__ts_dev__/g; - s/^[[:blank:]]*Device Boot/ Device Boot/g' >> $TS_OUTPUT 2>&1 + $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT echo -ne "-------------------\n\n" >> $TS_OUTPUT } @@ -58,80 +56,83 @@ ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Create 1st primary partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_1PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ +echo -e "${FDISK_CMD_CREATE_1PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Set primary partition active" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_SET_ACTIVE}${FDISK_CMD_WRITE_CLOSE}" | \ +echo -e "${FDISK_CMD_SET_ACTIVE}${FDISK_CMD_WRITE_CLOSE}" | \ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Re-create 1st primary partition" -echo -e "${FDISK_CMD_INIT}d\n${FDISK_CMD_CREATE_1PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ +echo -e "d\n${FDISK_CMD_CREATE_1PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Create 2nd primary partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_2PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ +echo -e "${FDISK_CMD_CREATE_2PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Create extended partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" | \ +echo -e "${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" | \ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Create logical partitions" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \ +echo -e "${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Delete logical partitions" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_LOGICALS}${FDISK_CMD_WRITE_CLOSE}" \ +echo -e "${FDISK_CMD_DELETE_LOGICALS}${FDISK_CMD_WRITE_CLOSE}" \ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout + ts_log "Create another logical partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \ +echo -e "${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Delete primary partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_1PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \ +echo -e "${FDISK_CMD_DELETE_1PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Delete primary partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_2PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \ +echo -e "${FDISK_CMD_DELETE_2PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout ts_log "Delete extended partition" -echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \ +echo -e "${FDISK_CMD_DELETE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \ | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 print_layout +ts_fdisk_clean ${TEST_IMAGE_NAME} + ts_finalize diff --git a/tests/ts/fdisk/mbr-sort b/tests/ts/fdisk/mbr-sort new file mode 100755 index 000000000..8b600fc43 --- /dev/null +++ b/tests/ts/fdisk/mbr-sort @@ -0,0 +1,77 @@ +#!/bin/bash + +# +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +TS_TOPDIR="${0%/*}/../.." +TS_DESC="MBR - sort" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +# cmd to changes system id to 0x1 +FDISK_CMD_WRITE_CLOSE="w\nq\n" +FDISK_CMD_CREATE_DOSLABEL="o\n" #create dos label + +FDISK_CMD_CREATE_1PRIMARY="n\np\n1\n4096\n6143\n" +FDISK_CMD_CREATE_2PRIMARY="n\np\n2\n2048\n4095\n" +FDISK_CMD_CREATE_3PRIMARY="n\np\n3\n6144\n8191\n" +FDISK_CMD_CREATE_EXTENDED="n\ne\n\n\n" + +FDISK_CMD_CREATE_1LOGICAL="n\n14336\n16383\n" +FDISK_CMD_CREATE_2LOGICAL="n\n22528\n24575\n" +FDISK_CMD_CREATE_3LOGICAL="n\n18432\n20479\n" +FDISK_CMD_CREATE_4LOGICAL="n\n10240\n12287\n" + +FDISK_CMD_EXPERT_SORT="x\nf\nr\n" + +function print_layout { + echo -ne "\n---layout----------" >> $TS_OUTPUT + $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + echo -ne "-------------------\n\n" >> $TS_OUTPUT +} + +#set -x + +ts_log "Initialize empty image" +TEST_IMAGE_NAME=$(ts_image_init 20) # 20 MiB + +ts_log "Create new DOS partition table" +echo -e "${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + +print_layout + +ts_log "Create primary partitions" +echo -e "${FDISK_CMD_CREATE_1PRIMARY}${FDISK_CMD_CREATE_2PRIMARY}${FDISK_CMD_CREATE_3PRIMARY}${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + +print_layout + + +ts_log "Create logical partitions" +echo -e "${FDISK_CMD_CREATE_1LOGICAL}${FDISK_CMD_CREATE_2LOGICAL}${FDISK_CMD_CREATE_3LOGICAL}${FDISK_CMD_CREATE_4LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + +print_layout + + +ts_log "Fix order." +echo -e "${FDISK_CMD_EXPERT_SORT}${FDISK_CMD_WRITE_CLOSE}" \ + | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + +print_layout + +ts_fdisk_clean ${TEST_IMAGE_NAME} +ts_finalize diff --git a/tests/ts/fdisk/sunlabel b/tests/ts/fdisk/sunlabel index 19bfd22e4..f610ad8f5 100755 --- a/tests/ts/fdisk/sunlabel +++ b/tests/ts/fdisk/sunlabel @@ -20,15 +20,17 @@ TS_DESC="sunlabel tests" . $TS_TOPDIR/functions.sh ts_init "$*" -FDISK_CMD_INIT="s\n1\n1\n1024\n" # create new sunlabel +FDISK_CMD_INIT="s\n" # create new sunlabel FDISK_CMD_WRITE_CLOSE="w\nq\n" FDISK_CMD_DELETEALL="d\n1\nd\n2\nd\n3\nd\n4\nd\n5\nd\n6\nd\n7\nd\n8\n" # delete all partitions -FDISK_CMD_CREATE_PRIMARY="n\n1\n0\n128\n" # create first partition, cylinders 0 through 128 +FDISK_CMD_CREATE_PRIMARY="n\n\n\n128\n" # create first partition FDISK_CMD_TOGGLE_READONLY="a\n1\n" # sets first partition as read-only 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 cylinders 128 to the end of disk +FDISK_CMD_CREATE_SECONDARY="n\n2\n128\n\n" # create secondary partition to the end of disk + +FDISK_OPTIONS="-H 1 -S 63 -u=cylinders" #set -x @@ -38,37 +40,50 @@ ts_image_md5sum >> $TS_OUTPUT 2>&1 ts_log "Create new SUN partition table" echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" \ - | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + | $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 +$TS_CMD_FDISK ${FDISK_OPTIONS} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + ts_log "Create first partition" echo -e "${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 +$TS_CMD_FDISK ${FDISK_OPTIONS} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + ts_log "Set partition sysid" echo -e "${FDISK_CMD_CHANGE_SYSID}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 +$TS_CMD_FDISK ${FDISK_OPTIONS} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + ts_log "Set first partition readonly" echo -e "${FDISK_CMD_TOGGLE_READONLY}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 +$TS_CMD_FDISK ${FDISK_OPTIONS} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + ts_log "Set first partition mountable" echo -e "${FDISK_CMD_TOGGLE_MOUNTABLE}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 +$TS_CMD_FDISK ${FDISK_OPTIONS} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + ts_log "Create second partition" echo -e "${FDISK_CMD_CREATE_SECONDARY}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>&1 ts_image_md5sum >> $TS_OUTPUT 2>&1 +$TS_CMD_FDISK ${FDISK_OPTIONS} -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT + ts_log "Delete all partitions" echo -e "${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" | \ - $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null + $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null ts_image_md5sum >> $TS_OUTPUT 2>&1 +ts_fdisk_clean ${TEST_IMAGE_NAME} ts_finalize diff --git a/tests/ts/last/ipv6 b/tests/ts/last/ipv6 new file mode 100755 index 000000000..8e2b01e5c --- /dev/null +++ b/tests/ts/last/ipv6 @@ -0,0 +1,41 @@ +#!/bin/bash + +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="last ipv6" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +export LANG=C +export TZ=GMT + +>| $TS_OUTPUT + +ts_log "~~~ dns short ~~~" +$TS_CMD_LAST -f $TS_SELF/ipv6-input -d >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ dns long ~~~" +$TS_CMD_LAST -f $TS_SELF/ipv6-input -d -w >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ dns host last ~~~" +$TS_CMD_LAST -f $TS_SELF/ipv6-input -d -a >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ show ip ~~~" +$TS_CMD_LAST -f $TS_SELF/ipv6-input -i >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ show ip last ~~~" +$TS_CMD_LAST -f $TS_SELF/ipv6-input -i -a >> $TS_OUTPUT 2>/dev/null + +ts_finalize diff --git a/tests/ts/last/ipv6-input b/tests/ts/last/ipv6-input Binary files differnew file mode 100644 index 000000000..342553bb9 --- /dev/null +++ b/tests/ts/last/ipv6-input diff --git a/tests/ts/last/last b/tests/ts/last/last new file mode 100755 index 000000000..4ad38cbe2 --- /dev/null +++ b/tests/ts/last/last @@ -0,0 +1,62 @@ +#!/bin/bash + +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="last" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +export LANG=C +export TZ=GMT + +>| $TS_OUTPUT + +ts_log "~~~ basic output ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ include system ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp -x >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ dns short ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp -d root >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ dns long ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp -w -d root >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ dns host last ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp -a -d root >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ show ip ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp -i torvalds >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ no host ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp -R torvalds >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ full times ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp -F >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ no time ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp --time-format=notime >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ iso-8601 time ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp --time-format=iso -w >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ since and until ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp -s "2013-08-28 02:20" -t "2013-08-28 08:20" >> $TS_OUTPUT 2>/dev/null + +ts_log "~~~ present ~~~" +$TS_CMD_LAST -f $TS_SELF/wtmp -p "2013-08-28 11:20" >> $TS_OUTPUT 2>/dev/null + +ts_finalize diff --git a/tests/ts/last/wtmp b/tests/ts/last/wtmp Binary files differnew file mode 100644 index 000000000..f66bb20a1 --- /dev/null +++ b/tests/ts/last/wtmp diff --git a/tests/ts/libmount/context-py b/tests/ts/libmount/context-py new file mode 100755 index 000000000..4be19dde6 --- /dev/null +++ b/tests/ts/libmount/context-py @@ -0,0 +1,143 @@ +#!/bin/bash + +# Copyright (C) 2010 Karel Zak <kzak@redhat.com> + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="context-py" + +. $TS_TOPDIR/functions.sh +ts_init "$*" +ts_init_py libmount +ts_skip_nonroot + +TESTPROG="$TS_HELPER_PYLIBMOUNT_CONTEXT" + +PYDBG="$PYTHON -m pdb" +LABEL=libmount-test +UUID=$(uuidgen) +MOUNTPOINT="$TS_MOUNTPOINT" +TS_NOEXIST="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-noex" +[ -d $TS_NOEXIST ] && rmdir $TS_NOEXIST + +ts_log "Init device" +umount $MOUNTPOINT &> /dev/null + +DEVICE=$(ts_scsi_debug_init dev_size_mb=100) +DEVNAME=$(basename $DEVICE) + +ts_log "Create partitions" +$TS_CMD_FDISK ${DEVICE} &> /dev/null <<EOF +n +p +1 + + +w +q +EOF + +DEVICE="${DEVICE}1" + +sleep 1 +udevadm settle + +grep -q $DEVNAME /proc/partitions +if [ $? -ne 0 ]; then + rmmod scsi_debug + ts_skip "no partition!" +fi + +ts_log "Create filesystem" +mkfs.ext4 -L "$LABEL" -U "$UUID" $DEVICE &> /dev/null + +ts_log "Do tests..." + +export LIBMOUNT_MTAB=$TS_OUTPUT.mtab +> $LIBMOUNT_MTAB + +udevadm settle +ts_device_has "TYPE" "ext4" $DEVICE || ts_die "Cannot find ext3 on $DEVICE" $DEVICE + +ts_init_subtest "mount-by-devname" +mkdir -p $MOUNTPOINT &> /dev/null +$PYTHON $TESTPROG --mount $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1 + +grep -q $DEVICE $LIBMOUNT_MTAB || \ + echo "(by device) cannot find $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "umount-by-devname" +$PYTHON $TESTPROG --umount $DEVICE >> $TS_OUTPUT 2>&1 +grep -q $DEVICE $LIBMOUNT_MTAB && + echo "umount (device) failed: found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + + +ts_init_subtest "mount-by-label" +mkdir -p $MOUNTPOINT &> /dev/null +$PYTHON $TESTPROG --mount LABEL="$LABEL" $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $DEVICE $LIBMOUNT_MTAB || \ + echo "(by label) cannot find $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + + +ts_init_subtest "umount-by-mountpoint" +$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $DEVICE $LIBMOUNT_MTAB && \ + echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + + +ts_init_subtest "mount-by-uuid" +mkdir -p $MOUNTPOINT &> /dev/null +$PYTHON $TESTPROG --mount UUID="$UUID" $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $DEVICE $LIBMOUNT_MTAB || \ + echo "(by uuid) cannot find $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 +$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $DEVICE $LIBMOUNT_MTAB && + echo "umount failed: found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + + +ts_init_subtest "mount-flags" +mkdir -p $MOUNTPOINT &> /dev/null +$PYTHON $TESTPROG --mount -o ro,noexec,nosuid,strictatime $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1 +$TS_CMD_FINDMNT --kernel $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>&1 +grep -q $DEVICE $LIBMOUNT_MTAB || \ + echo "cannot find $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 + +$PYTHON $TESTPROG --mount -o remount,rw $MOUNTPOINT >> $TS_OUTPUT 2>&1 +$TS_CMD_FINDMNT --kernel $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>&1 + +$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $DEVICE $LIBMOUNT_MTAB && + echo "umount failed: found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + + +ts_init_subtest "mount-loopdev" +mkdir -p $MOUNTPOINT &> /dev/null +img=$(ts_image_init) +mkfs.ext3 -F $img &> /dev/null +udevadm settle + +$PYTHON $TESTPROG --mount -o loop $img $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $MOUNTPOINT $LIBMOUNT_MTAB || \ + echo "(loopdev) cannot find $MOUNTPOINT in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 +udevadm settle +$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $MOUNTPOINT $LIBMOUNT_MTAB && + echo "umount failed: found $MOUNTPOINT in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "x-mount.mkdir" +$TS_CMD_MOUNT -o x-mount.mkdir --bind $MOUNTPOINT $TS_NOEXIST >> $TS_OUTPUT 2>&1 && + echo "successfully mounted" >> $TS_OUTPUT +ts_finalize_subtest + +$TS_CMD_UMOUNT $TS_NOEXIST +rmdir $TS_NOEXIST + +ts_log "...done." +rmmod scsi_debug +ts_finalize diff --git a/tests/ts/libmount/context-utab b/tests/ts/libmount/context-utab index 35851628d..b3aaff99f 100755 --- a/tests/ts/libmount/context-utab +++ b/tests/ts/libmount/context-utab @@ -85,13 +85,15 @@ grep -q $DEVICE $LIBMOUNT_UTAB && \ echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 ts_finalize_subtest + if [ -x "/sbin/mkfs.btrfs" ]; then + $TS_CMD_WIPEFS -a $DEVICE &> /dev/null ts_log "Create filesystem [btrfs]" - /sbin/mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null + mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null udevadm settle mount -t btrfs $DEVICE $MOUNTPOINT &> /dev/null - /sbin/btrfsctl -S sub $MOUNTPOINT &> /dev/null + btrfs subvolume create $MOUNTPOINT/sub &> /dev/null umount $MOUNTPOINT &> /dev/null udevadm settle diff --git a/tests/ts/libmount/context-utab-py b/tests/ts/libmount/context-utab-py new file mode 100755 index 000000000..ed379d4a6 --- /dev/null +++ b/tests/ts/libmount/context-utab-py @@ -0,0 +1,119 @@ +#!/bin/bash + +# Copyright (C) 2010 Karel Zak <kzak@redhat.com> +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="context-py (utab)" + +. $TS_TOPDIR/functions.sh +ts_init "$*" +ts_init_py libmount +ts_skip_nonroot + + +TESTPROG="$TS_HELPER_PYLIBMOUNT_CONTEXT" +LABEL=libmount-test +UUID=$(uuidgen) +MOUNTPOINT="$TS_MOUNTPOINT" + +DEVICE=$(ts_scsi_debug_init dev_size_mb=100) +DEVNAME=$(basename $DEVICE) + +ts_log "Create partitions" +$TS_CMD_FDISK ${DEVICE} &> /dev/null <<EOF +n +p +1 + + +w +q +EOF + +DEVICE="${DEVICE}1" + +sleep 1 +udevadm settle + +grep -q $DEVNAME /proc/partitions +if [ $? -ne 0 ]; then + rmmod scsi_debug + ts_skip "no partition!" +fi + +ts_log "Create filesystem" +mkfs.ext4 -L "$LABEL" -U "$UUID" $DEVICE &> /dev/null + +ts_log "Do tests..." + +export LIBMOUNT_MTAB=$TS_OUTPUT.mtab +rm -f $LIBMOUNT_MTAB +ln -s /proc/mounts $LIBMOUNT_MTAB + +export LIBMOUNT_UTAB=$TS_OUTPUT.utab +rm -f $LIBMOUNT_UTAB +> $LIBMOUNT_UTAB + +udevadm settle + +ts_init_subtest "mount-by-devname" +mkdir -p $MOUNTPOINT &> /dev/null +$PYTHON $TESTPROG --mount $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $DEVICE /proc/mounts || \ + echo "(by device) cannot find $DEVICE in /proc/mounts" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + + +ts_init_subtest "umount-by-devname" +$PYTHON $TESTPROG --umount $DEVICE >> $TS_OUTPUT 2>&1 +grep -q $DEVICE /proc/mounts && + echo "umount (device) failed: found $DEVICE in /proc/mounts" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + + +ts_init_subtest "mount-uhelper" +mkdir -p $MOUNTPOINT &> /dev/null +$PYTHON $TESTPROG --mount -o uhelper=foo,rw LABEL="$LABEL" $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $DEVICE $LIBMOUNT_UTAB || \ + echo "(by label) cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + + +ts_init_subtest "umount" +$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 +grep -q $DEVICE $LIBMOUNT_UTAB && \ + echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +if [ -x "/sbin/mkfs.btrfs" ]; then + $TS_CMD_WIPEFS -a $DEVICE &> /dev/null + ts_log "Create filesystem [btrfs]" + mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null + udevadm settle + + mount -t btrfs $DEVICE $MOUNTPOINT &> /dev/null + btrfs subvolume create $MOUNTPOINT/sub &> /dev/null + umount $MOUNTPOINT &> /dev/null + + udevadm settle + + ts_init_subtest "mount-uhelper-subvol" + mkdir -p $MOUNTPOINT &> /dev/null + $PYTHON $TESTPROG --mount -o uhelper=foo,rw,subvol=sub $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1 + grep -q $DEVICE $LIBMOUNT_UTAB || \ + echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 + ts_finalize_subtest + + ts_log "All mount options (btrfs subvolume + utab) ---" + $TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1 + ts_log "---" + + ts_init_subtest "umount-subvol" + $PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 + grep -q $DEVICE $LIBMOUNT_UTAB && \ + echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 + ts_finalize_subtest +fi + +ts_log "...done." +rmmod scsi_debug +ts_finalize diff --git a/tests/ts/libmount/files/fstab.comment b/tests/ts/libmount/files/fstab.comment new file mode 100644 index 000000000..656e663af --- /dev/null +++ b/tests/ts/libmount/files/fstab.comment @@ -0,0 +1,22 @@ +# + # this is a leading comment +# + +# this comments belongs to the first fs +UUID=d3a8f783-df75-4dc8-9163-975a891052c0 / ext3 noatime,defaults 1 1 +UUID=fef7ccb3-821c-4de8-88dc-71472be5946f /boot ext3 noatime,defaults 1 2 + +# 3rd fs comment + newline padding + +UUID=1f2aa318-9c34-462e-8d29-260819ffd657 swap swap defaults 0 0 +tmpfs /dev/shm tmpfs defaults 0 0 +devpts /dev/pts devpts gid=5,mode=620 0 0 +sysfs /sys sysfs defaults 0 0 +proc /proc proc defaults 0 0 +# this is comment +/dev/mapper/foo /home/foo ext4 noatime,defaults 0 0 +foo.com:/mnt/share /mnt/remote nfs noauto +//bar.com/gogogo /mnt/gogogo cifs user=SRGROUP/baby,noauto +/dev/foo /any/foo/ auto defaults 0 0 + +#this is a trailing comment diff --git a/tests/ts/libmount/files/mountinfo b/tests/ts/libmount/files/mountinfo index ff1e664a8..475ea1a33 100644 --- a/tests/ts/libmount/files/mountinfo +++ b/tests/ts/libmount/files/mountinfo @@ -30,3 +30,4 @@ 44 41 0:36 / /home/kzak/.gvfs rw,nosuid,nodev,relatime - fuse.gvfs-fuse-daemon gvfs-fuse-daemon rw,user_id=500,group_id=500 45 20 0:37 / /var/lib/nfs/rpc_pipefs rw,relatime - rpc_pipefs sunrpc rw 47 20 0:38 / /mnt/sounds rw,relatime - cifs //foo.home/bar/ rw,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344 +48 20 0:39 / /mnt/foo\040(deleted) rw,relatime - bar /fooooo rw diff --git a/tests/ts/libmount/tabfiles b/tests/ts/libmount/tabfiles index 671c649bb..c6fa360b3 100755 --- a/tests/ts/libmount/tabfiles +++ b/tests/ts/libmount/tabfiles @@ -17,6 +17,11 @@ ts_valgrind $TESTPROG --parse "$TS_SELF/files/fstab" &> $TS_OUTPUT sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT ts_finalize_subtest +ts_init_subtest "parse-fstab-full" +ts_valgrind $TESTPROG --parse "$TS_SELF/files/fstab.comment" --comments &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + ts_init_subtest "parse-mtab" ts_valgrind $TESTPROG --parse "$TS_SELF/files/mtab" &> $TS_OUTPUT sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT diff --git a/tests/ts/libmount/tabfiles-py b/tests/ts/libmount/tabfiles-py new file mode 100755 index 000000000..64e89110c --- /dev/null +++ b/tests/ts/libmount/tabfiles-py @@ -0,0 +1,70 @@ +#!/bin/bash + +# Copyright (C) 2010 Karel Zak <kzak@redhat.com> + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="tab files-py" + +. $TS_TOPDIR/functions.sh +ts_init "$*" +ts_init_py libmount + +PYDBG="$PYTHON -m pdb" +TESTPROG="$TS_HELPER_PYLIBMOUNT_TAB" + +ts_init_subtest "parse-fstab" +$PYTHON $TESTPROG --parse "$TS_SELF/files/fstab" &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "parse-fstab-full" +$PYTHON $TESTPROG --parse "$TS_SELF/files/fstab.comment" --comments &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "parse-mtab" +$PYTHON $TESTPROG --parse "$TS_SELF/files/mtab" &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "parse-fstab-broken" +$PYTHON $TESTPROG --parse "$TS_SELF/files/fstab.broken" &> $TS_OUTPUT +sed -i -e 's/.*fstab.broken:[[:digit:]]*: parse error//g; s/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "parse-mountinfo" +$PYTHON $TESTPROG --parse "$TS_SELF/files/mountinfo" &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "copy" +$PYTHON $TESTPROG --copy-fs "$TS_SELF/files/fstab" &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "find-source" +$PYTHON $TESTPROG --find-forward "$TS_SELF/files/fstab" source UUID=fef7ccb3-821c-4de8-88dc-71472be5946f &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "find-target" +$PYTHON $TESTPROG --find-forward "$TS_SELF/files/fstab" target /home/foo &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "find-target2" +$PYTHON $TESTPROG --find-forward "$TS_SELF/files/fstab" target /any/foo &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "find-target3" +$PYTHON $TESTPROG --find-forward "$TS_SELF/files/fstab" target /any/foo/ &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "find-pair" +$PYTHON $TESTPROG --find-pair "$TS_SELF/files/mtab" /dev/mapper/kzak-home /home/kzak &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_finalize diff --git a/tests/ts/libmount/tabfiles-tags-py b/tests/ts/libmount/tabfiles-tags-py new file mode 100755 index 000000000..05c2c2076 --- /dev/null +++ b/tests/ts/libmount/tabfiles-tags-py @@ -0,0 +1,82 @@ +#!/bin/bash + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="tags-py" + +. $TS_TOPDIR/functions.sh +ts_init "$*" +ts_init_py libmount +ts_skip_nonroot + +TESTPROG="$TS_HELPER_PYLIBMOUNT_TAB" + +PYDBG="$PYTHON -m pdb" + +DEVICE=$(ts_scsi_debug_init dev_size_mb=50 sector_size=512) +LABEL="testLibmount" +UUID="de1bc6e9-34ab-4151-a1d7-900042eee8d9" + +# +# Create filesystem +# +mkfs.ext3 -F -L $LABEL $DEVICE -U $UUID &> /dev/null || ts_die "Cannot make ext3 on $DEVICE" $DEVICE +udevadm settle + +ts_device_has_uuid $DEVICE || ts_die "Cannot find UUID on $DEVICE" $DEVICE + +FSTAB="$TS_OUTDIR/fstab" + +# +# Label in fstab +# +echo "LABEL=$LABEL /mnt/mountpoint auto defaults" > $FSTAB + +ts_init_subtest "fstab-label2uuid" +$PYTHON $TESTPROG --find-forward $FSTAB source "UUID=$UUID" &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "fstab-label2dev" +$PYTHON $TESTPROG --find-forward $FSTAB source $DEVICE &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +# +# Add more enties for the same device +# +echo "UUID=$UUID /mnt/mountpoint2 auto defaults" >> $FSTAB + +ts_init_subtest "fstab-uuid" +# has to return /mnt/mountpoint2 +$PYTHON $TESTPROG --find-forward $FSTAB source "UUID=$UUID" &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "fstab-label" +# has to return /mnt/mountpoint +$PYTHON $TESTPROG --find-forward $FSTAB source "LABEL=$LABEL" &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + + +ts_init_subtest "fstab-dev2label" +# has to return /mnt/mountpoint +$PYTHON $TESTPROG --find-forward $FSTAB source $DEVICE &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +ts_finalize_subtest + +# +# Add devname +# +echo "$DEVICE /mnt/mountpoint3 auto defaults" >> $FSTAB + +ts_init_subtest "fstab-dev" +# has to return /mnt/mountpoint3 +$PYTHON $TESTPROG --find-forward $FSTAB source $DEVICE &> $TS_OUTPUT +sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT +sed -i -e 's/source: .*//g' $TS_OUTPUT # devname is generated, remove it +ts_finalize_subtest + +udevadm settle +rmmod scsi_debug +ts_finalize diff --git a/tests/ts/libmount/update b/tests/ts/libmount/update index 3a989dddb..6d4bce81c 100755 --- a/tests/ts/libmount/update +++ b/tests/ts/libmount/update @@ -93,4 +93,16 @@ ts_valgrind $TESTPROG --remove /proc cp $LIBMOUNT_UTAB $TS_OUTPUT # save the mtab aside ts_finalize_subtest # checks the mtab +# +# fstab - replace +# +export LIBMOUNT_FSTAB=$TS_OUTPUT.fstab +rm -f $LIBMOUNT_FSTAB +cp "$TS_SELF/files/fstab.comment" $LIBMOUNT_FSTAB + +ts_init_subtest "fstab-replace" +ts_valgrind $TESTPROG --replace "LABEL=foo" "/mnt/foo" +cp $LIBMOUNT_FSTAB $TS_OUTPUT # save the fstab aside +ts_finalize_subtest #checks the fstab + ts_finalize diff --git a/tests/ts/libmount/update-py b/tests/ts/libmount/update-py new file mode 100755 index 000000000..e49d33ef0 --- /dev/null +++ b/tests/ts/libmount/update-py @@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright (C) 2010 Karel Zak <kzak@redhat.com> + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="tab update-py" + +. $TS_TOPDIR/functions.sh +ts_init "$*" +ts_init_py libmount +ts_skip_nonroot + +TESTPROG="$TS_HELPER_PYLIBMOUNT_UPDATE" + +[ -x $TESTPROG ] || ts_skip "test not compiled" + +# +# fstab - replace +# +export LIBMOUNT_FSTAB=$TS_OUTPUT.fstab +rm -f $LIBMOUNT_FSTAB +cp "$TS_SELF/files/fstab.comment" $LIBMOUNT_FSTAB + +ts_init_subtest "fstab-replace" +$PYTHON $TESTPROG --replace "LABEL=foo" "/mnt/foo" +cp $LIBMOUNT_FSTAB $TS_OUTPUT # save the fstab aside +ts_finalize_subtest #checks the fstab + +ts_finalize diff --git a/tests/ts/losetup/losetup b/tests/ts/losetup/losetup new file mode 100755 index 000000000..29d4b4201 --- /dev/null +++ b/tests/ts/losetup/losetup @@ -0,0 +1,131 @@ +#!/bin/bash + +# +# Copyright (C) 2013 Karel Zak <kzak@redhat.com> +# +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="losetup" + +. $TS_TOPDIR/functions.sh +ts_init "$*" +ts_skip_nonroot + +DEVICE=$(ts_scsi_debug_init dev_size_mb=11) +REFILE=$(ts_image_init 10) + +function lo_print { + local lo=$1 + echo "offset: $( $TS_CMD_LOSETUP --list --raw -n -O OFFSET $lo )" + echo "sizelimit: $( $TS_CMD_LOSETUP --list --raw -n -O SIZELIMIT $lo )" + echo "size: $( $TS_CMD_LSBLK -o SIZE -b -n -r $lo )" +} + +# +# file-* tests: Backing file is a regular file +# +BACKFILE="$REFILE" + +ts_init_subtest "file" +LODEV=$( $TS_CMD_LOSETUP --find --show $BACKFILE ) +if [ -z "$LODEV" ]; then + ts_log "Failed to create loop device" +fi +lo_print $LODEV >> $TS_OUTPUT +$TS_CMD_LOSETUP -d $LODEV +ts_finalize_subtest + +ts_init_subtest "file-offset" +LODEV=$( $TS_CMD_LOSETUP --offset 1MiB --find --show $BACKFILE ) +if [ -z "$LODEV" ]; then + ts_log "Failed to create loop device" +fi +lo_print $LODEV >> $TS_OUTPUT +$TS_CMD_LOSETUP -d $LODEV +ts_finalize_subtest + + +ts_init_subtest "file-sizelimit" +LODEV=$( $TS_CMD_LOSETUP --sizelimit 3MiB --find --show $BACKFILE ) +if [ -z "$LODEV" ]; then + ts_log "Failed to create loop device" +fi +lo_print $LODEV >> $TS_OUTPUT +$TS_CMD_LOSETUP -d $LODEV +ts_finalize_subtest + + +ts_init_subtest "file-section" +LODEV=$( $TS_CMD_LOSETUP --offset 1MiB --sizelimit 3MiB --find --show $BACKFILE ) +if [ -z "$LODEV" ]; then + ts_log "Failed to create loop device" +fi +lo_print $LODEV >> $TS_OUTPUT +$TS_CMD_LOSETUP -d $LODEV +ts_finalize_subtest + +rm -rf $BACKFILE + +# +# Backing file is a block device +# +BACKFILE="$DEVICE" + +ts_init_subtest "blkdev" +LODEV=$( $TS_CMD_LOSETUP --find --show $BACKFILE ) +if [ -z "$LODEV" ]; then + ts_log "Failed to create loop device" +fi +lo_print $LODEV >> $TS_OUTPUT +$TS_CMD_LOSETUP -d $LODEV +ts_finalize_subtest + +ts_init_subtest "blkdev-offset" +LODEV=$( $TS_CMD_LOSETUP --offset 1MiB --find --show $BACKFILE ) +if [ -z "$LODEV" ]; then + ts_log "Failed to create loop device" +fi +lo_print $LODEV >> $TS_OUTPUT +$TS_CMD_LOSETUP -d $LODEV +ts_finalize_subtest + + +ts_init_subtest "blkdev-sizelimit" +LODEV=$( $TS_CMD_LOSETUP --sizelimit 3MiB --find --show $BACKFILE ) +if [ -z "$LODEV" ]; then + ts_log "Failed to create loop device" +fi +lo_print $LODEV >> $TS_OUTPUT +$TS_CMD_LOSETUP -d $LODEV +ts_finalize_subtest + + +ts_init_subtest "blkdev-section" +LODEV=$( $TS_CMD_LOSETUP --offset 1MiB --sizelimit 3MiB --find --show $BACKFILE ) +if [ -z "$LODEV" ]; then + ts_log "Failed to create loop device" +fi +lo_print $LODEV >> $TS_OUTPUT +$TS_CMD_LOSETUP -d $LODEV +ts_finalize_subtest + +udevadm settle + +rmmod scsi_debug + +ts_finalize + + + diff --git a/tests/ts/lscpu/dumps/ppc-qemu.tar.gz b/tests/ts/lscpu/dumps/ppc-qemu.tar.gz Binary files differnew file mode 100644 index 000000000..a428271e6 --- /dev/null +++ b/tests/ts/lscpu/dumps/ppc-qemu.tar.gz diff --git a/tests/ts/misc/rev b/tests/ts/misc/rev index f36a799b2..035ce8230 100755 --- a/tests/ts/misc/rev +++ b/tests/ts/misc/rev @@ -23,4 +23,6 @@ for I in {0..512}; do printf "%s " {a..z}; done | md5sum >> $TS_OUTPUT 2>&1 for I in {0..512}; do printf "%s " {a..z}; done | \ $TS_CMD_REV | md5sum >> $TS_OUTPUT 2>&1 +printf "abc\n123" | $TS_CMD_REV >> $TS_OUTPUT 2>&1 + ts_finalize diff --git a/tests/ts/partx/partx b/tests/ts/partx/partx index f09d96b86..54aef8bbb 100755 --- a/tests/ts/partx/partx +++ b/tests/ts/partx/partx @@ -19,17 +19,16 @@ TS_TOPDIR="$(dirname $0)/../.." TS_DESC="partitions probing" TS_IMGDIR="$TS_TOPDIR/ts/blkid/images-pt" +PARTS=3 . $TS_TOPDIR/functions.sh ts_init "$*" +ts_skip_nonroot -if [ ! -x "$TS_CMD_PARTX" ]; then - ts_skip "partx disabled" -fi +[ ! -x "$TS_CMD_PARTX" ] && ts_skip "partx disabled" mkdir -p $TS_OUTDIR/images-pt - for img in $(ls $TS_IMGDIR/*.img.bz2 | sort); do name=$(basename $img .img.bz2) outimg=$TS_OUTDIR/images-pt/${name}.img @@ -42,4 +41,86 @@ for img in $(ls $TS_IMGDIR/*.img.bz2 | sort); do ts_finalize_subtest done + +DEVICE=$(ts_scsi_debug_init dev_size_mb=50) + +ts_init_subtest "addpart" +$TS_CMD_ADDPART ${DEVICE} 1 0 1 +[ "$?" == 0 ] && echo OK &>$TS_OUTPUT || ts_die "Unable to add partition"a &>$TS_OUTPUT +ts_finalize_subtest + +udevadm settle + +ts_init_subtest "delpart" +$TS_CMD_DELPART ${DEVICE} 1 +[ "$?" == 0 ] && echo OK >> $TS_OUTPUT 2>&1 || ts_die "Unable to remove partition" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +udevadm settle +rmmod scsi_debug &> /dev/null + +DEVICE=$(ts_scsi_debug_init dev_size_mb=50 num_parts=$PARTS) +DEVNAME=$(basename $DEVICE) + +ts_init_subtest "detect-parts" +$TS_CMD_PARTX --show $DEVICE &> $TS_OUTPUT +ts_finalize_subtest + +udevadm settle + +ts_init_subtest "delete-all" +#delete partinfo +$TS_CMD_PARTX --delete $DEVICE &> $TS_OUTPUT +[ $? -eq 0 ] && echo "partitions deleted" &> $TS_OUTPUT || + echo "Unable to delete partitions on $DEVICE" &> $TS_OUTPUT +ls -d "/sys/block/${DEVNAME}/${DEVNAME}*" 2>/dev/null && ts_die +ts_finalize_subtest + +udevadm settle + +ts_init_subtest "add-all" +#read DEVICE and restore the partinfo +$TS_CMD_PARTX --add $DEVICE &> $TS_OUTPUT +[ $(ls -d /sys/block/${DEVNAME}/${DEVNAME}* 2>/dev/null | wc -l) -eq $PARTS ] && + echo "partitions added" >> $TS_OUTPUT 2>&1 || + echo "Unable to add partitions for $DEVICE" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +udevadm settle + +ts_init_subtest "delete-one" +#remove last partition only +$TS_CMD_PARTX -d --nr -1 $DEVICE >> $TS_OUTPUT 2>&1 +[ $(ls -d /sys/block/${DEVNAME}/${DEVNAME}* 2>/dev/null | +wc -l) -eq $((PARTS-1)) ] && + echo "last partition removed" >> $TS_OUTPUT 2>&1 || + echo "Unable to remove a partition on $DEVICE" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +udevadm settle + +ts_init_subtest "delete-non-existent" +#attempt to remove it again +$TS_CMD_PARTX -d $PARTS $DEVICE && echo "partx failed: removed non-existing partition" &>$TS_OUTPUT || echo "partx: OK" &>$TS_OUTPUT +ts_finalize_subtest + +udevadm settle + +ts_init_subtest "add-existing" +#try adding an existing partition +$TS_CMD_PARTX -a --nr 1 $DEVICE &>/dev/null && echo "partx failed: re-added an existing partition" &> $TS_OUTPUT || echo "partx: OK" &> $TS_OUTPUT +ts_finalize_subtest + +udevadm settle + +ts_init_subtest "change-by-range" +# {-a|-d} --nr 0 should handle all partitions +$TS_CMD_PARTX -d --nr 0 $DEVICE +ls -d /sys/block/${DEVNAME}/${DEVNAME}* 2>/dev/null && echo "Unable to delete partitions on $DEVICE" >> $TS_OUTPUT 2>&1 || echo "partitions deleted" >> $TS_OUTPUT 2>&1 +$TS_CMD_PARTX -a --nr 0 $DEVICE +[ $(ls -d /sys/block/${DEVNAME}/${DEVNAME}* 2>/dev/null | wc -l) -eq $PARTS ] && echo "partitions added" >> $TS_OUTPUT 2>&1 || echo "Failed to add $DEVICE partitions" >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +udevadm settle +rmmod scsi_debug ts_finalize diff --git a/tests/ts/utmpdump/ipv6bin b/tests/ts/utmpdump/ipv6bin Binary files differnew file mode 100644 index 000000000..342553bb9 --- /dev/null +++ b/tests/ts/utmpdump/ipv6bin diff --git a/tests/ts/utmpdump/ipv6tobin b/tests/ts/utmpdump/ipv6tobin new file mode 100755 index 000000000..6de99ad1b --- /dev/null +++ b/tests/ts/utmpdump/ipv6tobin @@ -0,0 +1,25 @@ +#!/bin/bash + +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="IPv6 to binary" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +export LANG=C +export TZ=GMT +$TS_CMD_UTMPDUMP -r $TS_SELF/ipv6txt >| $TS_OUTPUT 2>/dev/null + +ts_finalize diff --git a/tests/ts/utmpdump/ipv6totxt b/tests/ts/utmpdump/ipv6totxt new file mode 100755 index 000000000..fb81f3922 --- /dev/null +++ b/tests/ts/utmpdump/ipv6totxt @@ -0,0 +1,25 @@ +#!/bin/bash + +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="IPv6 to text" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +export LANG=C +export TZ=GMT +$TS_CMD_UTMPDUMP $TS_SELF/ipv6bin >| $TS_OUTPUT 2>/dev/null + +ts_finalize diff --git a/tests/ts/utmpdump/ipv6txt b/tests/ts/utmpdump/ipv6txt new file mode 100644 index 000000000..fb428d5e0 --- /dev/null +++ b/tests/ts/utmpdump/ipv6txt @@ -0,0 +1,2 @@ +[7] [00010] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30 ] [Wed Aug 28 20:30:40 2013 BST] +[8] [00011] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30 ] [Wed Aug 28 20:40:50 2013 BST] diff --git a/tests/ts/wipefs/wipefs b/tests/ts/wipefs/wipefs new file mode 100755 index 000000000..38dbedbb1 --- /dev/null +++ b/tests/ts/wipefs/wipefs @@ -0,0 +1,30 @@ +#!/bin/bash + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="wipefs" + +. $TS_TOPDIR/functions.sh +ts_skip_nonroot +ts_init "$*" + +DEVICE=$(ts_scsi_debug_init dev_size_mb=50 num_parts=2) + +# remove old backups +rm -rf $HOME/wipefs-$(basename ${DEVICE})-*.bak + +#remove the magic byte, back it up +$TS_CMD_WIPEFS --all --backup ${DEVICE} &>/dev/null || ts_die "wipefs failed" + +#there should be just one magic string/backup file in this case +INFILE=$(ls $HOME/wipefs-$(basename ${DEVICE})-*.bak) +OFFT=$(echo $INFILE | sed -E 's/^.*-(.*).bak$/\1/') +dd if=$INFILE of=$DEVICE bs=1 conv=notrunc seek=$(($OFFT)) &>/dev/null + +#the bytes should be copied back, check if wipefs can recognize it +$TS_CMD_WIPEFS -a ${DEVICE} > $TS_OUTDIR/out 2>/dev/null + +# check for output +[ -s $TS_OUTDIR/out ] && echo "OK" &> $TS_OUTPUT || exit 1 + +rmmod scsi_debug &>/dev/null +ts_finalize |
