summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makemodule.am27
-rw-r--r--tests/commands.sh123
-rw-r--r--tests/expected/bitops/swapbytes21
-rw-r--r--tests/expected/blkdiscard/offsets50
-rw-r--r--tests/expected/blkdiscard/offsets.err20
-rw-r--r--tests/expected/blkid/cache2
-rw-r--r--tests/expected/blkid/dm-err4
-rw-r--r--tests/expected/blkid/low-probe-adaptec-raid3
-rw-r--r--tests/expected/blkid/low-probe-apfs6
-rw-r--r--tests/expected/blkid/low-probe-bcache-B4
-rw-r--r--tests/expected/blkid/low-probe-bcache-C4
-rw-r--r--tests/expected/blkid/low-probe-bcache-journal4
-rw-r--r--tests/expected/blkid/low-probe-bcachefs12
-rw-r--r--tests/expected/blkid/low-probe-bcachefs-214
-rw-r--r--tests/expected/blkid/low-probe-befs10
-rw-r--r--tests/expected/blkid/low-probe-bfs2
-rw-r--r--tests/expected/blkid/low-probe-bluestore2
-rw-r--r--tests/expected/blkid/low-probe-btrfs10
-rw-r--r--tests/expected/blkid/low-probe-cramfs7
-rw-r--r--tests/expected/blkid/low-probe-cramfs-big7
-rw-r--r--tests/expected/blkid/low-probe-cs_fvault25
-rw-r--r--tests/expected/blkid/low-probe-ddf-raid5
-rw-r--r--tests/expected/blkid/low-probe-drbd-v085
-rw-r--r--tests/expected/blkid/low-probe-drbd-v095
-rw-r--r--tests/expected/blkid/low-probe-drbdmanage-control-volume5
-rw-r--r--tests/expected/blkid/low-probe-erofs7
-rw-r--r--tests/expected/blkid/low-probe-exfat10
-rw-r--r--tests/expected/blkid/low-probe-ext211
-rw-r--r--tests/expected/blkid/low-probe-ext312
-rw-r--r--tests/expected/blkid/low-probe-ext411
-rw-r--r--tests/expected/blkid/low-probe-f2fs10
-rw-r--r--tests/expected/blkid/low-probe-fat13
-rw-r--r--tests/expected/blkid/low-probe-fat16_noheads11
-rw-r--r--tests/expected/blkid/low-probe-fat32_cp850_O_tilde12
-rw-r--r--tests/expected/blkid/low-probe-fat32_label_64MB10
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_label112
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME10
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_empty8
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_label212
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME10
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase8
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_erase10
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_label212
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_none8
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME8
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label110
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label212
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label110
-rw-r--r--tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label212
-rw-r--r--tests/expected/blkid/low-probe-fat32_xp_label110
-rw-r--r--tests/expected/blkid/low-probe-fat32_xp_none8
-rw-r--r--tests/expected/blkid/low-probe-fat32_xp_none_dosfslabel_label110
-rw-r--r--tests/expected/blkid/low-probe-fat32_xp_none_mlabel_label112
-rw-r--r--tests/expected/blkid/low-probe-gfs27
-rw-r--r--tests/expected/blkid/low-probe-hfs4
-rw-r--r--tests/expected/blkid/low-probe-hfsplus6
-rw-r--r--tests/expected/blkid/low-probe-hpfs9
-rw-r--r--tests/expected/blkid/low-probe-hpt37x-raid2
-rw-r--r--tests/expected/blkid/low-probe-hpt45x-raid2
-rw-r--r--tests/expected/blkid/low-probe-iso11
-rw-r--r--tests/expected/blkid/low-probe-iso-different-iso-joliet-label13
-rw-r--r--tests/expected/blkid/low-probe-iso-joliet12
-rw-r--r--tests/expected/blkid/low-probe-iso-multi-genisoimage-011
-rw-r--r--tests/expected/blkid/low-probe-iso-multi-genisoimage-17411
-rw-r--r--tests/expected/blkid/low-probe-iso-multi-genisoimage-34811
-rw-r--r--tests/expected/blkid/low-probe-iso-rr-joliet12
-rw-r--r--tests/expected/blkid/low-probe-iso-unicode-long-label13
-rw-r--r--tests/expected/blkid/low-probe-isw-raid3
-rw-r--r--tests/expected/blkid/low-probe-jbd10
-rw-r--r--tests/expected/blkid/low-probe-jfs8
-rw-r--r--tests/expected/blkid/low-probe-jmicron-raid3
-rw-r--r--tests/expected/blkid/low-probe-lsi-raid2
-rw-r--r--tests/expected/blkid/low-probe-luks15
-rw-r--r--tests/expected/blkid/low-probe-luks28
-rw-r--r--tests/expected/blkid/low-probe-lvm25
-rw-r--r--tests/expected/blkid/low-probe-mdraid5
-rw-r--r--tests/expected/blkid/low-probe-mdraid-19
-rw-r--r--tests/expected/blkid/low-probe-minix-BE6
-rw-r--r--tests/expected/blkid/low-probe-minix-LE6
-rw-r--r--tests/expected/blkid/low-probe-mpool6
-rw-r--r--tests/expected/blkid/low-probe-netware5
-rw-r--r--tests/expected/blkid/low-probe-nilfs29
-rw-r--r--tests/expected/blkid/low-probe-ntfs9
-rw-r--r--tests/expected/blkid/low-probe-nvidia-raid3
-rw-r--r--tests/expected/blkid/low-probe-ocfs29
-rw-r--r--tests/expected/blkid/low-probe-promise-raid2
-rw-r--r--tests/expected/blkid/low-probe-reiser39
-rw-r--r--tests/expected/blkid/low-probe-reiser49
-rw-r--r--tests/expected/blkid/low-probe-romfs7
-rw-r--r--tests/expected/blkid/low-probe-silicon-raid3
-rw-r--r--tests/expected/blkid/low-probe-small-fat3212
-rw-r--r--tests/expected/blkid/low-probe-squashfs36
-rw-r--r--tests/expected/blkid/low-probe-squashfs46
-rw-r--r--tests/expected/blkid/low-probe-swap03
-rw-r--r--tests/expected/blkid/low-probe-swap110
-rw-r--r--tests/expected/blkid/low-probe-swap1-big10
-rw-r--r--tests/expected/blkid/low-probe-tuxonice5
-rw-r--r--tests/expected/blkid/low-probe-ubi5
-rw-r--r--tests/expected/blkid/low-probe-ubifs6
-rw-r--r--tests/expected/blkid/low-probe-udf13
-rw-r--r--tests/expected/blkid/low-probe-udf-bdr-2.60-nero13
-rw-r--r--tests/expected/blkid/low-probe-udf-cd-mkudfiso-2010020810
-rw-r--r--tests/expected/blkid/low-probe-udf-cd-nero-613
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-409614
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-114
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-214
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-114
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-214
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-314
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-414
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-514
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-614
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-714
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-814
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.214
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.513
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.713
-rw-r--r--tests/expected/blkid/low-probe-udf-hdd-win713
-rw-r--r--tests/expected/blkid/low-probe-udf-multi-genisoimage-013
-rw-r--r--tests/expected/blkid/low-probe-udf-multi-genisoimage-41713
-rw-r--r--tests/expected/blkid/low-probe-udf-multi-genisoimage-83413
-rw-r--r--tests/expected/blkid/low-probe-udf-multi-mkudffs-014
-rw-r--r--tests/expected/blkid/low-probe-udf-multi-mkudffs-32014
-rw-r--r--tests/expected/blkid/low-probe-udf-multi-mkudffs-64014
-rw-r--r--tests/expected/blkid/low-probe-ufs8
-rw-r--r--tests/expected/blkid/low-probe-vdo4
-rw-r--r--tests/expected/blkid/low-probe-via-raid3
-rw-r--r--tests/expected/blkid/low-probe-vmfs7
-rw-r--r--tests/expected/blkid/low-probe-vmfs_volume7
-rw-r--r--tests/expected/blkid/low-probe-xfs10
-rw-r--r--tests/expected/blkid/low-probe-xfs-log3
-rw-r--r--tests/expected/blkid/low-probe-xfs-v510
-rw-r--r--tests/expected/blkid/low-probe-zfs12
-rw-r--r--tests/expected/blkid/low-probe-zonefs4
-rw-r--r--tests/expected/blkid/lowprobe-pt-atari-primary3
-rw-r--r--tests/expected/blkid/lowprobe-pt-atari-xgm4
-rw-r--r--tests/expected/blkid/lowprobe-pt-bsd4
-rw-r--r--tests/expected/blkid/lowprobe-pt-dos+bsd6
-rw-r--r--tests/expected/blkid/lowprobe-pt-gpt7
-rw-r--r--tests/expected/blkid/lowprobe-pt-sgi6
-rw-r--r--tests/expected/blkid/lowprobe-pt-sun4
-rw-r--r--tests/expected/blkid/mbr-wholedisk-fake-vfat2
-rw-r--r--tests/expected/blkid/md-raid0-whole50
-rw-r--r--tests/expected/blkid/md-raid1-part68
-rw-r--r--tests/expected/blkid/md-raid1-whole50
-rw-r--r--tests/expected/blkid/offset41
-rw-r--r--tests/expected/blkid/topology-disk4
-rw-r--r--tests/expected/blkid/topology-partition4
-rw-r--r--tests/expected/build-sys/config-all128
-rw-r--r--tests/expected/build-sys/config-all-devel115
-rw-r--r--tests/expected/build-sys/config-all-non-nls128
-rw-r--r--tests/expected/build-sys/config-audit121
-rw-r--r--tests/expected/build-sys/config-chfnsh-libuser121
-rw-r--r--tests/expected/build-sys/config-chfnsh-no-password121
-rw-r--r--tests/expected/build-sys/config-chfnsh-pam121
-rw-r--r--tests/expected/build-sys/config-core121
-rw-r--r--tests/expected/build-sys/config-cryptsetup128
-rw-r--r--tests/expected/build-sys/config-devel128
-rw-r--r--tests/expected/build-sys/config-devel-new-mount122
-rw-r--r--tests/expected/build-sys/config-devel-non-asan128
-rw-r--r--tests/expected/build-sys/config-devel-non-docs128
-rw-r--r--tests/expected/build-sys/config-disable-all0
-rw-r--r--tests/expected/build-sys/config-enable-schedutils4
-rw-r--r--tests/expected/build-sys/config-fuzz0
-rw-r--r--tests/expected/build-sys/config-non-libblkid98
-rw-r--r--tests/expected/build-sys/config-non-libmount107
-rw-r--r--tests/expected/build-sys/config-non-libs75
-rw-r--r--tests/expected/build-sys/config-non-libsmartcols91
-rw-r--r--tests/expected/build-sys/config-non-libuuid113
-rw-r--r--tests/expected/build-sys/config-non-nls121
-rw-r--r--tests/expected/build-sys/config-non-widechar0
-rw-r--r--tests/expected/build-sys/config-selinux121
-rw-r--r--tests/expected/build-sys/config-slang121
-rw-r--r--tests/expected/build-sys/config-static129
-rw-r--r--tests/expected/cal/bigyear-1m-month9
-rw-r--r--tests/expected/cal/bigyear-1m-year9
-rw-r--r--tests/expected/cal/bigyear-1mj-month9
-rw-r--r--tests/expected/cal/bigyear-1mj-year9
-rw-r--r--tests/expected/cal/bigyear-1mjw-month9
-rw-r--r--tests/expected/cal/bigyear-1mjw-year9
-rw-r--r--tests/expected/cal/bigyear-1mw-month9
-rw-r--r--tests/expected/cal/bigyear-1mw-year9
-rw-r--r--tests/expected/cal/bigyear-1s-month9
-rw-r--r--tests/expected/cal/bigyear-1s-year9
-rw-r--r--tests/expected/cal/bigyear-1sj-month9
-rw-r--r--tests/expected/cal/bigyear-1sj-year9
-rw-r--r--tests/expected/cal/bigyear-1sjw-month9
-rw-r--r--tests/expected/cal/bigyear-1sjw-year9
-rw-r--r--tests/expected/cal/bigyear-1sw-month9
-rw-r--r--tests/expected/cal/bigyear-1sw-year9
-rw-r--r--tests/expected/cal/bigyear-3m-month9
-rw-r--r--tests/expected/cal/bigyear-3mj-month9
-rw-r--r--tests/expected/cal/bigyear-3mjw-month9
-rw-r--r--tests/expected/cal/bigyear-3mw-month9
-rw-r--r--tests/expected/cal/bigyear-3s-month9
-rw-r--r--tests/expected/cal/bigyear-3sj-month9
-rw-r--r--tests/expected/cal/bigyear-3sjw-month9
-rw-r--r--tests/expected/cal/bigyear-3sw-month9
-rw-r--r--tests/expected/cal/color0
-rw-r--r--tests/expected/cal/color-first-day8
-rw-r--r--tests/expected/cal/color-last-day8
-rw-r--r--tests/expected/cal/color-reformation-corner-cases-18
-rw-r--r--tests/expected/cal/color-reformation-corner-cases-28
-rw-r--r--tests/expected/cal/color-reformation-corner-cases-38
-rw-r--r--tests/expected/cal/color-reformation-corner-cases-48
-rw-r--r--tests/expected/cal/color-vertical8
-rw-r--r--tests/expected/cal/color-vertical-week9
-rw-r--r--tests/expected/cal/colorw0
-rw-r--r--tests/expected/cal/colorw-first-day-week-numbers8
-rw-r--r--tests/expected/cal/colorw-last-day-week-numbers8
-rw-r--r--tests/expected/cal/colorw-reformation-corner-cases-1-week-numbers8
-rw-r--r--tests/expected/cal/colorw-reformation-corner-cases-2-week-numbers8
-rw-r--r--tests/expected/cal/colorw-reformation-corner-cases-3-week-numbers8
-rw-r--r--tests/expected/cal/colorw-reformation-corner-cases-4-week-numbers8
-rw-r--r--tests/expected/cal/column-527
-rw-r--r--tests/expected/cal/column-619
-rw-r--r--tests/expected/cal/column-auto35
-rw-r--r--tests/expected/cal/jan1753-3w9
-rw-r--r--tests/expected/cal/jan1753-m3w9
-rw-r--r--tests/expected/cal/month-1m9
-rw-r--r--tests/expected/cal/month-1mj9
-rw-r--r--tests/expected/cal/month-1mjw9
-rw-r--r--tests/expected/cal/month-1mw9
-rw-r--r--tests/expected/cal/month-1s9
-rw-r--r--tests/expected/cal/month-1sj9
-rw-r--r--tests/expected/cal/month-1sjw9
-rw-r--r--tests/expected/cal/month-1sw9
-rw-r--r--tests/expected/cal/month-3m9
-rw-r--r--tests/expected/cal/month-3mj9
-rw-r--r--tests/expected/cal/month-3mjw9
-rw-r--r--tests/expected/cal/month-3mw9
-rw-r--r--tests/expected/cal/month-3s9
-rw-r--r--tests/expected/cal/month-3sj9
-rw-r--r--tests/expected/cal/month-3sjw9
-rw-r--r--tests/expected/cal/month-3sw9
-rw-r--r--tests/expected/cal/month-Sn201537
-rw-r--r--tests/expected/cal/month-Sn2157
-rw-r--r--tests/expected/cal/month-Sn39
-rw-r--r--tests/expected/cal/month-Sn51137
-rw-r--r--tests/expected/cal/sep1752-1m-month9
-rw-r--r--tests/expected/cal/sep1752-1m-year9
-rw-r--r--tests/expected/cal/sep1752-1mj-month9
-rw-r--r--tests/expected/cal/sep1752-1mj-year9
-rw-r--r--tests/expected/cal/sep1752-1mjw-month9
-rw-r--r--tests/expected/cal/sep1752-1mjw-year9
-rw-r--r--tests/expected/cal/sep1752-1mw-month9
-rw-r--r--tests/expected/cal/sep1752-1mw-year9
-rw-r--r--tests/expected/cal/sep1752-1s-month9
-rw-r--r--tests/expected/cal/sep1752-1s-year9
-rw-r--r--tests/expected/cal/sep1752-1sj-month9
-rw-r--r--tests/expected/cal/sep1752-1sj-year9
-rw-r--r--tests/expected/cal/sep1752-1sjw-month9
-rw-r--r--tests/expected/cal/sep1752-1sjw-year9
-rw-r--r--tests/expected/cal/sep1752-1sw-month9
-rw-r--r--tests/expected/cal/sep1752-1sw-year9
-rw-r--r--tests/expected/cal/sep1752-3m-month9
-rw-r--r--tests/expected/cal/sep1752-3mj-month9
-rw-r--r--tests/expected/cal/sep1752-3mjw-month9
-rw-r--r--tests/expected/cal/sep1752-3mw-month9
-rw-r--r--tests/expected/cal/sep1752-3s-month9
-rw-r--r--tests/expected/cal/sep1752-3sj-month9
-rw-r--r--tests/expected/cal/sep1752-3sjw-month9
-rw-r--r--tests/expected/cal/sep1752-3sw-month9
-rw-r--r--tests/expected/cal/sep1752-week-iso9
-rw-r--r--tests/expected/cal/vertical-1mjv9
-rw-r--r--tests/expected/cal/vertical-1mjwv10
-rw-r--r--tests/expected/cal/vertical-1mv9
-rw-r--r--tests/expected/cal/vertical-1mwv10
-rw-r--r--tests/expected/cal/vertical-1sjv9
-rw-r--r--tests/expected/cal/vertical-1sjwv10
-rw-r--r--tests/expected/cal/vertical-1sv9
-rw-r--r--tests/expected/cal/vertical-1swv10
-rw-r--r--tests/expected/cal/vertical-3mjv9
-rw-r--r--tests/expected/cal/vertical-3mjwv10
-rw-r--r--tests/expected/cal/vertical-3mv9
-rw-r--r--tests/expected/cal/vertical-3mwv10
-rw-r--r--tests/expected/cal/vertical-3sjv9
-rw-r--r--tests/expected/cal/vertical-3sjwv10
-rw-r--r--tests/expected/cal/vertical-3sv9
-rw-r--r--tests/expected/cal/vertical-3swv10
-rw-r--r--tests/expected/cal/vertical-vSn201603
-rw-r--r--tests/expected/cal/vertical-vSn2163
-rw-r--r--tests/expected/cal/vertical-vSn39
-rw-r--r--tests/expected/cal/vertical-vSn51153
-rw-r--r--tests/expected/cal/weekarg-1m-week539
-rw-r--r--tests/expected/cal/weekarg-1m-week53-color9
-rw-r--r--tests/expected/cal/weekarg-1mj-week539
-rw-r--r--tests/expected/cal/weekarg-1mj-week53-color9
-rw-r--r--tests/expected/cal/weekarg-3m-week409
-rw-r--r--tests/expected/cal/weekarg-3m-week40-color9
-rw-r--r--tests/expected/cal/weekarg-3m-week52-color9
-rw-r--r--tests/expected/cal/weekarg-3m-week53-color9
-rw-r--r--tests/expected/cal/weekarg-3mj-week409
-rw-r--r--tests/expected/cal/weekarg-3mj-week40-color9
-rw-r--r--tests/expected/cal/weekarg-3s-week409
-rw-r--r--tests/expected/cal/weekarg-3s-week54-color9
-rw-r--r--tests/expected/cal/weekarg-3sj-week409
-rw-r--r--tests/expected/cal/weekarg-m-week409
-rw-r--r--tests/expected/cal/weekarg-mj-week409
-rw-r--r--tests/expected/cal/weekarg-s-week409
-rw-r--r--tests/expected/cal/weekarg-sj-week409
-rw-r--r--tests/expected/cal/weeknum0
-rw-r--r--tests/expected/cal/weeknum-3mjw57
-rw-r--r--tests/expected/cal/weeknum-3mw57
-rw-r--r--tests/expected/cal/weeknum-3sjw57
-rw-r--r--tests/expected/cal/weeknum-3sw57
-rw-r--r--tests/expected/cal/weeknum-ymjw239
-rw-r--r--tests/expected/cal/weeknum-ymw239
-rw-r--r--tests/expected/cal/weeknum-ysjw239
-rw-r--r--tests/expected/cal/weeknum-ysw239
-rw-r--r--tests/expected/cal/year-ym35
-rw-r--r--tests/expected/cal/year-ymj35
-rw-r--r--tests/expected/cal/year-ymjw35
-rw-r--r--tests/expected/cal/year-ymw35
-rw-r--r--tests/expected/cal/year-ys35
-rw-r--r--tests/expected/cal/year-ysj35
-rw-r--r--tests/expected/cal/year-ysjw35
-rw-r--r--tests/expected/cal/year-ysw35
-rw-r--r--tests/expected/chfn/gecos6
-rw-r--r--tests/expected/col/io0
-rw-r--r--tests/expected/col/io-allocate-here2
-rw-r--r--tests/expected/col/io-cr1
-rw-r--r--tests/expected/col/io-cs-alternate1
-rw-r--r--tests/expected/col/io-cs-normal2
-rw-r--r--tests/expected/col/io-esc-backspace1
-rw-r--r--tests/expected/col/io-esc-tab2
-rw-r--r--tests/expected/col/io-flushing199
-rw-r--r--tests/expected/col/io-half-line2
-rw-r--r--tests/expected/col/io-reverse-lf2
-rw-r--r--tests/expected/col/io-so-si0
-rw-r--r--tests/expected/col/io-tab-backspace1
-rw-r--r--tests/expected/col/io-trailing-spaces2
-rw-r--r--tests/expected/col/io-various-spaces1
-rw-r--r--tests/expected/col/io-vt13
-rw-r--r--tests/expected/col/io-vt25
-rw-r--r--tests/expected/col/multibyte-invalid1
-rw-r--r--tests/expected/col/multibyte-valid1
-rw-r--r--tests/expected/col/newlines0
-rw-r--r--tests/expected/col/newlines-one-line-no-nl1
-rw-r--r--tests/expected/col/newlines-one-line-with-nl1
-rw-r--r--tests/expected/col/newlines-second-line-no-nl2
-rw-r--r--tests/expected/col/newlines-second-line-with-nl2
-rw-r--r--tests/expected/col/newlines-zero-length-file0
-rw-r--r--tests/expected/col/options0
-rw-r--r--tests/expected/col/options-no-backspaces1
-rw-r--r--tests/expected/col/options-pass2
-rw-r--r--tests/expected/col/options-spaces1
-rw-r--r--tests/expected/col/options-tabs1
-rw-r--r--tests/expected/colcrt/functional-half-lines89
-rw-r--r--tests/expected/colcrt/functional-no-options74
-rw-r--r--tests/expected/colcrt/functional-no-underlining44
-rw-r--r--tests/expected/colcrt/functional-short-options89
-rw-r--r--tests/expected/colcrt/regressions-crash12
-rw-r--r--tests/expected/colcrt/regressions-crash210
-rw-r--r--tests/expected/colcrt/regressions-hang13
-rw-r--r--tests/expected/colrm/rm2-23
-rw-r--r--tests/expected/column/columnate0
-rw-r--r--tests/expected/column/columnate-fill-cols-2501
-rw-r--r--tests/expected/column/columnate-fill-cols-505
-rw-r--r--tests/expected/column/columnate-fill-cols-803
-rw-r--r--tests/expected/column/columnate-fill-rows-2501
-rw-r--r--tests/expected/column/columnate-fill-rows-505
-rw-r--r--tests/expected/column/columnate-fill-rows-803
-rw-r--r--tests/expected/column/invalid-multibyte1
-rw-r--r--tests/expected/column/multi-file10
-rw-r--r--tests/expected/column/separator_table10
-rw-r--r--tests/expected/column/table0
-rw-r--r--tests/expected/column/table-default6
-rw-r--r--tests/expected/column/table-empty-column1
-rw-r--r--tests/expected/column/table-empty-column-at-eol1
-rw-r--r--tests/expected/column/table-empty-column-at-eol21
-rw-r--r--tests/expected/column/table-empty-lines6
-rw-r--r--tests/expected/column/table-headers42
-rw-r--r--tests/expected/column/table-hide41
-rw-r--r--tests/expected/column/table-input-separator6
-rw-r--r--tests/expected/column/table-input-separator-space6
-rw-r--r--tests/expected/column/table-long41
-rw-r--r--tests/expected/column/table-neg-11
-rw-r--r--tests/expected/column/table-neg-1-21
-rw-r--r--tests/expected/column/table-neg-21
-rw-r--r--tests/expected/column/table-noempty-lines4
-rw-r--r--tests/expected/column/table-order42
-rw-r--r--tests/expected/column/table-output-separator6
-rw-r--r--tests/expected/column/table-range1
-rw-r--r--tests/expected/column/table-right42
-rw-r--r--tests/expected/column/table-tree42
-rw-r--r--tests/expected/column/table-truncate42
-rw-r--r--tests/expected/column/table-wrap56
-rw-r--r--tests/expected/cramfs/doubles3
-rw-r--r--tests/expected/cramfs/fsck-bad-header-nopad-4K-be21
-rw-r--r--tests/expected/cramfs/fsck-bad-header-nopad-4K-be.err15
-rw-r--r--tests/expected/cramfs/fsck-bad-header-nopad-4K-le21
-rw-r--r--tests/expected/cramfs/fsck-bad-header-nopad-4K-le.err15
-rw-r--r--tests/expected/cramfs/fsck-bad-header-pad-4K-be21
-rw-r--r--tests/expected/cramfs/fsck-bad-header-pad-4K-be.err15
-rw-r--r--tests/expected/cramfs/fsck-bad-header-pad-4K-le21
-rw-r--r--tests/expected/cramfs/fsck-bad-header-pad-4K-le.err15
-rw-r--r--tests/expected/cramfs/fsck-bad-header-pad-64K-be21
-rw-r--r--tests/expected/cramfs/fsck-bad-header-pad-64K-be.err15
-rw-r--r--tests/expected/cramfs/fsck-bad-header-pad-64K-le21
-rw-r--r--tests/expected/cramfs/fsck-bad-header-pad-64K-le.err15
-rw-r--r--tests/expected/cramfs/fsck-bad-header.err0
-rw-r--r--tests/expected/cramfs/fsck-endianness8
-rw-r--r--tests/expected/cramfs/mkfs4124
-rw-r--r--tests/expected/cramfs/mkfs-endianness80
-rw-r--r--tests/expected/dmesg/colors105
-rw-r--r--tests/expected/dmesg/console-levels248
-rw-r--r--tests/expected/dmesg/decode105
-rw-r--r--tests/expected/dmesg/delta105
-rw-r--r--tests/expected/dmesg/facilities96
-rw-r--r--tests/expected/dmesg/indentation35
-rw-r--r--tests/expected/dmesg/limit4
-rw-r--r--tests/expected/eject/umount-by-disk1
-rw-r--r--tests/expected/eject/umount-by-disk-mounted1
-rw-r--r--tests/expected/eject/umount-by-disk-mounted-partition2
-rw-r--r--tests/expected/eject/umount-by-partition2
-rw-r--r--tests/expected/eject/umount-by-partition-mounted2
-rw-r--r--tests/expected/fadvise/drop23
-rw-r--r--tests/expected/fdisk/align-512-4K80
-rw-r--r--tests/expected/fdisk/align-512-4K-6381
-rw-r--r--tests/expected/fdisk/align-512-4K-md80
-rw-r--r--tests/expected/fdisk/align-512-51268
-rw-r--r--tests/expected/fdisk/align-512-512-topology80
-rw-r--r--tests/expected/fdisk/bsd_0_64.BE213
-rw-r--r--tests/expected/fdisk/bsd_0_64.LE213
-rw-r--r--tests/expected/fdisk/bsd_0_64_alpha.LE217
-rw-r--r--tests/expected/fdisk/bsd_1_0.BE213
-rw-r--r--tests/expected/fdisk/bsd_1_0.LE213
-rw-r--r--tests/expected/fdisk/gpt0
-rw-r--r--tests/expected/fdisk/gpt-change-type-by-number20
-rw-r--r--tests/expected/fdisk/gpt-change-type-by-uuid20
-rw-r--r--tests/expected/fdisk/gpt-corrupt-backup-table20
-rw-r--r--tests/expected/fdisk/gpt-corrupt-primary-table20
-rw-r--r--tests/expected/fdisk/gpt-create-again-partition20
-rw-r--r--tests/expected/fdisk/gpt-create-partitions0
-rw-r--r--tests/expected/fdisk/gpt-delete-partition19
-rw-r--r--tests/expected/fdisk/gpt-empty-pt12
-rw-r--r--tests/expected/fdisk/gpt-resize42
-rw-r--r--tests/expected/fdisk/gpt-resize.err3
-rw-r--r--tests/expected/fdisk/id1
-rw-r--r--tests/expected/fdisk/id-create-mbr-with-id-0x11
-rw-r--r--tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc0
-rw-r--r--tests/expected/fdisk/id-create-mbr-with-id-0x21
-rw-r--r--tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc0
-rw-r--r--tests/expected/fdisk/id.sparc1
-rw-r--r--tests/expected/fdisk/mbr-dos-mode0
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-create-another-log-par20
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-create-extended-par16
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-create-logical-par20
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-create-primary-partition15
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-delete-extended-par12
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-delete-logical-par17
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-delete-primary-par19
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-empty-pt13
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-re-create-primary-par15
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-set-partition-type15
-rw-r--r--tests/expected/fdisk/mbr-dos-mode-set-primary-par-active15
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete19
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-1st-active15
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-1st-primary15
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete20
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate15
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-2nd-primary16
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-empty-pt14
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-extended17
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-extended-delete12
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end47
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-logical21
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-logical-delete18
-rw-r--r--tests/expected/fdisk/mbr-nondos-mode-logical-recreate21
-rw-r--r--tests/expected/fdisk/mbr-sort0
-rw-r--r--tests/expected/fdisk/mbr-sort-create-logical-partitions22
-rw-r--r--tests/expected/fdisk/mbr-sort-create-primary-partitions18
-rw-r--r--tests/expected/fdisk/mbr-sort-empty-pt10
-rw-r--r--tests/expected/fdisk/mbr-sort-fix-order20
-rw-r--r--tests/expected/fdisk/oddinput7
-rw-r--r--tests/expected/fdisk/oddinput.err4
-rw-r--r--tests/expected/fdisk/oddinput.toosmall1
-rw-r--r--tests/expected/fdisk/sunlabel0
-rw-r--r--tests/expected/fdisk/sunlabel-create-first-partition16
-rw-r--r--tests/expected/fdisk/sunlabel-create-second-partition29
-rw-r--r--tests/expected/fdisk/sunlabel-delete-all-partitions1
-rw-r--r--tests/expected/fdisk/sunlabel-empty-sun-pt14
-rw-r--r--tests/expected/fdisk/sunlabel-set-first-par-mountable16
-rw-r--r--tests/expected/fdisk/sunlabel-set-first-par-readonly16
-rw-r--r--tests/expected/fdisk/sunlabel-set-partition-sysid16
-rw-r--r--tests/expected/fincore/count.409653
-rw-r--r--tests/expected/fincore/count.6553653
-rw-r--r--tests/expected/fincore/count.err.40964
-rw-r--r--tests/expected/fincore/count.err.655364
-rw-r--r--tests/expected/fincore/count.err.nosize4
-rw-r--r--tests/expected/fincore/count.nosize53
-rw-r--r--tests/expected/findmnt/filter-options31
-rw-r--r--tests/expected/findmnt/filter-options-name7
-rw-r--r--tests/expected/findmnt/filter-options-nameval3
-rw-r--r--tests/expected/findmnt/filter-options-nameval-multi3
-rw-r--r--tests/expected/findmnt/filter-options-nameval-neg33
-rw-r--r--tests/expected/findmnt/filter-options-neg5
-rw-r--r--tests/expected/findmnt/filter-options-no5
-rw-r--r--tests/expected/findmnt/filter-options-no-multi3
-rw-r--r--tests/expected/findmnt/filter-types4
-rw-r--r--tests/expected/findmnt/filter-types-multi5
-rw-r--r--tests/expected/findmnt/filter-types-neg31
-rw-r--r--tests/expected/findmnt/outputs-default34
-rw-r--r--tests/expected/findmnt/outputs-force-tree34
-rw-r--r--tests/expected/findmnt/outputs-kernel34
-rw-r--r--tests/expected/findmnt/outputs-messy-mountinfo31
-rw-r--r--tests/expected/findmnt/outputs-submounts17
-rw-r--r--tests/expected/findmnt/target-non-root1
-rw-r--r--tests/expected/findmnt/target-root3
-rw-r--r--tests/expected/fsck/ismounted1
-rw-r--r--tests/expected/getopt/basic9
-rw-r--r--tests/expected/getopt/basic.err0
-rw-r--r--tests/expected/getopt/options-alternative_option_clash2
-rw-r--r--tests/expected/getopt/options-alternative_option_clash.err0
-rw-r--r--tests/expected/getopt/options-alternative_option_long2
-rw-r--r--tests/expected/getopt/options-alternative_option_long.err0
-rw-r--r--tests/expected/getopt/options-alternative_option_short2
-rw-r--r--tests/expected/getopt/options-alternative_option_short.err0
-rw-r--r--tests/expected/getopt/options-compatible3
-rw-r--r--tests/expected/getopt/options-compatible.err2
-rw-r--r--tests/expected/getopt/options-csh2
-rw-r--r--tests/expected/getopt/options-csh.err0
-rw-r--r--tests/expected/getopt/options-invalid_getopt_option1
-rw-r--r--tests/expected/getopt/options-invalid_getopt_option.err2
-rw-r--r--tests/expected/getopt/options-invocation_model_one2
-rw-r--r--tests/expected/getopt/options-invocation_model_one.err0
-rw-r--r--tests/expected/getopt/options-invocation_model_three_as_one2
-rw-r--r--tests/expected/getopt/options-invocation_model_three_as_one.err0
-rw-r--r--tests/expected/getopt/options-invocation_model_two_as_one2
-rw-r--r--tests/expected/getopt/options-invocation_model_two_as_one.err0
-rw-r--r--tests/expected/getopt/options-invocation_without_parameters1
-rw-r--r--tests/expected/getopt/options-invocation_without_parameters.err2
-rw-r--r--tests/expected/getopt/options-long_option_ambiguous_12
-rw-r--r--tests/expected/getopt/options-long_option_ambiguous_1.err1
-rw-r--r--tests/expected/getopt/options-longopts2
-rw-r--r--tests/expected/getopt/options-longopts.err0
-rw-r--r--tests/expected/getopt/options-name_option_long2
-rw-r--r--tests/expected/getopt/options-name_option_long.err2
-rw-r--r--tests/expected/getopt/options-name_option_short2
-rw-r--r--tests/expected/getopt/options-name_option_short.err2
-rw-r--r--tests/expected/getopt/options-no-arguments1
-rw-r--r--tests/expected/getopt/options-no-arguments.err2
-rw-r--r--tests/expected/getopt/options-non-option4
-rw-r--r--tests/expected/getopt/options-non-option.err0
-rw-r--r--tests/expected/getopt/options-posix_correctly4
-rw-r--r--tests/expected/getopt/options-posix_correctly.err0
-rw-r--r--tests/expected/getopt/options-quiet_option_long2
-rw-r--r--tests/expected/getopt/options-quiet_option_long.err0
-rw-r--r--tests/expected/getopt/options-quiet_option_short2
-rw-r--r--tests/expected/getopt/options-quiet_option_short.err0
-rw-r--r--tests/expected/getopt/options-quiet_output_option_long1
-rw-r--r--tests/expected/getopt/options-quiet_output_option_long.err4
-rw-r--r--tests/expected/getopt/options-quiet_output_option_short1
-rw-r--r--tests/expected/getopt/options-quiet_output_option_short.err4
-rw-r--r--tests/expected/getopt/options-same_long_short_options2
-rw-r--r--tests/expected/getopt/options-same_long_short_options.err0
-rw-r--r--tests/expected/getopt/options-sh2
-rw-r--r--tests/expected/getopt/options-sh.err0
-rw-r--r--tests/expected/getopt/options-test_for_enhanced_getopt1
-rw-r--r--tests/expected/getopt/options-test_for_enhanced_getopt.err0
-rw-r--r--tests/expected/getopt/options-unknown_options2
-rw-r--r--tests/expected/getopt/options-unknown_options.err2
-rw-r--r--tests/expected/getopt/options-unquoted_option_bash5
-rw-r--r--tests/expected/getopt/options-unquoted_option_bash.err0
-rw-r--r--tests/expected/getopt/options-unquoted_option_tcsh5
-rw-r--r--tests/expected/getopt/options-unquoted_option_tcsh.err0
-rw-r--r--tests/expected/getopt/options-weird_quoting_bash5
-rw-r--r--tests/expected/getopt/options-weird_quoting_bash.err0
-rw-r--r--tests/expected/getopt/options-weird_quoting_tcsh2
-rw-r--r--tests/expected/getopt/options-weird_quoting_tcsh.err0
-rw-r--r--tests/expected/getopt/options.err0
-rw-r--r--tests/expected/hardlink/options-content26
-rw-r--r--tests/expected/hardlink/options-dryrun26
-rw-r--r--tests/expected/hardlink/options-maximum-size-819135
-rw-r--r--tests/expected/hardlink/options-maximum-size-819235
-rw-r--r--tests/expected/hardlink/options-nargs26
-rw-r--r--tests/expected/hardlink/options-noregex1
-rw-r--r--tests/expected/hardlink/options-orig26
-rw-r--r--tests/expected/hardlink/options-regex-escapes26
-rw-r--r--tests/expected/hexdump/format-strings-1b_char41
-rw-r--r--tests/expected/hexdump/format-strings-1b_octal41
-rw-r--r--tests/expected/hexdump/format-strings-2b_dec41
-rw-r--r--tests/expected/hexdump/format-strings-2b_dec.BE41
-rw-r--r--tests/expected/hexdump/format-strings-2b_hex41
-rw-r--r--tests/expected/hexdump/format-strings-2b_hex.BE41
-rw-r--r--tests/expected/hexdump/format-strings-2b_octal41
-rw-r--r--tests/expected/hexdump/format-strings-2b_octal.BE41
-rw-r--r--tests/expected/hexdump/format-strings-canon41
-rw-r--r--tests/expected/hexdump/format-strings-empty-format1
-rw-r--r--tests/expected/hexdump/format-strings-empty-format.BE1
-rw-r--r--tests/expected/hexdump/highlighting-1b_char-141
-rw-r--r--tests/expected/hexdump/highlighting-1b_char-241
-rw-r--r--tests/expected/hexdump/highlighting-1b_char-341
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-141
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-241
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-2.BE41
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-341
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-441
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-4.BE41
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-541
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-5.BE41
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-641
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-741
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-7.BE41
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-841
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-8.BE41
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-941
-rw-r--r--tests/expected/hexdump/highlighting-1b_octal-9.BE41
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-141
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-1.BE41
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-241
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-2.BE41
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-341
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-3.BE41
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-441
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-4.BE41
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-541
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-5.BE41
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-61
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-71
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-841
-rw-r--r--tests/expected/hexdump/highlighting-2b_dec-8.BE41
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-121
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-1.BE21
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-221
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-2.BE21
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-32
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-3.BE2
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-42
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-4.BE2
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-51
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-62
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-6.BE2
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-72
-rw-r--r--tests/expected/hexdump/highlighting-4b_dec-7.BE2
-rw-r--r--tests/expected/hexdump/highlighting-canon-141
-rw-r--r--tests/expected/hexdump/highlighting-canon-1.BE41
-rw-r--r--tests/expected/hexdump/highlighting-canon-241
-rw-r--r--tests/expected/ipcs/headers0
-rw-r--r--tests/expected/ipcs/headers-all-headers35
-rw-r--r--tests/expected/ipcs/headers-mesg-headers8
-rw-r--r--tests/expected/ipcs/headers-sem-headers6
-rw-r--r--tests/expected/ipcs/headers-shm-headers8
-rw-r--r--tests/expected/ipcs/limits7
-rw-r--r--tests/expected/ipcs/limits24
-rw-r--r--tests/expected/ipcs/mk-rm-msg3
-rw-r--r--tests/expected/ipcs/mk-rm-sem4
-rw-r--r--tests/expected/ipcs/mk-rm-shm4
-rw-r--r--tests/expected/isosize/print-size-default_output1
-rw-r--r--tests/expected/isosize/print-size-divisor_output1
-rw-r--r--tests/expected/isosize/print-size-sector_output1
-rw-r--r--tests/expected/kill/all_processes3
-rw-r--r--tests/expected/kill/all_processes.err5
-rw-r--r--tests/expected/kill/name_to_number1
-rw-r--r--tests/expected/kill/options1
-rw-r--r--tests/expected/kill/print_pid1
-rw-r--r--tests/expected/kill/queue1
-rw-r--r--tests/expected/lib/procfs-one-process14
-rw-r--r--tests/expected/lib/procfs-stat-nth6
-rw-r--r--tests/expected/lib/procfs-stat-nth.err2
-rw-r--r--tests/expected/libfdisk/gpt-all-defaults24
-rw-r--r--tests/expected/libfdisk/gpt-all-defaults-with-typo24
-rw-r--r--tests/expected/libfdisk/gpt-getattr2
-rw-r--r--tests/expected/libfdisk/gpt-setattr2
-rw-r--r--tests/expected/libfdisk/mkpart0
-rw-r--r--tests/expected/libfdisk/mkpart-full0
-rw-r--r--tests/expected/libfdisk/mkpart-full-gpt30
-rw-r--r--tests/expected/libfdisk/mkpart-full-gpt-err-overlap12
-rw-r--r--tests/expected/libfdisk/mkpart-full-gpt-err-overlap.err2
-rw-r--r--tests/expected/libfdisk/mkpart-full-gpt-nopartno30
-rw-r--r--tests/expected/libfdisk/mkpart-full-gpt-partno-gap30
-rw-r--r--tests/expected/libfdisk/mkpart-full-gpt-space-gap24
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-err-logical17
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-err-logical.err1
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-err-nospace10
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-err-nospace.err2
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-err-primary10
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-err-primary.err2
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-logical33
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-nopartno33
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-partno-gap26
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-primary21
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-primary-nopartno21
-rw-r--r--tests/expected/libfdisk/mkpart-full-mbr-space-gap18
-rw-r--r--tests/expected/libfdisk/mkpart-gpt23
-rw-r--r--tests/expected/libfdisk/mkpart-mbr17
-rw-r--r--tests/expected/libfdisk/mkpart-mbr-logic26
-rw-r--r--tests/expected/libfdisk/mkpart-mbr-nopartno26
-rw-r--r--tests/expected/libmount/context5
-rw-r--r--tests/expected/libmount/context-X-comment1
-rw-r--r--tests/expected/libmount/context-mount-by-devname1
-rw-r--r--tests/expected/libmount/context-mount-by-label1
-rw-r--r--tests/expected/libmount/context-mount-by-uuid2
-rw-r--r--tests/expected/libmount/context-mount-flags8
-rw-r--r--tests/expected/libmount/context-mount-loopdev2
-rw-r--r--tests/expected/libmount/context-py5
-rw-r--r--tests/expected/libmount/context-py-mount-by-devname1
-rw-r--r--tests/expected/libmount/context-py-mount-by-label1
-rw-r--r--tests/expected/libmount/context-py-mount-by-uuid2
-rw-r--r--tests/expected/libmount/context-py-mount-flags5
-rw-r--r--tests/expected/libmount/context-py-mount-loopdev2
-rw-r--r--tests/expected/libmount/context-py-umount-by-devname1
-rw-r--r--tests/expected/libmount/context-py-umount-by-mountpoint1
-rw-r--r--tests/expected/libmount/context-py-x-mount.mkdir1
-rw-r--r--tests/expected/libmount/context-umount-by-devname1
-rw-r--r--tests/expected/libmount/context-umount-by-mountpoint1
-rw-r--r--tests/expected/libmount/context-utab4
-rw-r--r--tests/expected/libmount/context-utab-mount-by-devname1
-rw-r--r--tests/expected/libmount/context-utab-mount-uhelper1
-rw-r--r--tests/expected/libmount/context-utab-mount-uhelper-subvol1
-rw-r--r--tests/expected/libmount/context-utab-py4
-rw-r--r--tests/expected/libmount/context-utab-py-mount-by-devname1
-rw-r--r--tests/expected/libmount/context-utab-py-mount-uhelper1
-rw-r--r--tests/expected/libmount/context-utab-py-mount-uhelper-subvol1
-rw-r--r--tests/expected/libmount/context-utab-py-umount1
-rw-r--r--tests/expected/libmount/context-utab-py-umount-by-devname1
-rw-r--r--tests/expected/libmount/context-utab-py-umount-subvol1
-rw-r--r--tests/expected/libmount/context-utab-umount1
-rw-r--r--tests/expected/libmount/context-utab-umount-by-devname1
-rw-r--r--tests/expected/libmount/context-utab-umount-subvol1
-rw-r--r--tests/expected/libmount/context-x-permanent1
-rw-r--r--tests/expected/libmount/debug-set-from-code1
-rw-r--r--tests/expected/libmount/debug-set-from-env-int1
-rw-r--r--tests/expected/libmount/debug-set-from-env-str1
-rw-r--r--tests/expected/libmount/lock1
-rw-r--r--tests/expected/libmount/loop1
-rw-r--r--tests/expected/libmount/loop-conflict2
-rw-r--r--tests/expected/libmount/loop-dev-loop1
-rw-r--r--tests/expected/libmount/loop-explicit-rw2
-rw-r--r--tests/expected/libmount/loop-file1
-rw-r--r--tests/expected/libmount/loop-file-o-loop1
-rw-r--r--tests/expected/libmount/loop-o-loop-val1
-rw-r--r--tests/expected/libmount/loop-o-loop-val-conflict2
-rw-r--r--tests/expected/libmount/loop-o-loop-val-initialized2
-rw-r--r--tests/expected/libmount/loop-overlay7
-rw-r--r--tests/expected/libmount/loop-reuse1
-rw-r--r--tests/expected/libmount/optstr-append1
-rw-r--r--tests/expected/libmount/optstr-append-empty-value1
-rw-r--r--tests/expected/libmount/optstr-append-value1
-rw-r--r--tests/expected/libmount/optstr-apply-linux2
-rw-r--r--tests/expected/libmount/optstr-apply-user2
-rw-r--r--tests/expected/libmount/optstr-apply-user-Xx2
-rw-r--r--tests/expected/libmount/optstr-apply-user-large-X2
-rw-r--r--tests/expected/libmount/optstr-apply-user-small-x2
-rw-r--r--tests/expected/libmount/optstr-deduplicate1
-rw-r--r--tests/expected/libmount/optstr-deduplicate-empty1
-rw-r--r--tests/expected/libmount/optstr-flags2
-rw-r--r--tests/expected/libmount/optstr-get1
-rw-r--r--tests/expected/libmount/optstr-get-value1
-rw-r--r--tests/expected/libmount/optstr-match13
-rw-r--r--tests/expected/libmount/optstr-prepend1
-rw-r--r--tests/expected/libmount/optstr-prepend-empty-value1
-rw-r--r--tests/expected/libmount/optstr-prepend-value1
-rw-r--r--tests/expected/libmount/optstr-remove1
-rw-r--r--tests/expected/libmount/optstr-remove-empty-value1
-rw-r--r--tests/expected/libmount/optstr-remove-quoted1
-rw-r--r--tests/expected/libmount/optstr-remove-value1
-rw-r--r--tests/expected/libmount/optstr-set-empty1
-rw-r--r--tests/expected/libmount/optstr-set-large1
-rw-r--r--tests/expected/libmount/optstr-set-new1
-rw-r--r--tests/expected/libmount/optstr-set-new-empty1
-rw-r--r--tests/expected/libmount/optstr-set-new-end1
-rw-r--r--tests/expected/libmount/optstr-set-new-end-empty1
-rw-r--r--tests/expected/libmount/optstr-set-remove1
-rw-r--r--tests/expected/libmount/optstr-set-small1
-rw-r--r--tests/expected/libmount/optstr-split3
-rw-r--r--tests/expected/libmount/tabdiff-mount2
-rw-r--r--tests/expected/libmount/tabdiff-move2
-rw-r--r--tests/expected/libmount/tabdiff-remount3
-rw-r--r--tests/expected/libmount/tabdiff-umount2
-rw-r--r--tests/expected/libmount/tabfiles-copy18
-rw-r--r--tests/expected/libmount/tabfiles-find-fs1
-rw-r--r--tests/expected/libmount/tabfiles-find-pair6
-rw-r--r--tests/expected/libmount/tabfiles-find-source8
-rw-r--r--tests/expected/libmount/tabfiles-find-target6
-rw-r--r--tests/expected/libmount/tabfiles-find-target25
-rw-r--r--tests/expected/libmount/tabfiles-find-target35
-rw-r--r--tests/expected/libmount/tabfiles-parse-fstab65
-rw-r--r--tests/expected/libmount/tabfiles-parse-fstab-broken63
-rw-r--r--tests/expected/libmount/tabfiles-parse-fstab-full83
-rw-r--r--tests/expected/libmount/tabfiles-parse-mountinfo364
-rw-r--r--tests/expected/libmount/tabfiles-parse-mountinfo-nosrc78
-rw-r--r--tests/expected/libmount/tabfiles-parse-mtab75
-rw-r--r--tests/expected/libmount/tabfiles-parse-swaps22
-rw-r--r--tests/expected/libmount/tabfiles-py-copy18
-rw-r--r--tests/expected/libmount/tabfiles-py-find-pair6
-rw-r--r--tests/expected/libmount/tabfiles-py-find-source8
-rw-r--r--tests/expected/libmount/tabfiles-py-find-target6
-rw-r--r--tests/expected/libmount/tabfiles-py-find-target25
-rw-r--r--tests/expected/libmount/tabfiles-py-find-target35
-rw-r--r--tests/expected/libmount/tabfiles-py-parse-fstab65
-rw-r--r--tests/expected/libmount/tabfiles-py-parse-fstab-broken63
-rw-r--r--tests/expected/libmount/tabfiles-py-parse-fstab-full83
-rw-r--r--tests/expected/libmount/tabfiles-py-parse-mountinfo364
-rw-r--r--tests/expected/libmount/tabfiles-py-parse-mtab75
-rw-r--r--tests/expected/libmount/tabfiles-tags-fstab-dev5
-rw-r--r--tests/expected/libmount/tabfiles-tags-fstab-dev2label5
-rw-r--r--tests/expected/libmount/tabfiles-tags-fstab-label5
-rw-r--r--tests/expected/libmount/tabfiles-tags-fstab-label2dev5
-rw-r--r--tests/expected/libmount/tabfiles-tags-fstab-label2uuid5
-rw-r--r--tests/expected/libmount/tabfiles-tags-fstab-uuid5
-rw-r--r--tests/expected/libmount/tabfiles-tags-py-fstab-dev5
-rw-r--r--tests/expected/libmount/tabfiles-tags-py-fstab-dev2label5
-rw-r--r--tests/expected/libmount/tabfiles-tags-py-fstab-label5
-rw-r--r--tests/expected/libmount/tabfiles-tags-py-fstab-label2dev5
-rw-r--r--tests/expected/libmount/tabfiles-tags-py-fstab-label2uuid5
-rw-r--r--tests/expected/libmount/tabfiles-tags-py-fstab-uuid5
-rw-r--r--tests/expected/libmount/update-fstab-add3
-rw-r--r--tests/expected/libmount/update-fstab-replace24
-rw-r--r--tests/expected/libmount/update-mtab-mount5
-rw-r--r--tests/expected/libmount/update-mtab-move5
-rw-r--r--tests/expected/libmount/update-mtab-remount5
-rw-r--r--tests/expected/libmount/update-mtab-umount2
-rw-r--r--tests/expected/libmount/update-py-fstab-replace24
-rw-r--r--tests/expected/libmount/update-utab-mount3
-rw-r--r--tests/expected/libmount/update-utab-move3
-rw-r--r--tests/expected/libmount/update-utab-remount3
-rw-r--r--tests/expected/libmount/update-utab-umount1
-rw-r--r--tests/expected/libmount/utils-ends-with1
-rw-r--r--tests/expected/libmount/utils-kernel-cmdline5
-rw-r--r--tests/expected/libmount/utils-match-fstype1
-rw-r--r--tests/expected/libmount/utils-match-fstype-neg1
-rw-r--r--tests/expected/libmount/utils-match-fstype-neg21
-rw-r--r--tests/expected/libmount/utils-match-options1
-rw-r--r--tests/expected/libmount/utils-match-options-list1
-rw-r--r--tests/expected/libmount/utils-match-options-neg1
-rw-r--r--tests/expected/libmount/utils-match-options-neg-list1
-rw-r--r--tests/expected/libmount/utils-match-options-neg-list21
-rw-r--r--tests/expected/libmount/utils-mountpoint1
-rw-r--r--tests/expected/libmount/utils-mountpoint-root1
-rw-r--r--tests/expected/libmount/utils-mountpoint-subdir1
-rw-r--r--tests/expected/libmount/utils-starts-with1
-rw-r--r--tests/expected/libsmartcols/fromfile1
-rw-r--r--tests/expected/libsmartcols/fromfile-column-separator11
-rw-r--r--tests/expected/libsmartcols/fromfile-export10
-rw-r--r--tests/expected/libsmartcols/fromfile-hidden11
-rw-r--r--tests/expected/libsmartcols/fromfile-noextremes12
-rw-r--r--tests/expected/libsmartcols/fromfile-padding-default11
-rw-r--r--tests/expected/libsmartcols/fromfile-padding-maxout11
-rw-r--r--tests/expected/libsmartcols/fromfile-padding-minout11
-rw-r--r--tests/expected/libsmartcols/fromfile-raw11
-rw-r--r--tests/expected/libsmartcols/fromfile-right11
-rw-r--r--tests/expected/libsmartcols/fromfile-right-maxout11
-rw-r--r--tests/expected/libsmartcols/fromfile-strictwidth11
-rw-r--r--tests/expected/libsmartcols/fromfile-tree11
-rw-r--r--tests/expected/libsmartcols/fromfile-tree-end11
-rw-r--r--tests/expected/libsmartcols/fromfile-tree-json70
-rw-r--r--tests/expected/libsmartcols/fromfile-tree-middle11
-rw-r--r--tests/expected/libsmartcols/fromfile-trunc11
-rw-r--r--tests/expected/libsmartcols/fromfile-wrap17
-rw-r--r--tests/expected/libsmartcols/fromfile-wrap-tree18
-rw-r--r--tests/expected/libsmartcols/fromfile-wrapnl19
-rw-r--r--tests/expected/libsmartcols/fromfile-wrapnl-tree19
-rw-r--r--tests/expected/libsmartcols/title16
-rw-r--r--tests/expected/logger/errors-check_socket41
-rw-r--r--tests/expected/logger/errors-check_socket.err0
-rw-r--r--tests/expected/logger/errors-id_with_space5
-rw-r--r--tests/expected/logger/errors-id_with_space.err5
-rw-r--r--tests/expected/logger/errors-invalid_prio1
-rw-r--r--tests/expected/logger/errors-invalid_prio.err1
-rw-r--r--tests/expected/logger/errors-invalid_socket1
-rw-r--r--tests/expected/logger/errors-invalid_socket.err1
-rw-r--r--tests/expected/logger/errors-kern_priority1
-rw-r--r--tests/expected/logger/errors-kern_priority.err1
-rw-r--r--tests/expected/logger/errors-kern_priority_numeric1
-rw-r--r--tests/expected/logger/errors-kern_priority_numeric.err1
-rw-r--r--tests/expected/logger/errors-multi-line1
-rw-r--r--tests/expected/logger/errors-multi-line.err3
-rw-r--r--tests/expected/logger/errors-rfc5424_exceed_size1
-rw-r--r--tests/expected/logger/errors-rfc5424_exceed_size.err1
-rw-r--r--tests/expected/logger/errors-rfc5424_msgid_with_space1
-rw-r--r--tests/expected/logger/errors-rfc5424_msgid_with_space.err1
-rw-r--r--tests/expected/logger/errors-tag_with_space2
-rw-r--r--tests/expected/logger/errors-tag_with_space.err2
-rw-r--r--tests/expected/logger/errors-tcp1
-rw-r--r--tests/expected/logger/errors-tcp.err1
-rw-r--r--tests/expected/logger/formats-check_socket0
-rw-r--r--tests/expected/logger/formats-check_socket.err0
-rw-r--r--tests/expected/logger/formats-octet_counting0
-rw-r--r--tests/expected/logger/formats-octet_counting.err2
-rw-r--r--tests/expected/logger/formats-priorities0
-rw-r--r--tests/expected/logger/formats-priorities.err304
-rw-r--r--tests/expected/logger/formats-rfc31640
-rw-r--r--tests/expected/logger/formats-rfc3164.err2
-rw-r--r--tests/expected/logger/formats-rfc5424_msgid0
-rw-r--r--tests/expected/logger/formats-rfc5424_msgid.err2
-rw-r--r--tests/expected/logger/formats-rfc5424_nohost0
-rw-r--r--tests/expected/logger/formats-rfc5424_nohost.err2
-rw-r--r--tests/expected/logger/formats-rfc5424_notime0
-rw-r--r--tests/expected/logger/formats-rfc5424_notime.err2
-rw-r--r--tests/expected/logger/formats-rfc5424_simple0
-rw-r--r--tests/expected/logger/formats-rfc5424_simple.err2
-rw-r--r--tests/expected/logger/input_empty_line3
-rw-r--r--tests/expected/logger/input_prio_prefix1
-rw-r--r--tests/expected/logger/input_simple1
-rw-r--r--tests/expected/logger/journald0
-rw-r--r--tests/expected/logger/journald.err3
-rw-r--r--tests/expected/logger/options-check_socket0
-rw-r--r--tests/expected/logger/options-check_socket.err0
-rw-r--r--tests/expected/logger/options-input_file_empty_line0
-rw-r--r--tests/expected/logger/options-input_file_empty_line.err4
-rw-r--r--tests/expected/logger/options-input_file_prio_prefix0
-rw-r--r--tests/expected/logger/options-input_file_prio_prefix.err2
-rw-r--r--tests/expected/logger/options-input_file_simple0
-rw-r--r--tests/expected/logger/options-input_file_simple.err2
-rw-r--r--tests/expected/logger/options-input_file_skip_empty0
-rw-r--r--tests/expected/logger/options-input_file_skip_empty.err3
-rw-r--r--tests/expected/logger/options-log_pid0
-rw-r--r--tests/expected/logger/options-log_pid.err2
-rw-r--r--tests/expected/logger/options-log_pid_define0
-rw-r--r--tests/expected/logger/options-log_pid_define.err2
-rw-r--r--tests/expected/logger/options-log_pid_long0
-rw-r--r--tests/expected/logger/options-log_pid_long.err2
-rw-r--r--tests/expected/logger/options-log_pid_no_arg0
-rw-r--r--tests/expected/logger/options-log_pid_no_arg.err2
-rw-r--r--tests/expected/logger/options-simple0
-rw-r--r--tests/expected/logger/options-simple.err2
-rw-r--r--tests/expected/logger/options.err0
-rw-r--r--tests/expected/login/islocal13
-rw-r--r--tests/expected/login/logindefs14
-rw-r--r--tests/expected/look/separator1
-rw-r--r--tests/expected/losetup/losetup-blkdev-offset3
-rw-r--r--tests/expected/losetup/losetup-blkdev-section3
-rw-r--r--tests/expected/losetup/losetup-blkdev-show3
-rw-r--r--tests/expected/losetup/losetup-blkdev-sizelimit3
-rw-r--r--tests/expected/losetup/losetup-file-offset3
-rw-r--r--tests/expected/losetup/losetup-file-section3
-rw-r--r--tests/expected/losetup/losetup-file-secton3
-rw-r--r--tests/expected/losetup/losetup-file-show3
-rw-r--r--tests/expected/losetup/losetup-file-sizelimit3
-rw-r--r--tests/expected/losetup/losetup-loop1
-rw-r--r--tests/expected/losetup/losetup-loop-find-conflict3
-rw-r--r--tests/expected/losetup/losetup-loop-find-conflict-no-sizelimit3
-rw-r--r--tests/expected/losetup/losetup-loop-find-conflict-readonly3
-rw-r--r--tests/expected/losetup/losetup-loop-find-no-re-use2
-rw-r--r--tests/expected/losetup/losetup-loop-find-ok-no-sizelimit2
-rw-r--r--tests/expected/losetup/losetup-loop-find-race-condition2
-rw-r--r--tests/expected/losetup/losetup-loop-find-re-use2
-rw-r--r--tests/expected/losetup/losetup-loop-plain-conflict2
-rw-r--r--tests/expected/losetup/losetup-loop-plain-re-use2
-rw-r--r--tests/expected/losetup/losetup-loop-plain-readonly2
-rw-r--r--tests/expected/lsblk/lsblk-simple-lvm-basic22
-rw-r--r--tests/expected/lsblk/lsblk-simple-lvm-discard22
-rw-r--r--tests/expected/lsblk/lsblk-simple-lvm-rw22
-rw-r--r--tests/expected/lsblk/lsblk-simple-lvm-state22
-rw-r--r--tests/expected/lsblk/lsblk-simple-lvm-topo22
-rw-r--r--tests/expected/lsblk/lsblk-simple-lvm-vendor22
-rw-r--r--tests/expected/lsblk/lsblk-simple-lvm-zone22
-rw-r--r--tests/expected/lsblk/lsblk-simple-nvme-basic14
-rw-r--r--tests/expected/lsblk/lsblk-simple-nvme-discard14
-rw-r--r--tests/expected/lsblk/lsblk-simple-nvme-rw14
-rw-r--r--tests/expected/lsblk/lsblk-simple-nvme-state14
-rw-r--r--tests/expected/lsblk/lsblk-simple-nvme-topo14
-rw-r--r--tests/expected/lsblk/lsblk-simple-nvme-vendor14
-rw-r--r--tests/expected/lsblk/lsblk-simple-nvme-zone14
-rw-r--r--tests/expected/lscpu/lscpu-armv728
-rw-r--r--tests/expected/lscpu/lscpu-loongarch-loongson_3a5000_hv37
-rw-r--r--tests/expected/lscpu/lscpu-ppc-qemu20
-rw-r--r--tests/expected/lscpu/lscpu-ppc64-POWER753
-rw-r--r--tests/expected/lscpu/lscpu-ppc64-POWER7-64cpu152
-rw-r--r--tests/expected/lscpu/lscpu-rv64-linux16
-rw-r--r--tests/expected/lscpu/lscpu-s390-kvm32
-rw-r--r--tests/expected/lscpu/lscpu-s390-lpar61
-rw-r--r--tests/expected/lscpu/lscpu-s390-lpar-drawer53
-rw-r--r--tests/expected/lscpu/lscpu-s390-nested-virt46
-rw-r--r--tests/expected/lscpu/lscpu-s390-zvm34
-rw-r--r--tests/expected/lscpu/lscpu-sparc6433
-rw-r--r--tests/expected/lscpu/lscpu-vbox-win37
-rw-r--r--tests/expected/lscpu/lscpu-vmware_fpe76
-rw-r--r--tests/expected/lscpu/lscpu-x86_64-64cpu164
-rw-r--r--tests/expected/lscpu/lscpu-x86_64-64cpu-linux6.262
-rw-r--r--tests/expected/lscpu/lscpu-x86_64-dell_e431042
-rw-r--r--tests/expected/lscpu/lscpu-x86_64-epyc_7451239
-rw-r--r--tests/expected/lsfd/column-ainodeclass-inotify2
-rw-r--r--tests/expected/lsfd/column-ainodeclass-pidfd2
-rw-r--r--tests/expected/lsfd/column-kthread6
-rw-r--r--tests/expected/lsfd/column-name-pidfd2
-rw-r--r--tests/expected/lsfd/column-name-ro-regular-file2
-rw-r--r--tests/expected/lsfd/column-name-socketpair2
-rw-r--r--tests/expected/lsfd/column-type-inotify2
-rw-r--r--tests/expected/lsfd/column-type-pidfd2
-rw-r--r--tests/expected/lsfd/column-type-ro-regular-file2
-rw-r--r--tests/expected/lsfd/column-type-socketpair2
-rw-r--r--tests/expected/lsfd/mkfds-directory12
-rw-r--r--tests/expected/lsfd/mkfds-mapped-packet-socket8
-rw-r--r--tests/expected/lsfd/mkfds-netlink-groups3
-rw-r--r--tests/expected/lsfd/mkfds-netlink-protocol3
-rw-r--r--tests/expected/lsfd/mkfds-netns4
-rw-r--r--tests/expected/lsfd/mkfds-pidfd2
-rw-r--r--tests/expected/lsfd/mkfds-ping-ping4
-rw-r--r--tests/expected/lsfd/mkfds-ping-ping64
-rw-r--r--tests/expected/lsfd/mkfds-pipe-no-fork13
-rw-r--r--tests/expected/lsfd/mkfds-raw2
-rw-r--r--tests/expected/lsfd/mkfds-raw62
-rw-r--r--tests/expected/lsfd/mkfds-ro-block-device13
-rw-r--r--tests/expected/lsfd/mkfds-ro-regular-file15
-rw-r--r--tests/expected/lsfd/mkfds-rw-character-device5
-rw-r--r--tests/expected/lsfd/mkfds-socketpair3
-rw-r--r--tests/expected/lsfd/mkfds-symlink2
-rw-r--r--tests/expected/lsfd/mkfds-tcp4
-rw-r--r--tests/expected/lsfd/mkfds-tcp64
-rw-r--r--tests/expected/lsfd/mkfds-udp24
-rw-r--r--tests/expected/lsfd/mkfds-udp624
-rw-r--r--tests/expected/lsfd/mkfds-unix-dgram6
-rw-r--r--tests/expected/lsfd/mkfds-unix-in-netns-dgram6
-rw-r--r--tests/expected/lsfd/mkfds-unix-in-netns-seqpacket6
-rw-r--r--tests/expected/lsfd/mkfds-unix-in-netns-stream6
-rw-r--r--tests/expected/lsfd/mkfds-unix-stream32
-rw-r--r--tests/expected/lsfd/option-filter-broken-exp7
-rw-r--r--tests/expected/lsfd/option-inet46
-rw-r--r--tests/expected/lsfd/option-pid13
-rw-r--r--tests/expected/lsfd/option-summary3
-rw-r--r--tests/expected/lsmem/lsmem-s390-zvm-6g209
-rw-r--r--tests/expected/lsmem/lsmem-x86_64-16g530
-rw-r--r--tests/expected/lsns/ioctl_ns1
-rw-r--r--tests/expected/lsns/netnsid1
-rw-r--r--tests/expected/lsns/nsfs1
-rw-r--r--tests/expected/md5/md57
-rw-r--r--tests/expected/minix/fsck365
-rw-r--r--tests/expected/minix/fsck-images-auto-fix57
-rw-r--r--tests/expected/minix/fsck-images-badblocks35
-rw-r--r--tests/expected/minix/fsck-images-badblocks.BE35
-rw-r--r--tests/expected/minix/fsck-images-broken-root7
-rw-r--r--tests/expected/minix/fsck-images-bug.7738921
-rw-r--r--tests/expected/minix/fsck-images-check-blocks29
-rw-r--r--tests/expected/minix/fsck-images-check-blocks.BE29
-rw-r--r--tests/expected/minix/fsck-images-v1c1428
-rw-r--r--tests/expected/minix/fsck-images-v1c14.BE28
-rw-r--r--tests/expected/minix/fsck-images-v1c3029
-rw-r--r--tests/expected/minix/fsck-images-v1c30.BE29
-rw-r--r--tests/expected/minix/fsck-images-v2c1429
-rw-r--r--tests/expected/minix/fsck-images-v2c14.BE29
-rw-r--r--tests/expected/minix/fsck-images-v2c3030
-rw-r--r--tests/expected/minix/fsck-images-v2c30.BE30
-rw-r--r--tests/expected/minix/fsck-images-v3c6031
-rw-r--r--tests/expected/minix/fsck-images-v3c60.BE31
-rw-r--r--tests/expected/minix/fsck.err32
-rw-r--r--tests/expected/minix/mkfs-v1c149
-rw-r--r--tests/expected/minix/mkfs-v1c309
-rw-r--r--tests/expected/minix/mkfs-v2c149
-rw-r--r--tests/expected/minix/mkfs-v2c309
-rw-r--r--tests/expected/minix/mkfs-v2i655359
-rw-r--r--tests/expected/minix/mkfs-v3c609
-rw-r--r--tests/expected/misc/fallocate1
-rw-r--r--tests/expected/misc/flock3
-rw-r--r--tests/expected/misc/flock-exclusive1
-rw-r--r--tests/expected/misc/flock-fd1
-rw-r--r--tests/expected/misc/flock-no-fork1
-rw-r--r--tests/expected/misc/flock-non-block1
-rw-r--r--tests/expected/misc/flock-shared2
-rw-r--r--tests/expected/misc/flock-time-check1
-rw-r--r--tests/expected/misc/flock-timeout2
-rw-r--r--tests/expected/misc/ionice2
-rw-r--r--tests/expected/misc/ionice.err7
-rw-r--r--tests/expected/misc/line0
-rw-r--r--tests/expected/misc/line-empty-input2
-rw-r--r--tests/expected/misc/line-empty-input-wait-for-eof2
-rw-r--r--tests/expected/misc/line-large-line5
-rw-r--r--tests/expected/misc/line-one-call2
-rw-r--r--tests/expected/misc/line-text-without-eol2
-rw-r--r--tests/expected/misc/line-two-calls3
-rw-r--r--tests/expected/misc/line-wait-for-eof2
-rw-r--r--tests/expected/misc/mbsencode-invalid-ascii10
-rw-r--r--tests/expected/misc/mbsencode-invalid-utf810
-rw-r--r--tests/expected/misc/mbsencode-safe-ascii10
-rw-r--r--tests/expected/misc/mbsencode-safe-utf810
-rw-r--r--tests/expected/misc/mcookie1
-rw-r--r--tests/expected/misc/mountpoint0
-rw-r--r--tests/expected/misc/mountpoint-default2
-rw-r--r--tests/expected/misc/mountpoint-mutually-exclusive1
-rw-r--r--tests/expected/misc/mountpoint-mutually-exclusive.err1
-rw-r--r--tests/expected/misc/mountpoint-nofollow2
-rw-r--r--tests/expected/misc/pipesz-exec1
-rw-r--r--tests/expected/misc/pipesz-get-fd1
-rw-r--r--tests/expected/misc/pipesz-get-fd-bad.err1
-rw-r--r--tests/expected/misc/pipesz-get-file1
-rw-r--r--tests/expected/misc/pipesz-get-file-bad.err1
-rw-r--r--tests/expected/misc/pipesz-set-fd-bad.err1
-rw-r--r--tests/expected/misc/pipesz-set-file-bad.err1
-rw-r--r--tests/expected/misc/rev5
-rw-r--r--tests/expected/misc/setarch-options21
-rw-r--r--tests/expected/misc/setarch-options.err4
-rw-r--r--tests/expected/misc/setarch-show7
-rw-r--r--tests/expected/misc/setarch-uname266
-rw-r--r--tests/expected/misc/setarch-uname26-version1
-rw-r--r--tests/expected/misc/setsid1
-rw-r--r--tests/expected/misc/strtosize26
-rw-r--r--tests/expected/misc/strtosize.err4
-rw-r--r--tests/expected/misc/swaplabel4
-rw-r--r--tests/expected/misc/swaplabel.err3
-rw-r--r--tests/expected/misc/waitpid-count1
-rw-r--r--tests/expected/misc/waitpid-count.err1
-rw-r--r--tests/expected/misc/waitpid-exited.err2
-rw-r--r--tests/expected/misc/waitpid-normal4
-rw-r--r--tests/expected/misc/waitpid-timeout2
-rw-r--r--tests/expected/misc/whereis5
-rw-r--r--tests/expected/more/regexp4
-rw-r--r--tests/expected/more/squeeze3
-rw-r--r--tests/expected/mount/devname1
-rw-r--r--tests/expected/mount/dm-verity0
-rw-r--r--tests/expected/mount/fallback-mount_setattr1
-rw-r--r--tests/expected/mount/fslists1
-rw-r--r--tests/expected/mount/fslists-more-types1
-rw-r--r--tests/expected/mount/fslists-more-types-fstab1
-rw-r--r--tests/expected/mount/fslists-one-type1
-rw-r--r--tests/expected/mount/fslists-type-pattern1
-rw-r--r--tests/expected/mount/fslists-type-pattern-neg1
-rw-r--r--tests/expected/mount/fstab-all5
-rw-r--r--tests/expected/mount/fstab-bind1
-rw-r--r--tests/expected/mount/fstab-broken1
-rw-r--r--tests/expected/mount/fstab-broken-mount1
-rw-r--r--tests/expected/mount/fstab-broken-mount-all1
-rw-r--r--tests/expected/mount/fstab-btrfs-auto1
-rw-r--r--tests/expected/mount/fstab-btrfs-btrfs1
-rw-r--r--tests/expected/mount/fstab-devname0
-rw-r--r--tests/expected/mount/fstab-devname2label1
-rw-r--r--tests/expected/mount/fstab-devname2uuid1
-rw-r--r--tests/expected/mount/fstab-label0
-rw-r--r--tests/expected/mount/fstab-label2devname0
-rw-r--r--tests/expected/mount/fstab-label2uuid0
-rw-r--r--tests/expected/mount/fstab-loop1
-rw-r--r--tests/expected/mount/fstab-none1
-rw-r--r--tests/expected/mount/fstab-symlink1
-rw-r--r--tests/expected/mount/fstab-uuid0
-rw-r--r--tests/expected/mount/fstab-uuid2devname0
-rw-r--r--tests/expected/mount/fstab-uuid2label0
-rw-r--r--tests/expected/mount/label0
-rw-r--r--tests/expected/mount/move1
-rw-r--r--tests/expected/mount/regfile1
-rw-r--r--tests/expected/mount/remount1
-rw-r--r--tests/expected/mount/rlimit1
-rw-r--r--tests/expected/mount/rlimit-mount1
-rw-r--r--tests/expected/mount/rlimit-umount1
-rw-r--r--tests/expected/mount/set_ugid_mode1
-rw-r--r--tests/expected/mount/shared-subtree1
-rw-r--r--tests/expected/mount/shared-subtree-bind-shared1
-rw-r--r--tests/expected/mount/shared-subtree-make-private1
-rw-r--r--tests/expected/mount/shared-subtree-make-shared1
-rw-r--r--tests/expected/mount/shared-subtree-make-unbindable1
-rw-r--r--tests/expected/mount/shared-subtree-mount-private1
-rw-r--r--tests/expected/mount/shared-subtree-mount-private-ro2
-rw-r--r--tests/expected/mount/special0
-rw-r--r--tests/expected/mount/special-basic1
-rw-r--r--tests/expected/mount/special-multi-types1
-rw-r--r--tests/expected/mount/special-options1
-rw-r--r--tests/expected/mount/special-user1
-rw-r--r--tests/expected/mount/special-username1
-rw-r--r--tests/expected/mount/umount-alltargets6
-rw-r--r--tests/expected/mount/umount-alltargets-all-targets-dev3
-rw-r--r--tests/expected/mount/umount-alltargets-all-targets-mnt3
-rw-r--r--tests/expected/mount/umount-alltargets-all-targets-recursive3
-rw-r--r--tests/expected/mount/umount-recursive15
-rw-r--r--tests/expected/mount/uuid0
-rw-r--r--tests/expected/namei/logic8
-rw-r--r--tests/expected/partx/partx-add-all1
-rw-r--r--tests/expected/partx/partx-add-existing1
-rw-r--r--tests/expected/partx/partx-addpart1
-rw-r--r--tests/expected/partx/partx-change-by-range2
-rw-r--r--tests/expected/partx/partx-delete-all1
-rw-r--r--tests/expected/partx/partx-delete-non-existent1
-rw-r--r--tests/expected/partx/partx-delete-one1
-rw-r--r--tests/expected/partx/partx-delpart1
-rw-r--r--tests/expected/partx/partx-detect-parts5
-rw-r--r--tests/expected/partx/partx-image-atari-primary2
-rw-r--r--tests/expected/partx/partx-image-atari-xgm3
-rw-r--r--tests/expected/partx/partx-image-bsd3
-rw-r--r--tests/expected/partx/partx-image-dos+bsd5
-rw-r--r--tests/expected/partx/partx-image-gpt6
-rw-r--r--tests/expected/partx/partx-image-sgi5
-rw-r--r--tests/expected/partx/partx-image-sun3
-rw-r--r--tests/expected/partx/partx-update-one1
-rw-r--r--tests/expected/paths/built-in21
-rw-r--r--tests/expected/rename/basic19
-rw-r--r--tests/expected/rename/exit_codes6
-rw-r--r--tests/expected/rename/exit_codes.err1
-rw-r--r--tests/expected/rename/overwrite1
-rw-r--r--tests/expected/rename/subdir38
-rw-r--r--tests/expected/rename/symlink7
-rw-r--r--tests/expected/rename/symlink.err1
-rw-r--r--tests/expected/schedutils/chrt0
-rw-r--r--tests/expected/schedutils/chrt-batch2
-rw-r--r--tests/expected/schedutils/chrt-deadline9
-rw-r--r--tests/expected/schedutils/chrt-fifo4
-rw-r--r--tests/expected/schedutils/chrt-idle2
-rw-r--r--tests/expected/schedutils/chrt-non-root-batch-vs-nice3
-rw-r--r--tests/expected/schedutils/chrt-other2
-rw-r--r--tests/expected/schedutils/chrt-rr4
-rw-r--r--tests/expected/schedutils/cpuset24
-rw-r--r--tests/expected/script/buffering-race3
-rw-r--r--tests/expected/script/options-append8
-rw-r--r--tests/expected/script/options-force14
-rw-r--r--tests/expected/script/options-quiet8
-rw-r--r--tests/expected/script/options-return16
-rw-r--r--tests/expected/script/options-size9
-rw-r--r--tests/expected/script/race1
-rw-r--r--tests/expected/script/replay0
-rw-r--r--tests/expected/script/replay-basic9
-rw-r--r--tests/expected/script/replay-input4
-rw-r--r--tests/expected/script/replay-live7
-rw-r--r--tests/expected/script/replay-output7
-rw-r--r--tests/expected/sfdisk/dos-activate20
-rw-r--r--tests/expected/sfdisk/dos-default-vs-gap124
-rw-r--r--tests/expected/sfdisk/dos-default-vs-gap230
-rw-r--r--tests/expected/sfdisk/dos-dump-gaps27
-rw-r--r--tests/expected/sfdisk/dos-dump-old26
-rw-r--r--tests/expected/sfdisk/dos-explicit-size36
-rw-r--r--tests/expected/sfdisk/dos-explicit-size.err7
-rw-r--r--tests/expected/sfdisk/dos-read-dump35
-rw-r--r--tests/expected/sfdisk/dos-read-dump-case24
-rw-r--r--tests/expected/sfdisk/dos-read-dump.err2
-rw-r--r--tests/expected/sfdisk/dos-reduce-empty-extended26
-rw-r--r--tests/expected/sfdisk/dos-resize24
-rw-r--r--tests/expected/sfdisk/dos-resize-empty-extended26
-rw-r--r--tests/expected/sfdisk/dos-resize-extended34
-rw-r--r--tests/expected/sfdisk/dos-resize-logical34
-rw-r--r--tests/expected/sfdisk/dos-simple-commas32
-rw-r--r--tests/expected/sfdisk/dos-simple-space26
-rw-r--r--tests/expected/sfdisk/dos-sizes-vs-gaps26
-rw-r--r--tests/expected/sfdisk/dos-write-dump12
-rw-r--r--tests/expected/sfdisk/dos-write-json43
-rw-r--r--tests/expected/sfdisk/dump0
-rw-r--r--tests/expected/sfdisk/dump-current48
-rw-r--r--tests/expected/sfdisk/dump-v2.3247
-rw-r--r--tests/expected/sfdisk/dump-v2.3548
-rw-r--r--tests/expected/sfdisk/gpt-all-defaults32
-rw-r--r--tests/expected/sfdisk/gpt-attrs102
-rw-r--r--tests/expected/sfdisk/gpt-attrs-broken-guid0
-rw-r--r--tests/expected/sfdisk/gpt-attrs-broken-guid.err2
-rw-r--r--tests/expected/sfdisk/gpt-attrs-broken-nosep0
-rw-r--r--tests/expected/sfdisk/gpt-attrs-broken-nosep.err2
-rw-r--r--tests/expected/sfdisk/gpt-attrs-guid102
-rw-r--r--tests/expected/sfdisk/gpt-attrs-guid.err0
-rw-r--r--tests/expected/sfdisk/gpt-attrs-space102
-rw-r--r--tests/expected/sfdisk/gpt-attrs-space.err0
-rw-r--r--tests/expected/sfdisk/gpt-attrs-unsupported0
-rw-r--r--tests/expected/sfdisk/gpt-attrs-unsupported.err2
-rw-r--r--tests/expected/sfdisk/gpt-attrs-with-typo102
-rw-r--r--tests/expected/sfdisk/gpt-attrs-with-typo.err0
-rw-r--r--tests/expected/sfdisk/gpt-attrs.err0
-rw-r--r--tests/expected/sfdisk/gpt-label6
-rw-r--r--tests/expected/sfdisk/gpt-list-pmbr10
-rw-r--r--tests/expected/sfdisk/gpt-list-pmbr.err1
-rw-r--r--tests/expected/sfdisk/gpt-read-dump44
-rw-r--r--tests/expected/sfdisk/gpt-reorder51
-rw-r--r--tests/expected/sfdisk/gpt-resize24
-rw-r--r--tests/expected/sfdisk/gpt-type5
-rw-r--r--tests/expected/sfdisk/gpt-uuid1
-rw-r--r--tests/expected/sfdisk/gpt-write-dump12
-rw-r--r--tests/expected/sfdisk/gpt-write-json39
-rw-r--r--tests/expected/sfdisk/movedata-down31
-rw-r--r--tests/expected/sfdisk/movedata-non-overlay31
-rw-r--r--tests/expected/sfdisk/movedata-up31
-rw-r--r--tests/expected/sfdisk/resize-dos-0-move-up-absolute26
-rw-r--r--tests/expected/sfdisk/resize-dos-1-move-down-absolute26
-rw-r--r--tests/expected/sfdisk/resize-dos-10-down-enlarge26
-rw-r--r--tests/expected/sfdisk/resize-dos-11-absolute-move-resize26
-rw-r--r--tests/expected/sfdisk/resize-dos-12-reduce-midle30
-rw-r--r--tests/expected/sfdisk/resize-dos-13-max-last30
-rw-r--r--tests/expected/sfdisk/resize-dos-2-move-up-relative26
-rw-r--r--tests/expected/sfdisk/resize-dos-3-move-down-relative26
-rw-r--r--tests/expected/sfdisk/resize-dos-4-enlarge-absolute26
-rw-r--r--tests/expected/sfdisk/resize-dos-5-reduce-absolute26
-rw-r--r--tests/expected/sfdisk/resize-dos-6-enlarge-relative26
-rw-r--r--tests/expected/sfdisk/resize-dos-7-reduce-relative26
-rw-r--r--tests/expected/sfdisk/resize-dos-8-enlarge-all26
-rw-r--r--tests/expected/sfdisk/resize-dos-9-up-preduce26
-rw-r--r--tests/expected/sfdisk/resize-dos-unsorted74
-rw-r--r--tests/expected/sfdisk/resize-gpt-0-move-up-absolute26
-rw-r--r--tests/expected/sfdisk/resize-gpt-1-move-down-absolute26
-rw-r--r--tests/expected/sfdisk/resize-gpt-10-down-enlarge26
-rw-r--r--tests/expected/sfdisk/resize-gpt-11-absolute-move-resize26
-rw-r--r--tests/expected/sfdisk/resize-gpt-12-reduce-midle30
-rw-r--r--tests/expected/sfdisk/resize-gpt-13-max-last30
-rw-r--r--tests/expected/sfdisk/resize-gpt-2-move-up-relative26
-rw-r--r--tests/expected/sfdisk/resize-gpt-3-move-down-relative26
-rw-r--r--tests/expected/sfdisk/resize-gpt-4-enlarge-absolute26
-rw-r--r--tests/expected/sfdisk/resize-gpt-5-reduce-absolute26
-rw-r--r--tests/expected/sfdisk/resize-gpt-6-enlarge-relative26
-rw-r--r--tests/expected/sfdisk/resize-gpt-7-reduce-relative26
-rw-r--r--tests/expected/sfdisk/resize-gpt-8-enlarge-all26
-rw-r--r--tests/expected/sfdisk/resize-gpt-9-up-preduce26
-rw-r--r--tests/expected/sfdisk/script-broken-115
-rw-r--r--tests/expected/sfdisk/script-broken-1.err1
-rw-r--r--tests/expected/sfdisk/script-broken-215
-rw-r--r--tests/expected/sfdisk/script-broken-2.err1
-rw-r--r--tests/expected/sfdisk/script-broken-315
-rw-r--r--tests/expected/sfdisk/script-broken-3.err1
-rw-r--r--tests/expected/sfdisk/script-broken-415
-rw-r--r--tests/expected/sfdisk/script-broken-4.err1
-rw-r--r--tests/expected/sfdisk/script-broken-515
-rw-r--r--tests/expected/sfdisk/script-broken-5.err1
-rw-r--r--tests/expected/sfdisk/script-quotes44
-rw-r--r--tests/expected/sfdisk/script-separator44
-rw-r--r--tests/expected/sfdisk/script-type-and-id44
-rw-r--r--tests/expected/sfdisk/wipe-fs-to-dos28
-rw-r--r--tests/expected/sfdisk/wipe-fs-to-dos.err2
-rw-r--r--tests/expected/sfdisk/wipe-gpt-to-dos51
-rw-r--r--tests/expected/sfdisk/wipe-gpt-to-dos-auto58
-rw-r--r--tests/expected/sfdisk/wipe-gpt-to-dos-auto.err0
-rw-r--r--tests/expected/sfdisk/wipe-gpt-to-dos.err0
-rw-r--r--tests/expected/sfdisk/wipe-partition59
-rw-r--r--tests/expected/sfdisk/wipe-partition.err1
-rw-r--r--tests/expected/sfdisk/wipe.err0
-rw-r--r--tests/expected/sha1/sha17
-rw-r--r--tests/expected/swapon/devname1
-rw-r--r--tests/expected/swapon/fixpgsz1
-rw-r--r--tests/expected/swapon/fixsig1
-rw-r--r--tests/expected/swapon/label1
-rw-r--r--tests/expected/swapon/uuid1
-rw-r--r--tests/expected/tailf/simple2
-rw-r--r--tests/expected/ul/basic0
-rw-r--r--tests/expected/ul/basic-filter-input11
-rw-r--r--tests/expected/ul/basic-indicated2
-rw-r--r--tests/expected/ul/basic-printable-characters95
-rw-r--r--tests/expected/ul/ul3
-rw-r--r--tests/expected/utmp/last-dns12
-rw-r--r--tests/expected/utmp/last-ipv6-dns12
-rw-r--r--tests/expected/utmp/last-ipv6-nodns8
-rw-r--r--tests/expected/utmp/last-nodns124
-rw-r--r--tests/expected/utmp/utmpdump-circle1
-rw-r--r--tests/expected/utmp/utmpdump-subsecond4
-rw-r--r--tests/expected/utmp/utmpdump-tobin1
-rw-r--r--tests/expected/utmp/utmpdump-tobin-ipv61
-rw-r--r--tests/expected/utmp/utmpdump-totxt10
-rw-r--r--tests/expected/utmp/utmpdump-totxt-ipv62
-rw-r--r--tests/expected/uuid/namespace7
-rw-r--r--tests/expected/uuid/oids4
-rw-r--r--tests/expected/uuid/uuid_parser15
-rw-r--r--tests/expected/uuid/uuidd11
-rw-r--r--tests/expected/uuid/uuidgen8
-rw-r--r--tests/expected/uuid/uuidparse31
-rw-r--r--tests/expected/wipefs/wipefs1
-rw-r--r--tests/functions.sh1169
-rw-r--r--tests/helpers/Makemodule.am40
-rw-r--r--tests/helpers/test_byteswap.c113
-rw-r--r--tests/helpers/test_enosys.c126
-rw-r--r--tests/helpers/test_mbsencode.c43
-rw-r--r--tests/helpers/test_md5.c37
-rw-r--r--tests/helpers/test_mkfds.c2665
-rw-r--r--tests/helpers/test_pathnames.c86
-rw-r--r--tests/helpers/test_sha1.c37
-rw-r--r--tests/helpers/test_sigreceive.c170
-rw-r--r--tests/helpers/test_strerror.c44
-rw-r--r--tests/helpers/test_sysinfo.c176
-rw-r--r--tests/helpers/test_tiocsti.c21
-rw-r--r--tests/helpers/test_uuid_namespace.c42
-rwxr-xr-xtests/run.sh282
-rwxr-xr-xtests/ts/bitops/swapbytes29
-rwxr-xr-xtests/ts/blkdiscard/offsets101
-rwxr-xr-xtests/ts/blkid/cache48
-rwxr-xr-xtests/ts/blkid/dm-err52
-rw-r--r--tests/ts/blkid/images-fs/adaptec-raid.img.xzbin0 -> 672 bytes
-rw-r--r--tests/ts/blkid/images-fs/apfs.img.xzbin0 -> 2728 bytes
-rw-r--r--tests/ts/blkid/images-fs/bcache-B.img.xzbin0 -> 180 bytes
-rw-r--r--tests/ts/blkid/images-fs/bcache-C.img.xzbin0 -> 9976 bytes
-rw-r--r--tests/ts/blkid/images-fs/bcache-journal.img.xzbin0 -> 2320 bytes
-rw-r--r--tests/ts/blkid/images-fs/bcachefs-2.img.xzbin0 -> 1000 bytes
-rw-r--r--tests/ts/blkid/images-fs/bcachefs.img.xzbin0 -> 1808 bytes
-rw-r--r--tests/ts/blkid/images-fs/befs.img.xzbin0 -> 28584 bytes
-rw-r--r--tests/ts/blkid/images-fs/bfs.img.xzbin0 -> 492 bytes
-rw-r--r--tests/ts/blkid/images-fs/bluestore.img.xzbin0 -> 412 bytes
-rw-r--r--tests/ts/blkid/images-fs/btrfs.img.xzbin0 -> 21696 bytes
-rw-r--r--tests/ts/blkid/images-fs/cramfs-big.img.xzbin0 -> 480 bytes
-rw-r--r--tests/ts/blkid/images-fs/cramfs.img.xzbin0 -> 144 bytes
-rw-r--r--tests/ts/blkid/images-fs/cs_fvault2.img.xzbin0 -> 200 bytes
-rw-r--r--tests/ts/blkid/images-fs/ddf-raid.img.xzbin0 -> 8140 bytes
-rw-r--r--tests/ts/blkid/images-fs/drbd-v08.img.xzbin0 -> 448 bytes
-rw-r--r--tests/ts/blkid/images-fs/drbd-v09.img.xzbin0 -> 460 bytes
-rw-r--r--tests/ts/blkid/images-fs/drbdmanage-control-volume.img.xzbin0 -> 2520 bytes
-rw-r--r--tests/ts/blkid/images-fs/erofs.img.xzbin0 -> 200 bytes
-rw-r--r--tests/ts/blkid/images-fs/exfat.img.xzbin0 -> 4620 bytes
-rw-r--r--tests/ts/blkid/images-fs/ext2.img.xzbin0 -> 384 bytes
-rw-r--r--tests/ts/blkid/images-fs/ext3.img.xzbin0 -> 1612 bytes
-rw-r--r--tests/ts/blkid/images-fs/ext4.img.xzbin0 -> 3140 bytes
-rw-r--r--tests/ts/blkid/images-fs/f2fs.img.xzbin0 -> 22432 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat.img.xzbin0 -> 488 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat16_noheads.img.xzbin0 -> 16300 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_cp850_O_tilde.img.xzbin0 -> 5400 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_label_64MB.img.xzbin0 -> 10428 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_label1.img.xzbin0 -> 5400 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_NO_NAME.img.xzbin0 -> 5404 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_empty.img.xzbin0 -> 5396 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_label2.img.xzbin0 -> 5400 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_NO_NAME.img.xzbin0 -> 5412 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_erase.img.xzbin0 -> 5412 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_erase.img.xzbin0 -> 5400 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_label2.img.xzbin0 -> 5404 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_none.img.xzbin0 -> 5376 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_NO_NAME.img.xzbin0 -> 5384 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1.img.xzbin0 -> 5380 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1_xp_label2.img.xzbin0 -> 5404 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1.img.xzbin0 -> 5400 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1_dosfslabel_label2.img.xzbin0 -> 5396 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_xp_label1.img.xzbin0 -> 5936 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_xp_none.img.xzbin0 -> 5908 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_xp_none_dosfslabel_label1.img.xzbin0 -> 5908 bytes
-rw-r--r--tests/ts/blkid/images-fs/fat32_xp_none_mlabel_label1.img.xzbin0 -> 5660 bytes
-rw-r--r--tests/ts/blkid/images-fs/gfs2.img.xzbin0 -> 5092 bytes
-rw-r--r--tests/ts/blkid/images-fs/hfs.img.xzbin0 -> 1876 bytes
-rw-r--r--tests/ts/blkid/images-fs/hfsplus.img.xzbin0 -> 1940 bytes
-rw-r--r--tests/ts/blkid/images-fs/hpfs.img.xzbin0 -> 2172 bytes
-rw-r--r--tests/ts/blkid/images-fs/hpt37x-raid.img.xzbin0 -> 400 bytes
-rw-r--r--tests/ts/blkid/images-fs/hpt45x-raid.img.xzbin0 -> 424 bytes
-rw-r--r--tests/ts/blkid/images-fs/iso-different-iso-joliet-label.img.xzbin0 -> 712 bytes
-rw-r--r--tests/ts/blkid/images-fs/iso-joliet.img.xzbin0 -> 21884 bytes
-rw-r--r--tests/ts/blkid/images-fs/iso-multi-0-174-348-genisoimage.img.xzbin0 -> 656 bytes
-rw-r--r--tests/ts/blkid/images-fs/iso-rr-joliet.img.xzbin0 -> 22144 bytes
-rw-r--r--tests/ts/blkid/images-fs/iso-unicode-long-label.img.xzbin0 -> 616 bytes
-rw-r--r--tests/ts/blkid/images-fs/iso.img.xzbin0 -> 21656 bytes
-rw-r--r--tests/ts/blkid/images-fs/isw-raid.img.xzbin0 -> 528 bytes
-rw-r--r--tests/ts/blkid/images-fs/jbd.img.xzbin0 -> 688 bytes
-rw-r--r--tests/ts/blkid/images-fs/jfs.img.xzbin0 -> 4768 bytes
-rw-r--r--tests/ts/blkid/images-fs/jmicron-raid.img.xzbin0 -> 480 bytes
-rw-r--r--tests/ts/blkid/images-fs/lsi-raid.img.xzbin0 -> 436 bytes
-rw-r--r--tests/ts/blkid/images-fs/luks1.img.xzbin0 -> 300 bytes
-rw-r--r--tests/ts/blkid/images-fs/luks2.img.xzbin0 -> 276 bytes
-rw-r--r--tests/ts/blkid/images-fs/lvm2.img.xzbin0 -> 512 bytes
-rw-r--r--tests/ts/blkid/images-fs/mdraid-1.img.xzbin0 -> 1764 bytes
-rw-r--r--tests/ts/blkid/images-fs/mdraid.img.xzbin0 -> 1752 bytes
-rw-r--r--tests/ts/blkid/images-fs/minix-BE.img.xzbin0 -> 220 bytes
-rw-r--r--tests/ts/blkid/images-fs/minix-LE.img.xzbin0 -> 224 bytes
-rw-r--r--tests/ts/blkid/images-fs/mpool.img.xzbin0 -> 544 bytes
-rw-r--r--tests/ts/blkid/images-fs/netware.img.xzbin0 -> 244 bytes
-rw-r--r--tests/ts/blkid/images-fs/nilfs2.img.xzbin0 -> 25072 bytes
-rw-r--r--tests/ts/blkid/images-fs/ntfs.img.xzbin0 -> 89576 bytes
-rw-r--r--tests/ts/blkid/images-fs/nvidia-raid.img.xzbin0 -> 572 bytes
-rw-r--r--tests/ts/blkid/images-fs/ocfs2.img.xzbin0 -> 18644 bytes
-rw-r--r--tests/ts/blkid/images-fs/promise-raid.img.xzbin0 -> 740 bytes
-rw-r--r--tests/ts/blkid/images-fs/reiser3.img.xzbin0 -> 936 bytes
-rw-r--r--tests/ts/blkid/images-fs/reiser4.img.xzbin0 -> 904 bytes
-rw-r--r--tests/ts/blkid/images-fs/romfs.img.xzbin0 -> 384 bytes
-rw-r--r--tests/ts/blkid/images-fs/silicon-raid.img.xzbin0 -> 588 bytes
-rw-r--r--tests/ts/blkid/images-fs/small-fat32.img.xzbin0 -> 576 bytes
-rwxr-xr-xtests/ts/blkid/images-fs/squashfs3.img.xzbin0 -> 368 bytes
-rw-r--r--tests/ts/blkid/images-fs/squashfs4.img.xzbin0 -> 380 bytes
-rw-r--r--tests/ts/blkid/images-fs/swap0.img.xzbin0 -> 496 bytes
-rw-r--r--tests/ts/blkid/images-fs/swap1-big.img.xzbin0 -> 328 bytes
-rw-r--r--tests/ts/blkid/images-fs/swap1.img.xzbin0 -> 524 bytes
-rw-r--r--tests/ts/blkid/images-fs/tuxonice.img.xzbin0 -> 37032 bytes
-rw-r--r--tests/ts/blkid/images-fs/ubi.img.xzbin0 -> 380 bytes
-rw-r--r--tests/ts/blkid/images-fs/ubifs.img.xzbin0 -> 1128 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-bdr-2.60-nero.img.xzbin0 -> 1956 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-cd-mkudfiso-20100208.img.xzbin0 -> 756 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-cd-nero-6.img.xzbin0 -> 2168 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-macosx-2.60-4096.img.xzbin0 -> 2604 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-1.img.xzbin0 -> 2728 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-2.img.xzbin0 -> 2772 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-1.img.xzbin0 -> 2364 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-2.img.xzbin0 -> 2380 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-3.img.xzbin0 -> 2376 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-4.img.xzbin0 -> 2380 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-5.img.xzbin0 -> 2396 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-6.img.xzbin0 -> 2360 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-7.img.xzbin0 -> 2720 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-8.img.xzbin0 -> 2328 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-mkudffs-2.2.img.xzbin0 -> 2396 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.5.img.xzbin0 -> 2292 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.7.img.xzbin0 -> 2296 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-hdd-win7.img.xzbin0 -> 2624 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-multi-0-320-640-mkudffs.img.xzbin0 -> 1720 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf-multi-0-417-834-genisoimage.img.xzbin0 -> 3176 bytes
-rw-r--r--tests/ts/blkid/images-fs/udf.img.xzbin0 -> 1884 bytes
-rw-r--r--tests/ts/blkid/images-fs/ufs.img.xzbin0 -> 1296 bytes
-rw-r--r--tests/ts/blkid/images-fs/vdo.img.xzbin0 -> 140 bytes
-rw-r--r--tests/ts/blkid/images-fs/via-raid.img.xzbin0 -> 528 bytes
-rw-r--r--tests/ts/blkid/images-fs/vmfs.img.xzbin0 -> 512 bytes
-rw-r--r--tests/ts/blkid/images-fs/vmfs_volume.img.xzbin0 -> 680 bytes
-rw-r--r--tests/ts/blkid/images-fs/xfs-log.img.xzbin0 -> 1720 bytes
-rw-r--r--tests/ts/blkid/images-fs/xfs-v5.img.xzbin0 -> 4040 bytes
-rw-r--r--tests/ts/blkid/images-fs/xfs.img.xzbin0 -> 2892 bytes
-rw-r--r--tests/ts/blkid/images-fs/zfs.img.xzbin0 -> 19904 bytes
-rw-r--r--tests/ts/blkid/images-fs/zonefs.img.xzbin0 -> 784 bytes
-rw-r--r--tests/ts/blkid/images-pt/atari-primary.img.xzbin0 -> 932 bytes
-rw-r--r--tests/ts/blkid/images-pt/atari-xgm.img.xzbin0 -> 956 bytes
-rw-r--r--tests/ts/blkid/images-pt/bsd.img.xzbin0 -> 840 bytes
-rw-r--r--tests/ts/blkid/images-pt/dos+bsd.img.xzbin0 -> 2620 bytes
-rw-r--r--tests/ts/blkid/images-pt/gpt.img.xzbin0 -> 2140 bytes
-rw-r--r--tests/ts/blkid/images-pt/sgi.img.xzbin0 -> 1724 bytes
-rw-r--r--tests/ts/blkid/images-pt/sun.img.xzbin0 -> 1748 bytes
-rwxr-xr-xtests/ts/blkid/low-probe66
-rwxr-xr-xtests/ts/blkid/lowprobe-pt44
-rwxr-xr-xtests/ts/blkid/md-raid0-whole99
-rwxr-xr-xtests/ts/blkid/md-raid1-part99
-rwxr-xr-xtests/ts/blkid/md-raid1-whole103
-rwxr-xr-xtests/ts/blkid/offset58
-rwxr-xr-xtests/ts/blkid/topology54
-rwxr-xr-xtests/ts/build-sys/config83
-rwxr-xr-xtests/ts/cal/bigyear83
-rwxr-xr-xtests/ts/cal/color95
-rwxr-xr-xtests/ts/cal/colorw80
-rwxr-xr-xtests/ts/cal/column49
-rwxr-xr-xtests/ts/cal/jan175345
-rwxr-xr-xtests/ts/cal/month72
-rwxr-xr-xtests/ts/cal/sep175286
-rwxr-xr-xtests/ts/cal/vertical72
-rwxr-xr-xtests/ts/cal/weekarg99
-rwxr-xr-xtests/ts/cal/weeknum57
-rwxr-xr-xtests/ts/cal/year54
-rwxr-xr-xtests/ts/chfn/gecos38
-rwxr-xr-xtests/ts/col/io86
-rwxr-xr-xtests/ts/col/multibyte40
-rw-r--r--tests/ts/col/multibyte.data1
-rwxr-xr-xtests/ts/col/newlines46
-rwxr-xr-xtests/ts/col/options43
-rw-r--r--tests/ts/colcrt/crash1bin0 -> 314 bytes
-rw-r--r--tests/ts/colcrt/crash2bin0 -> 776 bytes
-rwxr-xr-xtests/ts/colcrt/functional51
-rw-r--r--tests/ts/colcrt/hang11
-rw-r--r--tests/ts/colcrt/nasty-inputbin0 -> 545 bytes
-rwxr-xr-xtests/ts/colcrt/regressions38
-rw-r--r--tests/ts/colcrt/underlines23
-rwxr-xr-xtests/ts/colrm/rm2-228
-rwxr-xr-xtests/ts/column/columnate52
-rw-r--r--tests/ts/column/files/fivecols10
-rw-r--r--tests/ts/column/files/mountinfo41
-rw-r--r--tests/ts/column/files/onecolumn9
-rw-r--r--tests/ts/column/files/table6
-rw-r--r--tests/ts/column/files/table-empty-lines6
-rw-r--r--tests/ts/column/files/table-sep6
-rw-r--r--tests/ts/column/files/table-sep-space6
-rwxr-xr-xtests/ts/column/invalid-multibyte30
-rwxr-xr-xtests/ts/column/multi-file34
-rwxr-xr-xtests/ts/column/table148
-rw-r--r--tests/ts/cramfs/cramfs-big.imgbin0 -> 4096 bytes
-rw-r--r--tests/ts/cramfs/cramfs-little.imgbin0 -> 4096 bytes
-rwxr-xr-xtests/ts/cramfs/doubles62
-rwxr-xr-xtests/ts/cramfs/fsck-bad-header102
-rwxr-xr-xtests/ts/cramfs/fsck-endianness58
-rwxr-xr-xtests/ts/cramfs/mkfs125
-rwxr-xr-xtests/ts/cramfs/mkfs-endianness63
-rw-r--r--tests/ts/cramfs/mkfs-endianness_testdata_a8
-rw-r--r--tests/ts/cramfs/mkfs-endianness_testdata_b217
-rwxr-xr-xtests/ts/dmesg/colors29
-rwxr-xr-xtests/ts/dmesg/console-levels36
-rwxr-xr-xtests/ts/dmesg/decode28
-rwxr-xr-xtests/ts/dmesg/delta28
-rwxr-xr-xtests/ts/dmesg/facilities30
-rwxr-xr-xtests/ts/dmesg/indentation40
-rw-r--r--tests/ts/dmesg/input105
-rwxr-xr-xtests/ts/dmesg/limit29
-rw-r--r--tests/ts/dmesg/newlines5
-rwxr-xr-xtests/ts/eject/umount127
-rwxr-xr-xtests/ts/fadvise/drop67
-rwxr-xr-xtests/ts/fdisk/align-512-4K79
-rwxr-xr-xtests/ts/fdisk/align-512-4K-6380
-rwxr-xr-xtests/ts/fdisk/align-512-4K-md104
-rwxr-xr-xtests/ts/fdisk/align-512-51273
-rwxr-xr-xtests/ts/fdisk/align-512-512-topology79
-rwxr-xr-xtests/ts/fdisk/bsd141
-rwxr-xr-xtests/ts/fdisk/gpt107
-rwxr-xr-xtests/ts/fdisk/gpt-resize63
-rwxr-xr-xtests/ts/fdisk/id56
-rwxr-xr-xtests/ts/fdisk/mbr-dos-mode145
-rwxr-xr-xtests/ts/fdisk/mbr-nondos-mode190
-rwxr-xr-xtests/ts/fdisk/mbr-sort83
-rwxr-xr-xtests/ts/fdisk/oddinput53
-rwxr-xr-xtests/ts/fdisk/sunlabel104
-rwxr-xr-xtests/ts/fincore/count230
-rw-r--r--tests/ts/findmnt/files/mountinfo32
-rw-r--r--tests/ts/findmnt/files/mountinfo-messy29
-rw-r--r--tests/ts/findmnt/files/mountinfo-nonroot31
-rwxr-xr-xtests/ts/findmnt/filter79
-rwxr-xr-xtests/ts/findmnt/outputs49
-rwxr-xr-xtests/ts/findmnt/target35
-rwxr-xr-xtests/ts/fsck/ismounted49
-rwxr-xr-xtests/ts/fuzzers/test_blkid_fuzz29
-rw-r--r--tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53142bin0 -> 1025 bytes
-rw-r--r--tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53149bin0 -> 35663 bytes
-rw-r--r--tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53160bin0 -> 1024 bytes
-rw-r--r--tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55282bin0 -> 131072 bytes
-rw-r--r--tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55291bin0 -> 131305 bytes
-rw-r--r--tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55318bin0 -> 134034 bytes
-rw-r--r--tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-62691bin0 -> 16863 bytes
-rwxr-xr-xtests/ts/fuzzers/test_fdisk_script_fuzz29
-rw-r--r--tests/ts/fuzzers/test_fdisk_script_fuzz_files/crash-8ae1c667bed4b4b864f62e78cded81d5083177eb1
-rw-r--r--tests/ts/fuzzers/test_fdisk_script_fuzz_files/crash-d216dfd17039a189c3858d78fbcf588695439b3b1
-rw-r--r--tests/ts/fuzzers/test_fdisk_script_fuzz_files/github-1015-1bin0 -> 12 bytes
-rw-r--r--tests/ts/fuzzers/test_fdisk_script_fuzz_files/github-1015-22
-rw-r--r--tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-245892
-rw-r--r--tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-248611
-rw-r--r--tests/ts/fuzzers/test_fdisk_script_fuzz_files/parse_line_valcommas-use-of-uninitialized-value1
-rwxr-xr-xtests/ts/fuzzers/test_last_fuzz29
-rw-r--r--tests/ts/fuzzers/test_last_fuzz_files/github-1097bin0 -> 384 bytes
-rwxr-xr-xtests/ts/fuzzers/test_mount_fuzz29
-rw-r--r--tests/ts/fuzzers/test_mount_fuzz_files/oss-fuzz-23722bin0 -> 4 bytes
-rwxr-xr-xtests/ts/getopt/basic49
-rwxr-xr-xtests/ts/getopt/options231
-rwxr-xr-xtests/ts/hardlink/options107
-rw-r--r--tests/ts/hardlink/testdir1.tar.xzbin0 -> 26468 bytes
-rw-r--r--tests/ts/hexdump/files/ascii.inbin0 -> 640 bytes
-rwxr-xr-xtests/ts/hexdump/format-strings69
-rwxr-xr-xtests/ts/hexdump/highlighting267
-rwxr-xr-xtests/ts/hwclock/show38
-rwxr-xr-xtests/ts/hwclock/systohc103
-rw-r--r--tests/ts/ipcs/functions.sh114
-rwxr-xr-xtests/ts/ipcs/headers60
-rwxr-xr-xtests/ts/ipcs/limits54
-rwxr-xr-xtests/ts/ipcs/limits237
-rwxr-xr-xtests/ts/ipcs/mk-rm-msg44
-rwxr-xr-xtests/ts/ipcs/mk-rm-sem44
-rwxr-xr-xtests/ts/ipcs/mk-rm-shm44
-rwxr-xr-xtests/ts/isosize/print-size37
-rw-r--r--tests/ts/isosize/sample.iso.gzbin0 -> 632 bytes
-rwxr-xr-xtests/ts/kill/all_processes66
-rw-r--r--tests/ts/kill/kill_functions.sh29
-rwxr-xr-xtests/ts/kill/name_to_number75
-rwxr-xr-xtests/ts/kill/options68
-rwxr-xr-xtests/ts/kill/print_pid63
-rwxr-xr-xtests/ts/kill/queue58
-rwxr-xr-xtests/ts/lib/procfs57
-rw-r--r--tests/ts/lib/procfs-data/proc/1/cmdlinebin0 -> 7 bytes
-rw-r--r--tests/ts/lib/procfs-data/proc/1/comm1
-rw-r--r--tests/ts/lib/procfs-data/proc/1/stat1
-rw-r--r--tests/ts/lib/procfs-data/proc/2/cmdlinebin0 -> 10 bytes
-rw-r--r--tests/ts/lib/procfs-data/proc/2/comm2
-rw-r--r--tests/ts/lib/procfs-data/proc/2/stat2
-rw-r--r--tests/ts/lib/procfs-data/proc/3/cmdlinebin0 -> 11 bytes
-rw-r--r--tests/ts/lib/procfs-data/proc/3/comm1
-rw-r--r--tests/ts/lib/procfs-data/proc/3/stat1
-rwxr-xr-xtests/ts/lib/timeutils24
-rwxr-xr-xtests/ts/libfdisk/gpt65
-rwxr-xr-xtests/ts/libfdisk/mkpart66
-rwxr-xr-xtests/ts/libfdisk/mkpart-full225
-rwxr-xr-xtests/ts/libmount/context169
-rwxr-xr-xtests/ts/libmount/context-py152
-rwxr-xr-xtests/ts/libmount/context-utab129
-rwxr-xr-xtests/ts/libmount/context-utab-py134
-rwxr-xr-xtests/ts/libmount/debug30
-rw-r--r--tests/ts/libmount/files/fstab14
-rw-r--r--tests/ts/libmount/files/fstab.broken14
-rw-r--r--tests/ts/libmount/files/fstab.comment22
-rw-r--r--tests/ts/libmount/files/kernel_cmdline1
-rw-r--r--tests/ts/libmount/files/mountinfo33
-rw-r--r--tests/ts/libmount/files/mountinfo_mv32
-rw-r--r--tests/ts/libmount/files/mountinfo_nosrc7
-rw-r--r--tests/ts/libmount/files/mountinfo_re32
-rw-r--r--tests/ts/libmount/files/mountinfo_u31
-rw-r--r--tests/ts/libmount/files/mtab12
-rw-r--r--tests/ts/libmount/files/swaps4
-rwxr-xr-xtests/ts/libmount/lock41
-rwxr-xr-xtests/ts/libmount/loop152
-rwxr-xr-xtests/ts/libmount/loop-overlay65
-rwxr-xr-xtests/ts/libmount/optstr160
-rwxr-xr-xtests/ts/libmount/tabdiff31
-rwxr-xr-xtests/ts/libmount/tabfiles85
-rwxr-xr-xtests/ts/libmount/tabfiles-py75
-rwxr-xr-xtests/ts/libmount/tabfiles-tags86
-rwxr-xr-xtests/ts/libmount/tabfiles-tags-py90
-rwxr-xr-xtests/ts/libmount/update69
-rwxr-xr-xtests/ts/libmount/update-py32
-rwxr-xr-xtests/ts/libmount/utils84
-rw-r--r--tests/ts/libsmartcols/files/col-hidden3
-rw-r--r--tests/ts/libsmartcols/files/col-id3
-rw-r--r--tests/ts/libsmartcols/files/col-name3
-rw-r--r--tests/ts/libsmartcols/files/col-noextremes3
-rw-r--r--tests/ts/libsmartcols/files/col-number3
-rw-r--r--tests/ts/libsmartcols/files/col-parent3
-rw-r--r--tests/ts/libsmartcols/files/col-strict3
-rw-r--r--tests/ts/libsmartcols/files/col-string3
-rw-r--r--tests/ts/libsmartcols/files/col-tree3
-rw-r--r--tests/ts/libsmartcols/files/col-trunc3
-rw-r--r--tests/ts/libsmartcols/files/col-wrap3
-rw-r--r--tests/ts/libsmartcols/files/col-wrapnl3
-rw-r--r--tests/ts/libsmartcols/files/data-id10
-rw-r--r--tests/ts/libsmartcols/files/data-number10
-rw-r--r--tests/ts/libsmartcols/files/data-number-tiny10
-rw-r--r--tests/ts/libsmartcols/files/data-parent10
-rw-r--r--tests/ts/libsmartcols/files/data-string10
-rw-r--r--tests/ts/libsmartcols/files/data-string-empty10
-rw-r--r--tests/ts/libsmartcols/files/data-string-extreme10
-rw-r--r--tests/ts/libsmartcols/files/data-string-long10
-rw-r--r--tests/ts/libsmartcols/files/data-string-nl10
-rwxr-xr-xtests/ts/libsmartcols/fromfile286
-rwxr-xr-xtests/ts/libsmartcols/title28
-rwxr-xr-xtests/ts/logger/errors116
-rwxr-xr-xtests/ts/logger/formats85
-rwxr-xr-xtests/ts/logger/journald35
-rwxr-xr-xtests/ts/logger/options82
-rwxr-xr-xtests/ts/login/islocal29
-rw-r--r--tests/ts/login/islocal.data10
-rwxr-xr-xtests/ts/login/logindefs26
-rw-r--r--tests/ts/login/logindefs.data16
-rwxr-xr-xtests/ts/look/separator41
-rw-r--r--tests/ts/look/words3
-rwxr-xr-xtests/ts/losetup/losetup86
-rwxr-xr-xtests/ts/losetup/losetup-blkdev81
-rwxr-xr-xtests/ts/losetup/losetup-loop247
-rw-r--r--tests/ts/losetup/losetup_functions.sh7
-rw-r--r--tests/ts/lsblk/README19
-rw-r--r--tests/ts/lsblk/dumps/simple-lvm.tar.xzbin0 -> 14216 bytes
-rw-r--r--tests/ts/lsblk/dumps/simple-nvme.tar.xzbin0 -> 10292 bytes
-rwxr-xr-xtests/ts/lsblk/lsblk56
-rwxr-xr-xtests/ts/lsblk/mk-input.sh124
-rw-r--r--tests/ts/lscpu/dumps/armv7.tar.gzbin0 -> 3163 bytes
-rw-r--r--tests/ts/lscpu/dumps/loongarch-loongson_3a5000_hv.tar.gzbin0 -> 7954 bytes
-rw-r--r--tests/ts/lscpu/dumps/ppc-qemu.tar.gzbin0 -> 2014 bytes
-rw-r--r--tests/ts/lscpu/dumps/ppc64-POWER7-64cpu.tar.gzbin0 -> 56867 bytes
-rw-r--r--tests/ts/lscpu/dumps/ppc64-POWER7.tar.gzbin0 -> 14350 bytes
-rw-r--r--tests/ts/lscpu/dumps/rv64-linux.tar.gzbin0 -> 4215 bytes
-rw-r--r--tests/ts/lscpu/dumps/s390-kvm.tar.gzbin0 -> 2275 bytes
-rw-r--r--tests/ts/lscpu/dumps/s390-lpar-drawer.tar.gzbin0 -> 18131 bytes
-rw-r--r--tests/ts/lscpu/dumps/s390-lpar.tar.gzbin0 -> 6611 bytes
-rw-r--r--tests/ts/lscpu/dumps/s390-nested-virt.tar.gzbin0 -> 7199 bytes
-rw-r--r--tests/ts/lscpu/dumps/s390-zvm.tar.gzbin0 -> 2582 bytes
-rw-r--r--tests/ts/lscpu/dumps/sparc64.tar.gzbin0 -> 2756 bytes
-rw-r--r--tests/ts/lscpu/dumps/vbox-win.tar.gzbin0 -> 15769 bytes
-rw-r--r--tests/ts/lscpu/dumps/vmware_fpe.tar.gzbin0 -> 59743 bytes
-rw-r--r--tests/ts/lscpu/dumps/x86_64-64cpu-linux6.2.tar.gzbin0 -> 39020 bytes
-rw-r--r--tests/ts/lscpu/dumps/x86_64-64cpu.tar.gzbin0 -> 153140 bytes
-rw-r--r--tests/ts/lscpu/dumps/x86_64-dell_e4310.tar.gzbin0 -> 12933 bytes
-rw-r--r--tests/ts/lscpu/dumps/x86_64-epyc_7451.tar.gzbin0 -> 361027 bytes
-rwxr-xr-xtests/ts/lscpu/lscpu61
-rwxr-xr-xtests/ts/lscpu/mk-input.sh48
-rwxr-xr-xtests/ts/lsfd/column-ainodeclass52
-rwxr-xr-xtests/ts/lsfd/column-kthread41
-rwxr-xr-xtests/ts/lsfd/column-name74
-rwxr-xr-xtests/ts/lsfd/column-type60
-rw-r--r--tests/ts/lsfd/lsfd-functions.bash85
-rwxr-xr-xtests/ts/lsfd/mkfds-directory109
-rwxr-xr-xtests/ts/lsfd/mkfds-mapped-packet-socket65
-rwxr-xr-xtests/ts/lsfd/mkfds-netlink-groups59
-rwxr-xr-xtests/ts/lsfd/mkfds-netlink-protocol58
-rwxr-xr-xtests/ts/lsfd/mkfds-netns72
-rwxr-xr-xtests/ts/lsfd/mkfds-pidfd51
-rwxr-xr-xtests/ts/lsfd/mkfds-ping142
-rwxr-xr-xtests/ts/lsfd/mkfds-pipe-no-fork124
-rwxr-xr-xtests/ts/lsfd/mkfds-raw49
-rwxr-xr-xtests/ts/lsfd/mkfds-raw650
-rwxr-xr-xtests/ts/lsfd/mkfds-ro-block-device80
-rwxr-xr-xtests/ts/lsfd/mkfds-ro-regular-file78
-rwxr-xr-xtests/ts/lsfd/mkfds-rw-character-device50
-rwxr-xr-xtests/ts/lsfd/mkfds-socketpair48
-rwxr-xr-xtests/ts/lsfd/mkfds-symlink45
-rwxr-xr-xtests/ts/lsfd/mkfds-tcp50
-rwxr-xr-xtests/ts/lsfd/mkfds-tcp651
-rwxr-xr-xtests/ts/lsfd/mkfds-udp138
-rwxr-xr-xtests/ts/lsfd/mkfds-udp6139
-rwxr-xr-xtests/ts/lsfd/mkfds-unix-dgram68
-rwxr-xr-xtests/ts/lsfd/mkfds-unix-in-netns109
-rwxr-xr-xtests/ts/lsfd/mkfds-unix-stream98
-rwxr-xr-xtests/ts/lsfd/option-filter-broken-exp36
-rwxr-xr-xtests/ts/lsfd/option-inet98
-rwxr-xr-xtests/ts/lsfd/option-pid80
-rwxr-xr-xtests/ts/lsfd/option-summary62
-rw-r--r--tests/ts/lsmem/dumps/s390-zvm-6g.tar.bz2bin0 -> 2459 bytes
-rw-r--r--tests/ts/lsmem/dumps/x86_64-16g.tar.bz2bin0 -> 8660 bytes
-rwxr-xr-xtests/ts/lsmem/lsmem60
-rwxr-xr-xtests/ts/lsmem/mk-input.sh22
-rwxr-xr-xtests/ts/lsns/ioctl_ns118
-rwxr-xr-xtests/ts/lsns/netnsid97
-rwxr-xr-xtests/ts/lsns/nsfs95
-rw-r--r--tests/ts/md5/data7
-rwxr-xr-xtests/ts/md5/md531
-rw-r--r--tests/ts/minix/broken-rootbin0 -> 5120 bytes
-rw-r--r--tests/ts/minix/debian.bug.773892bin0 -> 16384 bytes
-rwxr-xr-xtests/ts/minix/fsck59
-rwxr-xr-xtests/ts/minix/fsck-images90
-rwxr-xr-xtests/ts/minix/mkfs57
-rwxr-xr-xtests/ts/misc/fallocate39
-rwxr-xr-xtests/ts/misc/flock124
-rwxr-xr-xtests/ts/misc/ionice30
-rwxr-xr-xtests/ts/misc/line65
-rwxr-xr-xtests/ts/misc/mbsencode85
-rwxr-xr-xtests/ts/misc/mcookie28
-rwxr-xr-xtests/ts/misc/mountpoint36
-rwxr-xr-xtests/ts/misc/pipesz80
-rwxr-xr-xtests/ts/misc/rev34
-rwxr-xr-xtests/ts/misc/setarch109
-rwxr-xr-xtests/ts/misc/setsid25
-rwxr-xr-xtests/ts/misc/strtosize62
-rwxr-xr-xtests/ts/misc/swaplabel69
-rwxr-xr-xtests/ts/misc/waitpid59
-rwxr-xr-xtests/ts/misc/whereis50
-rw-r--r--tests/ts/mkswap/BE-4096.img.xzbin0 -> 180 bytes
-rw-r--r--tests/ts/mkswap/BE-8192.img.xzbin0 -> 192 bytes
-rw-r--r--tests/ts/mkswap/LE-4096.img.xzbin0 -> 180 bytes
-rw-r--r--tests/ts/mkswap/LE-8192.img.xzbin0 -> 192 bytes
-rwxr-xr-xtests/ts/mkswap/mkswap65
-rwxr-xr-xtests/ts/more/regexp27
-rwxr-xr-xtests/ts/more/squeeze26
-rwxr-xr-xtests/ts/mount/complex106
-rwxr-xr-xtests/ts/mount/devname57
-rwxr-xr-xtests/ts/mount/dm-verity72
-rwxr-xr-xtests/ts/mount/fallback86
-rwxr-xr-xtests/ts/mount/fslists90
-rwxr-xr-xtests/ts/mount/fstab-all156
-rwxr-xr-xtests/ts/mount/fstab-bind35
-rwxr-xr-xtests/ts/mount/fstab-broken81
-rwxr-xr-xtests/ts/mount/fstab-btrfs144
-rwxr-xr-xtests/ts/mount/fstab-devname58
-rwxr-xr-xtests/ts/mount/fstab-devname2label52
-rwxr-xr-xtests/ts/mount/fstab-devname2uuid50
-rwxr-xr-xtests/ts/mount/fstab-label63
-rwxr-xr-xtests/ts/mount/fstab-label2devname60
-rwxr-xr-xtests/ts/mount/fstab-label2uuid63
-rwxr-xr-xtests/ts/mount/fstab-loop56
-rwxr-xr-xtests/ts/mount/fstab-none38
-rwxr-xr-xtests/ts/mount/fstab-symlink71
-rwxr-xr-xtests/ts/mount/fstab-uuid64
-rwxr-xr-xtests/ts/mount/fstab-uuid2devname59
-rwxr-xr-xtests/ts/mount/fstab-uuid2label61
-rwxr-xr-xtests/ts/mount/label56
-rwxr-xr-xtests/ts/mount/move95
-rwxr-xr-xtests/ts/mount/regfile41
-rwxr-xr-xtests/ts/mount/remount59
-rwxr-xr-xtests/ts/mount/set_ugid_mode64
-rwxr-xr-xtests/ts/mount/shared-subtree87
-rwxr-xr-xtests/ts/mount/special61
-rwxr-xr-xtests/ts/mount/subdir66
-rwxr-xr-xtests/ts/mount/umount-alltargets120
-rwxr-xr-xtests/ts/mount/umount-recursive100
-rwxr-xr-xtests/ts/mount/uuid53
-rwxr-xr-xtests/ts/namei/logic35
-rwxr-xr-xtests/ts/partx/partx186
-rwxr-xr-xtests/ts/partx/partx-image43
-rwxr-xr-xtests/ts/paths/built-in32
-rwxr-xr-xtests/ts/rename/basic75
-rwxr-xr-xtests/ts/rename/exit_codes42
-rwxr-xr-xtests/ts/rename/overwrite31
-rwxr-xr-xtests/ts/rename/subdir95
-rwxr-xr-xtests/ts/rename/symlink57
-rwxr-xr-xtests/ts/schedutils/chrt110
-rwxr-xr-xtests/ts/schedutils/chrt-non-root61
-rwxr-xr-xtests/ts/schedutils/cpuset59
-rwxr-xr-xtests/ts/script/buffering-race27
-rwxr-xr-xtests/ts/script/options66
-rwxr-xr-xtests/ts/script/race48
-rwxr-xr-xtests/ts/script/replay98
-rwxr-xr-xtests/ts/sfdisk/dos276
-rwxr-xr-xtests/ts/sfdisk/dump87
-rw-r--r--tests/ts/sfdisk/files/dump-gaps7
-rw-r--r--tests/ts/sfdisk/files/dump-old7
-rwxr-xr-xtests/ts/sfdisk/gpt206
-rwxr-xr-xtests/ts/sfdisk/movedata75
-rwxr-xr-xtests/ts/sfdisk/resize154
-rwxr-xr-xtests/ts/sfdisk/script157
-rwxr-xr-xtests/ts/sfdisk/wipe104
-rw-r--r--tests/ts/sha1/data7
-rwxr-xr-xtests/ts/sha1/sha131
-rwxr-xr-xtests/ts/swapon/devname50
-rwxr-xr-xtests/ts/swapon/fixpgsz49
-rwxr-xr-xtests/ts/swapon/fixsig53
-rwxr-xr-xtests/ts/swapon/label52
-rwxr-xr-xtests/ts/swapon/uuid50
-rwxr-xr-xtests/ts/ul/basic42
-rw-r--r--tests/ts/ul/basic.input95
-rw-r--r--tests/ts/ul/filter.input9
-rwxr-xr-xtests/ts/ul/ul29
-rwxr-xr-xtests/ts/utmp/last93
-rwxr-xr-xtests/ts/utmp/last-ipv666
-rw-r--r--tests/ts/utmp/subsec3
-rw-r--r--tests/ts/utmp/txt-a19
-rw-r--r--tests/ts/utmp/txt-a-old19
-rw-r--r--tests/ts/utmp/txt-b10
-rw-r--r--tests/ts/utmp/txt-b-old10
-rw-r--r--tests/ts/utmp/txt-ipv62
-rw-r--r--tests/ts/utmp/txt-ipv6-old2
-rw-r--r--tests/ts/utmp/utmp_functions.sh18
-rwxr-xr-xtests/ts/utmp/utmpdump-circle48
-rwxr-xr-xtests/ts/utmp/utmpdump-subsecond32
-rwxr-xr-xtests/ts/utmp/utmpdump-tobin32
-rwxr-xr-xtests/ts/utmp/utmpdump-tobin-ipv632
-rwxr-xr-xtests/ts/utmp/utmpdump-totxt28
-rwxr-xr-xtests/ts/utmp/utmpdump-totxt-ipv628
-rw-r--r--tests/ts/utmp/wtmp-a.BEbin0 -> 7296 bytes
-rw-r--r--tests/ts/utmp/wtmp-a.LEbin0 -> 7296 bytes
-rw-r--r--tests/ts/utmp/wtmp-b.BEbin0 -> 3840 bytes
-rw-r--r--tests/ts/utmp/wtmp-b.LEbin0 -> 3840 bytes
-rw-r--r--tests/ts/utmp/wtmp-ipv6.BEbin0 -> 768 bytes
-rw-r--r--tests/ts/utmp/wtmp-ipv6.LEbin0 -> 768 bytes
-rwxr-xr-xtests/ts/uuid/namespace29
-rwxr-xr-xtests/ts/uuid/oids33
-rwxr-xr-xtests/ts/uuid/uuid_parser26
-rwxr-xr-xtests/ts/uuid/uuidd59
-rwxr-xr-xtests/ts/uuid/uuidgen45
-rwxr-xr-xtests/ts/uuid/uuidparse61
-rwxr-xr-xtests/ts/wipefs/wipefs33
1878 files changed, 55235 insertions, 0 deletions
diff --git a/tests/Makemodule.am b/tests/Makemodule.am
new file mode 100644
index 0000000..d5422be
--- /dev/null
+++ b/tests/Makemodule.am
@@ -0,0 +1,27 @@
+
+include tests/helpers/Makemodule.am
+
+EXTRA_DIST += \
+ tests/expected \
+ tests/functions.sh \
+ tests/commands.sh \
+ tests/run.sh \
+ tests/ts
+
+clean-local-tests:
+ rm -rf $(top_builddir)/tests/output $(top_builddir)/tests/diff
+
+CLEAN_LOCALS += clean-local-tests
+
+TESTS_OPTIONS = --nonroot --show-diff
+TESTS_PARALLEL = --parallel
+TESTS_COMMAND = $(top_srcdir)/tests/run.sh \
+ --srcdir=$(abs_top_srcdir) \
+ --builddir=$(abs_top_builddir) \
+ $(TESTS_PARALLEL) \
+ $(TESTS_OPTIONS)
+
+check-local-tests: $(check_PROGRAMS)
+ $(AM_V_GEN) $(TESTS_COMMAND)
+
+CHECK_LOCALS += check-local-tests
diff --git a/tests/commands.sh b/tests/commands.sh
new file mode 100644
index 0000000..8dfb135
--- /dev/null
+++ b/tests/commands.sh
@@ -0,0 +1,123 @@
+# Misc settings
+TS_TESTUSER=${TS_TESTUSER:-"nobody"}
+
+# helpers
+TS_HELPER_BYTESWAP="${ts_helpersdir}test_byteswap"
+TS_HELPER_CPUSET="${ts_helpersdir}test_cpuset"
+TS_HELPER_DMESG="${ts_helpersdir}test_dmesg"
+TS_HELPER_ENOSYS="${ts_helpersdir}test_enosys"
+TS_HELPER_ISLOCAL="${ts_helpersdir}test_islocal"
+TS_HELPER_ISMOUNTED="${ts_helpersdir}test_ismounted"
+TS_HELPER_LIBFDISK_GPT="${ts_helpersdir}test_fdisk_gpt"
+TS_HELPER_LIBFDISK_MKPART="${ts_helpersdir}sample-fdisk-mkpart"
+TS_HELPER_LIBMOUNT_CONTEXT="${ts_helpersdir}test_mount_context"
+TS_HELPER_LIBFDISK_MKPART_FULLSPEC="${ts_helpersdir}sample-fdisk-mkpart-fullspec"
+TS_HELPER_LIBFDISK_SCRIPT_FUZZ="${ts_helpersdir}test_fdisk_script_fuzz"
+TS_HELPER_LIBMOUNT_LOCK="${ts_helpersdir}test_mount_lock"
+TS_HELPER_LIBMOUNT_OPTSTR="${ts_helpersdir}test_mount_optstr"
+TS_HELPER_LIBMOUNT_TABDIFF="${ts_helpersdir}test_mount_tab_diff"
+TS_HELPER_LIBMOUNT_TAB="${ts_helpersdir}test_mount_tab"
+TS_HELPER_LIBMOUNT_UPDATE="${ts_helpersdir}test_mount_tab_update"
+TS_HELPER_LIBMOUNT_UTILS="${ts_helpersdir}test_mount_utils"
+TS_HELPER_LIBMOUNT_DEBUG="${ts_helpersdir}test_mount_debug"
+TS_HELPER_LIBMOUNT_FUZZ="${ts_helpersdir}test_mount_fuzz"
+TS_HELPER_LIBSMARTCOLS_FROMFILE="${ts_helpersdir}sample-scols-fromfile"
+TS_HELPER_LIBSMARTCOLS_TITLE="${ts_helpersdir}sample-scols-title"
+TS_HELPER_PYLIBMOUNT_CONTEXT="$top_srcdir/libmount/python/test_mount_context.py"
+TS_HELPER_PYLIBMOUNT_TAB="$top_srcdir/libmount/python/test_mount_tab.py"
+TS_HELPER_PYLIBMOUNT_UPDATE="$top_srcdir/libmount/python/test_mount_tab_update.py"
+TS_HELPER_LOGGER="${ts_helpersdir}test_logger"
+TS_HELPER_LOGINDEFS="${ts_helpersdir}test_logindefs"
+TS_HELPER_MD5="${ts_helpersdir}test_md5"
+TS_HELPER_SHA1="${ts_helpersdir}test_sha1"
+TS_HELPER_MKFS_MINIX="${ts_helpersdir}test_mkfs_minix"
+TS_HELPER_MORE=${TS_HELPER_MORE-"${ts_helpersdir}test_more"}
+TS_HELPER_PARTITIONS="${ts_helpersdir}sample-partitions"
+TS_HELPER_PATHS="${ts_helpersdir}test_pathnames"
+TS_HELPER_SCRIPT="${ts_helpersdir}test_script"
+TS_HELPER_SIGRECEIVE="${ts_helpersdir}test_sigreceive"
+TS_HELPER_STRERROR="${ts_helpersdir}test_strerror"
+TS_HELPER_STRUTILS="${ts_helpersdir}test_strutils"
+TS_HELPER_SYSINFO="${ts_helpersdir}test_sysinfo"
+TS_HELPER_TIOCSTI="${ts_helpersdir}test_tiocsti"
+TS_HELPER_UUID_PARSER="${ts_helpersdir}test_uuid_parser"
+TS_HELPER_UUID_NAMESPACE="${ts_helpersdir}test_uuid_namespace"
+TS_HELPER_MBSENCODE="${ts_helpersdir}test_mbsencode"
+TS_HELPER_CAL="${ts_helpersdir}test_cal"
+TS_HELPER_LAST_FUZZ="${ts_helpersdir}test_last_fuzz"
+TS_HELPER_MKFDS="${ts_helpersdir}test_mkfds"
+TS_HELPER_BLKID_FUZZ="${ts_helpersdir}test_blkid_fuzz"
+TS_HELPER_PROCFS="${ts_helpersdir}test_procfs"
+TS_HELPER_TIMEUTILS="${ts_helpersdir}test_timeutils"
+
+# paths to commands
+TS_CMD_ADDPART=${TS_CMD_ADDPART:-"${ts_commandsdir}addpart"}
+TS_CMD_DELPART=${TS_CMD_DELPART:-"${ts_commandsdir}delpart"}
+TS_CMD_BLKDISCARD=${TS_CMD_BLKID-"${ts_commandsdir}blkdiscard"}
+TS_CMD_BLKID=${TS_CMD_BLKID-"${ts_commandsdir}blkid"}
+TS_CMD_CAL=${TS_CMD_CAL-"${ts_commandsdir}cal"}
+TS_CMD_COLCRT=${TS_CMD_COLCRT:-"${ts_commandsdir}colcrt"}
+TS_CMD_COLRM=${TS_CMD_COLRM:-"${ts_commandsdir}colrm"}
+TS_CMD_COL=${TS_CMD_COL:-"${ts_commandsdir}col"}
+TS_CMD_COLUMN=${TS_CMD_COLUMN:-"${ts_commandsdir}column"}
+TS_CMD_EJECT=${TS_CMD_EJECT-"${ts_commandsdir}eject"}
+TS_CMD_FALLOCATE=${TS_CMD_FALLOCATE-"${ts_commandsdir}fallocate"}
+TS_CMD_FDISK=${TS_CMD_FDISK-"${ts_commandsdir}fdisk"}
+TS_CMD_FLOCK=${TS_CMD_FLOCK-"${ts_commandsdir}flock"}
+TS_CMD_SFDISK=${TS_CMD_SFDISK-"${ts_commandsdir}sfdisk"}
+TS_CMD_FADVISE=${TS_CMD_FADVISE-"${ts_commandsdir}fadvise"}
+TS_CMD_FINCORE=${TS_CMD_FINCORE-"${ts_commandsdir}fincore"}
+TS_CMD_FINDMNT=${TS_CMD_FINDMNT-"${ts_commandsdir}findmnt"}
+TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"${ts_commandsdir}fsck.cramfs"}
+TS_CMD_FSCKMINIX=${TS_CMD_FSCKMINIX:-"${ts_commandsdir}fsck.minix"}
+TS_CMD_GETOPT=${TS_CMD_GETOPT-"${ts_commandsdir}getopt"}
+TS_CMD_HARDLINK=${TS_CMD_HARDLINK-"${ts_commandsdir}hardlink"}
+TS_CMD_HEXDUMP=${TS_CMD_HEXDUMP-"${ts_commandsdir}hexdump"}
+TS_CMD_HWCLOCK=${TS_CMD_HWCLOCK-"${ts_commandsdir}hwclock"}
+TS_CMD_IONICE=${TS_CMD_IONICE-"${ts_commandsdir}ionice"}
+TS_CMD_IPCMK=${TS_CMD_IPCMK-"${ts_commandsdir}ipcmk"}
+TS_CMD_IPCRM=${TS_CMD_IPCRM-"${ts_commandsdir}ipcrm"}
+TS_CMD_IPCS=${TS_CMD_IPCS:-"${ts_commandsdir}ipcs"}
+TS_CMD_ISOSIZE=${TS_CMD_ISOSIZE-"${ts_commandsdir}isosize"}
+TS_CMD_KILL=${TS_CMD_KILL-"${ts_commandsdir}kill"}
+TS_CMD_LAST=${TS_CMD_LAST-"${ts_commandsdir}last"}
+TS_CMD_LINE=${TS_CMD_LINE-"${ts_commandsdir}line"}
+TS_CMD_LOOK=${TS_CMD_LOOK-"${ts_commandsdir}look"}
+TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"${ts_commandsdir}losetup"}
+TS_CMD_LSBLK=${TS_CMD_LSBLK-"${ts_commandsdir}lsblk"}
+TS_CMD_LSCPU=${TS_CMD_LSCPU-"${ts_commandsdir}lscpu"}
+TS_CMD_LSFD=${TS_CMD_LSFD-"${ts_commandsdir}lsfd"}
+TS_CMD_LSMEM=${TS_CMD_LSMEM-"${ts_commandsdir}lsmem"}
+TS_CMD_LSNS=${TS_CMD_LSNS-"${ts_commandsdir}lsns"}
+TS_CMD_MCOOKIE=${TS_CMD_MCOOKIE-"${ts_commandsdir}mcookie"}
+TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"${ts_commandsdir}mkfs.cramfs"}
+TS_CMD_MKMINIX=${TS_CMD_MKMINIX:-"${ts_commandsdir}mkfs.minix"}
+TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"${ts_commandsdir}mkswap"}
+TS_CMD_MOUNT=${TS_CMD_MOUNT:-"${ts_commandsdir}mount"}
+TS_CMD_MOUNTPOINT=${TS_CMD_MOUNTPOINT:-"${ts_commandsdir}mountpoint"}
+TS_CMD_NAMEI=${TS_CMD_NAMEI-"${ts_commandsdir}namei"}
+TS_CMD_PARTX=${TS_CMD_PARTX-"${ts_commandsdir}partx"}
+TS_CMD_PIPESZ=${TS_CMD_PIPESZ-"${ts_commandsdir}pipesz"}
+TS_CMD_RENAME=${TS_CMD_RENAME-"${ts_commandsdir}rename"}
+TS_CMD_RUNUSER=${TS_CMD_RUNUSER-"${ts_commandsdir}runuser"}
+TS_CMD_REV=${TS_CMD_REV:-"${ts_commandsdir}rev"}
+TS_CMD_SCRIPT=${TS_CMD_SCRIPT-"${ts_commandsdir}script"}
+TS_CMD_SCRIPTREPLAY=${TS_CMD_SCRIPTREPLAY-"${ts_commandsdir}scriptreplay"}
+TS_CMD_SCRIPTLIVE=${TS_CMD_SCRIPTLIVE-"${ts_commandsdir}scriptlive"}
+TS_CMD_SETARCH=${TS_CMD_SETARCH-"${ts_commandsdir}setarch"}
+TS_CMD_SETSID=${TS_CMD_SETSID-"${ts_commandsdir}setsid"}
+TS_CMD_SWAPLABEL=${TS_CMD_SWAPLABEL:-"${ts_commandsdir}swaplabel"}
+TS_CMD_SWAPOFF=${TS_CMD_SWAPOFF:-"${ts_commandsdir}swapoff"}
+TS_CMD_SWAPON=${TS_CMD_SWAPON:-"${ts_commandsdir}swapon"}
+TS_CMD_UL=${TS_CMD_UL-"${ts_commandsdir}ul"}
+TS_CMD_UMOUNT=${TS_CMD_UMOUNT:-"${ts_commandsdir}umount"}
+TS_CMD_UNSHARE=${TS_CMD_UNSHARE:-"${ts_commandsdir}unshare"}
+TS_CMD_UTMPDUMP=${TS_CMD_UTMPDUMP-"${ts_commandsdir}utmpdump"}
+TS_CMD_UUIDD=${TS_CMD_UUIDD-"${ts_commandsdir}uuidd"}
+TS_CMD_UUIDGEN=${TS_CMD_UUIDGEN-"${ts_commandsdir}uuidgen"}
+TS_CMD_UUIDPARSE=${TS_CMD_UUIDPARSE-"${ts_commandsdir}uuidparse"}
+TS_CMD_WAITPID=${TS_CMD_WAITPID-"${ts_commandsdir}waitpid"}
+TS_CMD_WHEREIS=${TS_CMD_WHEREIS-"${ts_commandsdir}whereis"}
+TS_CMD_WIPEFS=${TS_CMD_WIPEFS-"${ts_commandsdir}wipefs"}
+TS_CMD_CHRT=${TS_CMD_CHRT-"${ts_commandsdir}chrt"}
+TS_CMD_CHFN=${TS_CMD_CHFN-"${ts_commandsdir}chfn"}
diff --git a/tests/expected/bitops/swapbytes b/tests/expected/bitops/swapbytes
new file mode 100644
index 0000000..b9468a7
--- /dev/null
+++ b/tests/expected/bitops/swapbytes
@@ -0,0 +1,21 @@
+Testing swab16
+swab16(0x0001) = 0x0100
+swab16(0x1234) = 0x3412
+swab16(0xff00) = 0x00ff
+swab16(0x4000) = 0x0040
+swab16(0xfeff) = 0xfffe
+Testing swab32
+swab32(0x00000001) = 0x01000000
+swab32(0x80000000) = 0x00000080
+swab32(0x12345678) = 0x78563412
+swab32(0xffff0000) = 0x0000ffff
+swab32(0x00ff0000) = 0x0000ff00
+swab32(0xff000000) = 0x000000ff
+Testing swab64
+swab64(0x0000000000000001) = 0x0100000000000000
+swab64(0x8000000000000000) = 0x0000000000000080
+swab64(0x1234567812345678) = 0x7856341278563412
+swab64(0xffffffff00000000) = 0x00000000ffffffff
+swab64(0x00ff000000000000) = 0x000000000000ff00
+swab64(0xff00000000000000) = 0x00000000000000ff
+No errors found in the byteswap implementation
diff --git a/tests/expected/blkdiscard/offsets b/tests/expected/blkdiscard/offsets
new file mode 100644
index 0000000..9af14b3
--- /dev/null
+++ b/tests/expected/blkdiscard/offsets
@@ -0,0 +1,50 @@
+create loop device from image
+testing offsets with full block size
+Discarded 10485760 bytes from the offset 0
+ret: 0
+ret: 1
+ret: 1
+Discarded 10485248 bytes from the offset 512
+ret: 0
+Discarded 10484736 bytes from the offset 1024
+ret: 0
+testing offsets with specific length
+Discarded 5242880 bytes from the offset 0
+ret: 0
+ret: 1
+ret: 1
+ret: 1
+ret: 1
+Discarded 5242880 bytes from the offset 512
+ret: 0
+Discarded 5242880 bytes from the offset 1024
+ret: 0
+testing aligned steps full device
+Discarded 10485760 bytes from the offset 0
+ret: 0
+Discarded 10485760 bytes from the offset 0
+ret: 0
+testing aligned steps with offsets and length
+Discarded 1024 bytes from the offset 0
+ret: 0
+ret: 1
+ret: 1
+ret: 1
+Discarded 1536 bytes from the offset 512
+ret: 0
+Discarded 1024 bytes from the offset 1024
+ret: 0
+testing misaligned steps full device
+ret: 1
+ret: 1
+ret: 1
+ret: 1
+ret: 1
+testing misaligned steps with offsets and length
+ret: 1
+ret: 1
+ret: 1
+ret: 1
+ret: 1
+ret: 1
+detach loop device from image
diff --git a/tests/expected/blkdiscard/offsets.err b/tests/expected/blkdiscard/offsets.err
new file mode 100644
index 0000000..0689712
--- /dev/null
+++ b/tests/expected/blkdiscard/offsets.err
@@ -0,0 +1,20 @@
+blkdiscard: offset 1 is not aligned to sector size 512
+blkdiscard: offset 511 is not aligned to sector size 512
+blkdiscard: length 5242881 is not aligned to sector size 512
+blkdiscard: length 5243391 is not aligned to sector size 512
+blkdiscard: offset 1 is not aligned to sector size 512
+blkdiscard: offset 511 is not aligned to sector size 512
+blkdiscard: offset 1 is not aligned to sector size 512
+blkdiscard: offset 1 is not aligned to sector size 512
+blkdiscard: offset 511 is not aligned to sector size 512
+blkdiscard: length 1 is not aligned to sector size 512
+blkdiscard: length 256 is not aligned to sector size 512
+blkdiscard: length 511 is not aligned to sector size 512
+blkdiscard: length 513 is not aligned to sector size 512
+blkdiscard: length 768 is not aligned to sector size 512
+blkdiscard: length 511 is not aligned to sector size 512
+blkdiscard: offset 1 is not aligned to sector size 512
+blkdiscard: offset 511 is not aligned to sector size 512
+blkdiscard: length 511 is not aligned to sector size 512
+blkdiscard: offset 1 is not aligned to sector size 512
+blkdiscard: offset 511 is not aligned to sector size 512
diff --git a/tests/expected/blkid/cache b/tests/expected/blkid/cache
new file mode 100644
index 0000000..b46ff20
--- /dev/null
+++ b/tests/expected/blkid/cache
@@ -0,0 +1,2 @@
+DEVICE: UUID="11111111-1111-1111-1111-111111111111" TYPE="swap"
+<device DEVNO="" TIME="" UUID="11111111-1111-1111-1111-111111111111" TYPE="swap">DEVICE</device>
diff --git a/tests/expected/blkid/dm-err b/tests/expected/blkid/dm-err
new file mode 100644
index 0000000..66c8246
--- /dev/null
+++ b/tests/expected/blkid/dm-err
@@ -0,0 +1,4 @@
+Initialize device
+Probe device
+Return code: 2
+Deinitialize device
diff --git a/tests/expected/blkid/low-probe-adaptec-raid b/tests/expected/blkid/low-probe-adaptec-raid
new file mode 100644
index 0000000..99a5888
--- /dev/null
+++ b/tests/expected/blkid/low-probe-adaptec-raid
@@ -0,0 +1,3 @@
+ID_FS_TYPE=adaptec_raid_member
+ID_FS_USAGE=raid
+ID_FS_VERSION=8
diff --git a/tests/expected/blkid/low-probe-apfs b/tests/expected/blkid/low-probe-apfs
new file mode 100644
index 0000000..492edfd
--- /dev/null
+++ b/tests/expected/blkid/low-probe-apfs
@@ -0,0 +1,6 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_TYPE=apfs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=25e5f1d3-11c0-4d36-98a5-3f66953519b9
+ID_FS_UUID_ENC=25e5f1d3-11c0-4d36-98a5-3f66953519b9
diff --git a/tests/expected/blkid/low-probe-bcache-B b/tests/expected/blkid/low-probe-bcache-B
new file mode 100644
index 0000000..7396632
--- /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 0000000..b3c5f88
--- /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-bcache-journal b/tests/expected/blkid/low-probe-bcache-journal
new file mode 100644
index 0000000..c46ba22
--- /dev/null
+++ b/tests/expected/blkid/low-probe-bcache-journal
@@ -0,0 +1,4 @@
+ID_FS_TYPE=bcache
+ID_FS_USAGE=other
+ID_FS_UUID=fc6ea56f-372e-474e-bc5b-2ddc8430ddd1
+ID_FS_UUID_ENC=fc6ea56f-372e-474e-bc5b-2ddc8430ddd1
diff --git a/tests/expected/blkid/low-probe-bcachefs b/tests/expected/blkid/low-probe-bcachefs
new file mode 100644
index 0000000..510ec89
--- /dev/null
+++ b/tests/expected/blkid/low-probe-bcachefs
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_FSSIZE=4194304
+ID_FS_LABEL=Label
+ID_FS_LABEL_ENC=Label
+ID_FS_TYPE=bcachefs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=46bd306f-80ad-4cd0-af4f-147e7d85f393
+ID_FS_UUID_ENC=46bd306f-80ad-4cd0-af4f-147e7d85f393
+ID_FS_UUID_SUB=72a60ede-4cb6-4374-aa70-cb38a50af5ef
+ID_FS_UUID_SUB_ENC=72a60ede-4cb6-4374-aa70-cb38a50af5ef
+ID_FS_VERSION=0.13
diff --git a/tests/expected/blkid/low-probe-bcachefs-2 b/tests/expected/blkid/low-probe-bcachefs-2
new file mode 100644
index 0000000..8e10469
--- /dev/null
+++ b/tests/expected/blkid/low-probe-bcachefs-2
@@ -0,0 +1,14 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=4194304
+ID_FS_LABEL=Label
+ID_FS_LABEL_ENC=Label
+ID_FS_LABEL_SUB=Device_Label
+ID_FS_LABEL_SUB_ENC=Device\x20Label
+ID_FS_TYPE=bcachefs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=4fa11b1e-75e6-4210-9167-34e1769c0fe1
+ID_FS_UUID_ENC=4fa11b1e-75e6-4210-9167-34e1769c0fe1
+ID_FS_UUID_SUB=525fa857-174a-4d3f-be33-6fe60441de7c
+ID_FS_UUID_SUB_ENC=525fa857-174a-4d3f-be33-6fe60441de7c
+ID_FS_VERSION=0.24
diff --git a/tests/expected/blkid/low-probe-befs b/tests/expected/blkid/low-probe-befs
new file mode 100644
index 0000000..a793b4a
--- /dev/null
+++ b/tests/expected/blkid/low-probe-befs
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_ENDIANNESS=LITTLE
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_LABEL=befs_test
+ID_FS_LABEL_ENC=befs_test
+ID_FS_TYPE=befs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=95d89dec82f6b73b
+ID_FS_UUID_ENC=95d89dec82f6b73b
+ID_FS_VERSION=little-endian
diff --git a/tests/expected/blkid/low-probe-bfs b/tests/expected/blkid/low-probe-bfs
new file mode 100644
index 0000000..8287304
--- /dev/null
+++ b/tests/expected/blkid/low-probe-bfs
@@ -0,0 +1,2 @@
+ID_FS_TYPE=bfs
+ID_FS_USAGE=filesystem
diff --git a/tests/expected/blkid/low-probe-bluestore b/tests/expected/blkid/low-probe-bluestore
new file mode 100644
index 0000000..006d402
--- /dev/null
+++ b/tests/expected/blkid/low-probe-bluestore
@@ -0,0 +1,2 @@
+ID_FS_TYPE=ceph_bluestore
+ID_FS_USAGE=other
diff --git a/tests/expected/blkid/low-probe-btrfs b/tests/expected/blkid/low-probe-btrfs
new file mode 100644
index 0000000..c99088d
--- /dev/null
+++ b/tests/expected/blkid/low-probe-btrfs
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_FSLASTBLOCK=29440
+ID_FS_FSSIZE=120586240
+ID_FS_TYPE=btrfs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=d4a78b72-55e4-4811-86a6-09af936d43f9
+ID_FS_UUID_ENC=d4a78b72-55e4-4811-86a6-09af936d43f9
+ID_FS_UUID_SUB=1e7603cb-d0be-4d8f-8972-9dddf7d5543c
+ID_FS_UUID_SUB_ENC=1e7603cb-d0be-4d8f-8972-9dddf7d5543c
diff --git a/tests/expected/blkid/low-probe-cramfs b/tests/expected/blkid/low-probe-cramfs
new file mode 100644
index 0000000..cf9c152
--- /dev/null
+++ b/tests/expected/blkid/low-probe-cramfs
@@ -0,0 +1,7 @@
+ID_FS_ENDIANNESS=LITTLE
+ID_FS_FSSIZE=4096
+ID_FS_LABEL=test-cram
+ID_FS_LABEL_ENC=test-cram
+ID_FS_TYPE=cramfs
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=2
diff --git a/tests/expected/blkid/low-probe-cramfs-big b/tests/expected/blkid/low-probe-cramfs-big
new file mode 100644
index 0000000..46d1295
--- /dev/null
+++ b/tests/expected/blkid/low-probe-cramfs-big
@@ -0,0 +1,7 @@
+ID_FS_ENDIANNESS=BIG
+ID_FS_FSSIZE=4096
+ID_FS_LABEL=Compressed
+ID_FS_LABEL_ENC=Compressed
+ID_FS_TYPE=cramfs
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=2
diff --git a/tests/expected/blkid/low-probe-cs_fvault2 b/tests/expected/blkid/low-probe-cs_fvault2
new file mode 100644
index 0000000..0f16dcf
--- /dev/null
+++ b/tests/expected/blkid/low-probe-cs_fvault2
@@ -0,0 +1,5 @@
+ID_FS_TYPE=cs_fvault2
+ID_FS_USAGE=crypto
+ID_FS_UUID=fc52bfae-5a1f-4f9b-b3a6-f33303a0e401
+ID_FS_UUID_ENC=fc52bfae-5a1f-4f9b-b3a6-f33303a0e401
+ID_FS_VERSION=1
diff --git a/tests/expected/blkid/low-probe-ddf-raid b/tests/expected/blkid/low-probe-ddf-raid
new file mode 100644
index 0000000..7956dcd
--- /dev/null
+++ b/tests/expected/blkid/low-probe-ddf-raid
@@ -0,0 +1,5 @@
+ID_FS_TYPE=ddf_raid_member
+ID_FS_USAGE=raid
+ID_FS_UUID=Linux-MDÞ­__
+ID_FS_UUID_ENC=Linux-MDÞ­\xbe\xef
+ID_FS_VERSION=01.02.00
diff --git a/tests/expected/blkid/low-probe-drbd-v08 b/tests/expected/blkid/low-probe-drbd-v08
new file mode 100644
index 0000000..22b4313
--- /dev/null
+++ b/tests/expected/blkid/low-probe-drbd-v08
@@ -0,0 +1,5 @@
+ID_FS_TYPE=drbd
+ID_FS_USAGE=raid
+ID_FS_UUID=4242424242424242
+ID_FS_UUID_ENC=4242424242424242
+ID_FS_VERSION=v08
diff --git a/tests/expected/blkid/low-probe-drbd-v09 b/tests/expected/blkid/low-probe-drbd-v09
new file mode 100644
index 0000000..0bf0dcf
--- /dev/null
+++ b/tests/expected/blkid/low-probe-drbd-v09
@@ -0,0 +1,5 @@
+ID_FS_TYPE=drbd
+ID_FS_USAGE=raid
+ID_FS_UUID=4242424242424242
+ID_FS_UUID_ENC=4242424242424242
+ID_FS_VERSION=v09
diff --git a/tests/expected/blkid/low-probe-drbdmanage-control-volume b/tests/expected/blkid/low-probe-drbdmanage-control-volume
new file mode 100644
index 0000000..c30e2cd
--- /dev/null
+++ b/tests/expected/blkid/low-probe-drbdmanage-control-volume
@@ -0,0 +1,5 @@
+ID_FS_TYPE=drbdmanage_control_volume
+ID_FS_USAGE=other
+ID_FS_UUID=8765f402dcb246529acee269b0ba8f2e
+ID_FS_UUID_ENC=8765f402dcb246529acee269b0ba8f2e
+ID_FS_VERSION=1
diff --git a/tests/expected/blkid/low-probe-erofs b/tests/expected/blkid/low-probe-erofs
new file mode 100644
index 0000000..00bcaf3
--- /dev/null
+++ b/tests/expected/blkid/low-probe-erofs
@@ -0,0 +1,7 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_FSSIZE=4096
+ID_FS_TYPE=erofs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2375febf-f260-479d-ade7-952494047cb4
+ID_FS_UUID_ENC=2375febf-f260-479d-ade7-952494047cb4
diff --git a/tests/expected/blkid/low-probe-exfat b/tests/expected/blkid/low-probe-exfat
new file mode 100644
index 0000000..e04b894
--- /dev/null
+++ b/tests/expected/blkid/low-probe-exfat
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=1048064
+ID_FS_LABEL=Ðовый_том
+ID_FS_LABEL_ENC=Ðовый\x20том
+ID_FS_TYPE=exfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=9C23-8877
+ID_FS_UUID_ENC=9C23-8877
+ID_FS_VERSION=1.0
diff --git a/tests/expected/blkid/low-probe-ext2 b/tests/expected/blkid/low-probe-ext2
new file mode 100644
index 0000000..d60d227
--- /dev/null
+++ b/tests/expected/blkid/low-probe-ext2
@@ -0,0 +1,11 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_FSLASTBLOCK=100
+ID_FS_FSSIZE=102400
+ID_FS_LABEL=test-ext2
+ID_FS_LABEL_ENC=test-ext2
+ID_FS_TYPE=ext2
+ID_FS_USAGE=filesystem
+ID_FS_UUID=22f0eac3-5c89-4ec1-9076-60799119aaea
+ID_FS_UUID_ENC=22f0eac3-5c89-4ec1-9076-60799119aaea
+ID_FS_VERSION=1.0
diff --git a/tests/expected/blkid/low-probe-ext3 b/tests/expected/blkid/low-probe-ext3
new file mode 100644
index 0000000..6a3a61b
--- /dev/null
+++ b/tests/expected/blkid/low-probe-ext3
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_FSLASTBLOCK=2048
+ID_FS_FSSIZE=2097152
+ID_FS_LABEL=test-ext3
+ID_FS_LABEL_ENC=test-ext3
+ID_FS_SEC_TYPE=ext2
+ID_FS_TYPE=ext3
+ID_FS_USAGE=filesystem
+ID_FS_UUID=35f66dab-477e-4090-a872-95ee0e493ad6
+ID_FS_UUID_ENC=35f66dab-477e-4090-a872-95ee0e493ad6
+ID_FS_VERSION=1.0
diff --git a/tests/expected/blkid/low-probe-ext4 b/tests/expected/blkid/low-probe-ext4
new file mode 100644
index 0000000..95e6a6d
--- /dev/null
+++ b/tests/expected/blkid/low-probe-ext4
@@ -0,0 +1,11 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_FSLASTBLOCK=65536
+ID_FS_FSSIZE=67108864
+ID_FS_LABEL=test-ext4
+ID_FS_LABEL_ENC=test-ext4
+ID_FS_TYPE=ext4
+ID_FS_USAGE=filesystem
+ID_FS_UUID=ada110f6-bd6d-49db-955d-342c27627b61
+ID_FS_UUID_ENC=ada110f6-bd6d-49db-955d-342c27627b61
+ID_FS_VERSION=1.0
diff --git a/tests/expected/blkid/low-probe-f2fs b/tests/expected/blkid/low-probe-f2fs
new file mode 100644
index 0000000..d1c0167
--- /dev/null
+++ b/tests/expected/blkid/low-probe-f2fs
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_FSSIZE=148897792
+ID_FS_LABEL=test-f2fs
+ID_FS_LABEL_ENC=test-f2fs
+ID_FS_TYPE=f2fs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=f6aee5b9-8cc2-4da7-9f8d-c95aac90e17d
+ID_FS_UUID_ENC=f6aee5b9-8cc2-4da7-9f8d-c95aac90e17d
+ID_FS_VERSION=1.15
diff --git a/tests/expected/blkid/low-probe-fat b/tests/expected/blkid/low-probe-fat
new file mode 100644
index 0000000..24099f5
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat
@@ -0,0 +1,13 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=1474560
+ID_FS_LABEL=TEST-FAT
+ID_FS_LABEL_ENC=TEST-FAT
+ID_FS_LABEL_FATBOOT=TEST-FAT
+ID_FS_LABEL_FATBOOT_ENC=TEST-FAT
+ID_FS_SEC_TYPE=msdos
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=DEAD-BEEF
+ID_FS_UUID_ENC=DEAD-BEEF
+ID_FS_VERSION=FAT12
diff --git a/tests/expected/blkid/low-probe-fat16_noheads b/tests/expected/blkid/low-probe-fat16_noheads
new file mode 100644
index 0000000..22e6d49
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat16_noheads
@@ -0,0 +1,11 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_FSSIZE=219898368
+ID_FS_LABEL=VTech_1070
+ID_FS_LABEL_ENC=VTech\x201070
+ID_FS_SEC_TYPE=msdos
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2004-1014
+ID_FS_UUID_ENC=2004-1014
+ID_FS_VERSION=FAT16
diff --git a/tests/expected/blkid/low-probe-fat32_cp850_O_tilde b/tests/expected/blkid/low-probe-fat32_cp850_O_tilde
new file mode 100644
index 0000000..00cb875
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_cp850_O_tilde
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=___
+ID_FS_LABEL_ENC=\xe5\xe5\xe5
+ID_FS_LABEL_FATBOOT=___
+ID_FS_LABEL_FATBOOT_ENC=\xe5\xe5\xe5
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2826-F9B3
+ID_FS_UUID_ENC=2826-F9B3
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_label_64MB b/tests/expected/blkid/low-probe-fat32_label_64MB
new file mode 100644
index 0000000..31bdb9f
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_label_64MB
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=65454080
+ID_FS_LABEL=BINGO
+ID_FS_LABEL_ENC=BINGO
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=8CB5-BA49
+ID_FS_UUID_ENC=8CB5-BA49
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1 b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1
new file mode 100644
index 0000000..35afd61
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=label1
+ID_FS_LABEL_ENC=label1
+ID_FS_LABEL_FATBOOT=label1
+ID_FS_LABEL_FATBOOT_ENC=label1
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=92B4-BA66
+ID_FS_UUID_ENC=92B4-BA66
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME
new file mode 100644
index 0000000..449716a
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=NO_NAME
+ID_FS_LABEL_ENC=NO\x20NAME
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=92B4-BA66
+ID_FS_UUID_ENC=92B4-BA66
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_empty b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_empty
new file mode 100644
index 0000000..93b55c7
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_empty
@@ -0,0 +1,8 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=92B4-BA66
+ID_FS_UUID_ENC=92B4-BA66
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_label2 b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_label2
new file mode 100644
index 0000000..5ad9e08
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_dosfslabel_label2
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=label2
+ID_FS_LABEL_ENC=label2
+ID_FS_LABEL_FATBOOT=label2
+ID_FS_LABEL_FATBOOT_ENC=label2
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=92B4-BA66
+ID_FS_UUID_ENC=92B4-BA66
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME
new file mode 100644
index 0000000..449716a
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=NO_NAME
+ID_FS_LABEL_ENC=NO\x20NAME
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=92B4-BA66
+ID_FS_UUID_ENC=92B4-BA66
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase
new file mode 100644
index 0000000..93b55c7
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase
@@ -0,0 +1,8 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=92B4-BA66
+ID_FS_UUID_ENC=92B4-BA66
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_erase b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_erase
new file mode 100644
index 0000000..52e79f9
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_erase
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL_FATBOOT=label1
+ID_FS_LABEL_FATBOOT_ENC=label1
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=92B4-BA66
+ID_FS_UUID_ENC=92B4-BA66
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_label2 b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_label2
new file mode 100644
index 0000000..65b19e9
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_label1_xp_label2
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=LABEL2
+ID_FS_LABEL_ENC=LABEL2
+ID_FS_LABEL_FATBOOT=label1
+ID_FS_LABEL_FATBOOT_ENC=label1
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=92B4-BA66
+ID_FS_UUID_ENC=92B4-BA66
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none b/tests/expected/blkid/low-probe-fat32_mkdosfs_none
new file mode 100644
index 0000000..fdd9129
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none
@@ -0,0 +1,8 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=E6B8-AF8C
+ID_FS_UUID_ENC=E6B8-AF8C
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME
new file mode 100644
index 0000000..fdd9129
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME
@@ -0,0 +1,8 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=E6B8-AF8C
+ID_FS_UUID_ENC=E6B8-AF8C
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1 b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1
new file mode 100644
index 0000000..b5ae67a
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL_FATBOOT=label1
+ID_FS_LABEL_FATBOOT_ENC=label1
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=E6B8-AF8C
+ID_FS_UUID_ENC=E6B8-AF8C
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label2 b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label2
new file mode 100644
index 0000000..dd21413
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label2
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=LABEL2
+ID_FS_LABEL_ENC=LABEL2
+ID_FS_LABEL_FATBOOT=label1
+ID_FS_LABEL_FATBOOT_ENC=label1
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=E6B8-AF8C
+ID_FS_UUID_ENC=E6B8-AF8C
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1 b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1
new file mode 100644
index 0000000..6564396
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=LABEL1
+ID_FS_LABEL_ENC=LABEL1
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=E6B8-AF8C
+ID_FS_UUID_ENC=E6B8-AF8C
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label2 b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label2
new file mode 100644
index 0000000..33ef639
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label2
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=label2
+ID_FS_LABEL_ENC=label2
+ID_FS_LABEL_FATBOOT=label2
+ID_FS_LABEL_FATBOOT_ENC=label2
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=E6B8-AF8C
+ID_FS_UUID_ENC=E6B8-AF8C
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_xp_label1 b/tests/expected/blkid/low-probe-fat32_xp_label1
new file mode 100644
index 0000000..39ade41
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_xp_label1
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=LABEL1
+ID_FS_LABEL_ENC=LABEL1
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=A420-9304
+ID_FS_UUID_ENC=A420-9304
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_xp_none b/tests/expected/blkid/low-probe-fat32_xp_none
new file mode 100644
index 0000000..4490b16
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_xp_none
@@ -0,0 +1,8 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=54B6-DC94
+ID_FS_UUID_ENC=54B6-DC94
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_xp_none_dosfslabel_label1 b/tests/expected/blkid/low-probe-fat32_xp_none_dosfslabel_label1
new file mode 100644
index 0000000..89d32a1
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_xp_none_dosfslabel_label1
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL_FATBOOT=label1
+ID_FS_LABEL_FATBOOT_ENC=label1
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=54B6-DC94
+ID_FS_UUID_ENC=54B6-DC94
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-fat32_xp_none_mlabel_label1 b/tests/expected/blkid/low-probe-fat32_xp_none_mlabel_label1
new file mode 100644
index 0000000..9c7c7d4
--- /dev/null
+++ b/tests/expected/blkid/low-probe-fat32_xp_none_mlabel_label1
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=34603008
+ID_FS_LABEL=LABEL1
+ID_FS_LABEL_ENC=LABEL1
+ID_FS_LABEL_FATBOOT=LABEL1
+ID_FS_LABEL_FATBOOT_ENC=LABEL1
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=54B6-DC94
+ID_FS_UUID_ENC=54B6-DC94
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-gfs2 b/tests/expected/blkid/low-probe-gfs2
new file mode 100644
index 0000000..8b2840f
--- /dev/null
+++ b/tests/expected/blkid/low-probe-gfs2
@@ -0,0 +1,7 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_LABEL=mycluster:mygfs2
+ID_FS_LABEL_ENC=mycluster:mygfs2
+ID_FS_TYPE=gfs2
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=1
diff --git a/tests/expected/blkid/low-probe-hfs b/tests/expected/blkid/low-probe-hfs
new file mode 100644
index 0000000..d4cbb5c
--- /dev/null
+++ b/tests/expected/blkid/low-probe-hfs
@@ -0,0 +1,4 @@
+ID_FS_LABEL=BBB
+ID_FS_LABEL_ENC=BBB
+ID_FS_TYPE=hfs
+ID_FS_USAGE=filesystem
diff --git a/tests/expected/blkid/low-probe-hfsplus b/tests/expected/blkid/low-probe-hfsplus
new file mode 100644
index 0000000..07e60ea
--- /dev/null
+++ b/tests/expected/blkid/low-probe-hfsplus
@@ -0,0 +1,6 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_LABEL=123456789ABCDE
+ID_FS_LABEL_ENC=123456789ABCDE
+ID_FS_TYPE=hfsplus
+ID_FS_USAGE=filesystem
diff --git a/tests/expected/blkid/low-probe-hpfs b/tests/expected/blkid/low-probe-hpfs
new file mode 100644
index 0000000..a6198c6
--- /dev/null
+++ b/tests/expected/blkid/low-probe-hpfs
@@ -0,0 +1,9 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=P01_S16A
+ID_FS_LABEL_ENC=P01\x20S16A
+ID_FS_TYPE=hpfs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=3BC2-32D5
+ID_FS_UUID_ENC=3BC2-32D5
+ID_FS_VERSION=2
diff --git a/tests/expected/blkid/low-probe-hpt37x-raid b/tests/expected/blkid/low-probe-hpt37x-raid
new file mode 100644
index 0000000..81f6dec
--- /dev/null
+++ b/tests/expected/blkid/low-probe-hpt37x-raid
@@ -0,0 +1,2 @@
+ID_FS_TYPE=hpt37x_raid_member
+ID_FS_USAGE=raid
diff --git a/tests/expected/blkid/low-probe-hpt45x-raid b/tests/expected/blkid/low-probe-hpt45x-raid
new file mode 100644
index 0000000..4eb9552
--- /dev/null
+++ b/tests/expected/blkid/low-probe-hpt45x-raid
@@ -0,0 +1,2 @@
+ID_FS_TYPE=hpt45x_raid_member
+ID_FS_USAGE=raid
diff --git a/tests/expected/blkid/low-probe-iso b/tests/expected/blkid/low-probe-iso
new file mode 100644
index 0000000..fcf6a34
--- /dev/null
+++ b/tests/expected/blkid/low-probe-iso
@@ -0,0 +1,11 @@
+ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_FSSIZE=438272
+ID_FS_LABEL=IsoVolumeName
+ID_FS_LABEL_ENC=IsoVolumeName
+ID_FS_SYSTEM_ID=LINUX
+ID_FS_TYPE=iso9660
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2009-09-24-10-34-40-00
+ID_FS_UUID_ENC=2009-09-24-10-34-40-00
diff --git a/tests/expected/blkid/low-probe-iso-different-iso-joliet-label b/tests/expected/blkid/low-probe-iso-different-iso-joliet-label
new file mode 100644
index 0000000..37fffab
--- /dev/null
+++ b/tests/expected/blkid/low-probe-iso-different-iso-joliet-label
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=Joliet\x20Application
+ID_FS_BLOCK_SIZE=2048
+ID_FS_DATA_PREPARER_ID=Joliet\x20Preparer
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_FSSIZE=1228800
+ID_FS_LABEL=Joliet_Label
+ID_FS_LABEL_ENC=Joliet\x20Label
+ID_FS_PUBLISHER_ID=Joliet\x20Publisher
+ID_FS_SYSTEM_ID=Joliet\x20System\x20id
+ID_FS_TYPE=iso9660
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=Joliet\x20Extension
+ID_FS_VOLUME_SET_ID=Joliet\x20Volume\x20set
diff --git a/tests/expected/blkid/low-probe-iso-joliet b/tests/expected/blkid/low-probe-iso-joliet
new file mode 100644
index 0000000..1cc8b65
--- /dev/null
+++ b/tests/expected/blkid/low-probe-iso-joliet
@@ -0,0 +1,12 @@
+ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_FSSIZE=450560
+ID_FS_LABEL=ThisWonderfulLabelIsVeryVeryLong
+ID_FS_LABEL_ENC=ThisWonderfulLabelIsVeryVeryLong
+ID_FS_SYSTEM_ID=LINUX
+ID_FS_TYPE=iso9660
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2009-09-22-12-52-23-00
+ID_FS_UUID_ENC=2009-09-22-12-52-23-00
+ID_FS_VERSION=Joliet\x20Extension
diff --git a/tests/expected/blkid/low-probe-iso-multi-genisoimage-0 b/tests/expected/blkid/low-probe-iso-multi-genisoimage-0
new file mode 100644
index 0000000..e022d7e
--- /dev/null
+++ b/tests/expected/blkid/low-probe-iso-multi-genisoimage-0
@@ -0,0 +1,11 @@
+ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_FSSIZE=356352
+ID_FS_LABEL=first_session
+ID_FS_LABEL_ENC=first\x20session
+ID_FS_SYSTEM_ID=LINUX
+ID_FS_TYPE=iso9660
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2020-11-07-23-16-51-00
+ID_FS_UUID_ENC=2020-11-07-23-16-51-00
diff --git a/tests/expected/blkid/low-probe-iso-multi-genisoimage-174 b/tests/expected/blkid/low-probe-iso-multi-genisoimage-174
new file mode 100644
index 0000000..44940e1
--- /dev/null
+++ b/tests/expected/blkid/low-probe-iso-multi-genisoimage-174
@@ -0,0 +1,11 @@
+ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_FSSIZE=356352
+ID_FS_LABEL=second_session
+ID_FS_LABEL_ENC=second\x20session
+ID_FS_SYSTEM_ID=LINUX
+ID_FS_TYPE=iso9660
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2020-11-07-23-18-14-00
+ID_FS_UUID_ENC=2020-11-07-23-18-14-00
diff --git a/tests/expected/blkid/low-probe-iso-multi-genisoimage-348 b/tests/expected/blkid/low-probe-iso-multi-genisoimage-348
new file mode 100644
index 0000000..203f081
--- /dev/null
+++ b/tests/expected/blkid/low-probe-iso-multi-genisoimage-348
@@ -0,0 +1,11 @@
+ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_FSSIZE=356352
+ID_FS_LABEL=third_session
+ID_FS_LABEL_ENC=third\x20session
+ID_FS_SYSTEM_ID=LINUX
+ID_FS_TYPE=iso9660
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2020-11-07-23-22-08-00
+ID_FS_UUID_ENC=2020-11-07-23-22-08-00
diff --git a/tests/expected/blkid/low-probe-iso-rr-joliet b/tests/expected/blkid/low-probe-iso-rr-joliet
new file mode 100644
index 0000000..386fd76
--- /dev/null
+++ b/tests/expected/blkid/low-probe-iso-rr-joliet
@@ -0,0 +1,12 @@
+ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_FSSIZE=452608
+ID_FS_LABEL=ThisIsVolumeName
+ID_FS_LABEL_ENC=ThisIsVolumeName
+ID_FS_SYSTEM_ID=LINUX
+ID_FS_TYPE=iso9660
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2009-09-24-10-32-43-00
+ID_FS_UUID_ENC=2009-09-24-10-32-43-00
+ID_FS_VERSION=Joliet\x20Extension
diff --git a/tests/expected/blkid/low-probe-iso-unicode-long-label b/tests/expected/blkid/low-probe-iso-unicode-long-label
new file mode 100644
index 0000000..bdc2d21
--- /dev/null
+++ b/tests/expected/blkid/low-probe-iso-unicode-long-label
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=Nero\x20Linux
+ID_FS_BLOCK_SIZE=2048
+ID_FS_DATA_PREPARER_ID=Naïve\x20and\x20very\x20looooooooooooooooooooooooooooooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG\x20DATA\x20PREPARER
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_FSSIZE=1228800
+ID_FS_LABEL=Naïve_and_very_lOOOOOOOONG_LABEL
+ID_FS_LABEL_ENC=Naïve\x20and\x20very\x20lOOOOOOOONG_LABEL
+ID_FS_PUBLISHER_ID=Naïve\x20and\x20very\x20looooooooooooooooooooooooooooooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG\x20PUBLISHER
+ID_FS_SYSTEM_ID=Naïve\x20and\x20very\x20lONG\x20SYSTEM\x20IDENT
+ID_FS_TYPE=iso9660
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=Joliet\x20Extension
+ID_FS_VOLUME_SET_ID=Naïve\x20and\x20very\x20looooooooooooooooooooooooooooooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG_VOLUME_SET
diff --git a/tests/expected/blkid/low-probe-isw-raid b/tests/expected/blkid/low-probe-isw-raid
new file mode 100644
index 0000000..42419c5
--- /dev/null
+++ b/tests/expected/blkid/low-probe-isw-raid
@@ -0,0 +1,3 @@
+ID_FS_TYPE=isw_raid_member
+ID_FS_USAGE=raid
+ID_FS_VERSION=1.0.00
diff --git a/tests/expected/blkid/low-probe-jbd b/tests/expected/blkid/low-probe-jbd
new file mode 100644
index 0000000..def505d
--- /dev/null
+++ b/tests/expected/blkid/low-probe-jbd
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_FSLASTBLOCK=1024
+ID_FS_FSSIZE=1048576
+ID_FS_LOGUUID=0d7a07df-7b06-4829-bce7-3b9c3ece570c
+ID_FS_TYPE=jbd
+ID_FS_USAGE=other
+ID_FS_UUID=0d7a07df-7b06-4829-bce7-3b9c3ece570c
+ID_FS_UUID_ENC=0d7a07df-7b06-4829-bce7-3b9c3ece570c
+ID_FS_VERSION=1.0
diff --git a/tests/expected/blkid/low-probe-jfs b/tests/expected/blkid/low-probe-jfs
new file mode 100644
index 0000000..ee6e1ea
--- /dev/null
+++ b/tests/expected/blkid/low-probe-jfs
@@ -0,0 +1,8 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_LABEL=test-jfs
+ID_FS_LABEL_ENC=test-jfs
+ID_FS_TYPE=jfs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=9bf7b82e-7583-4c74-99a4-189a691f27b5
+ID_FS_UUID_ENC=9bf7b82e-7583-4c74-99a4-189a691f27b5
diff --git a/tests/expected/blkid/low-probe-jmicron-raid b/tests/expected/blkid/low-probe-jmicron-raid
new file mode 100644
index 0000000..dc572b7
--- /dev/null
+++ b/tests/expected/blkid/low-probe-jmicron-raid
@@ -0,0 +1,3 @@
+ID_FS_TYPE=jmicron_raid_member
+ID_FS_USAGE=raid
+ID_FS_VERSION=0.1
diff --git a/tests/expected/blkid/low-probe-lsi-raid b/tests/expected/blkid/low-probe-lsi-raid
new file mode 100644
index 0000000..48f7114
--- /dev/null
+++ b/tests/expected/blkid/low-probe-lsi-raid
@@ -0,0 +1,2 @@
+ID_FS_TYPE=lsi_mega_raid_member
+ID_FS_USAGE=raid
diff --git a/tests/expected/blkid/low-probe-luks1 b/tests/expected/blkid/low-probe-luks1
new file mode 100644
index 0000000..073a852
--- /dev/null
+++ b/tests/expected/blkid/low-probe-luks1
@@ -0,0 +1,5 @@
+ID_FS_TYPE=crypto_LUKS
+ID_FS_USAGE=crypto
+ID_FS_UUID=e5f398d9-39da-4b6a-9ac3-e085a9394e7c
+ID_FS_UUID_ENC=e5f398d9-39da-4b6a-9ac3-e085a9394e7c
+ID_FS_VERSION=1
diff --git a/tests/expected/blkid/low-probe-luks2 b/tests/expected/blkid/low-probe-luks2
new file mode 100644
index 0000000..ea5f99c
--- /dev/null
+++ b/tests/expected/blkid/low-probe-luks2
@@ -0,0 +1,8 @@
+ID_FS_LABEL=tst_label
+ID_FS_LABEL_ENC=tst_label
+ID_FS_SUBSYSTEM=tst_subsys
+ID_FS_TYPE=crypto_LUKS
+ID_FS_USAGE=crypto
+ID_FS_UUID=202265fe-9842-4c2d-ac9b-aba1b05deb63
+ID_FS_UUID_ENC=202265fe-9842-4c2d-ac9b-aba1b05deb63
+ID_FS_VERSION=2
diff --git a/tests/expected/blkid/low-probe-lvm2 b/tests/expected/blkid/low-probe-lvm2
new file mode 100644
index 0000000..19aed2a
--- /dev/null
+++ b/tests/expected/blkid/low-probe-lvm2
@@ -0,0 +1,5 @@
+ID_FS_TYPE=LVM2_member
+ID_FS_USAGE=raid
+ID_FS_UUID=Vynv4k-APH8-xQER-HSBb-8VJ3-SvFF-PB5O1U
+ID_FS_UUID_ENC=Vynv4k-APH8-xQER-HSBb-8VJ3-SvFF-PB5O1U
+ID_FS_VERSION=LVM2\x20001
diff --git a/tests/expected/blkid/low-probe-mdraid b/tests/expected/blkid/low-probe-mdraid
new file mode 100644
index 0000000..0613dfe
--- /dev/null
+++ b/tests/expected/blkid/low-probe-mdraid
@@ -0,0 +1,5 @@
+ID_FS_TYPE=linux_raid_member
+ID_FS_USAGE=raid
+ID_FS_UUID=37c76b91-011a-05c5-d30c-1fd4c5c3dbbc
+ID_FS_UUID_ENC=37c76b91-011a-05c5-d30c-1fd4c5c3dbbc
+ID_FS_VERSION=0.90.0
diff --git a/tests/expected/blkid/low-probe-mdraid-1 b/tests/expected/blkid/low-probe-mdraid-1
new file mode 100644
index 0000000..14c257b
--- /dev/null
+++ b/tests/expected/blkid/low-probe-mdraid-1
@@ -0,0 +1,9 @@
+ID_FS_LABEL=troy.t-8ch.de:0
+ID_FS_LABEL_ENC=troy.t-8ch.de:0
+ID_FS_TYPE=linux_raid_member
+ID_FS_USAGE=raid
+ID_FS_UUID=77e61baf-c0b5-d7d0-39cf-575b64d4878c
+ID_FS_UUID_ENC=77e61baf-c0b5-d7d0-39cf-575b64d4878c
+ID_FS_UUID_SUB=379f6ef9-e75a-12c1-11f1-d883ff168e1d
+ID_FS_UUID_SUB_ENC=379f6ef9-e75a-12c1-11f1-d883ff168e1d
+ID_FS_VERSION=1.2
diff --git a/tests/expected/blkid/low-probe-minix-BE b/tests/expected/blkid/low-probe-minix-BE
new file mode 100644
index 0000000..de0ad8d
--- /dev/null
+++ b/tests/expected/blkid/low-probe-minix-BE
@@ -0,0 +1,6 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_ENDIANNESS=BIG
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_TYPE=minix
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=1
diff --git a/tests/expected/blkid/low-probe-minix-LE b/tests/expected/blkid/low-probe-minix-LE
new file mode 100644
index 0000000..bcfbf3f
--- /dev/null
+++ b/tests/expected/blkid/low-probe-minix-LE
@@ -0,0 +1,6 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_ENDIANNESS=LITTLE
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_TYPE=minix
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=1
diff --git a/tests/expected/blkid/low-probe-mpool b/tests/expected/blkid/low-probe-mpool
new file mode 100644
index 0000000..f703ef0
--- /dev/null
+++ b/tests/expected/blkid/low-probe-mpool
@@ -0,0 +1,6 @@
+ID_FS_LABEL=mp1
+ID_FS_LABEL_ENC=mp1
+ID_FS_TYPE=mpool
+ID_FS_USAGE=filesystem
+ID_FS_UUID=2dfca1ea-651e-4694-976f-14654b0a8a83
+ID_FS_UUID_ENC=2dfca1ea-651e-4694-976f-14654b0a8a83
diff --git a/tests/expected/blkid/low-probe-netware b/tests/expected/blkid/low-probe-netware
new file mode 100644
index 0000000..094d5c9
--- /dev/null
+++ b/tests/expected/blkid/low-probe-netware
@@ -0,0 +1,5 @@
+ID_FS_TYPE=nss
+ID_FS_USAGE=filesystem
+ID_FS_UUID=64fba6bb-ebad-d901-8000-361d9abf2560
+ID_FS_UUID_ENC=64fba6bb-ebad-d901-8000-361d9abf2560
+ID_FS_VERSION=43.02
diff --git a/tests/expected/blkid/low-probe-nilfs2 b/tests/expected/blkid/low-probe-nilfs2
new file mode 100644
index 0000000..4bd4665
--- /dev/null
+++ b/tests/expected/blkid/low-probe-nilfs2
@@ -0,0 +1,9 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_LABEL=test-nilfs2
+ID_FS_LABEL_ENC=test-nilfs2
+ID_FS_TYPE=nilfs2
+ID_FS_USAGE=filesystem
+ID_FS_UUID=524025fb-6d31-40e6-baad-1db36cfdf806
+ID_FS_UUID_ENC=524025fb-6d31-40e6-baad-1db36cfdf806
+ID_FS_VERSION=2
diff --git a/tests/expected/blkid/low-probe-ntfs b/tests/expected/blkid/low-probe-ntfs
new file mode 100644
index 0000000..d18e929
--- /dev/null
+++ b/tests/expected/blkid/low-probe-ntfs
@@ -0,0 +1,9 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_FSSIZE=10485248
+ID_FS_LABEL=Ðовый_том
+ID_FS_LABEL_ENC=Ðовый\x20том
+ID_FS_TYPE=ntfs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=09CBB6DE30C87310
+ID_FS_UUID_ENC=09CBB6DE30C87310
diff --git a/tests/expected/blkid/low-probe-nvidia-raid b/tests/expected/blkid/low-probe-nvidia-raid
new file mode 100644
index 0000000..d143ea7
--- /dev/null
+++ b/tests/expected/blkid/low-probe-nvidia-raid
@@ -0,0 +1,3 @@
+ID_FS_TYPE=nvidia_raid_member
+ID_FS_USAGE=raid
+ID_FS_VERSION=100
diff --git a/tests/expected/blkid/low-probe-ocfs2 b/tests/expected/blkid/low-probe-ocfs2
new file mode 100644
index 0000000..99189f3
--- /dev/null
+++ b/tests/expected/blkid/low-probe-ocfs2
@@ -0,0 +1,9 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_LABEL=test-ocfs2
+ID_FS_LABEL_ENC=test-ocfs2
+ID_FS_TYPE=ocfs2
+ID_FS_USAGE=filesystem
+ID_FS_UUID=6b6bfbea-3a79-4f0c-b166-a20776102445
+ID_FS_UUID_ENC=6b6bfbea-3a79-4f0c-b166-a20776102445
+ID_FS_VERSION=0.90
diff --git a/tests/expected/blkid/low-probe-promise-raid b/tests/expected/blkid/low-probe-promise-raid
new file mode 100644
index 0000000..a2a82d0
--- /dev/null
+++ b/tests/expected/blkid/low-probe-promise-raid
@@ -0,0 +1,2 @@
+ID_FS_TYPE=promise_fasttrack_raid_member
+ID_FS_USAGE=raid
diff --git a/tests/expected/blkid/low-probe-reiser3 b/tests/expected/blkid/low-probe-reiser3
new file mode 100644
index 0000000..3ae7120
--- /dev/null
+++ b/tests/expected/blkid/low-probe-reiser3
@@ -0,0 +1,9 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_LABEL=TESTREISER
+ID_FS_LABEL_ENC=TESTREISER
+ID_FS_TYPE=reiserfs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=9efe7863-b124-46dc-ad68-8ecd04230a7b
+ID_FS_UUID_ENC=9efe7863-b124-46dc-ad68-8ecd04230a7b
+ID_FS_VERSION=JR
diff --git a/tests/expected/blkid/low-probe-reiser4 b/tests/expected/blkid/low-probe-reiser4
new file mode 100644
index 0000000..f8896bb
--- /dev/null
+++ b/tests/expected/blkid/low-probe-reiser4
@@ -0,0 +1,9 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_LABEL=TESTR4
+ID_FS_LABEL_ENC=TESTR4
+ID_FS_TYPE=reiser4
+ID_FS_USAGE=filesystem
+ID_FS_UUID=9722633c-d69a-4881-b1c8-bedecbbf39d2
+ID_FS_UUID_ENC=9722633c-d69a-4881-b1c8-bedecbbf39d2
+ID_FS_VERSION=4
diff --git a/tests/expected/blkid/low-probe-romfs b/tests/expected/blkid/low-probe-romfs
new file mode 100644
index 0000000..db9bb1d
--- /dev/null
+++ b/tests/expected/blkid/low-probe-romfs
@@ -0,0 +1,7 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_FSSIZE=96
+ID_FS_LABEL=test-romfs
+ID_FS_LABEL_ENC=test-romfs
+ID_FS_TYPE=romfs
+ID_FS_USAGE=filesystem
diff --git a/tests/expected/blkid/low-probe-silicon-raid b/tests/expected/blkid/low-probe-silicon-raid
new file mode 100644
index 0000000..35ab65f
--- /dev/null
+++ b/tests/expected/blkid/low-probe-silicon-raid
@@ -0,0 +1,3 @@
+ID_FS_TYPE=silicon_medley_raid_member
+ID_FS_USAGE=raid
+ID_FS_VERSION=2.3
diff --git a/tests/expected/blkid/low-probe-small-fat32 b/tests/expected/blkid/low-probe-small-fat32
new file mode 100644
index 0000000..d215a6e
--- /dev/null
+++ b/tests/expected/blkid/low-probe-small-fat32
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_FSSIZE=1474560
+ID_FS_LABEL=TESTVFAT
+ID_FS_LABEL_ENC=TESTVFAT
+ID_FS_LABEL_FATBOOT=TESTVFAT
+ID_FS_LABEL_FATBOOT_ENC=TESTVFAT
+ID_FS_TYPE=vfat
+ID_FS_USAGE=filesystem
+ID_FS_UUID=1423-AAE1
+ID_FS_UUID_ENC=1423-AAE1
+ID_FS_VERSION=FAT32
diff --git a/tests/expected/blkid/low-probe-squashfs3 b/tests/expected/blkid/low-probe-squashfs3
new file mode 100644
index 0000000..d4be7c7
--- /dev/null
+++ b/tests/expected/blkid/low-probe-squashfs3
@@ -0,0 +1,6 @@
+ID_FS_BLOCK_SIZE=1024
+ID_FS_ENDIANNESS=LITTLE
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_TYPE=squashfs3
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=3.1
diff --git a/tests/expected/blkid/low-probe-squashfs4 b/tests/expected/blkid/low-probe-squashfs4
new file mode 100644
index 0000000..817d9fb
--- /dev/null
+++ b/tests/expected/blkid/low-probe-squashfs4
@@ -0,0 +1,6 @@
+ID_FS_BLOCK_SIZE=131072
+ID_FS_FSBLOCKSIZE=131072
+ID_FS_FSSIZE=389
+ID_FS_TYPE=squashfs
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=4.0
diff --git a/tests/expected/blkid/low-probe-swap0 b/tests/expected/blkid/low-probe-swap0
new file mode 100644
index 0000000..cbcd998
--- /dev/null
+++ b/tests/expected/blkid/low-probe-swap0
@@ -0,0 +1,3 @@
+ID_FS_TYPE=swap
+ID_FS_USAGE=other
+ID_FS_VERSION=0
diff --git a/tests/expected/blkid/low-probe-swap1 b/tests/expected/blkid/low-probe-swap1
new file mode 100644
index 0000000..89b2e0e
--- /dev/null
+++ b/tests/expected/blkid/low-probe-swap1
@@ -0,0 +1,10 @@
+ID_FS_ENDIANNESS=LITTLE
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_FSSIZE=258048
+ID_FS_LABEL=SWAP-TEST
+ID_FS_LABEL_ENC=SWAP-TEST
+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=1
diff --git a/tests/expected/blkid/low-probe-swap1-big b/tests/expected/blkid/low-probe-swap1-big
new file mode 100644
index 0000000..e943921
--- /dev/null
+++ b/tests/expected/blkid/low-probe-swap1-big
@@ -0,0 +1,10 @@
+ID_FS_ENDIANNESS=BIG
+ID_FS_FSBLOCKSIZE=8192
+ID_FS_FSSIZE=1040384
+ID_FS_LABEL=big
+ID_FS_LABEL_ENC=big
+ID_FS_TYPE=swap
+ID_FS_USAGE=other
+ID_FS_UUID=2aeb82d0-6d84-4c4a-9d71-9c8f335816ce
+ID_FS_UUID_ENC=2aeb82d0-6d84-4c4a-9d71-9c8f335816ce
+ID_FS_VERSION=1
diff --git a/tests/expected/blkid/low-probe-tuxonice b/tests/expected/blkid/low-probe-tuxonice
new file mode 100644
index 0000000..3fd5a94
--- /dev/null
+++ b/tests/expected/blkid/low-probe-tuxonice
@@ -0,0 +1,5 @@
+ID_FS_TYPE=swsuspend
+ID_FS_USAGE=other
+ID_FS_UUID=7ec1e8e4-0a69-4565-860c-3f13b0f79838
+ID_FS_UUID_ENC=7ec1e8e4-0a69-4565-860c-3f13b0f79838
+ID_FS_VERSION=tuxonice
diff --git a/tests/expected/blkid/low-probe-ubi b/tests/expected/blkid/low-probe-ubi
new file mode 100644
index 0000000..3c5e8a5
--- /dev/null
+++ b/tests/expected/blkid/low-probe-ubi
@@ -0,0 +1,5 @@
+ID_FS_TYPE=ubi
+ID_FS_USAGE=raid
+ID_FS_UUID=1329411831
+ID_FS_UUID_ENC=1329411831
+ID_FS_VERSION=1
diff --git a/tests/expected/blkid/low-probe-ubifs b/tests/expected/blkid/low-probe-ubifs
new file mode 100644
index 0000000..9ca8af1
--- /dev/null
+++ b/tests/expected/blkid/low-probe-ubifs
@@ -0,0 +1,6 @@
+ID_FS_FSSIZE=1703936
+ID_FS_TYPE=ubifs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=bafe46c2-5ed9-4405-8e81-7fc317fab8f0
+ID_FS_UUID_ENC=bafe46c2-5ed9-4405-8e81-7fc317fab8f0
+ID_FS_VERSION=w4r0
diff --git a/tests/expected/blkid/low-probe-udf b/tests/expected/blkid/low-probe-udf
new file mode 100644
index 0000000..d8cd25b
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=genisoimage
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=test-udf
+ID_FS_LABEL_ENC=test-udf
+ID_FS_LOGICAL_VOLUME_ID=test-udf
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=47a83a8000000000
+ID_FS_UUID_ENC=47a83a8000000000
+ID_FS_VERSION=1.02
+ID_FS_VOLUME_ID=test-udf
+ID_FS_VOLUME_SET_ID=47A83A8000000000
diff --git a/tests/expected/blkid/low-probe-udf-bdr-2.60-nero b/tests/expected/blkid/low-probe-udf-bdr-2.60-nero
new file mode 100644
index 0000000..677c2a3
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-bdr-2.60-nero
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=Nero
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=Label
+ID_FS_LABEL_ENC=Label
+ID_FS_LOGICAL_VOLUME_ID=Label
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=3b4a858dc4b57a72
+ID_FS_UUID_ENC=3b4a858dc4b57a72
+ID_FS_VERSION=2.60
+ID_FS_VOLUME_ID=Label
+ID_FS_VOLUME_SET_ID=3B4A858DC4B57A72
diff --git a/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 b/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208
new file mode 100644
index 0000000..924d78f
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208
@@ -0,0 +1,10 @@
+ID_FS_APPLICATION_ID=mkudfiso
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=Volume_Label
+ID_FS_LABEL_ENC=Volume\x20Label
+ID_FS_LOGICAL_VOLUME_ID=Volume\x20Label
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_VERSION=1.02
+ID_FS_VOLUME_ID=Volume\x20Label
diff --git a/tests/expected/blkid/low-probe-udf-cd-nero-6 b/tests/expected/blkid/low-probe-udf-cd-nero-6
new file mode 100644
index 0000000..bc1b5fe
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-cd-nero-6
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=Nero
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=UDF_Label
+ID_FS_LABEL_ENC=UDF\x20Label
+ID_FS_LOGICAL_VOLUME_ID=UDF\x20Label
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=4aa16678b55e9987
+ID_FS_UUID_ENC=4aa16678b55e9987
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=UDF\x20Label
+ID_FS_VOLUME_SET_ID=4AA16678B55E9987
diff --git a/tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096 b/tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096
new file mode 100644
index 0000000..c8e5ac3
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Mac\x20OS\x20X\x20udf\x20newfs_udf
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_LABEL=Untitled_UDF_Volume
+ID_FS_LABEL_ENC=Untitled\x20UDF\x20Volume
+ID_FS_LOGICAL_VOLUME_ID=Untitled\x20UDF\x20Volume
+ID_FS_PUBLISHER_ID=Default\x20Owner\x20Name
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=691eed1320284d61
+ID_FS_UUID_ENC=691eed1320284d61
+ID_FS_VERSION=2.60
+ID_FS_VOLUME_ID=MacOS\x20X\x20UDF\x202017-12-28\x201145.55
+ID_FS_VOLUME_SET_ID=691EED13\x20\x28Mac\x20OS\x20X\x20newfs_udf\x29\x20UDF\x20Volume\x20Set
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1
new file mode 100644
index 0000000..0f073c0
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=LinuxUDF
+ID_FS_LABEL_ENC=LinuxUDF
+ID_FS_LOGICAL_VOLUME_ID=LinuxUDF
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.0.0b2
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=54aeb2524c696e75
+ID_FS_UUID_ENC=54aeb2524c696e75
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=LinuxUDF
+ID_FS_VOLUME_SET_ID=54aeb252LinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2
new file mode 100644
index 0000000..c55e233
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=Label
+ID_FS_LABEL_ENC=Label
+ID_FS_LOGICAL_VOLUME_ID=Label
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.0.0b2
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=54aead85c291280d
+ID_FS_UUID_ENC=54aead85c291280d
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=Label
+ID_FS_VOLUME_SET_ID=54aead85‘\x28\x0d\x01Volume\x20set\x20identifier
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1
new file mode 100644
index 0000000..3758691
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=Label
+ID_FS_LABEL_ENC=Label
+ID_FS_LOGICAL_VOLUME_ID=Label
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.3
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5906e052003d522a
+ID_FS_UUID_ENC=5906e052003d522a
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=Label
+ID_FS_VOLUME_SET_ID=5906e052003d522aLinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2
new file mode 100644
index 0000000..521e0ff
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=Label
+ID_FS_LABEL_ENC=Label
+ID_FS_LOGICAL_VOLUME_ID=Label
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.3
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5906e7a800531574
+ID_FS_UUID_ENC=5906e7a800531574
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=Label
+ID_FS_VOLUME_SET_ID=5906e7a800531574LinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3
new file mode 100644
index 0000000..e720867
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=ÿ
+ID_FS_LABEL_ENC=ÿ
+ID_FS_LOGICAL_VOLUME_ID=ÿ
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.3
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5914e5d44790645a
+ID_FS_UUID_ENC=5914e5d44790645a
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=ÿ
+ID_FS_VOLUME_SET_ID=5914e5d44790645aLinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4
new file mode 100644
index 0000000..ecd8c3c
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=1024
+ID_FS_FSBLOCKSIZE=1024
+ID_FS_LABEL=Label
+ID_FS_LABEL_ENC=Label
+ID_FS_LOGICAL_VOLUME_ID=Label
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.3
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=59418701b1e8322d
+ID_FS_UUID_ENC=59418701b1e8322d
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=Label
+ID_FS_VOLUME_SET_ID=59418701b1e8322dLinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5
new file mode 100644
index 0000000..df2d901
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_LABEL=Label
+ID_FS_LABEL_ENC=Label
+ID_FS_LOGICAL_VOLUME_ID=Label
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.3
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=594186edcc164a70
+ID_FS_UUID_ENC=594186edcc164a70
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=Label
+ID_FS_VOLUME_SET_ID=594186edcc164a70LinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6
new file mode 100644
index 0000000..aba8d2e
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ID_FS_LABEL_ENC=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ID_FS_LOGICAL_VOLUME_ID=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.3
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=59419a34ca436d67
+ID_FS_UUID_ENC=59419a34ca436d67
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ID_FS_VOLUME_SET_ID=59419a34ca436d67LinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7
new file mode 100644
index 0000000..67faf34
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_LABEL=Label4096
+ID_FS_LABEL_ENC=Label4096
+ID_FS_LOGICAL_VOLUME_ID=Label4096
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.3
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5a08b6f521891529
+ID_FS_UUID_ENC=5a08b6f521891529
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=Label4096
+ID_FS_VOLUME_SET_ID=5a08b6f521891529LinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8
new file mode 100644
index 0000000..11a3bde
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=LinuxUDF
+ID_FS_LABEL_ENC=LinuxUDF
+ID_FS_LOGICAL_VOLUME_ID=LinuxUDF
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x201.3
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5a11940936fe76a8
+ID_FS_UUID_ENC=5a11940936fe76a8
+ID_FS_VERSION=1.50
+ID_FS_VOLUME_ID=LinuxUDF
+ID_FS_VOLUME_SET_ID=5a11940936fe76a8LinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2
new file mode 100644
index 0000000..c61e8b5
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=😀
+ID_FS_LABEL_ENC=😀
+ID_FS_LOGICAL_VOLUME_ID=😀
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x202.2
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5e3d6e3fee58c271
+ID_FS_UUID_ENC=5e3d6e3fee58c271
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=😀
+ID_FS_VOLUME_SET_ID=5e3d6e3fee58c271LinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5
new file mode 100644
index 0000000..c173bb8
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=UDFtoolkit
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=discname
+ID_FS_LABEL_ENC=discname
+ID_FS_LOGICAL_VOLUME_ID=discname
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=20c624ac00000000
+ID_FS_UUID_ENC=20c624ac00000000
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=29b7712e
+ID_FS_VOLUME_SET_ID=20c624ac
diff --git a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7
new file mode 100644
index 0000000..4c71a0c
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=UDFtoolkit
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=discname
+ID_FS_LABEL_ENC=discname
+ID_FS_LOGICAL_VOLUME_ID=discname
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=54aeb3b66dd41fde
+ID_FS_UUID_ENC=54aeb3b66dd41fde
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=5ea1a197
+ID_FS_VOLUME_SET_ID=54aeb3b66dd41fde
diff --git a/tests/expected/blkid/low-probe-udf-hdd-win7 b/tests/expected/blkid/low-probe-udf-hdd-win7
new file mode 100644
index 0000000..eafa7f0
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-hdd-win7
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=Microsoft\x20Windows
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=My_volume_label
+ID_FS_LABEL_ENC=My\x20volume\x20label
+ID_FS_LOGICAL_VOLUME_ID=My\x20volume\x20label
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=103a3b3b20554446
+ID_FS_UUID_ENC=103a3b3b20554446
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=UDF\x20Volume
+ID_FS_VOLUME_SET_ID=103A3B3B\x20UDF\x20Volume\x20Set
diff --git a/tests/expected/blkid/low-probe-udf-multi-genisoimage-0 b/tests/expected/blkid/low-probe-udf-multi-genisoimage-0
new file mode 100644
index 0000000..5eeb78d
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-multi-genisoimage-0
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=genisoimage
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=first_session
+ID_FS_LABEL_ENC=first\x20session
+ID_FS_LOGICAL_VOLUME_ID=first\x20session
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5fa71e760000246c
+ID_FS_UUID_ENC=5fa71e760000246c
+ID_FS_VERSION=1.02
+ID_FS_VOLUME_ID=first\x20session
+ID_FS_VOLUME_SET_ID=5FA71E760000246C
diff --git a/tests/expected/blkid/low-probe-udf-multi-genisoimage-417 b/tests/expected/blkid/low-probe-udf-multi-genisoimage-417
new file mode 100644
index 0000000..5d2c784
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-multi-genisoimage-417
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=genisoimage
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=second_session
+ID_FS_LABEL_ENC=second\x20session
+ID_FS_LOGICAL_VOLUME_ID=second\x20session
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5fa71eba00002500
+ID_FS_UUID_ENC=5fa71eba00002500
+ID_FS_VERSION=1.02
+ID_FS_VOLUME_ID=second\x20session
+ID_FS_VOLUME_SET_ID=5FA71EBA00002500
diff --git a/tests/expected/blkid/low-probe-udf-multi-genisoimage-834 b/tests/expected/blkid/low-probe-udf-multi-genisoimage-834
new file mode 100644
index 0000000..aa7a163
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-multi-genisoimage-834
@@ -0,0 +1,13 @@
+ID_FS_APPLICATION_ID=genisoimage
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=third_session
+ID_FS_LABEL_ENC=third\x20session
+ID_FS_LOGICAL_VOLUME_ID=third\x20session
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5fa71eef00002553
+ID_FS_UUID_ENC=5fa71eef00002553
+ID_FS_VERSION=1.02
+ID_FS_VOLUME_ID=third\x20session
+ID_FS_VOLUME_SET_ID=5FA71EEF00002553
diff --git a/tests/expected/blkid/low-probe-udf-multi-mkudffs-0 b/tests/expected/blkid/low-probe-udf-multi-mkudffs-0
new file mode 100644
index 0000000..a1a234e
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-multi-mkudffs-0
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=first_session
+ID_FS_LABEL_ENC=first\x20session
+ID_FS_LOGICAL_VOLUME_ID=first\x20session
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x202.2
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5fa6f31ee7b7f813
+ID_FS_UUID_ENC=5fa6f31ee7b7f813
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=first\x20session
+ID_FS_VOLUME_SET_ID=5fa6f31ee7b7f813LinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-multi-mkudffs-320 b/tests/expected/blkid/low-probe-udf-multi-mkudffs-320
new file mode 100644
index 0000000..8428589
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-multi-mkudffs-320
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=second_session
+ID_FS_LABEL_ENC=second\x20session
+ID_FS_LOGICAL_VOLUME_ID=second\x20session
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x202.2
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5fa6f32c75d6d6a6
+ID_FS_UUID_ENC=5fa6f32c75d6d6a6
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=second\x20session
+ID_FS_VOLUME_SET_ID=5fa6f32c75d6d6a6LinuxUDF
diff --git a/tests/expected/blkid/low-probe-udf-multi-mkudffs-640 b/tests/expected/blkid/low-probe-udf-multi-mkudffs-640
new file mode 100644
index 0000000..59c9142
--- /dev/null
+++ b/tests/expected/blkid/low-probe-udf-multi-mkudffs-640
@@ -0,0 +1,14 @@
+ID_FS_APPLICATION_ID=Linux\x20mkudffs
+ID_FS_BLOCK_SIZE=2048
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_LABEL=third_session
+ID_FS_LABEL_ENC=third\x20session
+ID_FS_LOGICAL_VOLUME_ID=third\x20session
+ID_FS_PUBLISHER_ID=Linux\x20mkudffs\x202.2
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5fa6f33b0f78bab0
+ID_FS_UUID_ENC=5fa6f33b0f78bab0
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=third\x20session
+ID_FS_VOLUME_SET_ID=5fa6f33b0f78bab0LinuxUDF
diff --git a/tests/expected/blkid/low-probe-ufs b/tests/expected/blkid/low-probe-ufs
new file mode 100644
index 0000000..32e2234
--- /dev/null
+++ b/tests/expected/blkid/low-probe-ufs
@@ -0,0 +1,8 @@
+ID_FS_BLOCK_SIZE=2048
+ID_FS_ENDIANNESS=LITTLE
+ID_FS_FSBLOCKSIZE=2048
+ID_FS_TYPE=ufs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=4b0e640aec56ac70
+ID_FS_UUID_ENC=4b0e640aec56ac70
+ID_FS_VERSION=2
diff --git a/tests/expected/blkid/low-probe-vdo b/tests/expected/blkid/low-probe-vdo
new file mode 100644
index 0000000..be096ad
--- /dev/null
+++ b/tests/expected/blkid/low-probe-vdo
@@ -0,0 +1,4 @@
+ID_FS_TYPE=vdo
+ID_FS_USAGE=other
+ID_FS_UUID=666c7969-6e67-2056-444f-204020524800
+ID_FS_UUID_ENC=666c7969-6e67-2056-444f-204020524800
diff --git a/tests/expected/blkid/low-probe-via-raid b/tests/expected/blkid/low-probe-via-raid
new file mode 100644
index 0000000..8dd0e8c
--- /dev/null
+++ b/tests/expected/blkid/low-probe-via-raid
@@ -0,0 +1,3 @@
+ID_FS_TYPE=via_raid_member
+ID_FS_USAGE=raid
+ID_FS_VERSION=1
diff --git a/tests/expected/blkid/low-probe-vmfs b/tests/expected/blkid/low-probe-vmfs
new file mode 100644
index 0000000..41914b0
--- /dev/null
+++ b/tests/expected/blkid/low-probe-vmfs
@@ -0,0 +1,7 @@
+ID_FS_LABEL=toto
+ID_FS_LABEL_ENC=toto
+ID_FS_TYPE=VMFS
+ID_FS_USAGE=filesystem
+ID_FS_UUID=49edf844-ebfc28f3-65cb-0021280083cf
+ID_FS_UUID_ENC=49edf844-ebfc28f3-65cb-0021280083cf
+ID_FS_VERSION=31
diff --git a/tests/expected/blkid/low-probe-vmfs_volume b/tests/expected/blkid/low-probe-vmfs_volume
new file mode 100644
index 0000000..0d4dd83
--- /dev/null
+++ b/tests/expected/blkid/low-probe-vmfs_volume
@@ -0,0 +1,7 @@
+ID_FS_TYPE=VMFS_volume_member
+ID_FS_USAGE=raid
+ID_FS_UUID=49edf842-dcb35d37-b383-0021280083cf
+ID_FS_UUID_ENC=49edf842-dcb35d37-b383-0021280083cf
+ID_FS_UUID_SUB=49edf844-da2dde19-747b-0021280083cf
+ID_FS_UUID_SUB_ENC=49edf844-da2dde19-747b-0021280083cf
+ID_FS_VERSION=3
diff --git a/tests/expected/blkid/low-probe-xfs b/tests/expected/blkid/low-probe-xfs
new file mode 100644
index 0000000..0eb803f
--- /dev/null
+++ b/tests/expected/blkid/low-probe-xfs
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_FSLASTBLOCK=4096
+ID_FS_FSSIZE=11862016
+ID_FS_LABEL=test-xfs
+ID_FS_LABEL_ENC=test-xfs
+ID_FS_TYPE=xfs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=8c8a0a5a-9f57-492e-9610-45a61f38f58a
+ID_FS_UUID_ENC=8c8a0a5a-9f57-492e-9610-45a61f38f58a
diff --git a/tests/expected/blkid/low-probe-xfs-log b/tests/expected/blkid/low-probe-xfs-log
new file mode 100644
index 0000000..6cfb180
--- /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/low-probe-xfs-v5 b/tests/expected/blkid/low-probe-xfs-v5
new file mode 100644
index 0000000..7525b08
--- /dev/null
+++ b/tests/expected/blkid/low-probe-xfs-v5
@@ -0,0 +1,10 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_FSLASTBLOCK=5120
+ID_FS_FSSIZE=17469440
+ID_FS_LABEL=test-xfs-v5
+ID_FS_LABEL_ENC=test-xfs-v5
+ID_FS_TYPE=xfs
+ID_FS_USAGE=filesystem
+ID_FS_UUID=3fdcb214-0f39-466d-a81a-a1fb114fe7cd
+ID_FS_UUID_ENC=3fdcb214-0f39-466d-a81a-a1fb114fe7cd
diff --git a/tests/expected/blkid/low-probe-zfs b/tests/expected/blkid/low-probe-zfs
new file mode 100644
index 0000000..b205618
--- /dev/null
+++ b/tests/expected/blkid/low-probe-zfs
@@ -0,0 +1,12 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_ENDIANNESS=LITTLE
+ID_FS_FSBLOCKSIZE=512
+ID_FS_LABEL=tank
+ID_FS_LABEL_ENC=tank
+ID_FS_TYPE=zfs_member
+ID_FS_USAGE=filesystem
+ID_FS_UUID=1782036546311300980
+ID_FS_UUID_ENC=1782036546311300980
+ID_FS_UUID_SUB=13179280127379850514
+ID_FS_UUID_SUB_ENC=13179280127379850514
+ID_FS_VERSION=8
diff --git a/tests/expected/blkid/low-probe-zonefs b/tests/expected/blkid/low-probe-zonefs
new file mode 100644
index 0000000..59c86f3
--- /dev/null
+++ b/tests/expected/blkid/low-probe-zonefs
@@ -0,0 +1,4 @@
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_TYPE=zonefs
+ID_FS_USAGE=filesystem
diff --git a/tests/expected/blkid/lowprobe-pt-atari-primary b/tests/expected/blkid/lowprobe-pt-atari-primary
new file mode 100644
index 0000000..472821e
--- /dev/null
+++ b/tests/expected/blkid/lowprobe-pt-atari-primary
@@ -0,0 +1,3 @@
+size: 5242880, sector size: 512, PT: atari, offset: 0, id=(null)
+---
+#1: 2 10238 0x0 type='RAW'
diff --git a/tests/expected/blkid/lowprobe-pt-atari-xgm b/tests/expected/blkid/lowprobe-pt-atari-xgm
new file mode 100644
index 0000000..a7dae69
--- /dev/null
+++ b/tests/expected/blkid/lowprobe-pt-atari-xgm
@@ -0,0 +1,4 @@
+size: 5242880, sector size: 512, PT: atari, offset: 0, id=(null)
+---
+#1: 2 9 0x0 type='RAW'
+#2: 14 10226 0x0 type='RAW'
diff --git a/tests/expected/blkid/lowprobe-pt-bsd b/tests/expected/blkid/lowprobe-pt-bsd
new file mode 100644
index 0000000..722aac4
--- /dev/null
+++ b/tests/expected/blkid/lowprobe-pt-bsd
@@ -0,0 +1,4 @@
+size: 4456448, sector size: 512, PT: bsd, offset: 512, id=(null)
+---
+#1: 7936 4864 0x7
+#2: 12544 3584 0x7
diff --git a/tests/expected/blkid/lowprobe-pt-dos+bsd b/tests/expected/blkid/lowprobe-pt-dos+bsd
new file mode 100644
index 0000000..099e98c
--- /dev/null
+++ b/tests/expected/blkid/lowprobe-pt-dos+bsd
@@ -0,0 +1,6 @@
+size: 8388608, sector size: 512, PT: dos, offset: 446, id=8f8378c0
+---
+#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/lowprobe-pt-gpt b/tests/expected/blkid/lowprobe-pt-gpt
new file mode 100644
index 0000000..18814e1
--- /dev/null
+++ b/tests/expected/blkid/lowprobe-pt-gpt
@@ -0,0 +1,7 @@
+size: 10485760, sector size: 512, PT: gpt, offset: 512, id=dd27f98d-7519-4c9e-8041-f2bfa7b1ef61
+---
+#1: 34 2014 0x0 name='ThisIsName' uuid='1dcf10bc-637e-4c52-8203-087ae10a820b' type='ebd0a0a2-b9e5-4433-87c0-68b6b72699c7'
+#2: 2048 2048 0x0 name='ThisIsOtherName' uuid='a1d03a96-7238-46c6-bbb3-789cbe173ec7' type='ebd0a0a2-b9e5-4433-87c0-68b6b72699c7'
+#3: 4096 2048 0x0 name='primary' uuid='a7101b6c-468c-47df-aff6-cd444d12af61' type='ebd0a0a2-b9e5-4433-87c0-68b6b72699c7'
+#4: 6144 2048 0x0 name='primary' uuid='afc4950a-f0f1-4add-802c-5957133486d1' type='ebd0a0a2-b9e5-4433-87c0-68b6b72699c7'
+#5: 8192 2048 0x0 name='primary' uuid='0db0a787-c16b-4886-af3a-fbb97299677c' type='ebd0a0a2-b9e5-4433-87c0-68b6b72699c7'
diff --git a/tests/expected/blkid/lowprobe-pt-sgi b/tests/expected/blkid/lowprobe-pt-sgi
new file mode 100644
index 0000000..79cdde9
--- /dev/null
+++ b/tests/expected/blkid/lowprobe-pt-sgi
@@ -0,0 +1,6 @@
+size: 10485760, sector size: 512, PT: sgi, offset: 0, id=(null)
+---
+#1: 63 1606437 0x83
+#2: 1606500 30523500 0x83
+#9: 0 4096 0x0
+#11: 0 32130000 0x6
diff --git a/tests/expected/blkid/lowprobe-pt-sun b/tests/expected/blkid/lowprobe-pt-sun
new file mode 100644
index 0000000..ffc5cf3
--- /dev/null
+++ b/tests/expected/blkid/lowprobe-pt-sun
@@ -0,0 +1,4 @@
+size: 10485760, sector size: 512, PT: sun, offset: 0, id=(null)
+---
+#1: 0 87380 0x83
+#2: 87380 43690 0x82
diff --git a/tests/expected/blkid/mbr-wholedisk-fake-vfat b/tests/expected/blkid/mbr-wholedisk-fake-vfat
new file mode 100644
index 0000000..2ff8aec
--- /dev/null
+++ b/tests/expected/blkid/mbr-wholedisk-fake-vfat
@@ -0,0 +1,2 @@
+ID_PART_TABLE_UUID=500a0dff
+ID_PART_TABLE_TYPE=dos
diff --git a/tests/expected/blkid/md-raid0-whole b/tests/expected/blkid/md-raid0-whole
new file mode 100644
index 0000000..7c6ea59
--- /dev/null
+++ b/tests/expected/blkid/md-raid0-whole
@@ -0,0 +1,50 @@
+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.
+
+
+Command (m for help): Partition type
+ p primary (0 primary, 0 extended, 4 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Disk <removed>: 99.88 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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>p1 2048 22527 20480 10M 83 Linux
+<removed>p2 22528 204543 182016 88.9M 83 Linux
+
+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
+
+
+ID_FS_VERSION=0.90.0
+Probe second RAID member
+ID_FS_TYPE=linux_raid_member
+ID_FS_USAGE=raid
+
+
+ID_FS_VERSION=0.90.0
+Stop RAID device
+Deinitialize devices
diff --git a/tests/expected/blkid/md-raid1-part b/tests/expected/blkid/md-raid1-part
new file mode 100644
index 0000000..6841988
--- /dev/null
+++ b/tests/expected/blkid/md-raid1-part
@@ -0,0 +1,68 @@
+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.
+
+Command (m for help): Created a new disklabel.
+
+Command (m for help): Partition type
+ p primary (0 primary, 0 extended, 4 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Disk <removed>: 51 MiB, 53477376 bytes, 104448 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 53247 51200 25M 83 Linux
+<removed>2 53248 104447 51200 25M 83 Linux
+
+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
+ID_FS_UUID=__ts_uuid__
+ID_FS_UUID_ENC=__ts_uuid_enc__
+ID_FS_VERSION=0.90.0
+ID_PART_ENTRY_DISK=__ts_majorminor__
+ID_PART_ENTRY_NUMBER=1
+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
+ID_FS_UUID=__ts_uuid__
+ID_FS_UUID_ENC=__ts_uuid_enc__
+ID_FS_VERSION=0.90.0
+ID_PART_ENTRY_DISK=__ts_majorminor__
+ID_PART_ENTRY_NUMBER=2
+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
new file mode 100644
index 0000000..1a354b9
--- /dev/null
+++ b/tests/expected/blkid/md-raid1-whole
@@ -0,0 +1,50 @@
+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.
+
+
+Command (m for help): Partition type
+ p primary (0 primary, 0 extended, 4 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Disk /dev/md8: 49.94 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): <removed> bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+/dev/md8p1 2048 22527 20480 10M 83 Linux
+/dev/md8p2 22528 43007 20480 10M 83 Linux
+
+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
+
+
+ID_FS_VERSION=0.90.0
+Probe second RAID member
+ID_FS_TYPE=linux_raid_member
+ID_FS_USAGE=raid
+
+
+ID_FS_VERSION=0.90.0
+Stop RAID device
+Deinitialize devices
diff --git a/tests/expected/blkid/offset b/tests/expected/blkid/offset
new file mode 100644
index 0000000..6f78cf6
--- /dev/null
+++ b/tests/expected/blkid/offset
@@ -0,0 +1,41 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 12287 10240 5M Linux filesystem
+<removed>2 12288 22527 10240 5M Linux filesystem
+<removed>3 22528 32767 10240 5M Linux filesystem
+<removed>4 32768 100351 67584 33M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+ID_FS_LABEL=FOO
+ID_FS_LABEL_ENC=FOO
+ID_FS_UUID=ccf3dc28-f697-4577-971b-0bc79300a700
+ID_FS_UUID_ENC=ccf3dc28-f697-4577-971b-0bc79300a700
+ID_FS_VERSION=1.0
+ID_FS_FSBLOCKSIZE=4096
+ID_FS_BLOCK_SIZE=4096
+ID_FS_FSLASTBLOCK=1280
+ID_FS_FSSIZE=5242880
+ID_FS_TYPE=ext2
+ID_FS_USAGE=filesystem
diff --git a/tests/expected/blkid/topology-disk b/tests/expected/blkid/topology-disk
new file mode 100644
index 0000000..c958c4c
--- /dev/null
+++ b/tests/expected/blkid/topology-disk
@@ -0,0 +1,4 @@
+ID_FS_DISKSEQ=S
+ID_IOLIMIT_LOGICAL_SECTOR_SIZE=512
+ID_IOLIMIT_MINIMUM_IO_SIZE=512
+ID_IOLIMIT_PHYSICAL_SECTOR_SIZE=512
diff --git a/tests/expected/blkid/topology-partition b/tests/expected/blkid/topology-partition
new file mode 100644
index 0000000..c958c4c
--- /dev/null
+++ b/tests/expected/blkid/topology-partition
@@ -0,0 +1,4 @@
+ID_FS_DISKSEQ=S
+ID_IOLIMIT_LOGICAL_SECTOR_SIZE=512
+ID_IOLIMIT_MINIMUM_IO_SIZE=512
+ID_IOLIMIT_PHYSICAL_SECTOR_SIZE=512
diff --git a/tests/expected/build-sys/config-all b/tests/expected/build-sys/config-all
new file mode 100644
index 0000000..0574f23
--- /dev/null
+++ b/tests/expected/build-sys/config-all
@@ -0,0 +1,128 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libuuid
+mount: libmount
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+fdformat:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+line:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+newgrp: libcrypt
+nologin:
+nsenter:
+pg: libncursesw libtinfo
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+tunelp:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+vipw:
+waitpid:
+wall:
+whereis:
+write:
diff --git a/tests/expected/build-sys/config-all-devel b/tests/expected/build-sys/config-all-devel
new file mode 100644
index 0000000..3e9a720
--- /dev/null
+++ b/tests/expected/build-sys/config-all-devel
@@ -0,0 +1,115 @@
+mkswap: libblkid libselinux libuuid
+swaplabel: libblkid libuuid
+blockdev:
+fdformat:
+fsck.cramfs: libz
+fsck.minix:
+isosize:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+raw:
+cfdisk: libblkid libncursesw libtinfo libuuid
+fdisk: libblkid libuuid
+sfdisk:
+fsck: libblkid libuuid
+getopt:
+hwclock: libaudit
+test_at:
+test_blkdev:
+test_canonicalize:
+test_cpuset:
+test_ismounted:
+test_loopdev:
+test_mangle:
+test_procutils:
+test_strutils:
+test_sysfs:
+test_wholedisk:
+mkfs: libblkid libuuid
+partitions: libblkid libuuid
+superblocks: libblkid libuuid
+topology: libblkid libuuid
+libblkid.so.1.1.0: libuuid
+mount: libblkid libmount libselinux libsepol libuuid
+libmount.so.1.1.0: libblkid libselinux libsepol libuuid
+libuuid.so.1.3.0: ld-linux-x86-64
+tst_uuid: libuuid
+chfn: libpam libpam_misc libselinux
+chsh: libpam libpam_misc libselinux
+last:
+login: libaudit libpam libpam_misc libselinux
+newgrp: rypt
+test_islocal:
+test_logindefs:
+vipw: libselinux
+blkid: libblkid libuuid
+findfs: libblkid libuuid
+findmnt: libblkid libmount libselinux libsepol libuuid
+lsblk: libblkid libudev libuuid
+uuidd: libuuid
+uuidgen: libuuid
+wipefs: libblkid libuuid
+cal: libncursesw libtinfo
+kill:
+logger:
+look:
+mcookie:
+namei:
+rename:
+whereis:
+mount: libblkid libmount libselinux libsepol libuuid
+swapon: libblkid libuuid
+umount: libblkid libmount libselinux libsepol libuuid
+losetup:
+partx: libblkid libuuid
+addpart:
+delpart:
+chrt:
+ionice:
+taskset:
+mountpoint: libblkid libmount libselinux libsepol libuuid
+arch:
+chcpu:
+ctrlaltdel:
+dmesg:
+fallocate:
+flock:
+fsfreeze:
+fstrim:
+ipcmk:
+ipcrm:
+ipcs:
+ldattach:
+lscpu:
+pivot_root:
+prlimit:
+readprofile:
+renice:
+rtcwake:
+setarch:
+setsid:
+switch_root:
+tunelp:
+unshare:
+agetty:
+mesg:
+script: libutempter libutil
+scriptreplay:
+setterm: libtinfo
+write:
+test_byteswap:
+test_md5:
+test_pathnames:
+test_sysinfo:
+col:
+colcrt:
+colrm:
+column:
+hexdump:
+line:
+more: libtinfo
+pg: libncursesw libtinfo
+rev:
+ul: libtinfo
diff --git a/tests/expected/build-sys/config-all-non-nls b/tests/expected/build-sys/config-all-non-nls
new file mode 100644
index 0000000..0574f23
--- /dev/null
+++ b/tests/expected/build-sys/config-all-non-nls
@@ -0,0 +1,128 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libuuid
+mount: libmount
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+fdformat:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+line:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+newgrp: libcrypt
+nologin:
+nsenter:
+pg: libncursesw libtinfo
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+tunelp:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+vipw:
+waitpid:
+wall:
+whereis:
+write:
diff --git a/tests/expected/build-sys/config-audit b/tests/expected/build-sys/config-audit
new file mode 100644
index 0000000..bdcd087
--- /dev/null
+++ b/tests/expected/build-sys/config-audit
@@ -0,0 +1,121 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libuuid
+mount: libmount
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libaudit libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libaudit libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+nologin:
+nsenter:
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-chfnsh-libuser b/tests/expected/build-sys/config-chfnsh-libuser
new file mode 100644
index 0000000..97e1ae6
--- /dev/null
+++ b/tests/expected/build-sys/config-chfnsh-libuser
@@ -0,0 +1,121 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid libselinux
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libselinux libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libselinux libuuid
+mount: libmount libselinux
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount libselinux
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libselinux libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libselinux libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libaudit libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libaudit libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei: libselinux
+nologin:
+nsenter: libselinux
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt libselinux
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-chfnsh-no-password b/tests/expected/build-sys/config-chfnsh-no-password
new file mode 100644
index 0000000..734113e
--- /dev/null
+++ b/tests/expected/build-sys/config-chfnsh-no-password
@@ -0,0 +1,121 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid libselinux
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libselinux libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libselinux libuuid
+mount: libmount libselinux
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount libselinux
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libselinux
+chmem:
+choom:
+chrt:
+chsh: libselinux
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libaudit libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libaudit libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei: libselinux
+nologin:
+nsenter: libselinux
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt libselinux
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-chfnsh-pam b/tests/expected/build-sys/config-chfnsh-pam
new file mode 100644
index 0000000..532013c
--- /dev/null
+++ b/tests/expected/build-sys/config-chfnsh-pam
@@ -0,0 +1,121 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid libselinux
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libselinux libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libselinux libuuid
+mount: libmount libselinux
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount libselinux
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libselinux
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libselinux
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libaudit libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libaudit libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei: libselinux
+nologin:
+nsenter: libselinux
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt libselinux
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-core b/tests/expected/build-sys/config-core
new file mode 100644
index 0000000..a20517c
--- /dev/null
+++ b/tests/expected/build-sys/config-core
@@ -0,0 +1,121 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libuuid
+mount: libmount
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+nologin:
+nsenter:
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-cryptsetup b/tests/expected/build-sys/config-cryptsetup
new file mode 100644
index 0000000..c4aae45
--- /dev/null
+++ b/tests/expected/build-sys/config-cryptsetup
@@ -0,0 +1,128 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid libcryptsetup
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libuuid
+mount: libmount
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libcryptsetup libmount
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+fdformat:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+line:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+newgrp: libcrypt
+nologin:
+nsenter:
+pg: libncursesw libtinfo
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+tunelp:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+vipw:
+waitpid:
+wall:
+whereis:
+write:
diff --git a/tests/expected/build-sys/config-devel b/tests/expected/build-sys/config-devel
new file mode 100644
index 0000000..5682413
--- /dev/null
+++ b/tests/expected/build-sys/config-devel
@@ -0,0 +1,128 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid libselinux
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libselinux libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libselinux libuuid
+mount: libmount libselinux
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount libselinux
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libselinux libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libselinux libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+fdformat:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libaudit libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+line:
+logger: libsystemd
+login: libaudit libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei: libselinux
+newgrp: libcrypt
+nologin:
+nsenter: libselinux
+pg: libncursesw libtinfo
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script: libutempter
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt libselinux
+switch_root:
+taskset:
+tunelp:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+vipw: libselinux
+waitpid:
+wall:
+whereis:
+write:
diff --git a/tests/expected/build-sys/config-devel-new-mount b/tests/expected/build-sys/config-devel-new-mount
new file mode 100644
index 0000000..9ac8272
--- /dev/null
+++ b/tests/expected/build-sys/config-devel-new-mount
@@ -0,0 +1,122 @@
+mkswap: libblkid libselinux libuuid
+swaplabel: libblkid libuuid
+blockdev:
+fdformat:
+fsck.cramfs: libz
+fsck.minix:
+isosize:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+raw:
+cfdisk: libblkid libncursesw libtinfo libuuid
+fdisk: libblkid libuuid
+fdisk.static: STATIC
+sfdisk:
+sfdisk.static: STATIC
+fsck: libblkid libuuid
+getopt:
+hwclock: libaudit
+test_at:
+test_blkdev:
+test_canonicalize:
+test_cpuset:
+test_ismounted:
+test_loopdev:
+test_mangle:
+test_procutils:
+test_strutils:
+test_sysfs:
+test_wholedisk:
+mkfs: libblkid libuuid
+partitions: libblkid libuuid
+superblocks: libblkid libuuid
+topology: libblkid libuuid
+libblkid.so.1.1.0: libuuid
+libmount.so.1.1.0: libblkid libselinux libsepol libuuid
+libuuid.so.1.3.0: ld-linux-x86-64
+tst_uuid: libuuid
+chfn: libpam libpam_misc libselinux
+chsh: libpam libpam_misc libselinux
+last:
+login: libaudit libpam libpam_misc libselinux
+newgrp: rypt
+test_islocal:
+test_logindefs:
+vipw: libselinux
+blkid: libblkid libuuid
+findfs: libblkid libuuid
+findmnt: libblkid libmount libselinux libsepol libuuid
+lsblk: libblkid libudev libuuid
+uuidd: libuuid
+uuidgen: libuuid
+wipefs: libblkid libuuid
+blkid.static: STATIC
+cal: libncursesw libtinfo
+kill:
+logger:
+look:
+lslocks:
+mcookie:
+namei:
+rename:
+whereis:
+partx: libblkid libuuid
+addpart:
+delpart:
+chrt:
+ionice:
+taskset:
+mount: libblkid libmount libselinux libsepol libuuid
+mountpoint: libblkid libmount libselinux libsepol libuuid
+swapon: libblkid libuuid
+umount: libblkid libmount libselinux libsepol libuuid
+arch:
+chcpu:
+ctrlaltdel:
+dmesg:
+fallocate:
+flock:
+fsfreeze:
+fstrim:
+ipcmk:
+ipcrm:
+ipcs:
+ldattach:
+losetup:
+losetup.static: STATIC
+lscpu:
+mount.static: STATIC
+pivot_root:
+prlimit:
+readprofile:
+renice:
+rtcwake:
+setarch:
+setsid:
+switch_root:
+tunelp:
+umount.static: STATIC
+unshare:
+agetty:
+mesg:
+script: libutempter libutil
+scriptreplay:
+setterm: libtinfo
+wall:
+write:
+test_byteswap:
+test_md5:
+test_pathnames:
+test_sysinfo:
+col:
+colcrt:
+colrm:
+column:
+hexdump:
+line:
+more: libtinfo
+pg: libncursesw libtinfo
+rev:
+ul: libtinfo
diff --git a/tests/expected/build-sys/config-devel-non-asan b/tests/expected/build-sys/config-devel-non-asan
new file mode 100644
index 0000000..5682413
--- /dev/null
+++ b/tests/expected/build-sys/config-devel-non-asan
@@ -0,0 +1,128 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid libselinux
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libselinux libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libselinux libuuid
+mount: libmount libselinux
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount libselinux
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libselinux libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libselinux libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+fdformat:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libaudit libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+line:
+logger: libsystemd
+login: libaudit libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei: libselinux
+newgrp: libcrypt
+nologin:
+nsenter: libselinux
+pg: libncursesw libtinfo
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script: libutempter
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt libselinux
+switch_root:
+taskset:
+tunelp:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+vipw: libselinux
+waitpid:
+wall:
+whereis:
+write:
diff --git a/tests/expected/build-sys/config-devel-non-docs b/tests/expected/build-sys/config-devel-non-docs
new file mode 100644
index 0000000..5682413
--- /dev/null
+++ b/tests/expected/build-sys/config-devel-non-docs
@@ -0,0 +1,128 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid libselinux
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libselinux libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libselinux libuuid
+mount: libmount libselinux
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount libselinux
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libselinux libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libselinux libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+fdformat:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libaudit libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+line:
+logger: libsystemd
+login: libaudit libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei: libselinux
+newgrp: libcrypt
+nologin:
+nsenter: libselinux
+pg: libncursesw libtinfo
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script: libutempter
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt libselinux
+switch_root:
+taskset:
+tunelp:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+vipw: libselinux
+waitpid:
+wall:
+whereis:
+write:
diff --git a/tests/expected/build-sys/config-disable-all b/tests/expected/build-sys/config-disable-all
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/build-sys/config-disable-all
diff --git a/tests/expected/build-sys/config-enable-schedutils b/tests/expected/build-sys/config-enable-schedutils
new file mode 100644
index 0000000..39eeae0
--- /dev/null
+++ b/tests/expected/build-sys/config-enable-schedutils
@@ -0,0 +1,4 @@
+chrt:
+ionice:
+taskset:
+uclampset:
diff --git a/tests/expected/build-sys/config-fuzz b/tests/expected/build-sys/config-fuzz
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/build-sys/config-fuzz
diff --git a/tests/expected/build-sys/config-non-libblkid b/tests/expected/build-sys/config-non-libblkid
new file mode 100644
index 0000000..ed38eb5
--- /dev/null
+++ b/tests/expected/build-sys/config-non-libblkid
@@ -0,0 +1,98 @@
+cfdisk: libfdisk libncursesw libsmartcols libtinfo
+column: libsmartcols
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+irqtop: libncursesw libsmartcols libtinfo
+libfdisk.so.1.1.0: libuuid
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+mkswap: libuuid
+prlimit: libsmartcols
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+zramctl: libsmartcols
+agetty:
+blkdiscard:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+nologin:
+nsenter:
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-non-libmount b/tests/expected/build-sys/config-non-libmount
new file mode 100644
index 0000000..45ff711
--- /dev/null
+++ b/tests/expected/build-sys/config-non-libmount
@@ -0,0 +1,107 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libncursesw libsmartcols libtinfo
+column: libsmartcols
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+mkswap: libblkid libuuid
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+nologin:
+nsenter:
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-non-libs b/tests/expected/build-sys/config-non-libs
new file mode 100644
index 0000000..b88a6a1
--- /dev/null
+++ b/tests/expected/build-sys/config-non-libs
@@ -0,0 +1,75 @@
+agetty:
+blkdiscard:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+mkswap:
+more: libtinfo
+namei:
+nologin:
+nsenter:
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-non-libsmartcols b/tests/expected/build-sys/config-non-libsmartcols
new file mode 100644
index 0000000..28ff817
--- /dev/null
+++ b/tests/expected/build-sys/config-non-libsmartcols
@@ -0,0 +1,91 @@
+blkdiscard: libblkid
+blkid: libblkid
+eject: libmount
+findfs: libblkid
+fsck: libblkid libmount
+fstrim: libmount
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid
+libuuid.so.1.3.0:
+mkswap: libblkid libuuid
+mount: libmount
+mountpoint: libmount
+pylibmount.so: libblkid libmount
+swaplabel: libblkid libuuid
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+nologin:
+nsenter:
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-non-libuuid b/tests/expected/build-sys/config-non-libuuid
new file mode 100644
index 0000000..3e5a295
--- /dev/null
+++ b/tests/expected/build-sys/config-non-libuuid
@@ -0,0 +1,113 @@
+blkdiscard: libblkid
+blkid: libblkid
+column: libsmartcols
+eject: libmount
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libmount.so.1.1.0: libblkid
+libsmartcols.so.1.1.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid
+mount: libmount
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount
+rfkill: libsmartcols
+swaplabel: libblkid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+nologin:
+nsenter:
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-non-nls b/tests/expected/build-sys/config-non-nls
new file mode 100644
index 0000000..a20517c
--- /dev/null
+++ b/tests/expected/build-sys/config-non-nls
@@ -0,0 +1,121 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libuuid
+mount: libmount
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+nologin:
+nsenter:
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-non-widechar b/tests/expected/build-sys/config-non-widechar
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/build-sys/config-non-widechar
diff --git a/tests/expected/build-sys/config-selinux b/tests/expected/build-sys/config-selinux
new file mode 100644
index 0000000..4d2e5f8
--- /dev/null
+++ b/tests/expected/build-sys/config-selinux
@@ -0,0 +1,121 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid libselinux
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libselinux libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libselinux libuuid
+mount: libmount libselinux
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount libselinux
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libselinux libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libselinux libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei: libselinux
+nologin:
+nsenter: libselinux
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt libselinux
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-slang b/tests/expected/build-sys/config-slang
new file mode 100644
index 0000000..5a3ac99
--- /dev/null
+++ b/tests/expected/build-sys/config-slang
@@ -0,0 +1,121 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libslang libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libslang libsmartcols
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libuuid
+mount: libmount
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+namei:
+nologin:
+nsenter:
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+unshare:
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/build-sys/config-static b/tests/expected/build-sys/config-static
new file mode 100644
index 0000000..92de9d7
--- /dev/null
+++ b/tests/expected/build-sys/config-static
@@ -0,0 +1,129 @@
+blkdiscard: libblkid
+blkid: libblkid
+cfdisk: libfdisk libmount libncursesw libsmartcols libtinfo
+column: libsmartcols
+eject: libmount
+fdisk: libfdisk libreadline libsmartcols libtinfo
+fincore: libsmartcols
+findfs: libblkid
+findmnt: libblkid libmount libsmartcols libudev
+fsck: libblkid libmount
+fstrim: libmount
+irqtop: libncursesw libsmartcols libtinfo
+libblkid.so.1.1.0:
+libfdisk.so.1.1.0: libblkid libuuid
+libmount.so.1.1.0: libblkid
+libsmartcols.so.1.1.0:
+libuuid.so.1.3.0:
+losetup: libsmartcols
+lsblk: libblkid libmount libsmartcols libudev
+lscpu: libsmartcols
+lsfd: libsmartcols
+lsipc: libsmartcols
+lsirq: libsmartcols
+lslocks: libmount libsmartcols
+lslogins: libsmartcols libsystemd
+lsmem: libsmartcols
+lsns: libmount libsmartcols
+mkswap: libblkid libuuid
+mount: libmount
+mountpoint: libmount
+partx: libblkid libsmartcols
+prlimit: libsmartcols
+pylibmount.so: libblkid libmount
+rfkill: libsmartcols
+sfdisk: libfdisk libreadline libsmartcols libtinfo
+swaplabel: libblkid libuuid
+swapoff: libblkid libmount
+swapon: libblkid libmount libsmartcols
+umount: libmount
+uuidd: libsystemd libuuid
+uuidgen: libuuid
+uuidparse: libsmartcols libuuid
+wdctl: libsmartcols
+wipefs: libblkid libsmartcols
+zramctl: libsmartcols
+addpart:
+agetty:
+blkid.static: STATIC
+blkpr:
+blkzone:
+blockdev:
+cal: libtinfo
+chcpu:
+chfn: libpam libpam_misc libuser
+chmem:
+choom:
+chrt:
+chsh: libpam libpam_misc libuser
+col:
+colcrt:
+colrm:
+ctrlaltdel:
+delpart:
+dmesg: libtinfo
+fadvise:
+fallocate:
+fdisk.static: STATIC
+flock:
+fsck.cramfs: libz
+fsck.minix:
+fsfreeze:
+getopt:
+hardlink:
+hexdump: libtinfo
+hwclock: libm
+ionice:
+ipcmk:
+ipcrm:
+ipcs:
+isosize:
+kill:
+last:
+ldattach:
+logger: libsystemd
+login: libpam libpam_misc
+look:
+losetup.static: STATIC
+mcookie:
+mesg:
+mkfs:
+mkfs.bfs:
+mkfs.cramfs: libz
+mkfs.minix:
+more: libtinfo
+mount.static: STATIC
+namei:
+nologin:
+nsenter:
+nsenter.static: STATIC
+pipesz:
+pivot_root:
+readprofile:
+rename:
+renice:
+resizepart:
+rev:
+rtcwake:
+runuser: libpam libpam_misc
+script:
+scriptlive:
+scriptreplay:
+setarch:
+setpriv: libcap-ng
+setsid:
+setterm: libtinfo
+sfdisk.static: STATIC
+su: libpam libpam_misc
+sulogin: libcrypt
+switch_root:
+taskset:
+uclampset:
+ul: libtinfo
+umount.static: STATIC
+unshare:
+unshare.static: STATIC
+utmpdump:
+waitpid:
+wall:
+whereis:
diff --git a/tests/expected/cal/bigyear-1m-month b/tests/expected/cal/bigyear-1m-month
new file mode 100644
index 0000000..6a0f2ad
--- /dev/null
+++ b/tests/expected/cal/bigyear-1m-month
@@ -0,0 +1,9 @@
+Gregorian - Monday-based month
+ December 2147483646
+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
diff --git a/tests/expected/cal/bigyear-1m-year b/tests/expected/cal/bigyear-1m-year
new file mode 100644
index 0000000..00c0a12
--- /dev/null
+++ b/tests/expected/cal/bigyear-1m-year
@@ -0,0 +1,9 @@
+Gregorian - Monday-based year
+ January 2147483646
+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
+
diff --git a/tests/expected/cal/bigyear-1mj-month b/tests/expected/cal/bigyear-1mj-month
new file mode 100644
index 0000000..f29e05d
--- /dev/null
+++ b/tests/expected/cal/bigyear-1mj-month
@@ -0,0 +1,9 @@
+Julian - Monday-based month
+ December 2147483646
+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
diff --git a/tests/expected/cal/bigyear-1mj-year b/tests/expected/cal/bigyear-1mj-year
new file mode 100644
index 0000000..56c3f8a
--- /dev/null
+++ b/tests/expected/cal/bigyear-1mj-year
@@ -0,0 +1,9 @@
+Julian - Monday-based year
+ January 2147483646
+Mon Tue Wed Thu Fri Sat Sun
+ 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
+
diff --git a/tests/expected/cal/bigyear-1mjw-month b/tests/expected/cal/bigyear-1mjw-month
new file mode 100644
index 0000000..35f8269
--- /dev/null
+++ b/tests/expected/cal/bigyear-1mjw-month
@@ -0,0 +1,9 @@
+Julian - Monday-based month with weeks
+ December 2147483646
+ Mon Tue Wed Thu Fri Sat Sun
+48 335 336
+49 337 338 339 340 341 342 343
+50 344 345 346 347 348 349 350
+51 351 352 353 354 355 356 357
+52 358 359 360 361 362 363 364
+ 1 365
diff --git a/tests/expected/cal/bigyear-1mjw-year b/tests/expected/cal/bigyear-1mjw-year
new file mode 100644
index 0000000..9001e9c
--- /dev/null
+++ b/tests/expected/cal/bigyear-1mjw-year
@@ -0,0 +1,9 @@
+Julian - Monday-based year with weeks
+ January 2147483646
+ Mon Tue Wed Thu Fri Sat Sun
+ 1 1 2 3 4 5 6 7
+ 2 8 9 10 11 12 13 14
+ 3 15 16 17 18 19 20 21
+ 4 22 23 24 25 26 27 28
+ 5 29 30 31
+
diff --git a/tests/expected/cal/bigyear-1mw-month b/tests/expected/cal/bigyear-1mw-month
new file mode 100644
index 0000000..a7dd7c6
--- /dev/null
+++ b/tests/expected/cal/bigyear-1mw-month
@@ -0,0 +1,9 @@
+Gregorian - Monday-based month with weeks
+ December 2147483646
+ Mo Tu We Th Fr Sa Su
+48 1 2
+49 3 4 5 6 7 8 9
+50 10 11 12 13 14 15 16
+51 17 18 19 20 21 22 23
+52 24 25 26 27 28 29 30
+ 1 31
diff --git a/tests/expected/cal/bigyear-1mw-year b/tests/expected/cal/bigyear-1mw-year
new file mode 100644
index 0000000..3b9fdfb
--- /dev/null
+++ b/tests/expected/cal/bigyear-1mw-year
@@ -0,0 +1,9 @@
+Gregorian - Monday-based year with weeks
+ January 2147483646
+ Mo Tu We Th Fr Sa Su
+ 1 1 2 3 4 5 6 7
+ 2 8 9 10 11 12 13 14
+ 3 15 16 17 18 19 20 21
+ 4 22 23 24 25 26 27 28
+ 5 29 30 31
+
diff --git a/tests/expected/cal/bigyear-1s-month b/tests/expected/cal/bigyear-1s-month
new file mode 100644
index 0000000..fcf5c0f
--- /dev/null
+++ b/tests/expected/cal/bigyear-1s-month
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based month
+ December 2147483646
+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
diff --git a/tests/expected/cal/bigyear-1s-year b/tests/expected/cal/bigyear-1s-year
new file mode 100644
index 0000000..8442aea
--- /dev/null
+++ b/tests/expected/cal/bigyear-1s-year
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based year
+ January 2147483646
+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
+
diff --git a/tests/expected/cal/bigyear-1sj-month b/tests/expected/cal/bigyear-1sj-month
new file mode 100644
index 0000000..d159352
--- /dev/null
+++ b/tests/expected/cal/bigyear-1sj-month
@@ -0,0 +1,9 @@
+Julian - Sunday-based month
+ December 2147483646
+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
diff --git a/tests/expected/cal/bigyear-1sj-year b/tests/expected/cal/bigyear-1sj-year
new file mode 100644
index 0000000..980e4b2
--- /dev/null
+++ b/tests/expected/cal/bigyear-1sj-year
@@ -0,0 +1,9 @@
+Julian - Sunday-based year
+ January 2147483646
+Sun Mon Tue Wed Thu Fri Sat
+ 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
+
diff --git a/tests/expected/cal/bigyear-1sjw-month b/tests/expected/cal/bigyear-1sjw-month
new file mode 100644
index 0000000..139ba22
--- /dev/null
+++ b/tests/expected/cal/bigyear-1sjw-month
@@ -0,0 +1,9 @@
+Julian - Sunday-based month with weeks
+ December 2147483646
+ Sun Mon Tue Wed Thu Fri Sat
+48 335
+49 336 337 338 339 340 341 342
+50 343 344 345 346 347 348 349
+51 350 351 352 353 354 355 356
+52 357 358 359 360 361 362 363
+53 364 365
diff --git a/tests/expected/cal/bigyear-1sjw-year b/tests/expected/cal/bigyear-1sjw-year
new file mode 100644
index 0000000..4d35dab
--- /dev/null
+++ b/tests/expected/cal/bigyear-1sjw-year
@@ -0,0 +1,9 @@
+Julian - Sunday-based year with weeks
+ January 2147483646
+ Sun Mon Tue Wed Thu Fri Sat
+ 1 1 2 3 4 5 6
+ 2 7 8 9 10 11 12 13
+ 3 14 15 16 17 18 19 20
+ 4 21 22 23 24 25 26 27
+ 5 28 29 30 31
+
diff --git a/tests/expected/cal/bigyear-1sw-month b/tests/expected/cal/bigyear-1sw-month
new file mode 100644
index 0000000..ca3aaa7
--- /dev/null
+++ b/tests/expected/cal/bigyear-1sw-month
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based month with weeks
+ December 2147483646
+ Su Mo Tu We Th Fr Sa
+48 1
+49 2 3 4 5 6 7 8
+50 9 10 11 12 13 14 15
+51 16 17 18 19 20 21 22
+52 23 24 25 26 27 28 29
+53 30 31
diff --git a/tests/expected/cal/bigyear-1sw-year b/tests/expected/cal/bigyear-1sw-year
new file mode 100644
index 0000000..7fb287c
--- /dev/null
+++ b/tests/expected/cal/bigyear-1sw-year
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based year with weeks
+ January 2147483646
+ Su Mo Tu We Th Fr Sa
+ 1 1 2 3 4 5 6
+ 2 7 8 9 10 11 12 13
+ 3 14 15 16 17 18 19 20
+ 4 21 22 23 24 25 26 27
+ 5 28 29 30 31
+
diff --git a/tests/expected/cal/bigyear-3m-month b/tests/expected/cal/bigyear-3m-month
new file mode 100644
index 0000000..2591b07
--- /dev/null
+++ b/tests/expected/cal/bigyear-3m-month
@@ -0,0 +1,9 @@
+Gregorian - Monday-based 3 months
+ November 2147483646 December 2147483646 January 2147483647
+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 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
diff --git a/tests/expected/cal/bigyear-3mj-month b/tests/expected/cal/bigyear-3mj-month
new file mode 100644
index 0000000..297f6a8
--- /dev/null
+++ b/tests/expected/cal/bigyear-3mj-month
@@ -0,0 +1,9 @@
+Julian - Monday-based 3 months
+ November 2147483646 December 2147483646 January 2147483647
+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 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
diff --git a/tests/expected/cal/bigyear-3mjw-month b/tests/expected/cal/bigyear-3mjw-month
new file mode 100644
index 0000000..2f6648f
--- /dev/null
+++ b/tests/expected/cal/bigyear-3mjw-month
@@ -0,0 +1,9 @@
+Julian - Monday-based 3 months with weeks
+ November 2147483646 December 2147483646 January 2147483647
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+44 305 306 307 308 48 335 336 1 1 2 3 4 5 6
+45 309 310 311 312 313 314 315 49 337 338 339 340 341 342 343 2 7 8 9 10 11 12 13
+46 316 317 318 319 320 321 322 50 344 345 346 347 348 349 350 3 14 15 16 17 18 19 20
+47 323 324 325 326 327 328 329 51 351 352 353 354 355 356 357 4 21 22 23 24 25 26 27
+48 330 331 332 333 334 52 358 359 360 361 362 363 364 5 28 29 30 31
+ 1 365
diff --git a/tests/expected/cal/bigyear-3mw-month b/tests/expected/cal/bigyear-3mw-month
new file mode 100644
index 0000000..ace1ff8
--- /dev/null
+++ b/tests/expected/cal/bigyear-3mw-month
@@ -0,0 +1,9 @@
+Gregorian - Monday-based 3 months with weeks
+ November 2147483646 December 2147483646 January 2147483647
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+44 1 2 3 4 48 1 2 1 1 2 3 4 5 6
+45 5 6 7 8 9 10 11 49 3 4 5 6 7 8 9 2 7 8 9 10 11 12 13
+46 12 13 14 15 16 17 18 50 10 11 12 13 14 15 16 3 14 15 16 17 18 19 20
+47 19 20 21 22 23 24 25 51 17 18 19 20 21 22 23 4 21 22 23 24 25 26 27
+48 26 27 28 29 30 52 24 25 26 27 28 29 30 5 28 29 30 31
+ 1 31
diff --git a/tests/expected/cal/bigyear-3s-month b/tests/expected/cal/bigyear-3s-month
new file mode 100644
index 0000000..e0bdb8d
--- /dev/null
+++ b/tests/expected/cal/bigyear-3s-month
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based 3 months
+ November 2147483646 December 2147483646 January 2147483647
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 1 2 3 4 5
+ 4 5 6 7 8 9 10 2 3 4 5 6 7 8 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 9 10 11 12 13 14 15 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 16 17 18 19 20 21 22 20 21 22 23 24 25 26
+25 26 27 28 29 30 23 24 25 26 27 28 29 27 28 29 30 31
+ 30 31
diff --git a/tests/expected/cal/bigyear-3sj-month b/tests/expected/cal/bigyear-3sj-month
new file mode 100644
index 0000000..1205d56
--- /dev/null
+++ b/tests/expected/cal/bigyear-3sj-month
@@ -0,0 +1,9 @@
+Julian - Sunday-based 3 months
+ November 2147483646 December 2147483646 January 2147483647
+Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 305 306 307 335 1 2 3 4 5
+308 309 310 311 312 313 314 336 337 338 339 340 341 342 6 7 8 9 10 11 12
+315 316 317 318 319 320 321 343 344 345 346 347 348 349 13 14 15 16 17 18 19
+322 323 324 325 326 327 328 350 351 352 353 354 355 356 20 21 22 23 24 25 26
+329 330 331 332 333 334 357 358 359 360 361 362 363 27 28 29 30 31
+ 364 365
diff --git a/tests/expected/cal/bigyear-3sjw-month b/tests/expected/cal/bigyear-3sjw-month
new file mode 100644
index 0000000..541d3ae
--- /dev/null
+++ b/tests/expected/cal/bigyear-3sjw-month
@@ -0,0 +1,9 @@
+Julian - Sunday-based 3 months with weeks
+ November 2147483646 December 2147483646 January 2147483647
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+44 305 306 307 48 335 1 1 2 3 4 5
+45 308 309 310 311 312 313 314 49 336 337 338 339 340 341 342 2 6 7 8 9 10 11 12
+46 315 316 317 318 319 320 321 50 343 344 345 346 347 348 349 3 13 14 15 16 17 18 19
+47 322 323 324 325 326 327 328 51 350 351 352 353 354 355 356 4 20 21 22 23 24 25 26
+48 329 330 331 332 333 334 52 357 358 359 360 361 362 363 5 27 28 29 30 31
+ 53 364 365
diff --git a/tests/expected/cal/bigyear-3sw-month b/tests/expected/cal/bigyear-3sw-month
new file mode 100644
index 0000000..305e2c6
--- /dev/null
+++ b/tests/expected/cal/bigyear-3sw-month
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based 3 months with weeks
+ November 2147483646 December 2147483646 January 2147483647
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+44 1 2 3 48 1 1 1 2 3 4 5
+45 4 5 6 7 8 9 10 49 2 3 4 5 6 7 8 2 6 7 8 9 10 11 12
+46 11 12 13 14 15 16 17 50 9 10 11 12 13 14 15 3 13 14 15 16 17 18 19
+47 18 19 20 21 22 23 24 51 16 17 18 19 20 21 22 4 20 21 22 23 24 25 26
+48 25 26 27 28 29 30 52 23 24 25 26 27 28 29 5 27 28 29 30 31
+ 53 30 31
diff --git a/tests/expected/cal/color b/tests/expected/cal/color
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/cal/color
diff --git a/tests/expected/cal/color-first-day b/tests/expected/cal/color-first-day
new file mode 100644
index 0000000..446f4fd
--- /dev/null
+++ b/tests/expected/cal/color-first-day
@@ -0,0 +1,8 @@
+ January 0001
+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
diff --git a/tests/expected/cal/color-last-day b/tests/expected/cal/color-last-day
new file mode 100644
index 0000000..ec7793c
--- /dev/null
+++ b/tests/expected/cal/color-last-day
@@ -0,0 +1,8 @@
+ 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 31 23 24 25 26 27 28 29
+ 30 31
diff --git a/tests/expected/cal/color-reformation-corner-cases-1 b/tests/expected/cal/color-reformation-corner-cases-1
new file mode 100644
index 0000000..4b26465
--- /dev/null
+++ b/tests/expected/cal/color-reformation-corner-cases-1
@@ -0,0 +1,8 @@
+ 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
+
+
+
diff --git a/tests/expected/cal/color-reformation-corner-cases-2 b/tests/expected/cal/color-reformation-corner-cases-2
new file mode 100644
index 0000000..db29a7f
--- /dev/null
+++ b/tests/expected/cal/color-reformation-corner-cases-2
@@ -0,0 +1,8 @@
+ 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
+
+
+
diff --git a/tests/expected/cal/color-reformation-corner-cases-3 b/tests/expected/cal/color-reformation-corner-cases-3
new file mode 100644
index 0000000..db29a7f
--- /dev/null
+++ b/tests/expected/cal/color-reformation-corner-cases-3
@@ -0,0 +1,8 @@
+ 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
+
+
+
diff --git a/tests/expected/cal/color-reformation-corner-cases-4 b/tests/expected/cal/color-reformation-corner-cases-4
new file mode 100644
index 0000000..6c55714
--- /dev/null
+++ b/tests/expected/cal/color-reformation-corner-cases-4
@@ -0,0 +1,8 @@
+ 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
+
+
+
diff --git a/tests/expected/cal/color-vertical b/tests/expected/cal/color-vertical
new file mode 100644
index 0000000..bf5c609
--- /dev/null
+++ b/tests/expected/cal/color-vertical
@@ -0,0 +1,8 @@
+ February 2023
+Su 5 12 19 26
+Mo 6 13 20 27
+Tu 7 14 21 28
+We 1 8 15 22
+Th 2 9 16 23
+Fr 3 10 17 24
+Sa 4 11 18 25
diff --git a/tests/expected/cal/color-vertical-week b/tests/expected/cal/color-vertical-week
new file mode 100644
index 0000000..d69866e
--- /dev/null
+++ b/tests/expected/cal/color-vertical-week
@@ -0,0 +1,9 @@
+ February 2023
+Su 5 12 19 26
+Mo 6 13 20 27
+Tu 7 14 21 28
+We 1 8 15 22
+Th 2 9 16 23
+Fr 3 10 17 24
+Sa 4 11 18 25
+ 5 6 7 8 9
diff --git a/tests/expected/cal/colorw b/tests/expected/cal/colorw
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/cal/colorw
diff --git a/tests/expected/cal/colorw-first-day-week-numbers b/tests/expected/cal/colorw-first-day-week-numbers
new file mode 100644
index 0000000..e14aaf3
--- /dev/null
+++ b/tests/expected/cal/colorw-first-day-week-numbers
@@ -0,0 +1,8 @@
+ January 0001
+ Su Mo Tu We Th Fr Sa
+ 1  1
+ 2 2 3 4 5 6 7 8
+ 3 9 10 11 12 13 14 15
+ 4 16 17 18 19 20 21 22
+ 5 23 24 25 26 27 28 29
+ 6 30 31
diff --git a/tests/expected/cal/colorw-last-day-week-numbers b/tests/expected/cal/colorw-last-day-week-numbers
new file mode 100644
index 0000000..d0d49cc
--- /dev/null
+++ b/tests/expected/cal/colorw-last-day-week-numbers
@@ -0,0 +1,8 @@
+ 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
+45 1 2 3 4 5 6 49 1 2 3 4 1 1
+46 7 8 9 10 11 12 13 50 5 6 7 8 9 10 11 2 2 3 4 5 6 7 8
+47 14 15 16 17 18 19 20 51 12 13 14 15 16 17 18 3 9 10 11 12 13 14 15
+48 21 22 23 24 25 26 27 52 19 20 21 22 23 24 25 4 16 17 18 19 20 21 22
+49 28 29 30 53 26 27 28 29 30 31 5 23 24 25 26 27 28 29
+ 6 30 31
diff --git a/tests/expected/cal/colorw-reformation-corner-cases-1-week-numbers b/tests/expected/cal/colorw-reformation-corner-cases-1-week-numbers
new file mode 100644
index 0000000..98fa041
--- /dev/null
+++ b/tests/expected/cal/colorw-reformation-corner-cases-1-week-numbers
@@ -0,0 +1,8 @@
+ September 1752
+ Su Mo Tu We Th Fr Sa
+36 1  2 14 15 16
+37 17 18 19 20 21 22 23
+38 24 25 26 27 28 29 30
+
+
+
diff --git a/tests/expected/cal/colorw-reformation-corner-cases-2-week-numbers b/tests/expected/cal/colorw-reformation-corner-cases-2-week-numbers
new file mode 100644
index 0000000..fdbc199
--- /dev/null
+++ b/tests/expected/cal/colorw-reformation-corner-cases-2-week-numbers
@@ -0,0 +1,8 @@
+ September 1752
+ Su Mo Tu We Th Fr Sa
+36 1 2 14 15 16
+37 17 18 19 20 21 22 23
+38 24 25 26 27 28 29 30
+
+
+
diff --git a/tests/expected/cal/colorw-reformation-corner-cases-3-week-numbers b/tests/expected/cal/colorw-reformation-corner-cases-3-week-numbers
new file mode 100644
index 0000000..fdbc199
--- /dev/null
+++ b/tests/expected/cal/colorw-reformation-corner-cases-3-week-numbers
@@ -0,0 +1,8 @@
+ September 1752
+ Su Mo Tu We Th Fr Sa
+36 1 2 14 15 16
+37 17 18 19 20 21 22 23
+38 24 25 26 27 28 29 30
+
+
+
diff --git a/tests/expected/cal/colorw-reformation-corner-cases-4-week-numbers b/tests/expected/cal/colorw-reformation-corner-cases-4-week-numbers
new file mode 100644
index 0000000..307b539
--- /dev/null
+++ b/tests/expected/cal/colorw-reformation-corner-cases-4-week-numbers
@@ -0,0 +1,8 @@
+ September 1752
+ Su Mo Tu We Th Fr Sa
+36 1 2 14 15 16
+37 17 18 19 20 21 22 23
+38 24 25 26 27 28 29 30
+
+
+
diff --git a/tests/expected/cal/column-5 b/tests/expected/cal/column-5
new file mode 100644
index 0000000..3da6495
--- /dev/null
+++ b/tests/expected/cal/column-5
@@ -0,0 +1,27 @@
+5 columns
+ 2006
+
+ January February March April May
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa 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 1 1 2 3 4 5 6
+ 8 9 10 11 12 13 14 5 6 7 8 9 10 11 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13
+15 16 17 18 19 20 21 12 13 14 15 16 17 18 12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20
+22 23 24 25 26 27 28 19 20 21 22 23 24 25 19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27
+29 30 31 26 27 28 26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
+ 30
+ June July August September October
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 1 2 3 4 5 1 2 1 2 3 4 5 6 7
+ 4 5 6 7 8 9 10 2 3 4 5 6 7 8 6 7 8 9 10 11 12 3 4 5 6 7 8 9 8 9 10 11 12 13 14
+11 12 13 14 15 16 17 9 10 11 12 13 14 15 13 14 15 16 17 18 19 10 11 12 13 14 15 16 15 16 17 18 19 20 21
+18 19 20 21 22 23 24 16 17 18 19 20 21 22 20 21 22 23 24 25 26 17 18 19 20 21 22 23 22 23 24 25 26 27 28
+25 26 27 28 29 30 23 24 25 26 27 28 29 27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
+ 30 31
+ November December
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 4 1 2
+ 5 6 7 8 9 10 11 3 4 5 6 7 8 9
+12 13 14 15 16 17 18 10 11 12 13 14 15 16
+19 20 21 22 23 24 25 17 18 19 20 21 22 23
+26 27 28 29 30 24 25 26 27 28 29 30
+ 31
diff --git a/tests/expected/cal/column-6 b/tests/expected/cal/column-6
new file mode 100644
index 0000000..f3f7f28
--- /dev/null
+++ b/tests/expected/cal/column-6
@@ -0,0 +1,19 @@
+6 columns
+ 2006
+
+ January February March April May June
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa 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 1 1 2 3 4 5 6 1 2 3
+ 8 9 10 11 12 13 14 5 6 7 8 9 10 11 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13 4 5 6 7 8 9 10
+15 16 17 18 19 20 21 12 13 14 15 16 17 18 12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20 11 12 13 14 15 16 17
+22 23 24 25 26 27 28 19 20 21 22 23 24 25 19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27 18 19 20 21 22 23 24
+29 30 31 26 27 28 26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31 25 26 27 28 29 30
+ 30
+ July August September October November December
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa 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 1 2 3 4 5 6 7 1 2 3 4 1 2
+ 2 3 4 5 6 7 8 6 7 8 9 10 11 12 3 4 5 6 7 8 9 8 9 10 11 12 13 14 5 6 7 8 9 10 11 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 15 16 17 18 19 20 21 12 13 14 15 16 17 18 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 22 23 24 25 26 27 28 19 20 21 22 23 24 25 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 29 30 31 26 27 28 29 30 24 25 26 27 28 29 30
+30 31 31
diff --git a/tests/expected/cal/column-auto b/tests/expected/cal/column-auto
new file mode 100644
index 0000000..2a3ea1f
--- /dev/null
+++ b/tests/expected/cal/column-auto
@@ -0,0 +1,35 @@
+auto columns
+ 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
+
+ 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
diff --git a/tests/expected/cal/jan1753-3w b/tests/expected/cal/jan1753-3w
new file mode 100644
index 0000000..80d3d01
--- /dev/null
+++ b/tests/expected/cal/jan1753-3w
@@ -0,0 +1,9 @@
+Sunday-based 1753 week numbers
+ December 1752 January 1753 February 1753
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+47 1 2 1 1 2 3 4 5 6 5 1 2 3
+48 3 4 5 6 7 8 9 2 7 8 9 10 11 12 13 6 4 5 6 7 8 9 10
+49 10 11 12 13 14 15 16 3 14 15 16 17 18 19 20 7 11 12 13 14 15 16 17
+50 17 18 19 20 21 22 23 4 21 22 23 24 25 26 27 8 18 19 20 21 22 23 24
+51 24 25 26 27 28 29 30 5 28 29 30 31 9 25 26 27 28
+52 31
diff --git a/tests/expected/cal/jan1753-m3w b/tests/expected/cal/jan1753-m3w
new file mode 100644
index 0000000..8de81fe
--- /dev/null
+++ b/tests/expected/cal/jan1753-m3w
@@ -0,0 +1,9 @@
+Monday-based 1753 week numbers
+ December 1752 January 1753 February 1753
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+47 1 2 3 1 1 2 3 4 5 6 7 5 1 2 3 4
+48 4 5 6 7 8 9 10 2 8 9 10 11 12 13 14 6 5 6 7 8 9 10 11
+49 11 12 13 14 15 16 17 3 15 16 17 18 19 20 21 7 12 13 14 15 16 17 18
+50 18 19 20 21 22 23 24 4 22 23 24 25 26 27 28 8 19 20 21 22 23 24 25
+51 25 26 27 28 29 30 31 5 29 30 31 9 26 27 28
+
diff --git a/tests/expected/cal/month-1m b/tests/expected/cal/month-1m
new file mode 100644
index 0000000..58cc28a
--- /dev/null
+++ b/tests/expected/cal/month-1m
@@ -0,0 +1,9 @@
+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
+
diff --git a/tests/expected/cal/month-1mj b/tests/expected/cal/month-1mj
new file mode 100644
index 0000000..b415f9a
--- /dev/null
+++ b/tests/expected/cal/month-1mj
@@ -0,0 +1,9 @@
+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
+
diff --git a/tests/expected/cal/month-1mjw b/tests/expected/cal/month-1mjw
new file mode 100644
index 0000000..f44d2c0
--- /dev/null
+++ b/tests/expected/cal/month-1mjw
@@ -0,0 +1,9 @@
+Julian - Monday-based week with week numbers
+ September 2006
+ Mon Tue Wed Thu Fri Sat Sun
+35 244 245 246
+36 247 248 249 250 251 252 253
+37 254 255 256 257 258 259 260
+38 261 262 263 264 265 266 267
+39 268 269 270 271 272 273
+
diff --git a/tests/expected/cal/month-1mw b/tests/expected/cal/month-1mw
new file mode 100644
index 0000000..67e727c
--- /dev/null
+++ b/tests/expected/cal/month-1mw
@@ -0,0 +1,9 @@
+Gregorian - Monday-based week with week numbers
+ September 2006
+ Mo Tu We Th Fr Sa Su
+35 1 2 3
+36 4 5 6 7 8 9 10
+37 11 12 13 14 15 16 17
+38 18 19 20 21 22 23 24
+39 25 26 27 28 29 30
+
diff --git a/tests/expected/cal/month-1s b/tests/expected/cal/month-1s
new file mode 100644
index 0000000..f0aa397
--- /dev/null
+++ b/tests/expected/cal/month-1s
@@ -0,0 +1,9 @@
+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
+
diff --git a/tests/expected/cal/month-1sj b/tests/expected/cal/month-1sj
new file mode 100644
index 0000000..3d48b49
--- /dev/null
+++ b/tests/expected/cal/month-1sj
@@ -0,0 +1,9 @@
+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
+
diff --git a/tests/expected/cal/month-1sjw b/tests/expected/cal/month-1sjw
new file mode 100644
index 0000000..e85420b
--- /dev/null
+++ b/tests/expected/cal/month-1sjw
@@ -0,0 +1,9 @@
+Julian - Sunday-based week with week numbers
+ September 2006
+ Sun Mon Tue Wed Thu Fri Sat
+35 244 245
+36 246 247 248 249 250 251 252
+37 253 254 255 256 257 258 259
+38 260 261 262 263 264 265 266
+39 267 268 269 270 271 272 273
+
diff --git a/tests/expected/cal/month-1sw b/tests/expected/cal/month-1sw
new file mode 100644
index 0000000..0f6be3c
--- /dev/null
+++ b/tests/expected/cal/month-1sw
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based week with week numbers
+ September 2006
+ Su Mo Tu We Th Fr Sa
+35 1 2
+36 3 4 5 6 7 8 9
+37 10 11 12 13 14 15 16
+38 17 18 19 20 21 22 23
+39 24 25 26 27 28 29 30
+
diff --git a/tests/expected/cal/month-3m b/tests/expected/cal/month-3m
new file mode 100644
index 0000000..3a299ba
--- /dev/null
+++ b/tests/expected/cal/month-3m
@@ -0,0 +1,9 @@
+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
diff --git a/tests/expected/cal/month-3mj b/tests/expected/cal/month-3mj
new file mode 100644
index 0000000..a1b7aff
--- /dev/null
+++ b/tests/expected/cal/month-3mj
@@ -0,0 +1,9 @@
+Julian - Monday-based week
+ December 2017 January 2018 February 2018
+Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+ 335 336 337 1 2 3 4 5 6 7 32 33 34 35
+338 339 340 341 342 343 344 8 9 10 11 12 13 14 36 37 38 39 40 41 42
+345 346 347 348 349 350 351 15 16 17 18 19 20 21 43 44 45 46 47 48 49
+352 353 354 355 356 357 358 22 23 24 25 26 27 28 50 51 52 53 54 55 56
+359 360 361 362 363 364 365 29 30 31 57 58 59
+
diff --git a/tests/expected/cal/month-3mjw b/tests/expected/cal/month-3mjw
new file mode 100644
index 0000000..0fdeb01
--- /dev/null
+++ b/tests/expected/cal/month-3mjw
@@ -0,0 +1,9 @@
+Julian - Monday-based week with week numbers
+ 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
+31 213 214 215 216 217 218 35 244 245 246 39 274
+32 219 220 221 222 223 224 225 36 247 248 249 250 251 252 253 40 275 276 277 278 279 280 281
+33 226 227 228 229 230 231 232 37 254 255 256 257 258 259 260 41 282 283 284 285 286 287 288
+34 233 234 235 236 237 238 239 38 261 262 263 264 265 266 267 42 289 290 291 292 293 294 295
+35 240 241 242 243 39 268 269 270 271 272 273 43 296 297 298 299 300 301 302
+ 44 303 304
diff --git a/tests/expected/cal/month-3mw b/tests/expected/cal/month-3mw
new file mode 100644
index 0000000..2309da8
--- /dev/null
+++ b/tests/expected/cal/month-3mw
@@ -0,0 +1,9 @@
+Gregorian - Monday-based week with week numbers
+ 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
+31 1 2 3 4 5 6 35 1 2 3 39 1
+32 7 8 9 10 11 12 13 36 4 5 6 7 8 9 10 40 2 3 4 5 6 7 8
+33 14 15 16 17 18 19 20 37 11 12 13 14 15 16 17 41 9 10 11 12 13 14 15
+34 21 22 23 24 25 26 27 38 18 19 20 21 22 23 24 42 16 17 18 19 20 21 22
+35 28 29 30 31 39 25 26 27 28 29 30 43 23 24 25 26 27 28 29
+ 44 30 31
diff --git a/tests/expected/cal/month-3s b/tests/expected/cal/month-3s
new file mode 100644
index 0000000..4f67f1a
--- /dev/null
+++ b/tests/expected/cal/month-3s
@@ -0,0 +1,9 @@
+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
+
diff --git a/tests/expected/cal/month-3sj b/tests/expected/cal/month-3sj
new file mode 100644
index 0000000..5d1b11a
--- /dev/null
+++ b/tests/expected/cal/month-3sj
@@ -0,0 +1,9 @@
+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
+
diff --git a/tests/expected/cal/month-3sjw b/tests/expected/cal/month-3sjw
new file mode 100644
index 0000000..f6e70ea
--- /dev/null
+++ b/tests/expected/cal/month-3sjw
@@ -0,0 +1,9 @@
+Julian - Sunday-based week with week numbers
+ 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
+31 213 214 215 216 217 35 244 245 40 274 275 276 277 278 279 280
+32 218 219 220 221 222 223 224 36 246 247 248 249 250 251 252 41 281 282 283 284 285 286 287
+33 225 226 227 228 229 230 231 37 253 254 255 256 257 258 259 42 288 289 290 291 292 293 294
+34 232 233 234 235 236 237 238 38 260 261 262 263 264 265 266 43 295 296 297 298 299 300 301
+35 239 240 241 242 243 39 267 268 269 270 271 272 273 44 302 303 304
+
diff --git a/tests/expected/cal/month-3sw b/tests/expected/cal/month-3sw
new file mode 100644
index 0000000..d6fccdc
--- /dev/null
+++ b/tests/expected/cal/month-3sw
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based week with week numbers
+ 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
+31 1 2 3 4 5 35 1 2 40 1 2 3 4 5 6 7
+32 6 7 8 9 10 11 12 36 3 4 5 6 7 8 9 41 8 9 10 11 12 13 14
+33 13 14 15 16 17 18 19 37 10 11 12 13 14 15 16 42 15 16 17 18 19 20 21
+34 20 21 22 23 24 25 26 38 17 18 19 20 21 22 23 43 22 23 24 25 26 27 28
+35 27 28 29 30 31 39 24 25 26 27 28 29 30 44 29 30 31
+
diff --git a/tests/expected/cal/month-Sn201 b/tests/expected/cal/month-Sn201
new file mode 100644
index 0000000..4374b95
--- /dev/null
+++ b/tests/expected/cal/month-Sn201
@@ -0,0 +1,537 @@
+Extreme span
+ May 1998 June 1998 July 1998
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 2 3 4 5 6 1 2 3 4
+ 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11
+10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18
+17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25
+24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31
+31
+ August 1998 September 1998 October 1998
+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 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
+ November 1998 December 1998 January 1999
+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 5 1 2
+ 8 9 10 11 12 13 14 6 7 8 9 10 11 12 3 4 5 6 7 8 9
+15 16 17 18 19 20 21 13 14 15 16 17 18 19 10 11 12 13 14 15 16
+22 23 24 25 26 27 28 20 21 22 23 24 25 26 17 18 19 20 21 22 23
+29 30 27 28 29 30 31 24 25 26 27 28 29 30
+ 31
+ February 1999 March 1999 April 1999
+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 5 6 1 2 3
+ 7 8 9 10 11 12 13 7 8 9 10 11 12 13 4 5 6 7 8 9 10
+14 15 16 17 18 19 20 14 15 16 17 18 19 20 11 12 13 14 15 16 17
+21 22 23 24 25 26 27 21 22 23 24 25 26 27 18 19 20 21 22 23 24
+28 28 29 30 31 25 26 27 28 29 30
+
+ May 1999 June 1999 July 1999
+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 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
+ August 1999 September 1999 October 1999
+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
+ November 1999 December 1999 January 2000
+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 31 23 24 25 26 27 28 29
+ 30 31
+ February 2000 March 2000 April 2000
+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 3 4 1
+ 6 7 8 9 10 11 12 5 6 7 8 9 10 11 2 3 4 5 6 7 8
+13 14 15 16 17 18 19 12 13 14 15 16 17 18 9 10 11 12 13 14 15
+20 21 22 23 24 25 26 19 20 21 22 23 24 25 16 17 18 19 20 21 22
+27 28 29 26 27 28 29 30 31 23 24 25 26 27 28 29
+ 30
+ May 2000 June 2000 July 2000
+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 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
+ August 2000 September 2000 October 2000
+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
+
+ November 2000 December 2000 January 2001
+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
+ February 2001 March 2001 April 2001
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 1 2 3 4 5 6 7
+ 4 5 6 7 8 9 10 4 5 6 7 8 9 10 8 9 10 11 12 13 14
+11 12 13 14 15 16 17 11 12 13 14 15 16 17 15 16 17 18 19 20 21
+18 19 20 21 22 23 24 18 19 20 21 22 23 24 22 23 24 25 26 27 28
+25 26 27 28 25 26 27 28 29 30 31 29 30
+
+ May 2001 June 2001 July 2001
+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
+
+ August 2001 September 2001 October 2001
+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
+ 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13
+12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20
+19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27
+26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
+ 30
+ November 2001 December 2001 January 2002
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 1 2 3 4 5
+ 4 5 6 7 8 9 10 2 3 4 5 6 7 8 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 9 10 11 12 13 14 15 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 16 17 18 19 20 21 22 20 21 22 23 24 25 26
+25 26 27 28 29 30 23 24 25 26 27 28 29 27 28 29 30 31
+ 30 31
+ February 2002 March 2002 April 2002
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 2 1 2 3 4 5 6
+ 3 4 5 6 7 8 9 3 4 5 6 7 8 9 7 8 9 10 11 12 13
+10 11 12 13 14 15 16 10 11 12 13 14 15 16 14 15 16 17 18 19 20
+17 18 19 20 21 22 23 17 18 19 20 21 22 23 21 22 23 24 25 26 27
+24 25 26 27 28 24 25 26 27 28 29 30 28 29 30
+ 31
+ May 2002 June 2002 July 2002
+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
+ 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13
+12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20
+19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27
+26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
+ 30
+ August 2002 September 2002 October 2002
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5
+ 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26
+25 26 27 28 29 30 31 29 30 27 28 29 30 31
+
+ November 2002 December 2002 January 2003
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 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 31
+
+ February 2003 March 2003 April 2003
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 1 1 2 3 4 5
+ 2 3 4 5 6 7 8 2 3 4 5 6 7 8 6 7 8 9 10 11 12
+ 9 10 11 12 13 14 15 9 10 11 12 13 14 15 13 14 15 16 17 18 19
+16 17 18 19 20 21 22 16 17 18 19 20 21 22 20 21 22 23 24 25 26
+23 24 25 26 27 28 23 24 25 26 27 28 29 27 28 29 30
+ 30 31
+ May 2003 June 2003 July 2003
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5
+ 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26
+25 26 27 28 29 30 31 29 30 27 28 29 30 31
+
+ August 2003 September 2003 October 2003
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 2 3 4 5 6 1 2 3 4
+ 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11
+10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18
+17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25
+24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31
+31
+ November 2003 December 2003 January 2004
+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 31
+30
+ February 2004 March 2004 April 2004
+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 5 6 1 2 3
+ 8 9 10 11 12 13 14 7 8 9 10 11 12 13 4 5 6 7 8 9 10
+15 16 17 18 19 20 21 14 15 16 17 18 19 20 11 12 13 14 15 16 17
+22 23 24 25 26 27 28 21 22 23 24 25 26 27 18 19 20 21 22 23 24
+29 28 29 30 31 25 26 27 28 29 30
+
+ May 2004 June 2004 July 2004
+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 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
+ August 2004 September 2004 October 2004
+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
+ November 2004 December 2004 January 2005
+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 31 23 24 25 26 27 28 29
+ 30 31
+ February 2005 March 2005 April 2005
+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 3 4 5 1 2
+ 6 7 8 9 10 11 12 6 7 8 9 10 11 12 3 4 5 6 7 8 9
+13 14 15 16 17 18 19 13 14 15 16 17 18 19 10 11 12 13 14 15 16
+20 21 22 23 24 25 26 20 21 22 23 24 25 26 17 18 19 20 21 22 23
+27 28 27 28 29 30 31 24 25 26 27 28 29 30
+
+ May 2005 June 2005 July 2005
+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
+ August 2005 September 2005 October 2005
+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 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
+ November 2005 December 2005 January 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 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
+
+ February 2006 March 2006 April 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 1 2 3 4 1
+ 5 6 7 8 9 10 11 5 6 7 8 9 10 11 2 3 4 5 6 7 8
+12 13 14 15 16 17 18 12 13 14 15 16 17 18 9 10 11 12 13 14 15
+19 20 21 22 23 24 25 19 20 21 22 23 24 25 16 17 18 19 20 21 22
+26 27 28 26 27 28 29 30 31 23 24 25 26 27 28 29
+ 30
+ May 2006 June 2006 July 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 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
+ 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
+
+ November 2006 December 2006 January 2007
+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
+ February 2007 March 2007 April 2007
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 1 2 3 4 5 6 7
+ 4 5 6 7 8 9 10 4 5 6 7 8 9 10 8 9 10 11 12 13 14
+11 12 13 14 15 16 17 11 12 13 14 15 16 17 15 16 17 18 19 20 21
+18 19 20 21 22 23 24 18 19 20 21 22 23 24 22 23 24 25 26 27 28
+25 26 27 28 25 26 27 28 29 30 31 29 30
+
+ May 2007 June 2007 July 2007
+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
+
+ August 2007 September 2007 October 2007
+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
+ 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13
+12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20
+19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27
+26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
+ 30
+ November 2007 December 2007 January 2008
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 1 2 3 4 5
+ 4 5 6 7 8 9 10 2 3 4 5 6 7 8 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 9 10 11 12 13 14 15 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 16 17 18 19 20 21 22 20 21 22 23 24 25 26
+25 26 27 28 29 30 23 24 25 26 27 28 29 27 28 29 30 31
+ 30 31
+ February 2008 March 2008 April 2008
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 1 2 3 4 5
+ 3 4 5 6 7 8 9 2 3 4 5 6 7 8 6 7 8 9 10 11 12
+10 11 12 13 14 15 16 9 10 11 12 13 14 15 13 14 15 16 17 18 19
+17 18 19 20 21 22 23 16 17 18 19 20 21 22 20 21 22 23 24 25 26
+24 25 26 27 28 29 23 24 25 26 27 28 29 27 28 29 30
+ 30 31
+ May 2008 June 2008 July 2008
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5
+ 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26
+25 26 27 28 29 30 31 29 30 27 28 29 30 31
+
+ August 2008 September 2008 October 2008
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 2 3 4 5 6 1 2 3 4
+ 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11
+10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18
+17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25
+24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31
+31
+ November 2008 December 2008 January 2009
+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 31
+30
+ February 2009 March 2009 April 2009
+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 5 6 7 1 2 3 4
+ 8 9 10 11 12 13 14 8 9 10 11 12 13 14 5 6 7 8 9 10 11
+15 16 17 18 19 20 21 15 16 17 18 19 20 21 12 13 14 15 16 17 18
+22 23 24 25 26 27 28 22 23 24 25 26 27 28 19 20 21 22 23 24 25
+ 29 30 31 26 27 28 29 30
+
+ May 2009 June 2009 July 2009
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 2 3 4 5 6 1 2 3 4
+ 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11
+10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18
+17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25
+24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31
+31
+ August 2009 September 2009 October 2009
+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 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
+ November 2009 December 2009 January 2010
+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 5 1 2
+ 8 9 10 11 12 13 14 6 7 8 9 10 11 12 3 4 5 6 7 8 9
+15 16 17 18 19 20 21 13 14 15 16 17 18 19 10 11 12 13 14 15 16
+22 23 24 25 26 27 28 20 21 22 23 24 25 26 17 18 19 20 21 22 23
+29 30 27 28 29 30 31 24 25 26 27 28 29 30
+ 31
+ February 2010 March 2010 April 2010
+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 5 6 1 2 3
+ 7 8 9 10 11 12 13 7 8 9 10 11 12 13 4 5 6 7 8 9 10
+14 15 16 17 18 19 20 14 15 16 17 18 19 20 11 12 13 14 15 16 17
+21 22 23 24 25 26 27 21 22 23 24 25 26 27 18 19 20 21 22 23 24
+28 28 29 30 31 25 26 27 28 29 30
+
+ May 2010 June 2010 July 2010
+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 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
+ August 2010 September 2010 October 2010
+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
+ November 2010 December 2010 January 2011
+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 31 23 24 25 26 27 28 29
+ 30 31
+ February 2011 March 2011 April 2011
+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 3 4 5 1 2
+ 6 7 8 9 10 11 12 6 7 8 9 10 11 12 3 4 5 6 7 8 9
+13 14 15 16 17 18 19 13 14 15 16 17 18 19 10 11 12 13 14 15 16
+20 21 22 23 24 25 26 20 21 22 23 24 25 26 17 18 19 20 21 22 23
+27 28 27 28 29 30 31 24 25 26 27 28 29 30
+
+ May 2011 June 2011 July 2011
+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
+ August 2011 September 2011 October 2011
+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 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
+ November 2011 December 2011 January 2012
+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 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
+
+ February 2012 March 2012 April 2012
+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 3 1 2 3 4 5 6 7
+ 5 6 7 8 9 10 11 4 5 6 7 8 9 10 8 9 10 11 12 13 14
+12 13 14 15 16 17 18 11 12 13 14 15 16 17 15 16 17 18 19 20 21
+19 20 21 22 23 24 25 18 19 20 21 22 23 24 22 23 24 25 26 27 28
+26 27 28 29 25 26 27 28 29 30 31 29 30
+
+ May 2012 June 2012 July 2012
+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
+
+ August 2012 September 2012 October 2012
+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
+ 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13
+12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20
+19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27
+26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
+ 30
+ November 2012 December 2012 January 2013
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 1 2 3 4 5
+ 4 5 6 7 8 9 10 2 3 4 5 6 7 8 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 9 10 11 12 13 14 15 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 16 17 18 19 20 21 22 20 21 22 23 24 25 26
+25 26 27 28 29 30 23 24 25 26 27 28 29 27 28 29 30 31
+ 30 31
+ February 2013 March 2013 April 2013
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 2 1 2 3 4 5 6
+ 3 4 5 6 7 8 9 3 4 5 6 7 8 9 7 8 9 10 11 12 13
+10 11 12 13 14 15 16 10 11 12 13 14 15 16 14 15 16 17 18 19 20
+17 18 19 20 21 22 23 17 18 19 20 21 22 23 21 22 23 24 25 26 27
+24 25 26 27 28 24 25 26 27 28 29 30 28 29 30
+ 31
+ May 2013 June 2013 July 2013
+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
+ 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13
+12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20
+19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27
+26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
+ 30
+ August 2013 September 2013 October 2013
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5
+ 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26
+25 26 27 28 29 30 31 29 30 27 28 29 30 31
+
+ November 2013 December 2013 January 2014
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 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 31
+
+ February 2014 March 2014 April 2014
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 1 1 2 3 4 5
+ 2 3 4 5 6 7 8 2 3 4 5 6 7 8 6 7 8 9 10 11 12
+ 9 10 11 12 13 14 15 9 10 11 12 13 14 15 13 14 15 16 17 18 19
+16 17 18 19 20 21 22 16 17 18 19 20 21 22 20 21 22 23 24 25 26
+23 24 25 26 27 28 23 24 25 26 27 28 29 27 28 29 30
+ 30 31
+ May 2014 June 2014 July 2014
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5
+ 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26
+25 26 27 28 29 30 31 29 30 27 28 29 30 31
+
+ August 2014 September 2014 October 2014
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 2 3 4 5 6 1 2 3 4
+ 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11
+10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18
+17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25
+24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31
+31
+ November 2014 December 2014 January 2015
+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 31
+30
diff --git a/tests/expected/cal/month-Sn21 b/tests/expected/cal/month-Sn21
new file mode 100644
index 0000000..128975f
--- /dev/null
+++ b/tests/expected/cal/month-Sn21
@@ -0,0 +1,57 @@
+Large span
+ November 2005 December 2005 January 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 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
+
+ February 2006 March 2006 April 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 1 2 3 4 1
+ 5 6 7 8 9 10 11 5 6 7 8 9 10 11 2 3 4 5 6 7 8
+12 13 14 15 16 17 18 12 13 14 15 16 17 18 9 10 11 12 13 14 15
+19 20 21 22 23 24 25 19 20 21 22 23 24 25 16 17 18 19 20 21 22
+26 27 28 26 27 28 29 30 31 23 24 25 26 27 28 29
+ 30
+ May 2006 June 2006 July 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 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
+ 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
+
+ November 2006 December 2006 January 2007
+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
+ February 2007 March 2007 April 2007
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 1 2 3 4 5 6 7
+ 4 5 6 7 8 9 10 4 5 6 7 8 9 10 8 9 10 11 12 13 14
+11 12 13 14 15 16 17 11 12 13 14 15 16 17 15 16 17 18 19 20 21
+18 19 20 21 22 23 24 18 19 20 21 22 23 24 22 23 24 25 26 27 28
+25 26 27 28 25 26 27 28 29 30 31 29 30
+
+ May 2007 June 2007 July 2007
+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
+
diff --git a/tests/expected/cal/month-Sn3 b/tests/expected/cal/month-Sn3
new file mode 100644
index 0000000..0f03e03
--- /dev/null
+++ b/tests/expected/cal/month-Sn3
@@ -0,0 +1,9 @@
+Normal span
+ 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
+
diff --git a/tests/expected/cal/month-Sn51 b/tests/expected/cal/month-Sn51
new file mode 100644
index 0000000..f899b44
--- /dev/null
+++ b/tests/expected/cal/month-Sn51
@@ -0,0 +1,137 @@
+Very Large span
+ August 2004 September 2004 October 2004
+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
+ November 2004 December 2004 January 2005
+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 31 23 24 25 26 27 28 29
+ 30 31
+ February 2005 March 2005 April 2005
+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 3 4 5 1 2
+ 6 7 8 9 10 11 12 6 7 8 9 10 11 12 3 4 5 6 7 8 9
+13 14 15 16 17 18 19 13 14 15 16 17 18 19 10 11 12 13 14 15 16
+20 21 22 23 24 25 26 20 21 22 23 24 25 26 17 18 19 20 21 22 23
+27 28 27 28 29 30 31 24 25 26 27 28 29 30
+
+ May 2005 June 2005 July 2005
+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
+ August 2005 September 2005 October 2005
+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 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
+ November 2005 December 2005 January 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 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
+
+ February 2006 March 2006 April 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 1 2 3 4 1
+ 5 6 7 8 9 10 11 5 6 7 8 9 10 11 2 3 4 5 6 7 8
+12 13 14 15 16 17 18 12 13 14 15 16 17 18 9 10 11 12 13 14 15
+19 20 21 22 23 24 25 19 20 21 22 23 24 25 16 17 18 19 20 21 22
+26 27 28 26 27 28 29 30 31 23 24 25 26 27 28 29
+ 30
+ May 2006 June 2006 July 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 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
+ 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
+
+ November 2006 December 2006 January 2007
+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
+ February 2007 March 2007 April 2007
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 1 2 3 4 5 6 7
+ 4 5 6 7 8 9 10 4 5 6 7 8 9 10 8 9 10 11 12 13 14
+11 12 13 14 15 16 17 11 12 13 14 15 16 17 15 16 17 18 19 20 21
+18 19 20 21 22 23 24 18 19 20 21 22 23 24 22 23 24 25 26 27 28
+25 26 27 28 25 26 27 28 29 30 31 29 30
+
+ May 2007 June 2007 July 2007
+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
+
+ August 2007 September 2007 October 2007
+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
+ 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13
+12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20
+19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27
+26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
+ 30
+ November 2007 December 2007 January 2008
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 1 2 3 4 5
+ 4 5 6 7 8 9 10 2 3 4 5 6 7 8 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 9 10 11 12 13 14 15 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 16 17 18 19 20 21 22 20 21 22 23 24 25 26
+25 26 27 28 29 30 23 24 25 26 27 28 29 27 28 29 30 31
+ 30 31
+ February 2008 March 2008 April 2008
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 1 2 3 4 5
+ 3 4 5 6 7 8 9 2 3 4 5 6 7 8 6 7 8 9 10 11 12
+10 11 12 13 14 15 16 9 10 11 12 13 14 15 13 14 15 16 17 18 19
+17 18 19 20 21 22 23 16 17 18 19 20 21 22 20 21 22 23 24 25 26
+24 25 26 27 28 29 23 24 25 26 27 28 29 27 28 29 30
+ 30 31
+ May 2008 June 2008 July 2008
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5
+ 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12
+11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19
+18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26
+25 26 27 28 29 30 31 29 30 27 28 29 30 31
+
+ August 2008 September 2008 October 2008
+Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+ 1 2 1 2 3 4 5 6 1 2 3 4
+ 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11
+10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18
+17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25
+24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31
+31
diff --git a/tests/expected/cal/sep1752-1m-month b/tests/expected/cal/sep1752-1m-month
new file mode 100644
index 0000000..d2815bc
--- /dev/null
+++ b/tests/expected/cal/sep1752-1m-month
@@ -0,0 +1,9 @@
+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
+
+
+
diff --git a/tests/expected/cal/sep1752-1m-year b/tests/expected/cal/sep1752-1m-year
new file mode 100644
index 0000000..305a547
--- /dev/null
+++ b/tests/expected/cal/sep1752-1m-year
@@ -0,0 +1,9 @@
+Gregorian - Monday-based year
+ January 1752
+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
+
diff --git a/tests/expected/cal/sep1752-1mj-month b/tests/expected/cal/sep1752-1mj-month
new file mode 100644
index 0000000..e62da4d
--- /dev/null
+++ b/tests/expected/cal/sep1752-1mj-month
@@ -0,0 +1,9 @@
+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
+
+
+
diff --git a/tests/expected/cal/sep1752-1mj-year b/tests/expected/cal/sep1752-1mj-year
new file mode 100644
index 0000000..b107e42
--- /dev/null
+++ b/tests/expected/cal/sep1752-1mj-year
@@ -0,0 +1,9 @@
+Julian - Monday-based year
+ January 1752
+Mon Tue Wed Thu Fri Sat Sun
+ 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
+
diff --git a/tests/expected/cal/sep1752-1mjw-month b/tests/expected/cal/sep1752-1mjw-month
new file mode 100644
index 0000000..e9bd0e9
--- /dev/null
+++ b/tests/expected/cal/sep1752-1mjw-month
@@ -0,0 +1,9 @@
+Julian - Monday-based month with week numbers
+ September 1752
+ Mon Tue Wed Thu Fri Sat Sun
+36 245 246 258 259 260 261
+37 262 263 264 265 266 267 268
+38 269 270 271 272 273 274
+
+
+
diff --git a/tests/expected/cal/sep1752-1mjw-year b/tests/expected/cal/sep1752-1mjw-year
new file mode 100644
index 0000000..bab6c78
--- /dev/null
+++ b/tests/expected/cal/sep1752-1mjw-year
@@ -0,0 +1,9 @@
+Julian - Monday-based year with week numbers
+ January 1752
+ Mon Tue Wed Thu Fri Sat Sun
+ 1 1 2 3 4 5
+ 2 6 7 8 9 10 11 12
+ 3 13 14 15 16 17 18 19
+ 4 20 21 22 23 24 25 26
+ 5 27 28 29 30 31
+
diff --git a/tests/expected/cal/sep1752-1mw-month b/tests/expected/cal/sep1752-1mw-month
new file mode 100644
index 0000000..3195ff0
--- /dev/null
+++ b/tests/expected/cal/sep1752-1mw-month
@@ -0,0 +1,9 @@
+Gregorian - Monday-based month with week numbers
+ September 1752
+ Mo Tu We Th Fr Sa Su
+36 1 2 14 15 16 17
+37 18 19 20 21 22 23 24
+38 25 26 27 28 29 30
+
+
+
diff --git a/tests/expected/cal/sep1752-1mw-year b/tests/expected/cal/sep1752-1mw-year
new file mode 100644
index 0000000..a039ebc
--- /dev/null
+++ b/tests/expected/cal/sep1752-1mw-year
@@ -0,0 +1,9 @@
+Gregorian - Monday-based year with week numbers
+ January 1752
+ Mo Tu We Th Fr Sa Su
+ 1 1 2 3 4 5
+ 2 6 7 8 9 10 11 12
+ 3 13 14 15 16 17 18 19
+ 4 20 21 22 23 24 25 26
+ 5 27 28 29 30 31
+
diff --git a/tests/expected/cal/sep1752-1s-month b/tests/expected/cal/sep1752-1s-month
new file mode 100644
index 0000000..07472ac
--- /dev/null
+++ b/tests/expected/cal/sep1752-1s-month
@@ -0,0 +1,9 @@
+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
+
+
+
diff --git a/tests/expected/cal/sep1752-1s-year b/tests/expected/cal/sep1752-1s-year
new file mode 100644
index 0000000..e6a5da3
--- /dev/null
+++ b/tests/expected/cal/sep1752-1s-year
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based year
+ January 1752
+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
+
diff --git a/tests/expected/cal/sep1752-1sj-month b/tests/expected/cal/sep1752-1sj-month
new file mode 100644
index 0000000..b6fb6d9
--- /dev/null
+++ b/tests/expected/cal/sep1752-1sj-month
@@ -0,0 +1,9 @@
+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
+
+
+
diff --git a/tests/expected/cal/sep1752-1sj-year b/tests/expected/cal/sep1752-1sj-year
new file mode 100644
index 0000000..b932fe7
--- /dev/null
+++ b/tests/expected/cal/sep1752-1sj-year
@@ -0,0 +1,9 @@
+Julian - Sunday-based year
+ January 1752
+Sun Mon Tue Wed Thu Fri Sat
+ 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
+
diff --git a/tests/expected/cal/sep1752-1sjw-month b/tests/expected/cal/sep1752-1sjw-month
new file mode 100644
index 0000000..45052d4
--- /dev/null
+++ b/tests/expected/cal/sep1752-1sjw-month
@@ -0,0 +1,9 @@
+Julian - Sunday-based month with week numbers
+ September 1752
+ Sun Mon Tue Wed Thu Fri Sat
+36 245 246 258 259 260
+37 261 262 263 264 265 266 267
+38 268 269 270 271 272 273 274
+
+
+
diff --git a/tests/expected/cal/sep1752-1sjw-year b/tests/expected/cal/sep1752-1sjw-year
new file mode 100644
index 0000000..fb59860
--- /dev/null
+++ b/tests/expected/cal/sep1752-1sjw-year
@@ -0,0 +1,9 @@
+Julian - Sunday-based year with week numbers
+ January 1752
+ Sun Mon Tue Wed Thu Fri Sat
+ 1 1 2 3 4
+ 2 5 6 7 8 9 10 11
+ 3 12 13 14 15 16 17 18
+ 4 19 20 21 22 23 24 25
+ 5 26 27 28 29 30 31
+
diff --git a/tests/expected/cal/sep1752-1sw-month b/tests/expected/cal/sep1752-1sw-month
new file mode 100644
index 0000000..24e3c06
--- /dev/null
+++ b/tests/expected/cal/sep1752-1sw-month
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based month with week numbers
+ September 1752
+ Su Mo Tu We Th Fr Sa
+36 1 2 14 15 16
+37 17 18 19 20 21 22 23
+38 24 25 26 27 28 29 30
+
+
+
diff --git a/tests/expected/cal/sep1752-1sw-year b/tests/expected/cal/sep1752-1sw-year
new file mode 100644
index 0000000..7583db3
--- /dev/null
+++ b/tests/expected/cal/sep1752-1sw-year
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based year with week numbers
+ January 1752
+ Su Mo Tu We Th Fr Sa
+ 1 1 2 3 4
+ 2 5 6 7 8 9 10 11
+ 3 12 13 14 15 16 17 18
+ 4 19 20 21 22 23 24 25
+ 5 26 27 28 29 30 31
+
diff --git a/tests/expected/cal/sep1752-3m-month b/tests/expected/cal/sep1752-3m-month
new file mode 100644
index 0000000..67bfa64
--- /dev/null
+++ b/tests/expected/cal/sep1752-3m-month
@@ -0,0 +1,9 @@
+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
diff --git a/tests/expected/cal/sep1752-3mj-month b/tests/expected/cal/sep1752-3mj-month
new file mode 100644
index 0000000..83b91ee
--- /dev/null
+++ b/tests/expected/cal/sep1752-3mj-month
@@ -0,0 +1,9 @@
+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
diff --git a/tests/expected/cal/sep1752-3mjw-month b/tests/expected/cal/sep1752-3mjw-month
new file mode 100644
index 0000000..4ec9b93
--- /dev/null
+++ b/tests/expected/cal/sep1752-3mjw-month
@@ -0,0 +1,9 @@
+Julian - Monday-based three months with week numbers
+ 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
+31 214 215 36 245 246 258 259 260 261 38 275
+32 216 217 218 219 220 221 222 37 262 263 264 265 266 267 268 39 276 277 278 279 280 281 282
+33 223 224 225 226 227 228 229 38 269 270 271 272 273 274 40 283 284 285 286 287 288 289
+34 230 231 232 233 234 235 236 41 290 291 292 293 294 295 296
+35 237 238 239 240 241 242 243 42 297 298 299 300 301 302 303
+36 244 43 304 305
diff --git a/tests/expected/cal/sep1752-3mw-month b/tests/expected/cal/sep1752-3mw-month
new file mode 100644
index 0000000..0e5d844
--- /dev/null
+++ b/tests/expected/cal/sep1752-3mw-month
@@ -0,0 +1,9 @@
+Gregorian - Monday-based three months with week numbers
+ 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
+31 1 2 36 1 2 14 15 16 17 38 1
+32 3 4 5 6 7 8 9 37 18 19 20 21 22 23 24 39 2 3 4 5 6 7 8
+33 10 11 12 13 14 15 16 38 25 26 27 28 29 30 40 9 10 11 12 13 14 15
+34 17 18 19 20 21 22 23 41 16 17 18 19 20 21 22
+35 24 25 26 27 28 29 30 42 23 24 25 26 27 28 29
+36 31 43 30 31
diff --git a/tests/expected/cal/sep1752-3s-month b/tests/expected/cal/sep1752-3s-month
new file mode 100644
index 0000000..cdf504b
--- /dev/null
+++ b/tests/expected/cal/sep1752-3s-month
@@ -0,0 +1,9 @@
+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
diff --git a/tests/expected/cal/sep1752-3sj-month b/tests/expected/cal/sep1752-3sj-month
new file mode 100644
index 0000000..4171e58
--- /dev/null
+++ b/tests/expected/cal/sep1752-3sj-month
@@ -0,0 +1,9 @@
+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
diff --git a/tests/expected/cal/sep1752-3sjw-month b/tests/expected/cal/sep1752-3sjw-month
new file mode 100644
index 0000000..187d382
--- /dev/null
+++ b/tests/expected/cal/sep1752-3sjw-month
@@ -0,0 +1,9 @@
+Julian - Sunday-based three months with week numbers
+ 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
+31 214 36 245 246 258 259 260 39 275 276 277 278 279 280 281
+32 215 216 217 218 219 220 221 37 261 262 263 264 265 266 267 40 282 283 284 285 286 287 288
+33 222 223 224 225 226 227 228 38 268 269 270 271 272 273 274 41 289 290 291 292 293 294 295
+34 229 230 231 232 233 234 235 42 296 297 298 299 300 301 302
+35 236 237 238 239 240 241 242 43 303 304 305
+36 243 244
diff --git a/tests/expected/cal/sep1752-3sw-month b/tests/expected/cal/sep1752-3sw-month
new file mode 100644
index 0000000..c7c2986
--- /dev/null
+++ b/tests/expected/cal/sep1752-3sw-month
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based three months with week numbers
+ 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
+31 1 36 1 2 14 15 16 39 1 2 3 4 5 6 7
+32 2 3 4 5 6 7 8 37 17 18 19 20 21 22 23 40 8 9 10 11 12 13 14
+33 9 10 11 12 13 14 15 38 24 25 26 27 28 29 30 41 15 16 17 18 19 20 21
+34 16 17 18 19 20 21 22 42 22 23 24 25 26 27 28
+35 23 24 25 26 27 28 29 43 29 30 31
+36 30 31
diff --git a/tests/expected/cal/sep1752-week-iso b/tests/expected/cal/sep1752-week-iso
new file mode 100644
index 0000000..18d0160
--- /dev/null
+++ b/tests/expected/cal/sep1752-week-iso
@@ -0,0 +1,9 @@
+Gregorian - address by week number
+ September 1752
+ Su Mo Tu We Th Fr Sa
+36 1 2
+37 3 4 5 6 7 8 9
+38 10 11 12 13 14 15 16
+39 17 18 19 20 21 22 23
+40 24 25 26 27 28 29 30
+
diff --git a/tests/expected/cal/vertical-1mjv b/tests/expected/cal/vertical-1mjv
new file mode 100644
index 0000000..f9ac2d1
--- /dev/null
+++ b/tests/expected/cal/vertical-1mjv
@@ -0,0 +1,9 @@
+Julian - Monday-based week
+ September 2006
+Mon 247 254 261 268
+Tue 248 255 262 269
+Wed 249 256 263 270
+Thu 250 257 264 271
+Fri 244 251 258 265 272
+Sat 245 252 259 266 273
+Sun 246 253 260 267
diff --git a/tests/expected/cal/vertical-1mjwv b/tests/expected/cal/vertical-1mjwv
new file mode 100644
index 0000000..dcb6fe9
--- /dev/null
+++ b/tests/expected/cal/vertical-1mjwv
@@ -0,0 +1,10 @@
+Julian - Monday-based week with week numbers
+ September 2006
+Mon 247 254 261 268
+Tue 248 255 262 269
+Wed 249 256 263 270
+Thu 250 257 264 271
+Fri 244 251 258 265 272
+Sat 245 252 259 266 273
+Sun 246 253 260 267
+ 35 36 37 38 39
diff --git a/tests/expected/cal/vertical-1mv b/tests/expected/cal/vertical-1mv
new file mode 100644
index 0000000..9a2780e
--- /dev/null
+++ b/tests/expected/cal/vertical-1mv
@@ -0,0 +1,9 @@
+Gregorian - Monday-based week
+ September 2006
+Mo 4 11 18 25
+Tu 5 12 19 26
+We 6 13 20 27
+Th 7 14 21 28
+Fr 1 8 15 22 29
+Sa 2 9 16 23 30
+Su 3 10 17 24
diff --git a/tests/expected/cal/vertical-1mwv b/tests/expected/cal/vertical-1mwv
new file mode 100644
index 0000000..89f5f1d
--- /dev/null
+++ b/tests/expected/cal/vertical-1mwv
@@ -0,0 +1,10 @@
+Gregorian - Monday-based week with week numbers
+ September 2006
+Mo 4 11 18 25
+Tu 5 12 19 26
+We 6 13 20 27
+Th 7 14 21 28
+Fr 1 8 15 22 29
+Sa 2 9 16 23 30
+Su 3 10 17 24
+ 35 36 37 38 39
diff --git a/tests/expected/cal/vertical-1sjv b/tests/expected/cal/vertical-1sjv
new file mode 100644
index 0000000..81f856a
--- /dev/null
+++ b/tests/expected/cal/vertical-1sjv
@@ -0,0 +1,9 @@
+Julian - Sunday-based week
+ September 2006
+Sun 246 253 260 267
+Mon 247 254 261 268
+Tue 248 255 262 269
+Wed 249 256 263 270
+Thu 250 257 264 271
+Fri 244 251 258 265 272
+Sat 245 252 259 266 273
diff --git a/tests/expected/cal/vertical-1sjwv b/tests/expected/cal/vertical-1sjwv
new file mode 100644
index 0000000..65cdadc
--- /dev/null
+++ b/tests/expected/cal/vertical-1sjwv
@@ -0,0 +1,10 @@
+Julian - Sunday-based week with week numbers
+ September 2006
+Sun 246 253 260 267
+Mon 247 254 261 268
+Tue 248 255 262 269
+Wed 249 256 263 270
+Thu 250 257 264 271
+Fri 244 251 258 265 272
+Sat 245 252 259 266 273
+ 35 36 37 38 39
diff --git a/tests/expected/cal/vertical-1sv b/tests/expected/cal/vertical-1sv
new file mode 100644
index 0000000..2e334a3
--- /dev/null
+++ b/tests/expected/cal/vertical-1sv
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based week
+ September 2006
+Su 3 10 17 24
+Mo 4 11 18 25
+Tu 5 12 19 26
+We 6 13 20 27
+Th 7 14 21 28
+Fr 1 8 15 22 29
+Sa 2 9 16 23 30
diff --git a/tests/expected/cal/vertical-1swv b/tests/expected/cal/vertical-1swv
new file mode 100644
index 0000000..8fc7e3e
--- /dev/null
+++ b/tests/expected/cal/vertical-1swv
@@ -0,0 +1,10 @@
+Gregorian - Sunday-based week with week numbers
+ September 2006
+Su 3 10 17 24
+Mo 4 11 18 25
+Tu 5 12 19 26
+We 6 13 20 27
+Th 7 14 21 28
+Fr 1 8 15 22 29
+Sa 2 9 16 23 30
+ 35 36 37 38 39
diff --git a/tests/expected/cal/vertical-3mjv b/tests/expected/cal/vertical-3mjv
new file mode 100644
index 0000000..f67791d
--- /dev/null
+++ b/tests/expected/cal/vertical-3mjv
@@ -0,0 +1,9 @@
+Julian - Monday-based week
+ December 2017 January 2018 February 2018
+Mon 338 345 352 359 1 8 15 22 29 36 43 50 57
+Tue 339 346 353 360 2 9 16 23 30 37 44 51 58
+Wed 340 347 354 361 3 10 17 24 31 38 45 52 59
+Thu 341 348 355 362 4 11 18 25 32 39 46 53
+Fri 335 342 349 356 363 5 12 19 26 33 40 47 54
+Sat 336 343 350 357 364 6 13 20 27 34 41 48 55
+Sun 337 344 351 358 365 7 14 21 28 35 42 49 56
diff --git a/tests/expected/cal/vertical-3mjwv b/tests/expected/cal/vertical-3mjwv
new file mode 100644
index 0000000..aaf8ee6
--- /dev/null
+++ b/tests/expected/cal/vertical-3mjwv
@@ -0,0 +1,10 @@
+Julian - Monday-based week with week numbers
+ August 2006 September 2006 October 2006
+Mon 219 226 233 240 247 254 261 268 275 282 289 296 303
+Tue 213 220 227 234 241 248 255 262 269 276 283 290 297 304
+Wed 214 221 228 235 242 249 256 263 270 277 284 291 298
+Thu 215 222 229 236 243 250 257 264 271 278 285 292 299
+Fri 216 223 230 237 244 251 258 265 272 279 286 293 300
+Sat 217 224 231 238 245 252 259 266 273 280 287 294 301
+Sun 218 225 232 239 246 253 260 267 274 281 288 295 302
+ 31 32 33 34 35 35 36 37 38 39 39 40 41 42 43 44
diff --git a/tests/expected/cal/vertical-3mv b/tests/expected/cal/vertical-3mv
new file mode 100644
index 0000000..fec2d06
--- /dev/null
+++ b/tests/expected/cal/vertical-3mv
@@ -0,0 +1,9 @@
+Gregorian - Monday-based week
+ August 2006 September 2006 October 2006
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
diff --git a/tests/expected/cal/vertical-3mwv b/tests/expected/cal/vertical-3mwv
new file mode 100644
index 0000000..63bcc1c
--- /dev/null
+++ b/tests/expected/cal/vertical-3mwv
@@ -0,0 +1,10 @@
+Gregorian - Monday-based week with week numbers
+ August 2006 September 2006 October 2006
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+ 31 32 33 34 35 35 36 37 38 39 39 40 41 42 43 44
diff --git a/tests/expected/cal/vertical-3sjv b/tests/expected/cal/vertical-3sjv
new file mode 100644
index 0000000..dcb6bd4
--- /dev/null
+++ b/tests/expected/cal/vertical-3sjv
@@ -0,0 +1,9 @@
+Julian - Sunday-based week
+ August 2006 September 2006 October 2006
+Sun 218 225 232 239 246 253 260 267 274 281 288 295 302
+Mon 219 226 233 240 247 254 261 268 275 282 289 296 303
+Tue 213 220 227 234 241 248 255 262 269 276 283 290 297 304
+Wed 214 221 228 235 242 249 256 263 270 277 284 291 298
+Thu 215 222 229 236 243 250 257 264 271 278 285 292 299
+Fri 216 223 230 237 244 251 258 265 272 279 286 293 300
+Sat 217 224 231 238 245 252 259 266 273 280 287 294 301
diff --git a/tests/expected/cal/vertical-3sjwv b/tests/expected/cal/vertical-3sjwv
new file mode 100644
index 0000000..7c2a2d1
--- /dev/null
+++ b/tests/expected/cal/vertical-3sjwv
@@ -0,0 +1,10 @@
+Julian - Sunday-based week with week numbers
+ August 2006 September 2006 October 2006
+Sun 218 225 232 239 246 253 260 267 274 281 288 295 302
+Mon 219 226 233 240 247 254 261 268 275 282 289 296 303
+Tue 213 220 227 234 241 248 255 262 269 276 283 290 297 304
+Wed 214 221 228 235 242 249 256 263 270 277 284 291 298
+Thu 215 222 229 236 243 250 257 264 271 278 285 292 299
+Fri 216 223 230 237 244 251 258 265 272 279 286 293 300
+Sat 217 224 231 238 245 252 259 266 273 280 287 294 301
+ 31 32 33 34 35 35 36 37 38 39 40 41 42 43 44
diff --git a/tests/expected/cal/vertical-3sv b/tests/expected/cal/vertical-3sv
new file mode 100644
index 0000000..f0133f9
--- /dev/null
+++ b/tests/expected/cal/vertical-3sv
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based week
+ August 2006 September 2006 October 2006
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
diff --git a/tests/expected/cal/vertical-3swv b/tests/expected/cal/vertical-3swv
new file mode 100644
index 0000000..5acb5da
--- /dev/null
+++ b/tests/expected/cal/vertical-3swv
@@ -0,0 +1,10 @@
+Gregorian - Sunday-based week with week numbers
+ August 2006 September 2006 October 2006
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+ 31 32 33 34 35 35 36 37 38 39 40 41 42 43 44
diff --git a/tests/expected/cal/vertical-vSn201 b/tests/expected/cal/vertical-vSn201
new file mode 100644
index 0000000..b9271ad
--- /dev/null
+++ b/tests/expected/cal/vertical-vSn201
@@ -0,0 +1,603 @@
+Extreme span
+ May 1998 June 1998 July 1998
+Su 3 10 17 24 31 7 14 21 28 5 12 19 26
+Mo 4 11 18 25 1 8 15 22 29 6 13 20 27
+Tu 5 12 19 26 2 9 16 23 30 7 14 21 28
+We 6 13 20 27 3 10 17 24 1 8 15 22 29
+Th 7 14 21 28 4 11 18 25 2 9 16 23 30
+Fr 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Sa 2 9 16 23 30 6 13 20 27 4 11 18 25
+
+ August 1998 September 1998 October 1998
+Su 2 9 16 23 30 6 13 20 27 4 11 18 25
+Mo 3 10 17 24 31 7 14 21 28 5 12 19 26
+Tu 4 11 18 25 1 8 15 22 29 6 13 20 27
+We 5 12 19 26 2 9 16 23 30 7 14 21 28
+Th 6 13 20 27 3 10 17 24 1 8 15 22 29
+Fr 7 14 21 28 4 11 18 25 2 9 16 23 30
+Sa 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+
+ November 1998 December 1998 January 1999
+Su 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Mo 2 9 16 23 30 7 14 21 28 4 11 18 25
+Tu 3 10 17 24 1 8 15 22 29 5 12 19 26
+We 4 11 18 25 2 9 16 23 30 6 13 20 27
+Th 5 12 19 26 3 10 17 24 31 7 14 21 28
+Fr 6 13 20 27 4 11 18 25 1 8 15 22 29
+Sa 7 14 21 28 5 12 19 26 2 9 16 23 30
+
+ February 1999 March 1999 April 1999
+Su 7 14 21 28 7 14 21 28 4 11 18 25
+Mo 1 8 15 22 1 8 15 22 29 5 12 19 26
+Tu 2 9 16 23 2 9 16 23 30 6 13 20 27
+We 3 10 17 24 3 10 17 24 31 7 14 21 28
+Th 4 11 18 25 4 11 18 25 1 8 15 22 29
+Fr 5 12 19 26 5 12 19 26 2 9 16 23 30
+Sa 6 13 20 27 6 13 20 27 3 10 17 24
+
+ May 1999 June 1999 July 1999
+Su 2 9 16 23 30 6 13 20 27 4 11 18 25
+Mo 3 10 17 24 31 7 14 21 28 5 12 19 26
+Tu 4 11 18 25 1 8 15 22 29 6 13 20 27
+We 5 12 19 26 2 9 16 23 30 7 14 21 28
+Th 6 13 20 27 3 10 17 24 1 8 15 22 29
+Fr 7 14 21 28 4 11 18 25 2 9 16 23 30
+Sa 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+
+ August 1999 September 1999 October 1999
+Su 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Mo 2 9 16 23 30 6 13 20 27 4 11 18 25
+Tu 3 10 17 24 31 7 14 21 28 5 12 19 26
+We 4 11 18 25 1 8 15 22 29 6 13 20 27
+Th 5 12 19 26 2 9 16 23 30 7 14 21 28
+Fr 6 13 20 27 3 10 17 24 1 8 15 22 29
+Sa 7 14 21 28 4 11 18 25 2 9 16 23 30
+
+ November 1999 December 1999 January 2000
+Su 7 14 21 28 5 12 19 26 2 9 16 23 30
+Mo 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Tu 2 9 16 23 30 7 14 21 28 4 11 18 25
+We 3 10 17 24 1 8 15 22 29 5 12 19 26
+Th 4 11 18 25 2 9 16 23 30 6 13 20 27
+Fr 5 12 19 26 3 10 17 24 31 7 14 21 28
+Sa 6 13 20 27 4 11 18 25 1 8 15 22 29
+
+ February 2000 March 2000 April 2000
+Su 6 13 20 27 5 12 19 26 2 9 16 23 30
+Mo 7 14 21 28 6 13 20 27 3 10 17 24
+Tu 1 8 15 22 29 7 14 21 28 4 11 18 25
+We 2 9 16 23 1 8 15 22 29 5 12 19 26
+Th 3 10 17 24 2 9 16 23 30 6 13 20 27
+Fr 4 11 18 25 3 10 17 24 31 7 14 21 28
+Sa 5 12 19 26 4 11 18 25 1 8 15 22 29
+
+ May 2000 June 2000 July 2000
+Su 7 14 21 28 4 11 18 25 2 9 16 23 30
+Mo 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Tu 2 9 16 23 30 6 13 20 27 4 11 18 25
+We 3 10 17 24 31 7 14 21 28 5 12 19 26
+Th 4 11 18 25 1 8 15 22 29 6 13 20 27
+Fr 5 12 19 26 2 9 16 23 30 7 14 21 28
+Sa 6 13 20 27 3 10 17 24 1 8 15 22 29
+
+ August 2000 September 2000 October 2000
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+
+ November 2000 December 2000 January 2001
+Su 5 12 19 26 3 10 17 24 31 7 14 21 28
+Mo 6 13 20 27 4 11 18 25 1 8 15 22 29
+Tu 7 14 21 28 5 12 19 26 2 9 16 23 30
+We 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Th 2 9 16 23 30 7 14 21 28 4 11 18 25
+Fr 3 10 17 24 1 8 15 22 29 5 12 19 26
+Sa 4 11 18 25 2 9 16 23 30 6 13 20 27
+
+ February 2001 March 2001 April 2001
+Su 4 11 18 25 4 11 18 25 1 8 15 22 29
+Mo 5 12 19 26 5 12 19 26 2 9 16 23 30
+Tu 6 13 20 27 6 13 20 27 3 10 17 24
+We 7 14 21 28 7 14 21 28 4 11 18 25
+Th 1 8 15 22 1 8 15 22 29 5 12 19 26
+Fr 2 9 16 23 2 9 16 23 30 6 13 20 27
+Sa 3 10 17 24 3 10 17 24 31 7 14 21 28
+
+ May 2001 June 2001 July 2001
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+
+ August 2001 September 2001 October 2001
+Su 5 12 19 26 2 9 16 23 30 7 14 21 28
+Mo 6 13 20 27 3 10 17 24 1 8 15 22 29
+Tu 7 14 21 28 4 11 18 25 2 9 16 23 30
+We 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Th 2 9 16 23 30 6 13 20 27 4 11 18 25
+Fr 3 10 17 24 31 7 14 21 28 5 12 19 26
+Sa 4 11 18 25 1 8 15 22 29 6 13 20 27
+
+ November 2001 December 2001 January 2002
+Su 4 11 18 25 2 9 16 23 30 6 13 20 27
+Mo 5 12 19 26 3 10 17 24 31 7 14 21 28
+Tu 6 13 20 27 4 11 18 25 1 8 15 22 29
+We 7 14 21 28 5 12 19 26 2 9 16 23 30
+Th 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Fr 2 9 16 23 30 7 14 21 28 4 11 18 25
+Sa 3 10 17 24 1 8 15 22 29 5 12 19 26
+
+ February 2002 March 2002 April 2002
+Su 3 10 17 24 3 10 17 24 31 7 14 21 28
+Mo 4 11 18 25 4 11 18 25 1 8 15 22 29
+Tu 5 12 19 26 5 12 19 26 2 9 16 23 30
+We 6 13 20 27 6 13 20 27 3 10 17 24
+Th 7 14 21 28 7 14 21 28 4 11 18 25
+Fr 1 8 15 22 1 8 15 22 29 5 12 19 26
+Sa 2 9 16 23 2 9 16 23 30 6 13 20 27
+
+ May 2002 June 2002 July 2002
+Su 5 12 19 26 2 9 16 23 30 7 14 21 28
+Mo 6 13 20 27 3 10 17 24 1 8 15 22 29
+Tu 7 14 21 28 4 11 18 25 2 9 16 23 30
+We 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Th 2 9 16 23 30 6 13 20 27 4 11 18 25
+Fr 3 10 17 24 31 7 14 21 28 5 12 19 26
+Sa 4 11 18 25 1 8 15 22 29 6 13 20 27
+
+ August 2002 September 2002 October 2002
+Su 4 11 18 25 1 8 15 22 29 6 13 20 27
+Mo 5 12 19 26 2 9 16 23 30 7 14 21 28
+Tu 6 13 20 27 3 10 17 24 1 8 15 22 29
+We 7 14 21 28 4 11 18 25 2 9 16 23 30
+Th 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Fr 2 9 16 23 30 6 13 20 27 4 11 18 25
+Sa 3 10 17 24 31 7 14 21 28 5 12 19 26
+
+ November 2002 December 2002 January 2003
+Su 3 10 17 24 1 8 15 22 29 5 12 19 26
+Mo 4 11 18 25 2 9 16 23 30 6 13 20 27
+Tu 5 12 19 26 3 10 17 24 31 7 14 21 28
+We 6 13 20 27 4 11 18 25 1 8 15 22 29
+Th 7 14 21 28 5 12 19 26 2 9 16 23 30
+Fr 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Sa 2 9 16 23 30 7 14 21 28 4 11 18 25
+
+ February 2003 March 2003 April 2003
+Su 2 9 16 23 2 9 16 23 30 6 13 20 27
+Mo 3 10 17 24 3 10 17 24 31 7 14 21 28
+Tu 4 11 18 25 4 11 18 25 1 8 15 22 29
+We 5 12 19 26 5 12 19 26 2 9 16 23 30
+Th 6 13 20 27 6 13 20 27 3 10 17 24
+Fr 7 14 21 28 7 14 21 28 4 11 18 25
+Sa 1 8 15 22 1 8 15 22 29 5 12 19 26
+
+ May 2003 June 2003 July 2003
+Su 4 11 18 25 1 8 15 22 29 6 13 20 27
+Mo 5 12 19 26 2 9 16 23 30 7 14 21 28
+Tu 6 13 20 27 3 10 17 24 1 8 15 22 29
+We 7 14 21 28 4 11 18 25 2 9 16 23 30
+Th 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Fr 2 9 16 23 30 6 13 20 27 4 11 18 25
+Sa 3 10 17 24 31 7 14 21 28 5 12 19 26
+
+ August 2003 September 2003 October 2003
+Su 3 10 17 24 31 7 14 21 28 5 12 19 26
+Mo 4 11 18 25 1 8 15 22 29 6 13 20 27
+Tu 5 12 19 26 2 9 16 23 30 7 14 21 28
+We 6 13 20 27 3 10 17 24 1 8 15 22 29
+Th 7 14 21 28 4 11 18 25 2 9 16 23 30
+Fr 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Sa 2 9 16 23 30 6 13 20 27 4 11 18 25
+
+ November 2003 December 2003 January 2004
+Su 2 9 16 23 30 7 14 21 28 4 11 18 25
+Mo 3 10 17 24 1 8 15 22 29 5 12 19 26
+Tu 4 11 18 25 2 9 16 23 30 6 13 20 27
+We 5 12 19 26 3 10 17 24 31 7 14 21 28
+Th 6 13 20 27 4 11 18 25 1 8 15 22 29
+Fr 7 14 21 28 5 12 19 26 2 9 16 23 30
+Sa 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+
+ February 2004 March 2004 April 2004
+Su 1 8 15 22 29 7 14 21 28 4 11 18 25
+Mo 2 9 16 23 1 8 15 22 29 5 12 19 26
+Tu 3 10 17 24 2 9 16 23 30 6 13 20 27
+We 4 11 18 25 3 10 17 24 31 7 14 21 28
+Th 5 12 19 26 4 11 18 25 1 8 15 22 29
+Fr 6 13 20 27 5 12 19 26 2 9 16 23 30
+Sa 7 14 21 28 6 13 20 27 3 10 17 24
+
+ May 2004 June 2004 July 2004
+Su 2 9 16 23 30 6 13 20 27 4 11 18 25
+Mo 3 10 17 24 31 7 14 21 28 5 12 19 26
+Tu 4 11 18 25 1 8 15 22 29 6 13 20 27
+We 5 12 19 26 2 9 16 23 30 7 14 21 28
+Th 6 13 20 27 3 10 17 24 1 8 15 22 29
+Fr 7 14 21 28 4 11 18 25 2 9 16 23 30
+Sa 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+
+ August 2004 September 2004 October 2004
+Su 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Mo 2 9 16 23 30 6 13 20 27 4 11 18 25
+Tu 3 10 17 24 31 7 14 21 28 5 12 19 26
+We 4 11 18 25 1 8 15 22 29 6 13 20 27
+Th 5 12 19 26 2 9 16 23 30 7 14 21 28
+Fr 6 13 20 27 3 10 17 24 1 8 15 22 29
+Sa 7 14 21 28 4 11 18 25 2 9 16 23 30
+
+ November 2004 December 2004 January 2005
+Su 7 14 21 28 5 12 19 26 2 9 16 23 30
+Mo 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Tu 2 9 16 23 30 7 14 21 28 4 11 18 25
+We 3 10 17 24 1 8 15 22 29 5 12 19 26
+Th 4 11 18 25 2 9 16 23 30 6 13 20 27
+Fr 5 12 19 26 3 10 17 24 31 7 14 21 28
+Sa 6 13 20 27 4 11 18 25 1 8 15 22 29
+
+ February 2005 March 2005 April 2005
+Su 6 13 20 27 6 13 20 27 3 10 17 24
+Mo 7 14 21 28 7 14 21 28 4 11 18 25
+Tu 1 8 15 22 1 8 15 22 29 5 12 19 26
+We 2 9 16 23 2 9 16 23 30 6 13 20 27
+Th 3 10 17 24 3 10 17 24 31 7 14 21 28
+Fr 4 11 18 25 4 11 18 25 1 8 15 22 29
+Sa 5 12 19 26 5 12 19 26 2 9 16 23 30
+
+ May 2005 June 2005 July 2005
+Su 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Mo 2 9 16 23 30 6 13 20 27 4 11 18 25
+Tu 3 10 17 24 31 7 14 21 28 5 12 19 26
+We 4 11 18 25 1 8 15 22 29 6 13 20 27
+Th 5 12 19 26 2 9 16 23 30 7 14 21 28
+Fr 6 13 20 27 3 10 17 24 1 8 15 22 29
+Sa 7 14 21 28 4 11 18 25 2 9 16 23 30
+
+ August 2005 September 2005 October 2005
+Su 7 14 21 28 4 11 18 25 2 9 16 23 30
+Mo 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Tu 2 9 16 23 30 6 13 20 27 4 11 18 25
+We 3 10 17 24 31 7 14 21 28 5 12 19 26
+Th 4 11 18 25 1 8 15 22 29 6 13 20 27
+Fr 5 12 19 26 2 9 16 23 30 7 14 21 28
+Sa 6 13 20 27 3 10 17 24 1 8 15 22 29
+
+ November 2005 December 2005 January 2006
+Su 6 13 20 27 4 11 18 25 1 8 15 22 29
+Mo 7 14 21 28 5 12 19 26 2 9 16 23 30
+Tu 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+We 2 9 16 23 30 7 14 21 28 4 11 18 25
+Th 3 10 17 24 1 8 15 22 29 5 12 19 26
+Fr 4 11 18 25 2 9 16 23 30 6 13 20 27
+Sa 5 12 19 26 3 10 17 24 31 7 14 21 28
+
+ February 2006 March 2006 April 2006
+Su 5 12 19 26 5 12 19 26 2 9 16 23 30
+Mo 6 13 20 27 6 13 20 27 3 10 17 24
+Tu 7 14 21 28 7 14 21 28 4 11 18 25
+We 1 8 15 22 1 8 15 22 29 5 12 19 26
+Th 2 9 16 23 2 9 16 23 30 6 13 20 27
+Fr 3 10 17 24 3 10 17 24 31 7 14 21 28
+Sa 4 11 18 25 4 11 18 25 1 8 15 22 29
+
+ May 2006 June 2006 July 2006
+Su 7 14 21 28 4 11 18 25 2 9 16 23 30
+Mo 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Tu 2 9 16 23 30 6 13 20 27 4 11 18 25
+We 3 10 17 24 31 7 14 21 28 5 12 19 26
+Th 4 11 18 25 1 8 15 22 29 6 13 20 27
+Fr 5 12 19 26 2 9 16 23 30 7 14 21 28
+Sa 6 13 20 27 3 10 17 24 1 8 15 22 29
+
+ August 2006 September 2006 October 2006
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+
+ November 2006 December 2006 January 2007
+Su 5 12 19 26 3 10 17 24 31 7 14 21 28
+Mo 6 13 20 27 4 11 18 25 1 8 15 22 29
+Tu 7 14 21 28 5 12 19 26 2 9 16 23 30
+We 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Th 2 9 16 23 30 7 14 21 28 4 11 18 25
+Fr 3 10 17 24 1 8 15 22 29 5 12 19 26
+Sa 4 11 18 25 2 9 16 23 30 6 13 20 27
+
+ February 2007 March 2007 April 2007
+Su 4 11 18 25 4 11 18 25 1 8 15 22 29
+Mo 5 12 19 26 5 12 19 26 2 9 16 23 30
+Tu 6 13 20 27 6 13 20 27 3 10 17 24
+We 7 14 21 28 7 14 21 28 4 11 18 25
+Th 1 8 15 22 1 8 15 22 29 5 12 19 26
+Fr 2 9 16 23 2 9 16 23 30 6 13 20 27
+Sa 3 10 17 24 3 10 17 24 31 7 14 21 28
+
+ May 2007 June 2007 July 2007
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+
+ August 2007 September 2007 October 2007
+Su 5 12 19 26 2 9 16 23 30 7 14 21 28
+Mo 6 13 20 27 3 10 17 24 1 8 15 22 29
+Tu 7 14 21 28 4 11 18 25 2 9 16 23 30
+We 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Th 2 9 16 23 30 6 13 20 27 4 11 18 25
+Fr 3 10 17 24 31 7 14 21 28 5 12 19 26
+Sa 4 11 18 25 1 8 15 22 29 6 13 20 27
+
+ November 2007 December 2007 January 2008
+Su 4 11 18 25 2 9 16 23 30 6 13 20 27
+Mo 5 12 19 26 3 10 17 24 31 7 14 21 28
+Tu 6 13 20 27 4 11 18 25 1 8 15 22 29
+We 7 14 21 28 5 12 19 26 2 9 16 23 30
+Th 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Fr 2 9 16 23 30 7 14 21 28 4 11 18 25
+Sa 3 10 17 24 1 8 15 22 29 5 12 19 26
+
+ February 2008 March 2008 April 2008
+Su 3 10 17 24 2 9 16 23 30 6 13 20 27
+Mo 4 11 18 25 3 10 17 24 31 7 14 21 28
+Tu 5 12 19 26 4 11 18 25 1 8 15 22 29
+We 6 13 20 27 5 12 19 26 2 9 16 23 30
+Th 7 14 21 28 6 13 20 27 3 10 17 24
+Fr 1 8 15 22 29 7 14 21 28 4 11 18 25
+Sa 2 9 16 23 1 8 15 22 29 5 12 19 26
+
+ May 2008 June 2008 July 2008
+Su 4 11 18 25 1 8 15 22 29 6 13 20 27
+Mo 5 12 19 26 2 9 16 23 30 7 14 21 28
+Tu 6 13 20 27 3 10 17 24 1 8 15 22 29
+We 7 14 21 28 4 11 18 25 2 9 16 23 30
+Th 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Fr 2 9 16 23 30 6 13 20 27 4 11 18 25
+Sa 3 10 17 24 31 7 14 21 28 5 12 19 26
+
+ August 2008 September 2008 October 2008
+Su 3 10 17 24 31 7 14 21 28 5 12 19 26
+Mo 4 11 18 25 1 8 15 22 29 6 13 20 27
+Tu 5 12 19 26 2 9 16 23 30 7 14 21 28
+We 6 13 20 27 3 10 17 24 1 8 15 22 29
+Th 7 14 21 28 4 11 18 25 2 9 16 23 30
+Fr 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Sa 2 9 16 23 30 6 13 20 27 4 11 18 25
+
+ November 2008 December 2008 January 2009
+Su 2 9 16 23 30 7 14 21 28 4 11 18 25
+Mo 3 10 17 24 1 8 15 22 29 5 12 19 26
+Tu 4 11 18 25 2 9 16 23 30 6 13 20 27
+We 5 12 19 26 3 10 17 24 31 7 14 21 28
+Th 6 13 20 27 4 11 18 25 1 8 15 22 29
+Fr 7 14 21 28 5 12 19 26 2 9 16 23 30
+Sa 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+
+ February 2009 March 2009 April 2009
+Su 1 8 15 22 1 8 15 22 29 5 12 19 26
+Mo 2 9 16 23 2 9 16 23 30 6 13 20 27
+Tu 3 10 17 24 3 10 17 24 31 7 14 21 28
+We 4 11 18 25 4 11 18 25 1 8 15 22 29
+Th 5 12 19 26 5 12 19 26 2 9 16 23 30
+Fr 6 13 20 27 6 13 20 27 3 10 17 24
+Sa 7 14 21 28 7 14 21 28 4 11 18 25
+
+ May 2009 June 2009 July 2009
+Su 3 10 17 24 31 7 14 21 28 5 12 19 26
+Mo 4 11 18 25 1 8 15 22 29 6 13 20 27
+Tu 5 12 19 26 2 9 16 23 30 7 14 21 28
+We 6 13 20 27 3 10 17 24 1 8 15 22 29
+Th 7 14 21 28 4 11 18 25 2 9 16 23 30
+Fr 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Sa 2 9 16 23 30 6 13 20 27 4 11 18 25
+
+ August 2009 September 2009 October 2009
+Su 2 9 16 23 30 6 13 20 27 4 11 18 25
+Mo 3 10 17 24 31 7 14 21 28 5 12 19 26
+Tu 4 11 18 25 1 8 15 22 29 6 13 20 27
+We 5 12 19 26 2 9 16 23 30 7 14 21 28
+Th 6 13 20 27 3 10 17 24 1 8 15 22 29
+Fr 7 14 21 28 4 11 18 25 2 9 16 23 30
+Sa 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+
+ November 2009 December 2009 January 2010
+Su 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Mo 2 9 16 23 30 7 14 21 28 4 11 18 25
+Tu 3 10 17 24 1 8 15 22 29 5 12 19 26
+We 4 11 18 25 2 9 16 23 30 6 13 20 27
+Th 5 12 19 26 3 10 17 24 31 7 14 21 28
+Fr 6 13 20 27 4 11 18 25 1 8 15 22 29
+Sa 7 14 21 28 5 12 19 26 2 9 16 23 30
+
+ February 2010 March 2010 April 2010
+Su 7 14 21 28 7 14 21 28 4 11 18 25
+Mo 1 8 15 22 1 8 15 22 29 5 12 19 26
+Tu 2 9 16 23 2 9 16 23 30 6 13 20 27
+We 3 10 17 24 3 10 17 24 31 7 14 21 28
+Th 4 11 18 25 4 11 18 25 1 8 15 22 29
+Fr 5 12 19 26 5 12 19 26 2 9 16 23 30
+Sa 6 13 20 27 6 13 20 27 3 10 17 24
+
+ May 2010 June 2010 July 2010
+Su 2 9 16 23 30 6 13 20 27 4 11 18 25
+Mo 3 10 17 24 31 7 14 21 28 5 12 19 26
+Tu 4 11 18 25 1 8 15 22 29 6 13 20 27
+We 5 12 19 26 2 9 16 23 30 7 14 21 28
+Th 6 13 20 27 3 10 17 24 1 8 15 22 29
+Fr 7 14 21 28 4 11 18 25 2 9 16 23 30
+Sa 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+
+ August 2010 September 2010 October 2010
+Su 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Mo 2 9 16 23 30 6 13 20 27 4 11 18 25
+Tu 3 10 17 24 31 7 14 21 28 5 12 19 26
+We 4 11 18 25 1 8 15 22 29 6 13 20 27
+Th 5 12 19 26 2 9 16 23 30 7 14 21 28
+Fr 6 13 20 27 3 10 17 24 1 8 15 22 29
+Sa 7 14 21 28 4 11 18 25 2 9 16 23 30
+
+ November 2010 December 2010 January 2011
+Su 7 14 21 28 5 12 19 26 2 9 16 23 30
+Mo 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Tu 2 9 16 23 30 7 14 21 28 4 11 18 25
+We 3 10 17 24 1 8 15 22 29 5 12 19 26
+Th 4 11 18 25 2 9 16 23 30 6 13 20 27
+Fr 5 12 19 26 3 10 17 24 31 7 14 21 28
+Sa 6 13 20 27 4 11 18 25 1 8 15 22 29
+
+ February 2011 March 2011 April 2011
+Su 6 13 20 27 6 13 20 27 3 10 17 24
+Mo 7 14 21 28 7 14 21 28 4 11 18 25
+Tu 1 8 15 22 1 8 15 22 29 5 12 19 26
+We 2 9 16 23 2 9 16 23 30 6 13 20 27
+Th 3 10 17 24 3 10 17 24 31 7 14 21 28
+Fr 4 11 18 25 4 11 18 25 1 8 15 22 29
+Sa 5 12 19 26 5 12 19 26 2 9 16 23 30
+
+ May 2011 June 2011 July 2011
+Su 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Mo 2 9 16 23 30 6 13 20 27 4 11 18 25
+Tu 3 10 17 24 31 7 14 21 28 5 12 19 26
+We 4 11 18 25 1 8 15 22 29 6 13 20 27
+Th 5 12 19 26 2 9 16 23 30 7 14 21 28
+Fr 6 13 20 27 3 10 17 24 1 8 15 22 29
+Sa 7 14 21 28 4 11 18 25 2 9 16 23 30
+
+ August 2011 September 2011 October 2011
+Su 7 14 21 28 4 11 18 25 2 9 16 23 30
+Mo 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Tu 2 9 16 23 30 6 13 20 27 4 11 18 25
+We 3 10 17 24 31 7 14 21 28 5 12 19 26
+Th 4 11 18 25 1 8 15 22 29 6 13 20 27
+Fr 5 12 19 26 2 9 16 23 30 7 14 21 28
+Sa 6 13 20 27 3 10 17 24 1 8 15 22 29
+
+ November 2011 December 2011 January 2012
+Su 6 13 20 27 4 11 18 25 1 8 15 22 29
+Mo 7 14 21 28 5 12 19 26 2 9 16 23 30
+Tu 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+We 2 9 16 23 30 7 14 21 28 4 11 18 25
+Th 3 10 17 24 1 8 15 22 29 5 12 19 26
+Fr 4 11 18 25 2 9 16 23 30 6 13 20 27
+Sa 5 12 19 26 3 10 17 24 31 7 14 21 28
+
+ February 2012 March 2012 April 2012
+Su 5 12 19 26 4 11 18 25 1 8 15 22 29
+Mo 6 13 20 27 5 12 19 26 2 9 16 23 30
+Tu 7 14 21 28 6 13 20 27 3 10 17 24
+We 1 8 15 22 29 7 14 21 28 4 11 18 25
+Th 2 9 16 23 1 8 15 22 29 5 12 19 26
+Fr 3 10 17 24 2 9 16 23 30 6 13 20 27
+Sa 4 11 18 25 3 10 17 24 31 7 14 21 28
+
+ May 2012 June 2012 July 2012
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+
+ August 2012 September 2012 October 2012
+Su 5 12 19 26 2 9 16 23 30 7 14 21 28
+Mo 6 13 20 27 3 10 17 24 1 8 15 22 29
+Tu 7 14 21 28 4 11 18 25 2 9 16 23 30
+We 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Th 2 9 16 23 30 6 13 20 27 4 11 18 25
+Fr 3 10 17 24 31 7 14 21 28 5 12 19 26
+Sa 4 11 18 25 1 8 15 22 29 6 13 20 27
+
+ November 2012 December 2012 January 2013
+Su 4 11 18 25 2 9 16 23 30 6 13 20 27
+Mo 5 12 19 26 3 10 17 24 31 7 14 21 28
+Tu 6 13 20 27 4 11 18 25 1 8 15 22 29
+We 7 14 21 28 5 12 19 26 2 9 16 23 30
+Th 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Fr 2 9 16 23 30 7 14 21 28 4 11 18 25
+Sa 3 10 17 24 1 8 15 22 29 5 12 19 26
+
+ February 2013 March 2013 April 2013
+Su 3 10 17 24 3 10 17 24 31 7 14 21 28
+Mo 4 11 18 25 4 11 18 25 1 8 15 22 29
+Tu 5 12 19 26 5 12 19 26 2 9 16 23 30
+We 6 13 20 27 6 13 20 27 3 10 17 24
+Th 7 14 21 28 7 14 21 28 4 11 18 25
+Fr 1 8 15 22 1 8 15 22 29 5 12 19 26
+Sa 2 9 16 23 2 9 16 23 30 6 13 20 27
+
+ May 2013 June 2013 July 2013
+Su 5 12 19 26 2 9 16 23 30 7 14 21 28
+Mo 6 13 20 27 3 10 17 24 1 8 15 22 29
+Tu 7 14 21 28 4 11 18 25 2 9 16 23 30
+We 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Th 2 9 16 23 30 6 13 20 27 4 11 18 25
+Fr 3 10 17 24 31 7 14 21 28 5 12 19 26
+Sa 4 11 18 25 1 8 15 22 29 6 13 20 27
+
+ August 2013 September 2013 October 2013
+Su 4 11 18 25 1 8 15 22 29 6 13 20 27
+Mo 5 12 19 26 2 9 16 23 30 7 14 21 28
+Tu 6 13 20 27 3 10 17 24 1 8 15 22 29
+We 7 14 21 28 4 11 18 25 2 9 16 23 30
+Th 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Fr 2 9 16 23 30 6 13 20 27 4 11 18 25
+Sa 3 10 17 24 31 7 14 21 28 5 12 19 26
+
+ November 2013 December 2013 January 2014
+Su 3 10 17 24 1 8 15 22 29 5 12 19 26
+Mo 4 11 18 25 2 9 16 23 30 6 13 20 27
+Tu 5 12 19 26 3 10 17 24 31 7 14 21 28
+We 6 13 20 27 4 11 18 25 1 8 15 22 29
+Th 7 14 21 28 5 12 19 26 2 9 16 23 30
+Fr 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Sa 2 9 16 23 30 7 14 21 28 4 11 18 25
+
+ February 2014 March 2014 April 2014
+Su 2 9 16 23 2 9 16 23 30 6 13 20 27
+Mo 3 10 17 24 3 10 17 24 31 7 14 21 28
+Tu 4 11 18 25 4 11 18 25 1 8 15 22 29
+We 5 12 19 26 5 12 19 26 2 9 16 23 30
+Th 6 13 20 27 6 13 20 27 3 10 17 24
+Fr 7 14 21 28 7 14 21 28 4 11 18 25
+Sa 1 8 15 22 1 8 15 22 29 5 12 19 26
+
+ May 2014 June 2014 July 2014
+Su 4 11 18 25 1 8 15 22 29 6 13 20 27
+Mo 5 12 19 26 2 9 16 23 30 7 14 21 28
+Tu 6 13 20 27 3 10 17 24 1 8 15 22 29
+We 7 14 21 28 4 11 18 25 2 9 16 23 30
+Th 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Fr 2 9 16 23 30 6 13 20 27 4 11 18 25
+Sa 3 10 17 24 31 7 14 21 28 5 12 19 26
+
+ August 2014 September 2014 October 2014
+Su 3 10 17 24 31 7 14 21 28 5 12 19 26
+Mo 4 11 18 25 1 8 15 22 29 6 13 20 27
+Tu 5 12 19 26 2 9 16 23 30 7 14 21 28
+We 6 13 20 27 3 10 17 24 1 8 15 22 29
+Th 7 14 21 28 4 11 18 25 2 9 16 23 30
+Fr 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Sa 2 9 16 23 30 6 13 20 27 4 11 18 25
+
+ November 2014 December 2014 January 2015
+Su 2 9 16 23 30 7 14 21 28 4 11 18 25
+Mo 3 10 17 24 1 8 15 22 29 5 12 19 26
+Tu 4 11 18 25 2 9 16 23 30 6 13 20 27
+We 5 12 19 26 3 10 17 24 31 7 14 21 28
+Th 6 13 20 27 4 11 18 25 1 8 15 22 29
+Fr 7 14 21 28 5 12 19 26 2 9 16 23 30
+Sa 1 8 15 22 29 6 13 20 27 3 10 17 24 31
diff --git a/tests/expected/cal/vertical-vSn21 b/tests/expected/cal/vertical-vSn21
new file mode 100644
index 0000000..9aa3350
--- /dev/null
+++ b/tests/expected/cal/vertical-vSn21
@@ -0,0 +1,63 @@
+Large span
+ November 2005 December 2005 January 2006
+Su 6 13 20 27 4 11 18 25 1 8 15 22 29
+Mo 7 14 21 28 5 12 19 26 2 9 16 23 30
+Tu 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+We 2 9 16 23 30 7 14 21 28 4 11 18 25
+Th 3 10 17 24 1 8 15 22 29 5 12 19 26
+Fr 4 11 18 25 2 9 16 23 30 6 13 20 27
+Sa 5 12 19 26 3 10 17 24 31 7 14 21 28
+
+ February 2006 March 2006 April 2006
+Su 5 12 19 26 5 12 19 26 2 9 16 23 30
+Mo 6 13 20 27 6 13 20 27 3 10 17 24
+Tu 7 14 21 28 7 14 21 28 4 11 18 25
+We 1 8 15 22 1 8 15 22 29 5 12 19 26
+Th 2 9 16 23 2 9 16 23 30 6 13 20 27
+Fr 3 10 17 24 3 10 17 24 31 7 14 21 28
+Sa 4 11 18 25 4 11 18 25 1 8 15 22 29
+
+ May 2006 June 2006 July 2006
+Su 7 14 21 28 4 11 18 25 2 9 16 23 30
+Mo 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Tu 2 9 16 23 30 6 13 20 27 4 11 18 25
+We 3 10 17 24 31 7 14 21 28 5 12 19 26
+Th 4 11 18 25 1 8 15 22 29 6 13 20 27
+Fr 5 12 19 26 2 9 16 23 30 7 14 21 28
+Sa 6 13 20 27 3 10 17 24 1 8 15 22 29
+
+ August 2006 September 2006 October 2006
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+
+ November 2006 December 2006 January 2007
+Su 5 12 19 26 3 10 17 24 31 7 14 21 28
+Mo 6 13 20 27 4 11 18 25 1 8 15 22 29
+Tu 7 14 21 28 5 12 19 26 2 9 16 23 30
+We 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Th 2 9 16 23 30 7 14 21 28 4 11 18 25
+Fr 3 10 17 24 1 8 15 22 29 5 12 19 26
+Sa 4 11 18 25 2 9 16 23 30 6 13 20 27
+
+ February 2007 March 2007 April 2007
+Su 4 11 18 25 4 11 18 25 1 8 15 22 29
+Mo 5 12 19 26 5 12 19 26 2 9 16 23 30
+Tu 6 13 20 27 6 13 20 27 3 10 17 24
+We 7 14 21 28 7 14 21 28 4 11 18 25
+Th 1 8 15 22 1 8 15 22 29 5 12 19 26
+Fr 2 9 16 23 2 9 16 23 30 6 13 20 27
+Sa 3 10 17 24 3 10 17 24 31 7 14 21 28
+
+ May 2007 June 2007 July 2007
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
diff --git a/tests/expected/cal/vertical-vSn3 b/tests/expected/cal/vertical-vSn3
new file mode 100644
index 0000000..023558a
--- /dev/null
+++ b/tests/expected/cal/vertical-vSn3
@@ -0,0 +1,9 @@
+Normal span
+ August 2006 September 2006 October 2006
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
diff --git a/tests/expected/cal/vertical-vSn51 b/tests/expected/cal/vertical-vSn51
new file mode 100644
index 0000000..aec0fcc
--- /dev/null
+++ b/tests/expected/cal/vertical-vSn51
@@ -0,0 +1,153 @@
+Very Large span
+ August 2004 September 2004 October 2004
+Su 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Mo 2 9 16 23 30 6 13 20 27 4 11 18 25
+Tu 3 10 17 24 31 7 14 21 28 5 12 19 26
+We 4 11 18 25 1 8 15 22 29 6 13 20 27
+Th 5 12 19 26 2 9 16 23 30 7 14 21 28
+Fr 6 13 20 27 3 10 17 24 1 8 15 22 29
+Sa 7 14 21 28 4 11 18 25 2 9 16 23 30
+
+ November 2004 December 2004 January 2005
+Su 7 14 21 28 5 12 19 26 2 9 16 23 30
+Mo 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Tu 2 9 16 23 30 7 14 21 28 4 11 18 25
+We 3 10 17 24 1 8 15 22 29 5 12 19 26
+Th 4 11 18 25 2 9 16 23 30 6 13 20 27
+Fr 5 12 19 26 3 10 17 24 31 7 14 21 28
+Sa 6 13 20 27 4 11 18 25 1 8 15 22 29
+
+ February 2005 March 2005 April 2005
+Su 6 13 20 27 6 13 20 27 3 10 17 24
+Mo 7 14 21 28 7 14 21 28 4 11 18 25
+Tu 1 8 15 22 1 8 15 22 29 5 12 19 26
+We 2 9 16 23 2 9 16 23 30 6 13 20 27
+Th 3 10 17 24 3 10 17 24 31 7 14 21 28
+Fr 4 11 18 25 4 11 18 25 1 8 15 22 29
+Sa 5 12 19 26 5 12 19 26 2 9 16 23 30
+
+ May 2005 June 2005 July 2005
+Su 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Mo 2 9 16 23 30 6 13 20 27 4 11 18 25
+Tu 3 10 17 24 31 7 14 21 28 5 12 19 26
+We 4 11 18 25 1 8 15 22 29 6 13 20 27
+Th 5 12 19 26 2 9 16 23 30 7 14 21 28
+Fr 6 13 20 27 3 10 17 24 1 8 15 22 29
+Sa 7 14 21 28 4 11 18 25 2 9 16 23 30
+
+ August 2005 September 2005 October 2005
+Su 7 14 21 28 4 11 18 25 2 9 16 23 30
+Mo 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Tu 2 9 16 23 30 6 13 20 27 4 11 18 25
+We 3 10 17 24 31 7 14 21 28 5 12 19 26
+Th 4 11 18 25 1 8 15 22 29 6 13 20 27
+Fr 5 12 19 26 2 9 16 23 30 7 14 21 28
+Sa 6 13 20 27 3 10 17 24 1 8 15 22 29
+
+ November 2005 December 2005 January 2006
+Su 6 13 20 27 4 11 18 25 1 8 15 22 29
+Mo 7 14 21 28 5 12 19 26 2 9 16 23 30
+Tu 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+We 2 9 16 23 30 7 14 21 28 4 11 18 25
+Th 3 10 17 24 1 8 15 22 29 5 12 19 26
+Fr 4 11 18 25 2 9 16 23 30 6 13 20 27
+Sa 5 12 19 26 3 10 17 24 31 7 14 21 28
+
+ February 2006 March 2006 April 2006
+Su 5 12 19 26 5 12 19 26 2 9 16 23 30
+Mo 6 13 20 27 6 13 20 27 3 10 17 24
+Tu 7 14 21 28 7 14 21 28 4 11 18 25
+We 1 8 15 22 1 8 15 22 29 5 12 19 26
+Th 2 9 16 23 2 9 16 23 30 6 13 20 27
+Fr 3 10 17 24 3 10 17 24 31 7 14 21 28
+Sa 4 11 18 25 4 11 18 25 1 8 15 22 29
+
+ May 2006 June 2006 July 2006
+Su 7 14 21 28 4 11 18 25 2 9 16 23 30
+Mo 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Tu 2 9 16 23 30 6 13 20 27 4 11 18 25
+We 3 10 17 24 31 7 14 21 28 5 12 19 26
+Th 4 11 18 25 1 8 15 22 29 6 13 20 27
+Fr 5 12 19 26 2 9 16 23 30 7 14 21 28
+Sa 6 13 20 27 3 10 17 24 1 8 15 22 29
+
+ August 2006 September 2006 October 2006
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+
+ November 2006 December 2006 January 2007
+Su 5 12 19 26 3 10 17 24 31 7 14 21 28
+Mo 6 13 20 27 4 11 18 25 1 8 15 22 29
+Tu 7 14 21 28 5 12 19 26 2 9 16 23 30
+We 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Th 2 9 16 23 30 7 14 21 28 4 11 18 25
+Fr 3 10 17 24 1 8 15 22 29 5 12 19 26
+Sa 4 11 18 25 2 9 16 23 30 6 13 20 27
+
+ February 2007 March 2007 April 2007
+Su 4 11 18 25 4 11 18 25 1 8 15 22 29
+Mo 5 12 19 26 5 12 19 26 2 9 16 23 30
+Tu 6 13 20 27 6 13 20 27 3 10 17 24
+We 7 14 21 28 7 14 21 28 4 11 18 25
+Th 1 8 15 22 1 8 15 22 29 5 12 19 26
+Fr 2 9 16 23 2 9 16 23 30 6 13 20 27
+Sa 3 10 17 24 3 10 17 24 31 7 14 21 28
+
+ May 2007 June 2007 July 2007
+Su 6 13 20 27 3 10 17 24 1 8 15 22 29
+Mo 7 14 21 28 4 11 18 25 2 9 16 23 30
+Tu 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+We 2 9 16 23 30 6 13 20 27 4 11 18 25
+Th 3 10 17 24 31 7 14 21 28 5 12 19 26
+Fr 4 11 18 25 1 8 15 22 29 6 13 20 27
+Sa 5 12 19 26 2 9 16 23 30 7 14 21 28
+
+ August 2007 September 2007 October 2007
+Su 5 12 19 26 2 9 16 23 30 7 14 21 28
+Mo 6 13 20 27 3 10 17 24 1 8 15 22 29
+Tu 7 14 21 28 4 11 18 25 2 9 16 23 30
+We 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Th 2 9 16 23 30 6 13 20 27 4 11 18 25
+Fr 3 10 17 24 31 7 14 21 28 5 12 19 26
+Sa 4 11 18 25 1 8 15 22 29 6 13 20 27
+
+ November 2007 December 2007 January 2008
+Su 4 11 18 25 2 9 16 23 30 6 13 20 27
+Mo 5 12 19 26 3 10 17 24 31 7 14 21 28
+Tu 6 13 20 27 4 11 18 25 1 8 15 22 29
+We 7 14 21 28 5 12 19 26 2 9 16 23 30
+Th 1 8 15 22 29 6 13 20 27 3 10 17 24 31
+Fr 2 9 16 23 30 7 14 21 28 4 11 18 25
+Sa 3 10 17 24 1 8 15 22 29 5 12 19 26
+
+ February 2008 March 2008 April 2008
+Su 3 10 17 24 2 9 16 23 30 6 13 20 27
+Mo 4 11 18 25 3 10 17 24 31 7 14 21 28
+Tu 5 12 19 26 4 11 18 25 1 8 15 22 29
+We 6 13 20 27 5 12 19 26 2 9 16 23 30
+Th 7 14 21 28 6 13 20 27 3 10 17 24
+Fr 1 8 15 22 29 7 14 21 28 4 11 18 25
+Sa 2 9 16 23 1 8 15 22 29 5 12 19 26
+
+ May 2008 June 2008 July 2008
+Su 4 11 18 25 1 8 15 22 29 6 13 20 27
+Mo 5 12 19 26 2 9 16 23 30 7 14 21 28
+Tu 6 13 20 27 3 10 17 24 1 8 15 22 29
+We 7 14 21 28 4 11 18 25 2 9 16 23 30
+Th 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Fr 2 9 16 23 30 6 13 20 27 4 11 18 25
+Sa 3 10 17 24 31 7 14 21 28 5 12 19 26
+
+ August 2008 September 2008 October 2008
+Su 3 10 17 24 31 7 14 21 28 5 12 19 26
+Mo 4 11 18 25 1 8 15 22 29 6 13 20 27
+Tu 5 12 19 26 2 9 16 23 30 7 14 21 28
+We 6 13 20 27 3 10 17 24 1 8 15 22 29
+Th 7 14 21 28 4 11 18 25 2 9 16 23 30
+Fr 1 8 15 22 29 5 12 19 26 3 10 17 24 31
+Sa 2 9 16 23 30 6 13 20 27 4 11 18 25
diff --git a/tests/expected/cal/weekarg-1m-week53 b/tests/expected/cal/weekarg-1m-week53
new file mode 100644
index 0000000..aeffd5e
--- /dev/null
+++ b/tests/expected/cal/weekarg-1m-week53
@@ -0,0 +1,9 @@
+Gregorian - Monday-based, week 53, 1 month
+ January 2010
+ Mo Tu We Th Fr Sa Su
+53 1 2 3
+ 1 4 5 6 7 8 9 10
+ 2 11 12 13 14 15 16 17
+ 3 18 19 20 21 22 23 24
+ 4 25 26 27 28 29 30 31
+
diff --git a/tests/expected/cal/weekarg-1m-week53-color b/tests/expected/cal/weekarg-1m-week53-color
new file mode 100644
index 0000000..84a5e68
--- /dev/null
+++ b/tests/expected/cal/weekarg-1m-week53-color
@@ -0,0 +1,9 @@
+Gregorian - Monday-based, week 53, 1 month
+ January 2010
+ Mo Tu We Th Fr Sa Su
+53 1 2 3
+ 1 4 5 6 7 8 9 10
+ 2 11 12 13 14 15 16 17
+ 3 18 19 20 21 22 23 24
+ 4 25 26 27 28 29 30 31
+
diff --git a/tests/expected/cal/weekarg-1mj-week53 b/tests/expected/cal/weekarg-1mj-week53
new file mode 100644
index 0000000..fd9cdfc
--- /dev/null
+++ b/tests/expected/cal/weekarg-1mj-week53
@@ -0,0 +1,9 @@
+Julian - Monday-based, week 53, 1 month
+ January 2010
+ Mon Tue Wed Thu Fri Sat Sun
+53 1 2 3
+ 1 4 5 6 7 8 9 10
+ 2 11 12 13 14 15 16 17
+ 3 18 19 20 21 22 23 24
+ 4 25 26 27 28 29 30 31
+
diff --git a/tests/expected/cal/weekarg-1mj-week53-color b/tests/expected/cal/weekarg-1mj-week53-color
new file mode 100644
index 0000000..9a055ae
--- /dev/null
+++ b/tests/expected/cal/weekarg-1mj-week53-color
@@ -0,0 +1,9 @@
+Julian - Monday-based, week 53, 1 month
+ January 2010
+ Mon Tue Wed Thu Fri Sat Sun
+53 1 2 3
+ 1 4 5 6 7 8 9 10
+ 2 11 12 13 14 15 16 17
+ 3 18 19 20 21 22 23 24
+ 4 25 26 27 28 29 30 31
+
diff --git a/tests/expected/cal/weekarg-3m-week40 b/tests/expected/cal/weekarg-3m-week40
new file mode 100644
index 0000000..e77bc7b
--- /dev/null
+++ b/tests/expected/cal/weekarg-3m-week40
@@ -0,0 +1,9 @@
+Gregorian - Monday-based, week 40, 3 month
+ September 2013 October 2013 November 2013
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+35 1 40 1 2 3 4 5 6 44 1 2 3
+36 2 3 4 5 6 7 8 41 7 8 9 10 11 12 13 45 4 5 6 7 8 9 10
+37 9 10 11 12 13 14 15 42 14 15 16 17 18 19 20 46 11 12 13 14 15 16 17
+38 16 17 18 19 20 21 22 43 21 22 23 24 25 26 27 47 18 19 20 21 22 23 24
+39 23 24 25 26 27 28 29 44 28 29 30 31 48 25 26 27 28 29 30
+40 30
diff --git a/tests/expected/cal/weekarg-3m-week40-color b/tests/expected/cal/weekarg-3m-week40-color
new file mode 100644
index 0000000..2ffa04e
--- /dev/null
+++ b/tests/expected/cal/weekarg-3m-week40-color
@@ -0,0 +1,9 @@
+Gregorian - Monday-based, week 40, 3 month
+ September 2013 October 2013 November 2013
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+35 1 40 1 2 3 4 5 6 44 1 2 3
+36 2 3 4 5 6 7 8 41  7 8 9 10 11 12 13 45 4 5 6 7 8 9 10
+37 9 10 11 12 13 14 15 42 14 15 16 17 18 19 20 46 11 12 13 14 15 16 17
+38 16 17 18 19 20 21 22 43 21 22 23 24 25 26 27 47 18 19 20 21 22 23 24
+39 23 24 25 26 27 28 29 44 28 29 30 31 48 25 26 27 28 29 30
+40 30
diff --git a/tests/expected/cal/weekarg-3m-week52-color b/tests/expected/cal/weekarg-3m-week52-color
new file mode 100644
index 0000000..1b0b6c3
--- /dev/null
+++ b/tests/expected/cal/weekarg-3m-week52-color
@@ -0,0 +1,9 @@
+Gregorian - Monday-based, week 52, 3 month
+ November 2000 December 2000 January 2001
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+44 1 2 3 4 5 48 1 2 3 1 1 2 3 4 5 6 7
+45 6 7 8 9 10 11 12 49 4 5 6 7 8 9 10 2 8 9 10 11 12 13 14
+46 13 14 15 16 17 18 19 50 11 12 13 14 15 16 17 3 15 16 17 18 19 20 21
+47 20 21 22 23 24 25 26 51 18 19 20 21 22 23 24 4 22 23 24 25 26 27 28
+48 27 28 29 30 52 25 26 27 28 29 30 31 5 29 30 31
+
diff --git a/tests/expected/cal/weekarg-3m-week53-color b/tests/expected/cal/weekarg-3m-week53-color
new file mode 100644
index 0000000..b46d330
--- /dev/null
+++ b/tests/expected/cal/weekarg-3m-week53-color
@@ -0,0 +1,9 @@
+Gregorian - Monday-based, week 53, 3 month
+ December 2009 January 2010 February 2010
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+49 1 2 3 4 5 6 53 1 2 3 5 1 2 3 4 5 6 7
+50 7 8 9 10 11 12 13 1 4 5 6 7 8 9 10 6 8 9 10 11 12 13 14
+51 14 15 16 17 18 19 20 2 11 12 13 14 15 16 17 7 15 16 17 18 19 20 21
+52 21 22 23 24 25 26 27 3 18 19 20 21 22 23 24 8 22 23 24 25 26 27 28
+53 28 29 30 31 4 25 26 27 28 29 30 31
+
diff --git a/tests/expected/cal/weekarg-3mj-week40 b/tests/expected/cal/weekarg-3mj-week40
new file mode 100644
index 0000000..9613d9d
--- /dev/null
+++ b/tests/expected/cal/weekarg-3mj-week40
@@ -0,0 +1,9 @@
+Julian - Monday-based, week 40, 3 month
+ September 2013 October 2013 November 2013
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+35 244 40 274 275 276 277 278 279 44 305 306 307
+36 245 246 247 248 249 250 251 41 280 281 282 283 284 285 286 45 308 309 310 311 312 313 314
+37 252 253 254 255 256 257 258 42 287 288 289 290 291 292 293 46 315 316 317 318 319 320 321
+38 259 260 261 262 263 264 265 43 294 295 296 297 298 299 300 47 322 323 324 325 326 327 328
+39 266 267 268 269 270 271 272 44 301 302 303 304 48 329 330 331 332 333 334
+40 273
diff --git a/tests/expected/cal/weekarg-3mj-week40-color b/tests/expected/cal/weekarg-3mj-week40-color
new file mode 100644
index 0000000..ef246ad
--- /dev/null
+++ b/tests/expected/cal/weekarg-3mj-week40-color
@@ -0,0 +1,9 @@
+Julian - Monday-based, week 40, 3 month
+ September 2013 October 2013 November 2013
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+35 244 40 274 275 276 277 278 279 44 305 306 307
+36 245 246 247 248 249 250 251 41 280 281 282 283 284 285 286 45 308 309 310 311 312 313 314
+37 252 253 254 255 256 257 258 42 287 288 289 290 291 292 293 46 315 316 317 318 319 320 321
+38 259 260 261 262 263 264 265 43 294 295 296 297 298 299 300 47 322 323 324 325 326 327 328
+39 266 267 268 269 270 271 272 44 301 302 303 304 48 329 330 331 332 333 334
+40 273
diff --git a/tests/expected/cal/weekarg-3s-week40 b/tests/expected/cal/weekarg-3s-week40
new file mode 100644
index 0000000..11f7c84
--- /dev/null
+++ b/tests/expected/cal/weekarg-3s-week40
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based, week 40, 3 month
+ September 2013 October 2013 November 2013
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+36 1 2 3 4 5 6 7 40 1 2 3 4 5 44 1 2
+37 8 9 10 11 12 13 14 41 6 7 8 9 10 11 12 45 3 4 5 6 7 8 9
+38 15 16 17 18 19 20 21 42 13 14 15 16 17 18 19 46 10 11 12 13 14 15 16
+39 22 23 24 25 26 27 28 43 20 21 22 23 24 25 26 47 17 18 19 20 21 22 23
+40 29 30 44 27 28 29 30 31 48 24 25 26 27 28 29 30
+
diff --git a/tests/expected/cal/weekarg-3s-week54-color b/tests/expected/cal/weekarg-3s-week54-color
new file mode 100644
index 0000000..5b19cdd
--- /dev/null
+++ b/tests/expected/cal/weekarg-3s-week54-color
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based, week 54, 3 month
+ November 2000 December 2000 January 2001
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+45 1 2 3 4 49 1 2 1 1 2 3 4 5 6
+46 5 6 7 8 9 10 11 50 3 4 5 6 7 8 9 2 7 8 9 10 11 12 13
+47 12 13 14 15 16 17 18 51 10 11 12 13 14 15 16 3 14 15 16 17 18 19 20
+48 19 20 21 22 23 24 25 52 17 18 19 20 21 22 23 4 21 22 23 24 25 26 27
+49 26 27 28 29 30 53 24 25 26 27 28 29 30 5 28 29 30 31
+ 54 31
diff --git a/tests/expected/cal/weekarg-3sj-week40 b/tests/expected/cal/weekarg-3sj-week40
new file mode 100644
index 0000000..a20ecb8
--- /dev/null
+++ b/tests/expected/cal/weekarg-3sj-week40
@@ -0,0 +1,9 @@
+Julian - Sunday-based, week 40, 3 month
+ September 2013 October 2013 November 2013
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+36 244 245 246 247 248 249 250 40 274 275 276 277 278 44 305 306
+37 251 252 253 254 255 256 257 41 279 280 281 282 283 284 285 45 307 308 309 310 311 312 313
+38 258 259 260 261 262 263 264 42 286 287 288 289 290 291 292 46 314 315 316 317 318 319 320
+39 265 266 267 268 269 270 271 43 293 294 295 296 297 298 299 47 321 322 323 324 325 326 327
+40 272 273 44 300 301 302 303 304 48 328 329 330 331 332 333 334
+
diff --git a/tests/expected/cal/weekarg-m-week40 b/tests/expected/cal/weekarg-m-week40
new file mode 100644
index 0000000..5361f86
--- /dev/null
+++ b/tests/expected/cal/weekarg-m-week40
@@ -0,0 +1,9 @@
+Gregorian - Monday-based, week 40, 1 month
+ October 2013
+ Mo Tu We Th Fr Sa Su
+40 1 2 3 4 5 6
+41 7 8 9 10 11 12 13
+42 14 15 16 17 18 19 20
+43 21 22 23 24 25 26 27
+44 28 29 30 31
+
diff --git a/tests/expected/cal/weekarg-mj-week40 b/tests/expected/cal/weekarg-mj-week40
new file mode 100644
index 0000000..f526c30
--- /dev/null
+++ b/tests/expected/cal/weekarg-mj-week40
@@ -0,0 +1,9 @@
+Julian - Monday-based, week 40, 1 month
+ October 2013
+ Mon Tue Wed Thu Fri Sat Sun
+40 274 275 276 277 278 279
+41 280 281 282 283 284 285 286
+42 287 288 289 290 291 292 293
+43 294 295 296 297 298 299 300
+44 301 302 303 304
+
diff --git a/tests/expected/cal/weekarg-s-week40 b/tests/expected/cal/weekarg-s-week40
new file mode 100644
index 0000000..207db45
--- /dev/null
+++ b/tests/expected/cal/weekarg-s-week40
@@ -0,0 +1,9 @@
+Gregorian - Sunday-based, week 40, 1 month
+ October 2013
+ Su Mo Tu We Th Fr Sa
+40 1 2 3 4 5
+41 6 7 8 9 10 11 12
+42 13 14 15 16 17 18 19
+43 20 21 22 23 24 25 26
+44 27 28 29 30 31
+
diff --git a/tests/expected/cal/weekarg-sj-week40 b/tests/expected/cal/weekarg-sj-week40
new file mode 100644
index 0000000..51ac788
--- /dev/null
+++ b/tests/expected/cal/weekarg-sj-week40
@@ -0,0 +1,9 @@
+Julian - Sunday-based, week 40, 1 month
+ October 2013
+ Sun Mon Tue Wed Thu Fri Sat
+40 274 275 276 277 278
+41 279 280 281 282 283 284 285
+42 286 287 288 289 290 291 292
+43 293 294 295 296 297 298 299
+44 300 301 302 303 304
+
diff --git a/tests/expected/cal/weeknum b/tests/expected/cal/weeknum
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/cal/weeknum
diff --git a/tests/expected/cal/weeknum-3mjw b/tests/expected/cal/weeknum-3mjw
new file mode 100644
index 0000000..3c525c6
--- /dev/null
+++ b/tests/expected/cal/weeknum-3mjw
@@ -0,0 +1,57 @@
+Julian - Monday-based week with week numbers - 3 month
+ December 2000 January 2001 February 2001
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+48 336 337 338 1 1 2 3 4 5 6 7 5 32 33 34 35
+49 339 340 341 342 343 344 345 2 8 9 10 11 12 13 14 6 36 37 38 39 40 41 42
+50 346 347 348 349 350 351 352 3 15 16 17 18 19 20 21 7 43 44 45 46 47 48 49
+51 353 354 355 356 357 358 359 4 22 23 24 25 26 27 28 8 50 51 52 53 54 55 56
+52 360 361 362 363 364 365 366 5 29 30 31 9 57 58 59
+
+ December 2001 January 2002 February 2002
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+48 335 336 1 1 2 3 4 5 6 5 32 33 34
+49 337 338 339 340 341 342 343 2 7 8 9 10 11 12 13 6 35 36 37 38 39 40 41
+50 344 345 346 347 348 349 350 3 14 15 16 17 18 19 20 7 42 43 44 45 46 47 48
+51 351 352 353 354 355 356 357 4 21 22 23 24 25 26 27 8 49 50 51 52 53 54 55
+52 358 359 360 361 362 363 364 5 28 29 30 31 9 56 57 58 59
+ 1 365
+ December 2002 January 2003 February 2003
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+48 335 1 1 2 3 4 5 5 32 33
+49 336 337 338 339 340 341 342 2 6 7 8 9 10 11 12 6 34 35 36 37 38 39 40
+50 343 344 345 346 347 348 349 3 13 14 15 16 17 18 19 7 41 42 43 44 45 46 47
+51 350 351 352 353 354 355 356 4 20 21 22 23 24 25 26 8 48 49 50 51 52 53 54
+52 357 358 359 360 361 362 363 5 27 28 29 30 31 9 55 56 57 58 59
+ 1 364 365
+ December 2008 January 2009 February 2009
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+49 336 337 338 339 340 341 342 1 1 2 3 4 5 32
+50 343 344 345 346 347 348 349 2 5 6 7 8 9 10 11 6 33 34 35 36 37 38 39
+51 350 351 352 353 354 355 356 3 12 13 14 15 16 17 18 7 40 41 42 43 44 45 46
+52 357 358 359 360 361 362 363 4 19 20 21 22 23 24 25 8 47 48 49 50 51 52 53
+ 1 364 365 366 5 26 27 28 29 30 31 9 54 55 56 57 58 59
+
+ December 2009 January 2010 February 2010
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+49 335 336 337 338 339 340 53 1 2 3 5 32 33 34 35 36 37 38
+50 341 342 343 344 345 346 347 1 4 5 6 7 8 9 10 6 39 40 41 42 43 44 45
+51 348 349 350 351 352 353 354 2 11 12 13 14 15 16 17 7 46 47 48 49 50 51 52
+52 355 356 357 358 359 360 361 3 18 19 20 21 22 23 24 8 53 54 55 56 57 58 59
+53 362 363 364 365 4 25 26 27 28 29 30 31
+
+ December 2010 January 2011 February 2011
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+48 335 336 337 338 339 52 1 2 5 32 33 34 35 36 37
+49 340 341 342 343 344 345 346 1 3 4 5 6 7 8 9 6 38 39 40 41 42 43 44
+50 347 348 349 350 351 352 353 2 10 11 12 13 14 15 16 7 45 46 47 48 49 50 51
+51 354 355 356 357 358 359 360 3 17 18 19 20 21 22 23 8 52 53 54 55 56 57 58
+52 361 362 363 364 365 4 24 25 26 27 28 29 30 9 59
+ 5 31
+ December 2011 January 2012 February 2012
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+48 335 336 337 338 52 1 5 32 33 34 35 36
+49 339 340 341 342 343 344 345 1 2 3 4 5 6 7 8 6 37 38 39 40 41 42 43
+50 346 347 348 349 350 351 352 2 9 10 11 12 13 14 15 7 44 45 46 47 48 49 50
+51 353 354 355 356 357 358 359 3 16 17 18 19 20 21 22 8 51 52 53 54 55 56 57
+52 360 361 362 363 364 365 4 23 24 25 26 27 28 29 9 58 59 60
+ 5 30 31
diff --git a/tests/expected/cal/weeknum-3mw b/tests/expected/cal/weeknum-3mw
new file mode 100644
index 0000000..92f1ab0
--- /dev/null
+++ b/tests/expected/cal/weeknum-3mw
@@ -0,0 +1,57 @@
+Gregorian - Monday-based week with week number
+ December 2000 January 2001 February 2001
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+48 1 2 3 1 1 2 3 4 5 6 7 5 1 2 3 4
+49 4 5 6 7 8 9 10 2 8 9 10 11 12 13 14 6 5 6 7 8 9 10 11
+50 11 12 13 14 15 16 17 3 15 16 17 18 19 20 21 7 12 13 14 15 16 17 18
+51 18 19 20 21 22 23 24 4 22 23 24 25 26 27 28 8 19 20 21 22 23 24 25
+52 25 26 27 28 29 30 31 5 29 30 31 9 26 27 28
+
+ December 2001 January 2002 February 2002
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+48 1 2 1 1 2 3 4 5 6 5 1 2 3
+49 3 4 5 6 7 8 9 2 7 8 9 10 11 12 13 6 4 5 6 7 8 9 10
+50 10 11 12 13 14 15 16 3 14 15 16 17 18 19 20 7 11 12 13 14 15 16 17
+51 17 18 19 20 21 22 23 4 21 22 23 24 25 26 27 8 18 19 20 21 22 23 24
+52 24 25 26 27 28 29 30 5 28 29 30 31 9 25 26 27 28
+ 1 31
+ December 2002 January 2003 February 2003
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+48 1 1 1 2 3 4 5 5 1 2
+49 2 3 4 5 6 7 8 2 6 7 8 9 10 11 12 6 3 4 5 6 7 8 9
+50 9 10 11 12 13 14 15 3 13 14 15 16 17 18 19 7 10 11 12 13 14 15 16
+51 16 17 18 19 20 21 22 4 20 21 22 23 24 25 26 8 17 18 19 20 21 22 23
+52 23 24 25 26 27 28 29 5 27 28 29 30 31 9 24 25 26 27 28
+ 1 30 31
+ December 2008 January 2009 February 2009
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+49 1 2 3 4 5 6 7 1 1 2 3 4 5 1
+50 8 9 10 11 12 13 14 2 5 6 7 8 9 10 11 6 2 3 4 5 6 7 8
+51 15 16 17 18 19 20 21 3 12 13 14 15 16 17 18 7 9 10 11 12 13 14 15
+52 22 23 24 25 26 27 28 4 19 20 21 22 23 24 25 8 16 17 18 19 20 21 22
+ 1 29 30 31 5 26 27 28 29 30 31 9 23 24 25 26 27 28
+
+ December 2009 January 2010 February 2010
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+49 1 2 3 4 5 6 53 1 2 3 5 1 2 3 4 5 6 7
+50 7 8 9 10 11 12 13 1 4 5 6 7 8 9 10 6 8 9 10 11 12 13 14
+51 14 15 16 17 18 19 20 2 11 12 13 14 15 16 17 7 15 16 17 18 19 20 21
+52 21 22 23 24 25 26 27 3 18 19 20 21 22 23 24 8 22 23 24 25 26 27 28
+53 28 29 30 31 4 25 26 27 28 29 30 31
+
+ December 2010 January 2011 February 2011
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+48 1 2 3 4 5 52 1 2 5 1 2 3 4 5 6
+49 6 7 8 9 10 11 12 1 3 4 5 6 7 8 9 6 7 8 9 10 11 12 13
+50 13 14 15 16 17 18 19 2 10 11 12 13 14 15 16 7 14 15 16 17 18 19 20
+51 20 21 22 23 24 25 26 3 17 18 19 20 21 22 23 8 21 22 23 24 25 26 27
+52 27 28 29 30 31 4 24 25 26 27 28 29 30 9 28
+ 5 31
+ December 2011 January 2012 February 2012
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+48 1 2 3 4 52 1 5 1 2 3 4 5
+49 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 6 6 7 8 9 10 11 12
+50 12 13 14 15 16 17 18 2 9 10 11 12 13 14 15 7 13 14 15 16 17 18 19
+51 19 20 21 22 23 24 25 3 16 17 18 19 20 21 22 8 20 21 22 23 24 25 26
+52 26 27 28 29 30 31 4 23 24 25 26 27 28 29 9 27 28 29
+ 5 30 31
diff --git a/tests/expected/cal/weeknum-3sjw b/tests/expected/cal/weeknum-3sjw
new file mode 100644
index 0000000..787d25c
--- /dev/null
+++ b/tests/expected/cal/weeknum-3sjw
@@ -0,0 +1,57 @@
+Julian - Sunday-based week with week numbers - 3 month
+ December 2000 January 2001 February 2001
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+49 336 337 1 1 2 3 4 5 6 5 32 33 34
+50 338 339 340 341 342 343 344 2 7 8 9 10 11 12 13 6 35 36 37 38 39 40 41
+51 345 346 347 348 349 350 351 3 14 15 16 17 18 19 20 7 42 43 44 45 46 47 48
+52 352 353 354 355 356 357 358 4 21 22 23 24 25 26 27 8 49 50 51 52 53 54 55
+53 359 360 361 362 363 364 365 5 28 29 30 31 9 56 57 58 59
+54 366
+ December 2001 January 2002 February 2002
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+48 335 1 1 2 3 4 5 5 32 33
+49 336 337 338 339 340 341 342 2 6 7 8 9 10 11 12 6 34 35 36 37 38 39 40
+50 343 344 345 346 347 348 349 3 13 14 15 16 17 18 19 7 41 42 43 44 45 46 47
+51 350 351 352 353 354 355 356 4 20 21 22 23 24 25 26 8 48 49 50 51 52 53 54
+52 357 358 359 360 361 362 363 5 27 28 29 30 31 9 55 56 57 58 59
+53 364 365
+ December 2002 January 2003 February 2003
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+49 335 336 337 338 339 340 341 1 1 2 3 4 5 32
+50 342 343 344 345 346 347 348 2 5 6 7 8 9 10 11 6 33 34 35 36 37 38 39
+51 349 350 351 352 353 354 355 3 12 13 14 15 16 17 18 7 40 41 42 43 44 45 46
+52 356 357 358 359 360 361 362 4 19 20 21 22 23 24 25 8 47 48 49 50 51 52 53
+53 363 364 365 5 26 27 28 29 30 31 9 54 55 56 57 58 59
+
+ December 2008 January 2009 February 2009
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+49 336 337 338 339 340 341 1 1 2 3 6 32 33 34 35 36 37 38
+50 342 343 344 345 346 347 348 2 4 5 6 7 8 9 10 7 39 40 41 42 43 44 45
+51 349 350 351 352 353 354 355 3 11 12 13 14 15 16 17 8 46 47 48 49 50 51 52
+52 356 357 358 359 360 361 362 4 18 19 20 21 22 23 24 9 53 54 55 56 57 58 59
+53 363 364 365 366 5 25 26 27 28 29 30 31
+
+ December 2009 January 2010 February 2010
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+49 335 336 337 338 339 1 1 2 6 32 33 34 35 36 37
+50 340 341 342 343 344 345 346 2 3 4 5 6 7 8 9 7 38 39 40 41 42 43 44
+51 347 348 349 350 351 352 353 3 10 11 12 13 14 15 16 8 45 46 47 48 49 50 51
+52 354 355 356 357 358 359 360 4 17 18 19 20 21 22 23 9 52 53 54 55 56 57 58
+53 361 362 363 364 365 5 24 25 26 27 28 29 30 10 59
+ 6 31
+ December 2010 January 2011 February 2011
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+49 335 336 337 338 1 1 6 32 33 34 35 36
+50 339 340 341 342 343 344 345 2 2 3 4 5 6 7 8 7 37 38 39 40 41 42 43
+51 346 347 348 349 350 351 352 3 9 10 11 12 13 14 15 8 44 45 46 47 48 49 50
+52 353 354 355 356 357 358 359 4 16 17 18 19 20 21 22 9 51 52 53 54 55 56 57
+53 360 361 362 363 364 365 5 23 24 25 26 27 28 29 10 58 59
+ 6 30 31
+ December 2011 January 2012 February 2012
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+49 335 336 337 1 1 2 3 4 5 6 7 5 32 33 34 35
+50 338 339 340 341 342 343 344 2 8 9 10 11 12 13 14 6 36 37 38 39 40 41 42
+51 345 346 347 348 349 350 351 3 15 16 17 18 19 20 21 7 43 44 45 46 47 48 49
+52 352 353 354 355 356 357 358 4 22 23 24 25 26 27 28 8 50 51 52 53 54 55 56
+53 359 360 361 362 363 364 365 5 29 30 31 9 57 58 59 60
+
diff --git a/tests/expected/cal/weeknum-3sw b/tests/expected/cal/weeknum-3sw
new file mode 100644
index 0000000..0b1c1b2
--- /dev/null
+++ b/tests/expected/cal/weeknum-3sw
@@ -0,0 +1,57 @@
+Gregorian - Sunday-based week with week numbers - 3 month
+ December 2000 January 2001 February 2001
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+49 1 2 1 1 2 3 4 5 6 5 1 2 3
+50 3 4 5 6 7 8 9 2 7 8 9 10 11 12 13 6 4 5 6 7 8 9 10
+51 10 11 12 13 14 15 16 3 14 15 16 17 18 19 20 7 11 12 13 14 15 16 17
+52 17 18 19 20 21 22 23 4 21 22 23 24 25 26 27 8 18 19 20 21 22 23 24
+53 24 25 26 27 28 29 30 5 28 29 30 31 9 25 26 27 28
+54 31
+ December 2001 January 2002 February 2002
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+48 1 1 1 2 3 4 5 5 1 2
+49 2 3 4 5 6 7 8 2 6 7 8 9 10 11 12 6 3 4 5 6 7 8 9
+50 9 10 11 12 13 14 15 3 13 14 15 16 17 18 19 7 10 11 12 13 14 15 16
+51 16 17 18 19 20 21 22 4 20 21 22 23 24 25 26 8 17 18 19 20 21 22 23
+52 23 24 25 26 27 28 29 5 27 28 29 30 31 9 24 25 26 27 28
+53 30 31
+ December 2002 January 2003 February 2003
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+49 1 2 3 4 5 6 7 1 1 2 3 4 5 1
+50 8 9 10 11 12 13 14 2 5 6 7 8 9 10 11 6 2 3 4 5 6 7 8
+51 15 16 17 18 19 20 21 3 12 13 14 15 16 17 18 7 9 10 11 12 13 14 15
+52 22 23 24 25 26 27 28 4 19 20 21 22 23 24 25 8 16 17 18 19 20 21 22
+53 29 30 31 5 26 27 28 29 30 31 9 23 24 25 26 27 28
+
+ December 2008 January 2009 February 2009
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+49 1 2 3 4 5 6 1 1 2 3 6 1 2 3 4 5 6 7
+50 7 8 9 10 11 12 13 2 4 5 6 7 8 9 10 7 8 9 10 11 12 13 14
+51 14 15 16 17 18 19 20 3 11 12 13 14 15 16 17 8 15 16 17 18 19 20 21
+52 21 22 23 24 25 26 27 4 18 19 20 21 22 23 24 9 22 23 24 25 26 27 28
+53 28 29 30 31 5 25 26 27 28 29 30 31
+
+ December 2009 January 2010 February 2010
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+49 1 2 3 4 5 1 1 2 6 1 2 3 4 5 6
+50 6 7 8 9 10 11 12 2 3 4 5 6 7 8 9 7 7 8 9 10 11 12 13
+51 13 14 15 16 17 18 19 3 10 11 12 13 14 15 16 8 14 15 16 17 18 19 20
+52 20 21 22 23 24 25 26 4 17 18 19 20 21 22 23 9 21 22 23 24 25 26 27
+53 27 28 29 30 31 5 24 25 26 27 28 29 30 10 28
+ 6 31
+ December 2010 January 2011 February 2011
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+49 1 2 3 4 1 1 6 1 2 3 4 5
+50 5 6 7 8 9 10 11 2 2 3 4 5 6 7 8 7 6 7 8 9 10 11 12
+51 12 13 14 15 16 17 18 3 9 10 11 12 13 14 15 8 13 14 15 16 17 18 19
+52 19 20 21 22 23 24 25 4 16 17 18 19 20 21 22 9 20 21 22 23 24 25 26
+53 26 27 28 29 30 31 5 23 24 25 26 27 28 29 10 27 28
+ 6 30 31
+ December 2011 January 2012 February 2012
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+49 1 2 3 1 1 2 3 4 5 6 7 5 1 2 3 4
+50 4 5 6 7 8 9 10 2 8 9 10 11 12 13 14 6 5 6 7 8 9 10 11
+51 11 12 13 14 15 16 17 3 15 16 17 18 19 20 21 7 12 13 14 15 16 17 18
+52 18 19 20 21 22 23 24 4 22 23 24 25 26 27 28 8 19 20 21 22 23 24 25
+53 25 26 27 28 29 30 31 5 29 30 31 9 26 27 28 29
+
diff --git a/tests/expected/cal/weeknum-ymjw b/tests/expected/cal/weeknum-ymjw
new file mode 100644
index 0000000..bcf9a1e
--- /dev/null
+++ b/tests/expected/cal/weeknum-ymjw
@@ -0,0 +1,239 @@
+Julian - Monday-based week with week numbers
+ 2001
+
+ January February March
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+ 1 1 2 3 4 5 6 7 5 32 33 34 35 9 60 61 62 63
+ 2 8 9 10 11 12 13 14 6 36 37 38 39 40 41 42 10 64 65 66 67 68 69 70
+ 3 15 16 17 18 19 20 21 7 43 44 45 46 47 48 49 11 71 72 73 74 75 76 77
+ 4 22 23 24 25 26 27 28 8 50 51 52 53 54 55 56 12 78 79 80 81 82 83 84
+ 5 29 30 31 9 57 58 59 13 85 86 87 88 89 90
+
+ April May June
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+13 91 18 121 122 123 124 125 126 22 152 153 154
+14 92 93 94 95 96 97 98 19 127 128 129 130 131 132 133 23 155 156 157 158 159 160 161
+15 99 100 101 102 103 104 105 20 134 135 136 137 138 139 140 24 162 163 164 165 166 167 168
+16 106 107 108 109 110 111 112 21 141 142 143 144 145 146 147 25 169 170 171 172 173 174 175
+17 113 114 115 116 117 118 119 22 148 149 150 151 26 176 177 178 179 180 181
+18 120
+ July August September
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+26 182 31 213 214 215 216 217 35 244 245
+27 183 184 185 186 187 188 189 32 218 219 220 221 222 223 224 36 246 247 248 249 250 251 252
+28 190 191 192 193 194 195 196 33 225 226 227 228 229 230 231 37 253 254 255 256 257 258 259
+29 197 198 199 200 201 202 203 34 232 233 234 235 236 237 238 38 260 261 262 263 264 265 266
+30 204 205 206 207 208 209 210 35 239 240 241 242 243 39 267 268 269 270 271 272 273
+31 211 212
+ October November December
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+40 274 275 276 277 278 279 280 44 305 306 307 308 48 335 336
+41 281 282 283 284 285 286 287 45 309 310 311 312 313 314 315 49 337 338 339 340 341 342 343
+42 288 289 290 291 292 293 294 46 316 317 318 319 320 321 322 50 344 345 346 347 348 349 350
+43 295 296 297 298 299 300 301 47 323 324 325 326 327 328 329 51 351 352 353 354 355 356 357
+44 302 303 304 48 330 331 332 333 334 52 358 359 360 361 362 363 364
+ 1 365
+ 2002
+
+ January February March
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+ 1 1 2 3 4 5 6 5 32 33 34 9 60 61 62
+ 2 7 8 9 10 11 12 13 6 35 36 37 38 39 40 41 10 63 64 65 66 67 68 69
+ 3 14 15 16 17 18 19 20 7 42 43 44 45 46 47 48 11 70 71 72 73 74 75 76
+ 4 21 22 23 24 25 26 27 8 49 50 51 52 53 54 55 12 77 78 79 80 81 82 83
+ 5 28 29 30 31 9 56 57 58 59 13 84 85 86 87 88 89 90
+
+ April May June
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+14 91 92 93 94 95 96 97 18 121 122 123 124 125 22 152 153
+15 98 99 100 101 102 103 104 19 126 127 128 129 130 131 132 23 154 155 156 157 158 159 160
+16 105 106 107 108 109 110 111 20 133 134 135 136 137 138 139 24 161 162 163 164 165 166 167
+17 112 113 114 115 116 117 118 21 140 141 142 143 144 145 146 25 168 169 170 171 172 173 174
+18 119 120 22 147 148 149 150 151 26 175 176 177 178 179 180 181
+
+ July August September
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+27 182 183 184 185 186 187 188 31 213 214 215 216 35 244
+28 189 190 191 192 193 194 195 32 217 218 219 220 221 222 223 36 245 246 247 248 249 250 251
+29 196 197 198 199 200 201 202 33 224 225 226 227 228 229 230 37 252 253 254 255 256 257 258
+30 203 204 205 206 207 208 209 34 231 232 233 234 235 236 237 38 259 260 261 262 263 264 265
+31 210 211 212 35 238 239 240 241 242 243 39 266 267 268 269 270 271 272
+ 40 273
+ October November December
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+40 274 275 276 277 278 279 44 305 306 307 48 335
+41 280 281 282 283 284 285 286 45 308 309 310 311 312 313 314 49 336 337 338 339 340 341 342
+42 287 288 289 290 291 292 293 46 315 316 317 318 319 320 321 50 343 344 345 346 347 348 349
+43 294 295 296 297 298 299 300 47 322 323 324 325 326 327 328 51 350 351 352 353 354 355 356
+44 301 302 303 304 48 329 330 331 332 333 334 52 357 358 359 360 361 362 363
+ 1 364 365
+ 2003
+
+ January February March
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+ 1 1 2 3 4 5 5 32 33 9 60 61
+ 2 6 7 8 9 10 11 12 6 34 35 36 37 38 39 40 10 62 63 64 65 66 67 68
+ 3 13 14 15 16 17 18 19 7 41 42 43 44 45 46 47 11 69 70 71 72 73 74 75
+ 4 20 21 22 23 24 25 26 8 48 49 50 51 52 53 54 12 76 77 78 79 80 81 82
+ 5 27 28 29 30 31 9 55 56 57 58 59 13 83 84 85 86 87 88 89
+ 14 90
+ April May June
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+14 91 92 93 94 95 96 18 121 122 123 124 22 152
+15 97 98 99 100 101 102 103 19 125 126 127 128 129 130 131 23 153 154 155 156 157 158 159
+16 104 105 106 107 108 109 110 20 132 133 134 135 136 137 138 24 160 161 162 163 164 165 166
+17 111 112 113 114 115 116 117 21 139 140 141 142 143 144 145 25 167 168 169 170 171 172 173
+18 118 119 120 22 146 147 148 149 150 151 26 174 175 176 177 178 179 180
+ 27 181
+ July August September
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+27 182 183 184 185 186 187 31 213 214 215 36 244 245 246 247 248 249 250
+28 188 189 190 191 192 193 194 32 216 217 218 219 220 221 222 37 251 252 253 254 255 256 257
+29 195 196 197 198 199 200 201 33 223 224 225 226 227 228 229 38 258 259 260 261 262 263 264
+30 202 203 204 205 206 207 208 34 230 231 232 233 234 235 236 39 265 266 267 268 269 270 271
+31 209 210 211 212 35 237 238 239 240 241 242 243 40 272 273
+
+ October November December
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+40 274 275 276 277 278 44 305 306 49 335 336 337 338 339 340 341
+41 279 280 281 282 283 284 285 45 307 308 309 310 311 312 313 50 342 343 344 345 346 347 348
+42 286 287 288 289 290 291 292 46 314 315 316 317 318 319 320 51 349 350 351 352 353 354 355
+43 293 294 295 296 297 298 299 47 321 322 323 324 325 326 327 52 356 357 358 359 360 361 362
+44 300 301 302 303 304 48 328 329 330 331 332 333 334 1 363 364 365
+
+ 2009
+
+ January February March
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+ 1 1 2 3 4 5 32 9 60
+ 2 5 6 7 8 9 10 11 6 33 34 35 36 37 38 39 10 61 62 63 64 65 66 67
+ 3 12 13 14 15 16 17 18 7 40 41 42 43 44 45 46 11 68 69 70 71 72 73 74
+ 4 19 20 21 22 23 24 25 8 47 48 49 50 51 52 53 12 75 76 77 78 79 80 81
+ 5 26 27 28 29 30 31 9 54 55 56 57 58 59 13 82 83 84 85 86 87 88
+ 14 89 90
+ April May June
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+14 91 92 93 94 95 18 121 122 123 23 152 153 154 155 156 157 158
+15 96 97 98 99 100 101 102 19 124 125 126 127 128 129 130 24 159 160 161 162 163 164 165
+16 103 104 105 106 107 108 109 20 131 132 133 134 135 136 137 25 166 167 168 169 170 171 172
+17 110 111 112 113 114 115 116 21 138 139 140 141 142 143 144 26 173 174 175 176 177 178 179
+18 117 118 119 120 22 145 146 147 148 149 150 151 27 180 181
+
+ July August September
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+27 182 183 184 185 186 31 213 214 36 244 245 246 247 248 249
+28 187 188 189 190 191 192 193 32 215 216 217 218 219 220 221 37 250 251 252 253 254 255 256
+29 194 195 196 197 198 199 200 33 222 223 224 225 226 227 228 38 257 258 259 260 261 262 263
+30 201 202 203 204 205 206 207 34 229 230 231 232 233 234 235 39 264 265 266 267 268 269 270
+31 208 209 210 211 212 35 236 237 238 239 240 241 242 40 271 272 273
+ 36 243
+ October November December
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+40 274 275 276 277 44 305 49 335 336 337 338 339 340
+41 278 279 280 281 282 283 284 45 306 307 308 309 310 311 312 50 341 342 343 344 345 346 347
+42 285 286 287 288 289 290 291 46 313 314 315 316 317 318 319 51 348 349 350 351 352 353 354
+43 292 293 294 295 296 297 298 47 320 321 322 323 324 325 326 52 355 356 357 358 359 360 361
+44 299 300 301 302 303 304 48 327 328 329 330 331 332 333 53 362 363 364 365
+ 49 334
+ 2010
+
+ January February March
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+53 1 2 3 5 32 33 34 35 36 37 38 9 60 61 62 63 64 65 66
+ 1 4 5 6 7 8 9 10 6 39 40 41 42 43 44 45 10 67 68 69 70 71 72 73
+ 2 11 12 13 14 15 16 17 7 46 47 48 49 50 51 52 11 74 75 76 77 78 79 80
+ 3 18 19 20 21 22 23 24 8 53 54 55 56 57 58 59 12 81 82 83 84 85 86 87
+ 4 25 26 27 28 29 30 31 13 88 89 90
+
+ April May June
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+13 91 92 93 94 17 121 122 22 152 153 154 155 156 157
+14 95 96 97 98 99 100 101 18 123 124 125 126 127 128 129 23 158 159 160 161 162 163 164
+15 102 103 104 105 106 107 108 19 130 131 132 133 134 135 136 24 165 166 167 168 169 170 171
+16 109 110 111 112 113 114 115 20 137 138 139 140 141 142 143 25 172 173 174 175 176 177 178
+17 116 117 118 119 120 21 144 145 146 147 148 149 150 26 179 180 181
+ 22 151
+ July August September
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+26 182 183 184 185 30 213 35 244 245 246 247 248
+27 186 187 188 189 190 191 192 31 214 215 216 217 218 219 220 36 249 250 251 252 253 254 255
+28 193 194 195 196 197 198 199 32 221 222 223 224 225 226 227 37 256 257 258 259 260 261 262
+29 200 201 202 203 204 205 206 33 228 229 230 231 232 233 234 38 263 264 265 266 267 268 269
+30 207 208 209 210 211 212 34 235 236 237 238 239 240 241 39 270 271 272 273
+ 35 242 243
+ October November December
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+39 274 275 276 44 305 306 307 308 309 310 311 48 335 336 337 338 339
+40 277 278 279 280 281 282 283 45 312 313 314 315 316 317 318 49 340 341 342 343 344 345 346
+41 284 285 286 287 288 289 290 46 319 320 321 322 323 324 325 50 347 348 349 350 351 352 353
+42 291 292 293 294 295 296 297 47 326 327 328 329 330 331 332 51 354 355 356 357 358 359 360
+43 298 299 300 301 302 303 304 48 333 334 52 361 362 363 364 365
+
+ 2011
+
+ January February March
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+52 1 2 5 32 33 34 35 36 37 9 60 61 62 63 64 65
+ 1 3 4 5 6 7 8 9 6 38 39 40 41 42 43 44 10 66 67 68 69 70 71 72
+ 2 10 11 12 13 14 15 16 7 45 46 47 48 49 50 51 11 73 74 75 76 77 78 79
+ 3 17 18 19 20 21 22 23 8 52 53 54 55 56 57 58 12 80 81 82 83 84 85 86
+ 4 24 25 26 27 28 29 30 9 59 13 87 88 89 90
+ 5 31
+ April May June
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+13 91 92 93 17 121 22 152 153 154 155 156
+14 94 95 96 97 98 99 100 18 122 123 124 125 126 127 128 23 157 158 159 160 161 162 163
+15 101 102 103 104 105 106 107 19 129 130 131 132 133 134 135 24 164 165 166 167 168 169 170
+16 108 109 110 111 112 113 114 20 136 137 138 139 140 141 142 25 171 172 173 174 175 176 177
+17 115 116 117 118 119 120 21 143 144 145 146 147 148 149 26 178 179 180 181
+ 22 150 151
+ July August September
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+26 182 183 184 31 213 214 215 216 217 218 219 35 244 245 246 247
+27 185 186 187 188 189 190 191 32 220 221 222 223 224 225 226 36 248 249 250 251 252 253 254
+28 192 193 194 195 196 197 198 33 227 228 229 230 231 232 233 37 255 256 257 258 259 260 261
+29 199 200 201 202 203 204 205 34 234 235 236 237 238 239 240 38 262 263 264 265 266 267 268
+30 206 207 208 209 210 211 212 35 241 242 243 39 269 270 271 272 273
+
+ October November December
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+39 274 275 44 305 306 307 308 309 310 48 335 336 337 338
+40 276 277 278 279 280 281 282 45 311 312 313 314 315 316 317 49 339 340 341 342 343 344 345
+41 283 284 285 286 287 288 289 46 318 319 320 321 322 323 324 50 346 347 348 349 350 351 352
+42 290 291 292 293 294 295 296 47 325 326 327 328 329 330 331 51 353 354 355 356 357 358 359
+43 297 298 299 300 301 302 303 48 332 333 334 52 360 361 362 363 364 365
+44 304
+ 2012
+
+ January February March
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+52 1 5 32 33 34 35 36 9 61 62 63 64
+ 1 2 3 4 5 6 7 8 6 37 38 39 40 41 42 43 10 65 66 67 68 69 70 71
+ 2 9 10 11 12 13 14 15 7 44 45 46 47 48 49 50 11 72 73 74 75 76 77 78
+ 3 16 17 18 19 20 21 22 8 51 52 53 54 55 56 57 12 79 80 81 82 83 84 85
+ 4 23 24 25 26 27 28 29 9 58 59 60 13 86 87 88 89 90 91
+ 5 30 31
+ April May June
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+13 92 18 122 123 124 125 126 127 22 153 154 155
+14 93 94 95 96 97 98 99 19 128 129 130 131 132 133 134 23 156 157 158 159 160 161 162
+15 100 101 102 103 104 105 106 20 135 136 137 138 139 140 141 24 163 164 165 166 167 168 169
+16 107 108 109 110 111 112 113 21 142 143 144 145 146 147 148 25 170 171 172 173 174 175 176
+17 114 115 116 117 118 119 120 22 149 150 151 152 26 177 178 179 180 181 182
+18 121
+ July August September
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+26 183 31 214 215 216 217 218 35 245 246
+27 184 185 186 187 188 189 190 32 219 220 221 222 223 224 225 36 247 248 249 250 251 252 253
+28 191 192 193 194 195 196 197 33 226 227 228 229 230 231 232 37 254 255 256 257 258 259 260
+29 198 199 200 201 202 203 204 34 233 234 235 236 237 238 239 38 261 262 263 264 265 266 267
+30 205 206 207 208 209 210 211 35 240 241 242 243 244 39 268 269 270 271 272 273 274
+31 212 213
+ October November December
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+40 275 276 277 278 279 280 281 44 306 307 308 309 48 336 337
+41 282 283 284 285 286 287 288 45 310 311 312 313 314 315 316 49 338 339 340 341 342 343 344
+42 289 290 291 292 293 294 295 46 317 318 319 320 321 322 323 50 345 346 347 348 349 350 351
+43 296 297 298 299 300 301 302 47 324 325 326 327 328 329 330 51 352 353 354 355 356 357 358
+44 303 304 305 48 331 332 333 334 335 52 359 360 361 362 363 364 365
+ 1 366
diff --git a/tests/expected/cal/weeknum-ymw b/tests/expected/cal/weeknum-ymw
new file mode 100644
index 0000000..44c20d4
--- /dev/null
+++ b/tests/expected/cal/weeknum-ymw
@@ -0,0 +1,239 @@
+Gregorian - Monday-based week with week numbers
+ 2001
+
+ 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 6 7 5 1 2 3 4 9 1 2 3 4
+ 2 8 9 10 11 12 13 14 6 5 6 7 8 9 10 11 10 5 6 7 8 9 10 11
+ 3 15 16 17 18 19 20 21 7 12 13 14 15 16 17 18 11 12 13 14 15 16 17 18
+ 4 22 23 24 25 26 27 28 8 19 20 21 22 23 24 25 12 19 20 21 22 23 24 25
+ 5 29 30 31 9 26 27 28 13 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
+13 1 18 1 2 3 4 5 6 22 1 2 3
+14 2 3 4 5 6 7 8 19 7 8 9 10 11 12 13 23 4 5 6 7 8 9 10
+15 9 10 11 12 13 14 15 20 14 15 16 17 18 19 20 24 11 12 13 14 15 16 17
+16 16 17 18 19 20 21 22 21 21 22 23 24 25 26 27 25 18 19 20 21 22 23 24
+17 23 24 25 26 27 28 29 22 28 29 30 31 26 25 26 27 28 29 30
+18 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
+26 1 31 1 2 3 4 5 35 1 2
+27 2 3 4 5 6 7 8 32 6 7 8 9 10 11 12 36 3 4 5 6 7 8 9
+28 9 10 11 12 13 14 15 33 13 14 15 16 17 18 19 37 10 11 12 13 14 15 16
+29 16 17 18 19 20 21 22 34 20 21 22 23 24 25 26 38 17 18 19 20 21 22 23
+30 23 24 25 26 27 28 29 35 27 28 29 30 31 39 24 25 26 27 28 29 30
+31 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
+40 1 2 3 4 5 6 7 44 1 2 3 4 48 1 2
+41 8 9 10 11 12 13 14 45 5 6 7 8 9 10 11 49 3 4 5 6 7 8 9
+42 15 16 17 18 19 20 21 46 12 13 14 15 16 17 18 50 10 11 12 13 14 15 16
+43 22 23 24 25 26 27 28 47 19 20 21 22 23 24 25 51 17 18 19 20 21 22 23
+44 29 30 31 48 26 27 28 29 30 52 24 25 26 27 28 29 30
+ 1 31
+ 2002
+
+ 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 6 5 1 2 3 9 1 2 3
+ 2 7 8 9 10 11 12 13 6 4 5 6 7 8 9 10 10 4 5 6 7 8 9 10
+ 3 14 15 16 17 18 19 20 7 11 12 13 14 15 16 17 11 11 12 13 14 15 16 17
+ 4 21 22 23 24 25 26 27 8 18 19 20 21 22 23 24 12 18 19 20 21 22 23 24
+ 5 28 29 30 31 9 25 26 27 28 13 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
+14 1 2 3 4 5 6 7 18 1 2 3 4 5 22 1 2
+15 8 9 10 11 12 13 14 19 6 7 8 9 10 11 12 23 3 4 5 6 7 8 9
+16 15 16 17 18 19 20 21 20 13 14 15 16 17 18 19 24 10 11 12 13 14 15 16
+17 22 23 24 25 26 27 28 21 20 21 22 23 24 25 26 25 17 18 19 20 21 22 23
+18 29 30 22 27 28 29 30 31 26 24 25 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
+27 1 2 3 4 5 6 7 31 1 2 3 4 35 1
+28 8 9 10 11 12 13 14 32 5 6 7 8 9 10 11 36 2 3 4 5 6 7 8
+29 15 16 17 18 19 20 21 33 12 13 14 15 16 17 18 37 9 10 11 12 13 14 15
+30 22 23 24 25 26 27 28 34 19 20 21 22 23 24 25 38 16 17 18 19 20 21 22
+31 29 30 31 35 26 27 28 29 30 31 39 23 24 25 26 27 28 29
+ 40 30
+ October November December
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+40 1 2 3 4 5 6 44 1 2 3 48 1
+41 7 8 9 10 11 12 13 45 4 5 6 7 8 9 10 49 2 3 4 5 6 7 8
+42 14 15 16 17 18 19 20 46 11 12 13 14 15 16 17 50 9 10 11 12 13 14 15
+43 21 22 23 24 25 26 27 47 18 19 20 21 22 23 24 51 16 17 18 19 20 21 22
+44 28 29 30 31 48 25 26 27 28 29 30 52 23 24 25 26 27 28 29
+ 1 30 31
+ 2003
+
+ 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 5 1 2 9 1 2
+ 2 6 7 8 9 10 11 12 6 3 4 5 6 7 8 9 10 3 4 5 6 7 8 9
+ 3 13 14 15 16 17 18 19 7 10 11 12 13 14 15 16 11 10 11 12 13 14 15 16
+ 4 20 21 22 23 24 25 26 8 17 18 19 20 21 22 23 12 17 18 19 20 21 22 23
+ 5 27 28 29 30 31 9 24 25 26 27 28 13 24 25 26 27 28 29 30
+ 14 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
+14 1 2 3 4 5 6 18 1 2 3 4 22 1
+15 7 8 9 10 11 12 13 19 5 6 7 8 9 10 11 23 2 3 4 5 6 7 8
+16 14 15 16 17 18 19 20 20 12 13 14 15 16 17 18 24 9 10 11 12 13 14 15
+17 21 22 23 24 25 26 27 21 19 20 21 22 23 24 25 25 16 17 18 19 20 21 22
+18 28 29 30 22 26 27 28 29 30 31 26 23 24 25 26 27 28 29
+ 27 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
+27 1 2 3 4 5 6 31 1 2 3 36 1 2 3 4 5 6 7
+28 7 8 9 10 11 12 13 32 4 5 6 7 8 9 10 37 8 9 10 11 12 13 14
+29 14 15 16 17 18 19 20 33 11 12 13 14 15 16 17 38 15 16 17 18 19 20 21
+30 21 22 23 24 25 26 27 34 18 19 20 21 22 23 24 39 22 23 24 25 26 27 28
+31 28 29 30 31 35 25 26 27 28 29 30 31 40 29 30
+
+ October November December
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+40 1 2 3 4 5 44 1 2 49 1 2 3 4 5 6 7
+41 6 7 8 9 10 11 12 45 3 4 5 6 7 8 9 50 8 9 10 11 12 13 14
+42 13 14 15 16 17 18 19 46 10 11 12 13 14 15 16 51 15 16 17 18 19 20 21
+43 20 21 22 23 24 25 26 47 17 18 19 20 21 22 23 52 22 23 24 25 26 27 28
+44 27 28 29 30 31 48 24 25 26 27 28 29 30 1 29 30 31
+
+ 2009
+
+ 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 9 1
+ 2 5 6 7 8 9 10 11 6 2 3 4 5 6 7 8 10 2 3 4 5 6 7 8
+ 3 12 13 14 15 16 17 18 7 9 10 11 12 13 14 15 11 9 10 11 12 13 14 15
+ 4 19 20 21 22 23 24 25 8 16 17 18 19 20 21 22 12 16 17 18 19 20 21 22
+ 5 26 27 28 29 30 31 9 23 24 25 26 27 28 13 23 24 25 26 27 28 29
+ 14 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
+14 1 2 3 4 5 18 1 2 3 23 1 2 3 4 5 6 7
+15 6 7 8 9 10 11 12 19 4 5 6 7 8 9 10 24 8 9 10 11 12 13 14
+16 13 14 15 16 17 18 19 20 11 12 13 14 15 16 17 25 15 16 17 18 19 20 21
+17 20 21 22 23 24 25 26 21 18 19 20 21 22 23 24 26 22 23 24 25 26 27 28
+18 27 28 29 30 22 25 26 27 28 29 30 31 27 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
+27 1 2 3 4 5 31 1 2 36 1 2 3 4 5 6
+28 6 7 8 9 10 11 12 32 3 4 5 6 7 8 9 37 7 8 9 10 11 12 13
+29 13 14 15 16 17 18 19 33 10 11 12 13 14 15 16 38 14 15 16 17 18 19 20
+30 20 21 22 23 24 25 26 34 17 18 19 20 21 22 23 39 21 22 23 24 25 26 27
+31 27 28 29 30 31 35 24 25 26 27 28 29 30 40 28 29 30
+ 36 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
+40 1 2 3 4 44 1 49 1 2 3 4 5 6
+41 5 6 7 8 9 10 11 45 2 3 4 5 6 7 8 50 7 8 9 10 11 12 13
+42 12 13 14 15 16 17 18 46 9 10 11 12 13 14 15 51 14 15 16 17 18 19 20
+43 19 20 21 22 23 24 25 47 16 17 18 19 20 21 22 52 21 22 23 24 25 26 27
+44 26 27 28 29 30 31 48 23 24 25 26 27 28 29 53 28 29 30 31
+ 49 30
+ 2010
+
+ January February March
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+53 1 2 3 5 1 2 3 4 5 6 7 9 1 2 3 4 5 6 7
+ 1 4 5 6 7 8 9 10 6 8 9 10 11 12 13 14 10 8 9 10 11 12 13 14
+ 2 11 12 13 14 15 16 17 7 15 16 17 18 19 20 21 11 15 16 17 18 19 20 21
+ 3 18 19 20 21 22 23 24 8 22 23 24 25 26 27 28 12 22 23 24 25 26 27 28
+ 4 25 26 27 28 29 30 31 13 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
+13 1 2 3 4 17 1 2 22 1 2 3 4 5 6
+14 5 6 7 8 9 10 11 18 3 4 5 6 7 8 9 23 7 8 9 10 11 12 13
+15 12 13 14 15 16 17 18 19 10 11 12 13 14 15 16 24 14 15 16 17 18 19 20
+16 19 20 21 22 23 24 25 20 17 18 19 20 21 22 23 25 21 22 23 24 25 26 27
+17 26 27 28 29 30 21 24 25 26 27 28 29 30 26 28 29 30
+ 22 31
+ July August September
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+26 1 2 3 4 30 1 35 1 2 3 4 5
+27 5 6 7 8 9 10 11 31 2 3 4 5 6 7 8 36 6 7 8 9 10 11 12
+28 12 13 14 15 16 17 18 32 9 10 11 12 13 14 15 37 13 14 15 16 17 18 19
+29 19 20 21 22 23 24 25 33 16 17 18 19 20 21 22 38 20 21 22 23 24 25 26
+30 26 27 28 29 30 31 34 23 24 25 26 27 28 29 39 27 28 29 30
+ 35 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
+39 1 2 3 44 1 2 3 4 5 6 7 48 1 2 3 4 5
+40 4 5 6 7 8 9 10 45 8 9 10 11 12 13 14 49 6 7 8 9 10 11 12
+41 11 12 13 14 15 16 17 46 15 16 17 18 19 20 21 50 13 14 15 16 17 18 19
+42 18 19 20 21 22 23 24 47 22 23 24 25 26 27 28 51 20 21 22 23 24 25 26
+43 25 26 27 28 29 30 31 48 29 30 52 27 28 29 30 31
+
+ 2011
+
+ January February March
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+52 1 2 5 1 2 3 4 5 6 9 1 2 3 4 5 6
+ 1 3 4 5 6 7 8 9 6 7 8 9 10 11 12 13 10 7 8 9 10 11 12 13
+ 2 10 11 12 13 14 15 16 7 14 15 16 17 18 19 20 11 14 15 16 17 18 19 20
+ 3 17 18 19 20 21 22 23 8 21 22 23 24 25 26 27 12 21 22 23 24 25 26 27
+ 4 24 25 26 27 28 29 30 9 28 13 28 29 30 31
+ 5 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
+13 1 2 3 17 1 22 1 2 3 4 5
+14 4 5 6 7 8 9 10 18 2 3 4 5 6 7 8 23 6 7 8 9 10 11 12
+15 11 12 13 14 15 16 17 19 9 10 11 12 13 14 15 24 13 14 15 16 17 18 19
+16 18 19 20 21 22 23 24 20 16 17 18 19 20 21 22 25 20 21 22 23 24 25 26
+17 25 26 27 28 29 30 21 23 24 25 26 27 28 29 26 27 28 29 30
+ 22 30 31
+ July August September
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+26 1 2 3 31 1 2 3 4 5 6 7 35 1 2 3 4
+27 4 5 6 7 8 9 10 32 8 9 10 11 12 13 14 36 5 6 7 8 9 10 11
+28 11 12 13 14 15 16 17 33 15 16 17 18 19 20 21 37 12 13 14 15 16 17 18
+29 18 19 20 21 22 23 24 34 22 23 24 25 26 27 28 38 19 20 21 22 23 24 25
+30 25 26 27 28 29 30 31 35 29 30 31 39 26 27 28 29 30
+
+ October November December
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+39 1 2 44 1 2 3 4 5 6 48 1 2 3 4
+40 3 4 5 6 7 8 9 45 7 8 9 10 11 12 13 49 5 6 7 8 9 10 11
+41 10 11 12 13 14 15 16 46 14 15 16 17 18 19 20 50 12 13 14 15 16 17 18
+42 17 18 19 20 21 22 23 47 21 22 23 24 25 26 27 51 19 20 21 22 23 24 25
+43 24 25 26 27 28 29 30 48 28 29 30 52 26 27 28 29 30 31
+44 31
+ 2012
+
+ January February March
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+52 1 5 1 2 3 4 5 9 1 2 3 4
+ 1 2 3 4 5 6 7 8 6 6 7 8 9 10 11 12 10 5 6 7 8 9 10 11
+ 2 9 10 11 12 13 14 15 7 13 14 15 16 17 18 19 11 12 13 14 15 16 17 18
+ 3 16 17 18 19 20 21 22 8 20 21 22 23 24 25 26 12 19 20 21 22 23 24 25
+ 4 23 24 25 26 27 28 29 9 27 28 29 13 26 27 28 29 30 31
+ 5 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
+13 1 18 1 2 3 4 5 6 22 1 2 3
+14 2 3 4 5 6 7 8 19 7 8 9 10 11 12 13 23 4 5 6 7 8 9 10
+15 9 10 11 12 13 14 15 20 14 15 16 17 18 19 20 24 11 12 13 14 15 16 17
+16 16 17 18 19 20 21 22 21 21 22 23 24 25 26 27 25 18 19 20 21 22 23 24
+17 23 24 25 26 27 28 29 22 28 29 30 31 26 25 26 27 28 29 30
+18 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
+26 1 31 1 2 3 4 5 35 1 2
+27 2 3 4 5 6 7 8 32 6 7 8 9 10 11 12 36 3 4 5 6 7 8 9
+28 9 10 11 12 13 14 15 33 13 14 15 16 17 18 19 37 10 11 12 13 14 15 16
+29 16 17 18 19 20 21 22 34 20 21 22 23 24 25 26 38 17 18 19 20 21 22 23
+30 23 24 25 26 27 28 29 35 27 28 29 30 31 39 24 25 26 27 28 29 30
+31 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
+40 1 2 3 4 5 6 7 44 1 2 3 4 48 1 2
+41 8 9 10 11 12 13 14 45 5 6 7 8 9 10 11 49 3 4 5 6 7 8 9
+42 15 16 17 18 19 20 21 46 12 13 14 15 16 17 18 50 10 11 12 13 14 15 16
+43 22 23 24 25 26 27 28 47 19 20 21 22 23 24 25 51 17 18 19 20 21 22 23
+44 29 30 31 48 26 27 28 29 30 52 24 25 26 27 28 29 30
+ 1 31
diff --git a/tests/expected/cal/weeknum-ysjw b/tests/expected/cal/weeknum-ysjw
new file mode 100644
index 0000000..b5a8527
--- /dev/null
+++ b/tests/expected/cal/weeknum-ysjw
@@ -0,0 +1,239 @@
+Julian - Sunday-based week with week numbers
+ 2001
+
+ January February March
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 1 1 2 3 4 5 6 5 32 33 34 9 60 61 62
+ 2 7 8 9 10 11 12 13 6 35 36 37 38 39 40 41 10 63 64 65 66 67 68 69
+ 3 14 15 16 17 18 19 20 7 42 43 44 45 46 47 48 11 70 71 72 73 74 75 76
+ 4 21 22 23 24 25 26 27 8 49 50 51 52 53 54 55 12 77 78 79 80 81 82 83
+ 5 28 29 30 31 9 56 57 58 59 13 84 85 86 87 88 89 90
+
+ April May June
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+14 91 92 93 94 95 96 97 18 121 122 123 124 125 22 152 153
+15 98 99 100 101 102 103 104 19 126 127 128 129 130 131 132 23 154 155 156 157 158 159 160
+16 105 106 107 108 109 110 111 20 133 134 135 136 137 138 139 24 161 162 163 164 165 166 167
+17 112 113 114 115 116 117 118 21 140 141 142 143 144 145 146 25 168 169 170 171 172 173 174
+18 119 120 22 147 148 149 150 151 26 175 176 177 178 179 180 181
+
+ July August September
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+27 182 183 184 185 186 187 188 31 213 214 215 216 35 244
+28 189 190 191 192 193 194 195 32 217 218 219 220 221 222 223 36 245 246 247 248 249 250 251
+29 196 197 198 199 200 201 202 33 224 225 226 227 228 229 230 37 252 253 254 255 256 257 258
+30 203 204 205 206 207 208 209 34 231 232 233 234 235 236 237 38 259 260 261 262 263 264 265
+31 210 211 212 35 238 239 240 241 242 243 39 266 267 268 269 270 271 272
+ 40 273
+ October November December
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+40 274 275 276 277 278 279 44 305 306 307 48 335
+41 280 281 282 283 284 285 286 45 308 309 310 311 312 313 314 49 336 337 338 339 340 341 342
+42 287 288 289 290 291 292 293 46 315 316 317 318 319 320 321 50 343 344 345 346 347 348 349
+43 294 295 296 297 298 299 300 47 322 323 324 325 326 327 328 51 350 351 352 353 354 355 356
+44 301 302 303 304 48 329 330 331 332 333 334 52 357 358 359 360 361 362 363
+ 53 364 365
+ 2002
+
+ January February March
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 1 1 2 3 4 5 5 32 33 9 60 61
+ 2 6 7 8 9 10 11 12 6 34 35 36 37 38 39 40 10 62 63 64 65 66 67 68
+ 3 13 14 15 16 17 18 19 7 41 42 43 44 45 46 47 11 69 70 71 72 73 74 75
+ 4 20 21 22 23 24 25 26 8 48 49 50 51 52 53 54 12 76 77 78 79 80 81 82
+ 5 27 28 29 30 31 9 55 56 57 58 59 13 83 84 85 86 87 88 89
+ 14 90
+ April May June
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+14 91 92 93 94 95 96 18 121 122 123 124 22 152
+15 97 98 99 100 101 102 103 19 125 126 127 128 129 130 131 23 153 154 155 156 157 158 159
+16 104 105 106 107 108 109 110 20 132 133 134 135 136 137 138 24 160 161 162 163 164 165 166
+17 111 112 113 114 115 116 117 21 139 140 141 142 143 144 145 25 167 168 169 170 171 172 173
+18 118 119 120 22 146 147 148 149 150 151 26 174 175 176 177 178 179 180
+ 27 181
+ July August September
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+27 182 183 184 185 186 187 31 213 214 215 36 244 245 246 247 248 249 250
+28 188 189 190 191 192 193 194 32 216 217 218 219 220 221 222 37 251 252 253 254 255 256 257
+29 195 196 197 198 199 200 201 33 223 224 225 226 227 228 229 38 258 259 260 261 262 263 264
+30 202 203 204 205 206 207 208 34 230 231 232 233 234 235 236 39 265 266 267 268 269 270 271
+31 209 210 211 212 35 237 238 239 240 241 242 243 40 272 273
+
+ October November December
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+40 274 275 276 277 278 44 305 306 49 335 336 337 338 339 340 341
+41 279 280 281 282 283 284 285 45 307 308 309 310 311 312 313 50 342 343 344 345 346 347 348
+42 286 287 288 289 290 291 292 46 314 315 316 317 318 319 320 51 349 350 351 352 353 354 355
+43 293 294 295 296 297 298 299 47 321 322 323 324 325 326 327 52 356 357 358 359 360 361 362
+44 300 301 302 303 304 48 328 329 330 331 332 333 334 53 363 364 365
+
+ 2003
+
+ January February March
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 1 1 2 3 4 5 32 9 60
+ 2 5 6 7 8 9 10 11 6 33 34 35 36 37 38 39 10 61 62 63 64 65 66 67
+ 3 12 13 14 15 16 17 18 7 40 41 42 43 44 45 46 11 68 69 70 71 72 73 74
+ 4 19 20 21 22 23 24 25 8 47 48 49 50 51 52 53 12 75 76 77 78 79 80 81
+ 5 26 27 28 29 30 31 9 54 55 56 57 58 59 13 82 83 84 85 86 87 88
+ 14 89 90
+ April May June
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+14 91 92 93 94 95 18 121 122 123 23 152 153 154 155 156 157 158
+15 96 97 98 99 100 101 102 19 124 125 126 127 128 129 130 24 159 160 161 162 163 164 165
+16 103 104 105 106 107 108 109 20 131 132 133 134 135 136 137 25 166 167 168 169 170 171 172
+17 110 111 112 113 114 115 116 21 138 139 140 141 142 143 144 26 173 174 175 176 177 178 179
+18 117 118 119 120 22 145 146 147 148 149 150 151 27 180 181
+
+ July August September
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+27 182 183 184 185 186 31 213 214 36 244 245 246 247 248 249
+28 187 188 189 190 191 192 193 32 215 216 217 218 219 220 221 37 250 251 252 253 254 255 256
+29 194 195 196 197 198 199 200 33 222 223 224 225 226 227 228 38 257 258 259 260 261 262 263
+30 201 202 203 204 205 206 207 34 229 230 231 232 233 234 235 39 264 265 266 267 268 269 270
+31 208 209 210 211 212 35 236 237 238 239 240 241 242 40 271 272 273
+ 36 243
+ October November December
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+40 274 275 276 277 44 305 49 335 336 337 338 339 340
+41 278 279 280 281 282 283 284 45 306 307 308 309 310 311 312 50 341 342 343 344 345 346 347
+42 285 286 287 288 289 290 291 46 313 314 315 316 317 318 319 51 348 349 350 351 352 353 354
+43 292 293 294 295 296 297 298 47 320 321 322 323 324 325 326 52 355 356 357 358 359 360 361
+44 299 300 301 302 303 304 48 327 328 329 330 331 332 333 53 362 363 364 365
+ 49 334
+ 2009
+
+ January February March
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 1 1 2 3 6 32 33 34 35 36 37 38 10 60 61 62 63 64 65 66
+ 2 4 5 6 7 8 9 10 7 39 40 41 42 43 44 45 11 67 68 69 70 71 72 73
+ 3 11 12 13 14 15 16 17 8 46 47 48 49 50 51 52 12 74 75 76 77 78 79 80
+ 4 18 19 20 21 22 23 24 9 53 54 55 56 57 58 59 13 81 82 83 84 85 86 87
+ 5 25 26 27 28 29 30 31 14 88 89 90
+
+ April May June
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+14 91 92 93 94 18 121 122 23 152 153 154 155 156 157
+15 95 96 97 98 99 100 101 19 123 124 125 126 127 128 129 24 158 159 160 161 162 163 164
+16 102 103 104 105 106 107 108 20 130 131 132 133 134 135 136 25 165 166 167 168 169 170 171
+17 109 110 111 112 113 114 115 21 137 138 139 140 141 142 143 26 172 173 174 175 176 177 178
+18 116 117 118 119 120 22 144 145 146 147 148 149 150 27 179 180 181
+ 23 151
+ July August September
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+27 182 183 184 185 31 213 36 244 245 246 247 248
+28 186 187 188 189 190 191 192 32 214 215 216 217 218 219 220 37 249 250 251 252 253 254 255
+29 193 194 195 196 197 198 199 33 221 222 223 224 225 226 227 38 256 257 258 259 260 261 262
+30 200 201 202 203 204 205 206 34 228 229 230 231 232 233 234 39 263 264 265 266 267 268 269
+31 207 208 209 210 211 212 35 235 236 237 238 239 240 241 40 270 271 272 273
+ 36 242 243
+ October November December
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+40 274 275 276 45 305 306 307 308 309 310 311 49 335 336 337 338 339
+41 277 278 279 280 281 282 283 46 312 313 314 315 316 317 318 50 340 341 342 343 344 345 346
+42 284 285 286 287 288 289 290 47 319 320 321 322 323 324 325 51 347 348 349 350 351 352 353
+43 291 292 293 294 295 296 297 48 326 327 328 329 330 331 332 52 354 355 356 357 358 359 360
+44 298 299 300 301 302 303 304 49 333 334 53 361 362 363 364 365
+
+ 2010
+
+ January February March
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 1 1 2 6 32 33 34 35 36 37 10 60 61 62 63 64 65
+ 2 3 4 5 6 7 8 9 7 38 39 40 41 42 43 44 11 66 67 68 69 70 71 72
+ 3 10 11 12 13 14 15 16 8 45 46 47 48 49 50 51 12 73 74 75 76 77 78 79
+ 4 17 18 19 20 21 22 23 9 52 53 54 55 56 57 58 13 80 81 82 83 84 85 86
+ 5 24 25 26 27 28 29 30 10 59 14 87 88 89 90
+ 6 31
+ April May June
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+14 91 92 93 18 121 23 152 153 154 155 156
+15 94 95 96 97 98 99 100 19 122 123 124 125 126 127 128 24 157 158 159 160 161 162 163
+16 101 102 103 104 105 106 107 20 129 130 131 132 133 134 135 25 164 165 166 167 168 169 170
+17 108 109 110 111 112 113 114 21 136 137 138 139 140 141 142 26 171 172 173 174 175 176 177
+18 115 116 117 118 119 120 22 143 144 145 146 147 148 149 27 178 179 180 181
+ 23 150 151
+ July August September
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+27 182 183 184 32 213 214 215 216 217 218 219 36 244 245 246 247
+28 185 186 187 188 189 190 191 33 220 221 222 223 224 225 226 37 248 249 250 251 252 253 254
+29 192 193 194 195 196 197 198 34 227 228 229 230 231 232 233 38 255 256 257 258 259 260 261
+30 199 200 201 202 203 204 205 35 234 235 236 237 238 239 240 39 262 263 264 265 266 267 268
+31 206 207 208 209 210 211 212 36 241 242 243 40 269 270 271 272 273
+
+ October November December
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+40 274 275 45 305 306 307 308 309 310 49 335 336 337 338
+41 276 277 278 279 280 281 282 46 311 312 313 314 315 316 317 50 339 340 341 342 343 344 345
+42 283 284 285 286 287 288 289 47 318 319 320 321 322 323 324 51 346 347 348 349 350 351 352
+43 290 291 292 293 294 295 296 48 325 326 327 328 329 330 331 52 353 354 355 356 357 358 359
+44 297 298 299 300 301 302 303 49 332 333 334 53 360 361 362 363 364 365
+45 304
+ 2011
+
+ January February March
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 1 1 6 32 33 34 35 36 10 60 61 62 63 64
+ 2 2 3 4 5 6 7 8 7 37 38 39 40 41 42 43 11 65 66 67 68 69 70 71
+ 3 9 10 11 12 13 14 15 8 44 45 46 47 48 49 50 12 72 73 74 75 76 77 78
+ 4 16 17 18 19 20 21 22 9 51 52 53 54 55 56 57 13 79 80 81 82 83 84 85
+ 5 23 24 25 26 27 28 29 10 58 59 14 86 87 88 89 90
+ 6 30 31
+ April May June
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+14 91 92 19 121 122 123 124 125 126 127 23 152 153 154 155
+15 93 94 95 96 97 98 99 20 128 129 130 131 132 133 134 24 156 157 158 159 160 161 162
+16 100 101 102 103 104 105 106 21 135 136 137 138 139 140 141 25 163 164 165 166 167 168 169
+17 107 108 109 110 111 112 113 22 142 143 144 145 146 147 148 26 170 171 172 173 174 175 176
+18 114 115 116 117 118 119 120 23 149 150 151 27 177 178 179 180 181
+
+ July August September
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+27 182 183 32 213 214 215 216 217 218 36 244 245 246
+28 184 185 186 187 188 189 190 33 219 220 221 222 223 224 225 37 247 248 249 250 251 252 253
+29 191 192 193 194 195 196 197 34 226 227 228 229 230 231 232 38 254 255 256 257 258 259 260
+30 198 199 200 201 202 203 204 35 233 234 235 236 237 238 239 39 261 262 263 264 265 266 267
+31 205 206 207 208 209 210 211 36 240 241 242 243 40 268 269 270 271 272 273
+32 212
+ October November December
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+40 274 45 305 306 307 308 309 49 335 336 337
+41 275 276 277 278 279 280 281 46 310 311 312 313 314 315 316 50 338 339 340 341 342 343 344
+42 282 283 284 285 286 287 288 47 317 318 319 320 321 322 323 51 345 346 347 348 349 350 351
+43 289 290 291 292 293 294 295 48 324 325 326 327 328 329 330 52 352 353 354 355 356 357 358
+44 296 297 298 299 300 301 302 49 331 332 333 334 53 359 360 361 362 363 364 365
+45 303 304
+ 2012
+
+ January February March
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 1 1 2 3 4 5 6 7 5 32 33 34 35 9 61 62 63
+ 2 8 9 10 11 12 13 14 6 36 37 38 39 40 41 42 10 64 65 66 67 68 69 70
+ 3 15 16 17 18 19 20 21 7 43 44 45 46 47 48 49 11 71 72 73 74 75 76 77
+ 4 22 23 24 25 26 27 28 8 50 51 52 53 54 55 56 12 78 79 80 81 82 83 84
+ 5 29 30 31 9 57 58 59 60 13 85 86 87 88 89 90 91
+
+ April May June
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+14 92 93 94 95 96 97 98 18 122 123 124 125 126 22 153 154
+15 99 100 101 102 103 104 105 19 127 128 129 130 131 132 133 23 155 156 157 158 159 160 161
+16 106 107 108 109 110 111 112 20 134 135 136 137 138 139 140 24 162 163 164 165 166 167 168
+17 113 114 115 116 117 118 119 21 141 142 143 144 145 146 147 25 169 170 171 172 173 174 175
+18 120 121 22 148 149 150 151 152 26 176 177 178 179 180 181 182
+
+ July August September
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+27 183 184 185 186 187 188 189 31 214 215 216 217 35 245
+28 190 191 192 193 194 195 196 32 218 219 220 221 222 223 224 36 246 247 248 249 250 251 252
+29 197 198 199 200 201 202 203 33 225 226 227 228 229 230 231 37 253 254 255 256 257 258 259
+30 204 205 206 207 208 209 210 34 232 233 234 235 236 237 238 38 260 261 262 263 264 265 266
+31 211 212 213 35 239 240 241 242 243 244 39 267 268 269 270 271 272 273
+ 40 274
+ October November December
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+40 275 276 277 278 279 280 44 306 307 308 48 336
+41 281 282 283 284 285 286 287 45 309 310 311 312 313 314 315 49 337 338 339 340 341 342 343
+42 288 289 290 291 292 293 294 46 316 317 318 319 320 321 322 50 344 345 346 347 348 349 350
+43 295 296 297 298 299 300 301 47 323 324 325 326 327 328 329 51 351 352 353 354 355 356 357
+44 302 303 304 305 48 330 331 332 333 334 335 52 358 359 360 361 362 363 364
+ 53 365 366
diff --git a/tests/expected/cal/weeknum-ysw b/tests/expected/cal/weeknum-ysw
new file mode 100644
index 0000000..0c924ce
--- /dev/null
+++ b/tests/expected/cal/weeknum-ysw
@@ -0,0 +1,239 @@
+Gregorian - Sunday-based week with week numbers
+ 2001
+
+ 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 1 2 3 4 5 6 5 1 2 3 9 1 2 3
+ 2 7 8 9 10 11 12 13 6 4 5 6 7 8 9 10 10 4 5 6 7 8 9 10
+ 3 14 15 16 17 18 19 20 7 11 12 13 14 15 16 17 11 11 12 13 14 15 16 17
+ 4 21 22 23 24 25 26 27 8 18 19 20 21 22 23 24 12 18 19 20 21 22 23 24
+ 5 28 29 30 31 9 25 26 27 28 13 25 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
+14 1 2 3 4 5 6 7 18 1 2 3 4 5 22 1 2
+15 8 9 10 11 12 13 14 19 6 7 8 9 10 11 12 23 3 4 5 6 7 8 9
+16 15 16 17 18 19 20 21 20 13 14 15 16 17 18 19 24 10 11 12 13 14 15 16
+17 22 23 24 25 26 27 28 21 20 21 22 23 24 25 26 25 17 18 19 20 21 22 23
+18 29 30 22 27 28 29 30 31 26 24 25 26 27 28 29 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
+27 1 2 3 4 5 6 7 31 1 2 3 4 35 1
+28 8 9 10 11 12 13 14 32 5 6 7 8 9 10 11 36 2 3 4 5 6 7 8
+29 15 16 17 18 19 20 21 33 12 13 14 15 16 17 18 37 9 10 11 12 13 14 15
+30 22 23 24 25 26 27 28 34 19 20 21 22 23 24 25 38 16 17 18 19 20 21 22
+31 29 30 31 35 26 27 28 29 30 31 39 23 24 25 26 27 28 29
+ 40 30
+ October November December
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+40 1 2 3 4 5 6 44 1 2 3 48 1
+41 7 8 9 10 11 12 13 45 4 5 6 7 8 9 10 49 2 3 4 5 6 7 8
+42 14 15 16 17 18 19 20 46 11 12 13 14 15 16 17 50 9 10 11 12 13 14 15
+43 21 22 23 24 25 26 27 47 18 19 20 21 22 23 24 51 16 17 18 19 20 21 22
+44 28 29 30 31 48 25 26 27 28 29 30 52 23 24 25 26 27 28 29
+ 53 30 31
+ 2002
+
+ 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 1 2 3 4 5 5 1 2 9 1 2
+ 2 6 7 8 9 10 11 12 6 3 4 5 6 7 8 9 10 3 4 5 6 7 8 9
+ 3 13 14 15 16 17 18 19 7 10 11 12 13 14 15 16 11 10 11 12 13 14 15 16
+ 4 20 21 22 23 24 25 26 8 17 18 19 20 21 22 23 12 17 18 19 20 21 22 23
+ 5 27 28 29 30 31 9 24 25 26 27 28 13 24 25 26 27 28 29 30
+ 14 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
+14 1 2 3 4 5 6 18 1 2 3 4 22 1
+15 7 8 9 10 11 12 13 19 5 6 7 8 9 10 11 23 2 3 4 5 6 7 8
+16 14 15 16 17 18 19 20 20 12 13 14 15 16 17 18 24 9 10 11 12 13 14 15
+17 21 22 23 24 25 26 27 21 19 20 21 22 23 24 25 25 16 17 18 19 20 21 22
+18 28 29 30 22 26 27 28 29 30 31 26 23 24 25 26 27 28 29
+ 27 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
+27 1 2 3 4 5 6 31 1 2 3 36 1 2 3 4 5 6 7
+28 7 8 9 10 11 12 13 32 4 5 6 7 8 9 10 37 8 9 10 11 12 13 14
+29 14 15 16 17 18 19 20 33 11 12 13 14 15 16 17 38 15 16 17 18 19 20 21
+30 21 22 23 24 25 26 27 34 18 19 20 21 22 23 24 39 22 23 24 25 26 27 28
+31 28 29 30 31 35 25 26 27 28 29 30 31 40 29 30
+
+ October November December
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+40 1 2 3 4 5 44 1 2 49 1 2 3 4 5 6 7
+41 6 7 8 9 10 11 12 45 3 4 5 6 7 8 9 50 8 9 10 11 12 13 14
+42 13 14 15 16 17 18 19 46 10 11 12 13 14 15 16 51 15 16 17 18 19 20 21
+43 20 21 22 23 24 25 26 47 17 18 19 20 21 22 23 52 22 23 24 25 26 27 28
+44 27 28 29 30 31 48 24 25 26 27 28 29 30 53 29 30 31
+
+ 2003
+
+ 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 1 2 3 4 5 1 9 1
+ 2 5 6 7 8 9 10 11 6 2 3 4 5 6 7 8 10 2 3 4 5 6 7 8
+ 3 12 13 14 15 16 17 18 7 9 10 11 12 13 14 15 11 9 10 11 12 13 14 15
+ 4 19 20 21 22 23 24 25 8 16 17 18 19 20 21 22 12 16 17 18 19 20 21 22
+ 5 26 27 28 29 30 31 9 23 24 25 26 27 28 13 23 24 25 26 27 28 29
+ 14 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
+14 1 2 3 4 5 18 1 2 3 23 1 2 3 4 5 6 7
+15 6 7 8 9 10 11 12 19 4 5 6 7 8 9 10 24 8 9 10 11 12 13 14
+16 13 14 15 16 17 18 19 20 11 12 13 14 15 16 17 25 15 16 17 18 19 20 21
+17 20 21 22 23 24 25 26 21 18 19 20 21 22 23 24 26 22 23 24 25 26 27 28
+18 27 28 29 30 22 25 26 27 28 29 30 31 27 29 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
+27 1 2 3 4 5 31 1 2 36 1 2 3 4 5 6
+28 6 7 8 9 10 11 12 32 3 4 5 6 7 8 9 37 7 8 9 10 11 12 13
+29 13 14 15 16 17 18 19 33 10 11 12 13 14 15 16 38 14 15 16 17 18 19 20
+30 20 21 22 23 24 25 26 34 17 18 19 20 21 22 23 39 21 22 23 24 25 26 27
+31 27 28 29 30 31 35 24 25 26 27 28 29 30 40 28 29 30
+ 36 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
+40 1 2 3 4 44 1 49 1 2 3 4 5 6
+41 5 6 7 8 9 10 11 45 2 3 4 5 6 7 8 50 7 8 9 10 11 12 13
+42 12 13 14 15 16 17 18 46 9 10 11 12 13 14 15 51 14 15 16 17 18 19 20
+43 19 20 21 22 23 24 25 47 16 17 18 19 20 21 22 52 21 22 23 24 25 26 27
+44 26 27 28 29 30 31 48 23 24 25 26 27 28 29 53 28 29 30 31
+ 49 30
+ 2009
+
+ 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 1 2 3 6 1 2 3 4 5 6 7 10 1 2 3 4 5 6 7
+ 2 4 5 6 7 8 9 10 7 8 9 10 11 12 13 14 11 8 9 10 11 12 13 14
+ 3 11 12 13 14 15 16 17 8 15 16 17 18 19 20 21 12 15 16 17 18 19 20 21
+ 4 18 19 20 21 22 23 24 9 22 23 24 25 26 27 28 13 22 23 24 25 26 27 28
+ 5 25 26 27 28 29 30 31 14 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
+14 1 2 3 4 18 1 2 23 1 2 3 4 5 6
+15 5 6 7 8 9 10 11 19 3 4 5 6 7 8 9 24 7 8 9 10 11 12 13
+16 12 13 14 15 16 17 18 20 10 11 12 13 14 15 16 25 14 15 16 17 18 19 20
+17 19 20 21 22 23 24 25 21 17 18 19 20 21 22 23 26 21 22 23 24 25 26 27
+18 26 27 28 29 30 22 24 25 26 27 28 29 30 27 28 29 30
+ 23 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
+27 1 2 3 4 31 1 36 1 2 3 4 5
+28 5 6 7 8 9 10 11 32 2 3 4 5 6 7 8 37 6 7 8 9 10 11 12
+29 12 13 14 15 16 17 18 33 9 10 11 12 13 14 15 38 13 14 15 16 17 18 19
+30 19 20 21 22 23 24 25 34 16 17 18 19 20 21 22 39 20 21 22 23 24 25 26
+31 26 27 28 29 30 31 35 23 24 25 26 27 28 29 40 27 28 29 30
+ 36 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
+40 1 2 3 45 1 2 3 4 5 6 7 49 1 2 3 4 5
+41 4 5 6 7 8 9 10 46 8 9 10 11 12 13 14 50 6 7 8 9 10 11 12
+42 11 12 13 14 15 16 17 47 15 16 17 18 19 20 21 51 13 14 15 16 17 18 19
+43 18 19 20 21 22 23 24 48 22 23 24 25 26 27 28 52 20 21 22 23 24 25 26
+44 25 26 27 28 29 30 31 49 29 30 53 27 28 29 30 31
+
+ 2010
+
+ 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 1 2 6 1 2 3 4 5 6 10 1 2 3 4 5 6
+ 2 3 4 5 6 7 8 9 7 7 8 9 10 11 12 13 11 7 8 9 10 11 12 13
+ 3 10 11 12 13 14 15 16 8 14 15 16 17 18 19 20 12 14 15 16 17 18 19 20
+ 4 17 18 19 20 21 22 23 9 21 22 23 24 25 26 27 13 21 22 23 24 25 26 27
+ 5 24 25 26 27 28 29 30 10 28 14 28 29 30 31
+ 6 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
+14 1 2 3 18 1 23 1 2 3 4 5
+15 4 5 6 7 8 9 10 19 2 3 4 5 6 7 8 24 6 7 8 9 10 11 12
+16 11 12 13 14 15 16 17 20 9 10 11 12 13 14 15 25 13 14 15 16 17 18 19
+17 18 19 20 21 22 23 24 21 16 17 18 19 20 21 22 26 20 21 22 23 24 25 26
+18 25 26 27 28 29 30 22 23 24 25 26 27 28 29 27 27 28 29 30
+ 23 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
+27 1 2 3 32 1 2 3 4 5 6 7 36 1 2 3 4
+28 4 5 6 7 8 9 10 33 8 9 10 11 12 13 14 37 5 6 7 8 9 10 11
+29 11 12 13 14 15 16 17 34 15 16 17 18 19 20 21 38 12 13 14 15 16 17 18
+30 18 19 20 21 22 23 24 35 22 23 24 25 26 27 28 39 19 20 21 22 23 24 25
+31 25 26 27 28 29 30 31 36 29 30 31 40 26 27 28 29 30
+
+ October November December
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+40 1 2 45 1 2 3 4 5 6 49 1 2 3 4
+41 3 4 5 6 7 8 9 46 7 8 9 10 11 12 13 50 5 6 7 8 9 10 11
+42 10 11 12 13 14 15 16 47 14 15 16 17 18 19 20 51 12 13 14 15 16 17 18
+43 17 18 19 20 21 22 23 48 21 22 23 24 25 26 27 52 19 20 21 22 23 24 25
+44 24 25 26 27 28 29 30 49 28 29 30 53 26 27 28 29 30 31
+45 31
+ 2011
+
+ 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 1 6 1 2 3 4 5 10 1 2 3 4 5
+ 2 2 3 4 5 6 7 8 7 6 7 8 9 10 11 12 11 6 7 8 9 10 11 12
+ 3 9 10 11 12 13 14 15 8 13 14 15 16 17 18 19 12 13 14 15 16 17 18 19
+ 4 16 17 18 19 20 21 22 9 20 21 22 23 24 25 26 13 20 21 22 23 24 25 26
+ 5 23 24 25 26 27 28 29 10 27 28 14 27 28 29 30 31
+ 6 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
+14 1 2 19 1 2 3 4 5 6 7 23 1 2 3 4
+15 3 4 5 6 7 8 9 20 8 9 10 11 12 13 14 24 5 6 7 8 9 10 11
+16 10 11 12 13 14 15 16 21 15 16 17 18 19 20 21 25 12 13 14 15 16 17 18
+17 17 18 19 20 21 22 23 22 22 23 24 25 26 27 28 26 19 20 21 22 23 24 25
+18 24 25 26 27 28 29 30 23 29 30 31 27 26 27 28 29 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
+27 1 2 32 1 2 3 4 5 6 36 1 2 3
+28 3 4 5 6 7 8 9 33 7 8 9 10 11 12 13 37 4 5 6 7 8 9 10
+29 10 11 12 13 14 15 16 34 14 15 16 17 18 19 20 38 11 12 13 14 15 16 17
+30 17 18 19 20 21 22 23 35 21 22 23 24 25 26 27 39 18 19 20 21 22 23 24
+31 24 25 26 27 28 29 30 36 28 29 30 31 40 25 26 27 28 29 30
+32 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
+40 1 45 1 2 3 4 5 49 1 2 3
+41 2 3 4 5 6 7 8 46 6 7 8 9 10 11 12 50 4 5 6 7 8 9 10
+42 9 10 11 12 13 14 15 47 13 14 15 16 17 18 19 51 11 12 13 14 15 16 17
+43 16 17 18 19 20 21 22 48 20 21 22 23 24 25 26 52 18 19 20 21 22 23 24
+44 23 24 25 26 27 28 29 49 27 28 29 30 53 25 26 27 28 29 30 31
+45 30 31
+ 2012
+
+ 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 1 2 3 4 5 6 7 5 1 2 3 4 9 1 2 3
+ 2 8 9 10 11 12 13 14 6 5 6 7 8 9 10 11 10 4 5 6 7 8 9 10
+ 3 15 16 17 18 19 20 21 7 12 13 14 15 16 17 18 11 11 12 13 14 15 16 17
+ 4 22 23 24 25 26 27 28 8 19 20 21 22 23 24 25 12 18 19 20 21 22 23 24
+ 5 29 30 31 9 26 27 28 29 13 25 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
+14 1 2 3 4 5 6 7 18 1 2 3 4 5 22 1 2
+15 8 9 10 11 12 13 14 19 6 7 8 9 10 11 12 23 3 4 5 6 7 8 9
+16 15 16 17 18 19 20 21 20 13 14 15 16 17 18 19 24 10 11 12 13 14 15 16
+17 22 23 24 25 26 27 28 21 20 21 22 23 24 25 26 25 17 18 19 20 21 22 23
+18 29 30 22 27 28 29 30 31 26 24 25 26 27 28 29 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
+27 1 2 3 4 5 6 7 31 1 2 3 4 35 1
+28 8 9 10 11 12 13 14 32 5 6 7 8 9 10 11 36 2 3 4 5 6 7 8
+29 15 16 17 18 19 20 21 33 12 13 14 15 16 17 18 37 9 10 11 12 13 14 15
+30 22 23 24 25 26 27 28 34 19 20 21 22 23 24 25 38 16 17 18 19 20 21 22
+31 29 30 31 35 26 27 28 29 30 31 39 23 24 25 26 27 28 29
+ 40 30
+ October November December
+ Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
+40 1 2 3 4 5 6 44 1 2 3 48 1
+41 7 8 9 10 11 12 13 45 4 5 6 7 8 9 10 49 2 3 4 5 6 7 8
+42 14 15 16 17 18 19 20 46 11 12 13 14 15 16 17 50 9 10 11 12 13 14 15
+43 21 22 23 24 25 26 27 47 18 19 20 21 22 23 24 51 16 17 18 19 20 21 22
+44 28 29 30 31 48 25 26 27 28 29 30 52 23 24 25 26 27 28 29
+ 53 30 31
diff --git a/tests/expected/cal/year-ym b/tests/expected/cal/year-ym
new file mode 100644
index 0000000..60b1a66
--- /dev/null
+++ b/tests/expected/cal/year-ym
@@ -0,0 +1,35 @@
+Gregorian - Monday-based week
+ 2006
+
+ 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
diff --git a/tests/expected/cal/year-ymj b/tests/expected/cal/year-ymj
new file mode 100644
index 0000000..f3b7143
--- /dev/null
+++ b/tests/expected/cal/year-ymj
@@ -0,0 +1,35 @@
+Julian - Monday-based week
+ 2006
+
+ January February March
+Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+ 1 32 33 34 35 36 60 61 62 63 64
+ 2 3 4 5 6 7 8 37 38 39 40 41 42 43 65 66 67 68 69 70 71
+ 9 10 11 12 13 14 15 44 45 46 47 48 49 50 72 73 74 75 76 77 78
+ 16 17 18 19 20 21 22 51 52 53 54 55 56 57 79 80 81 82 83 84 85
+ 23 24 25 26 27 28 29 58 59 86 87 88 89 90
+ 30 31
+ April May June
+Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+ 91 92 121 122 123 124 125 126 127 152 153 154 155
+ 93 94 95 96 97 98 99 128 129 130 131 132 133 134 156 157 158 159 160 161 162
+100 101 102 103 104 105 106 135 136 137 138 139 140 141 163 164 165 166 167 168 169
+107 108 109 110 111 112 113 142 143 144 145 146 147 148 170 171 172 173 174 175 176
+114 115 116 117 118 119 120 149 150 151 177 178 179 180 181
+
+ July August September
+Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+ 182 183 213 214 215 216 217 218 244 245 246
+184 185 186 187 188 189 190 219 220 221 222 223 224 225 247 248 249 250 251 252 253
+191 192 193 194 195 196 197 226 227 228 229 230 231 232 254 255 256 257 258 259 260
+198 199 200 201 202 203 204 233 234 235 236 237 238 239 261 262 263 264 265 266 267
+205 206 207 208 209 210 211 240 241 242 243 268 269 270 271 272 273
+212
+ October November December
+Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+ 274 305 306 307 308 309 335 336 337
+275 276 277 278 279 280 281 310 311 312 313 314 315 316 338 339 340 341 342 343 344
+282 283 284 285 286 287 288 317 318 319 320 321 322 323 345 346 347 348 349 350 351
+289 290 291 292 293 294 295 324 325 326 327 328 329 330 352 353 354 355 356 357 358
+296 297 298 299 300 301 302 331 332 333 334 359 360 361 362 363 364 365
+303 304
diff --git a/tests/expected/cal/year-ymjw b/tests/expected/cal/year-ymjw
new file mode 100644
index 0000000..e6a569e
--- /dev/null
+++ b/tests/expected/cal/year-ymjw
@@ -0,0 +1,35 @@
+Julian - Monday-based week with week numbers
+ 2006
+
+ January February March
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+52 1 5 32 33 34 35 36 9 60 61 62 63 64
+ 1 2 3 4 5 6 7 8 6 37 38 39 40 41 42 43 10 65 66 67 68 69 70 71
+ 2 9 10 11 12 13 14 15 7 44 45 46 47 48 49 50 11 72 73 74 75 76 77 78
+ 3 16 17 18 19 20 21 22 8 51 52 53 54 55 56 57 12 79 80 81 82 83 84 85
+ 4 23 24 25 26 27 28 29 9 58 59 13 86 87 88 89 90
+ 5 30 31
+ April May June
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+13 91 92 18 121 122 123 124 125 126 127 22 152 153 154 155
+14 93 94 95 96 97 98 99 19 128 129 130 131 132 133 134 23 156 157 158 159 160 161 162
+15 100 101 102 103 104 105 106 20 135 136 137 138 139 140 141 24 163 164 165 166 167 168 169
+16 107 108 109 110 111 112 113 21 142 143 144 145 146 147 148 25 170 171 172 173 174 175 176
+17 114 115 116 117 118 119 120 22 149 150 151 26 177 178 179 180 181
+
+ July August September
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+26 182 183 31 213 214 215 216 217 218 35 244 245 246
+27 184 185 186 187 188 189 190 32 219 220 221 222 223 224 225 36 247 248 249 250 251 252 253
+28 191 192 193 194 195 196 197 33 226 227 228 229 230 231 232 37 254 255 256 257 258 259 260
+29 198 199 200 201 202 203 204 34 233 234 235 236 237 238 239 38 261 262 263 264 265 266 267
+30 205 206 207 208 209 210 211 35 240 241 242 243 39 268 269 270 271 272 273
+31 212
+ October November December
+ Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
+39 274 44 305 306 307 308 309 48 335 336 337
+40 275 276 277 278 279 280 281 45 310 311 312 313 314 315 316 49 338 339 340 341 342 343 344
+41 282 283 284 285 286 287 288 46 317 318 319 320 321 322 323 50 345 346 347 348 349 350 351
+42 289 290 291 292 293 294 295 47 324 325 326 327 328 329 330 51 352 353 354 355 356 357 358
+43 296 297 298 299 300 301 302 48 331 332 333 334 52 359 360 361 362 363 364 365
+44 303 304
diff --git a/tests/expected/cal/year-ymw b/tests/expected/cal/year-ymw
new file mode 100644
index 0000000..6bb8aa4
--- /dev/null
+++ b/tests/expected/cal/year-ymw
@@ -0,0 +1,35 @@
+Gregorian - Monday-based week with week numbers
+ 2006
+
+ January February March
+ Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
+52 1 5 1 2 3 4 5 9 1 2 3 4 5
+ 1 2 3 4 5 6 7 8 6 6 7 8 9 10 11 12 10 6 7 8 9 10 11 12
+ 2 9 10 11 12 13 14 15 7 13 14 15 16 17 18 19 11 13 14 15 16 17 18 19
+ 3 16 17 18 19 20 21 22 8 20 21 22 23 24 25 26 12 20 21 22 23 24 25 26
+ 4 23 24 25 26 27 28 29 9 27 28 13 27 28 29 30 31
+ 5 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
+13 1 2 18 1 2 3 4 5 6 7 22 1 2 3 4
+14 3 4 5 6 7 8 9 19 8 9 10 11 12 13 14 23 5 6 7 8 9 10 11
+15 10 11 12 13 14 15 16 20 15 16 17 18 19 20 21 24 12 13 14 15 16 17 18
+16 17 18 19 20 21 22 23 21 22 23 24 25 26 27 28 25 19 20 21 22 23 24 25
+17 24 25 26 27 28 29 30 22 29 30 31 26 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
+26 1 2 31 1 2 3 4 5 6 35 1 2 3
+27 3 4 5 6 7 8 9 32 7 8 9 10 11 12 13 36 4 5 6 7 8 9 10
+28 10 11 12 13 14 15 16 33 14 15 16 17 18 19 20 37 11 12 13 14 15 16 17
+29 17 18 19 20 21 22 23 34 21 22 23 24 25 26 27 38 18 19 20 21 22 23 24
+30 24 25 26 27 28 29 30 35 28 29 30 31 39 25 26 27 28 29 30
+31 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
+39 1 44 1 2 3 4 5 48 1 2 3
+40 2 3 4 5 6 7 8 45 6 7 8 9 10 11 12 49 4 5 6 7 8 9 10
+41 9 10 11 12 13 14 15 46 13 14 15 16 17 18 19 50 11 12 13 14 15 16 17
+42 16 17 18 19 20 21 22 47 20 21 22 23 24 25 26 51 18 19 20 21 22 23 24
+43 23 24 25 26 27 28 29 48 27 28 29 30 52 25 26 27 28 29 30 31
+44 30 31
diff --git a/tests/expected/cal/year-ys b/tests/expected/cal/year-ys
new file mode 100644
index 0000000..7d37299
--- /dev/null
+++ b/tests/expected/cal/year-ys
@@ -0,0 +1,35 @@
+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
+
+ 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
diff --git a/tests/expected/cal/year-ysj b/tests/expected/cal/year-ysj
new file mode 100644
index 0000000..2b40099
--- /dev/null
+++ b/tests/expected/cal/year-ysj
@@ -0,0 +1,35 @@
+Julian - Sunday-based week
+ 2006
+
+ January February March
+Sun Mon Tue Wed Thu Fri Sat 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 60 61 62 63
+ 8 9 10 11 12 13 14 36 37 38 39 40 41 42 64 65 66 67 68 69 70
+ 15 16 17 18 19 20 21 43 44 45 46 47 48 49 71 72 73 74 75 76 77
+ 22 23 24 25 26 27 28 50 51 52 53 54 55 56 78 79 80 81 82 83 84
+ 29 30 31 57 58 59 85 86 87 88 89 90
+
+ April May June
+Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 91 121 122 123 124 125 126 152 153 154
+ 92 93 94 95 96 97 98 127 128 129 130 131 132 133 155 156 157 158 159 160 161
+ 99 100 101 102 103 104 105 134 135 136 137 138 139 140 162 163 164 165 166 167 168
+106 107 108 109 110 111 112 141 142 143 144 145 146 147 169 170 171 172 173 174 175
+113 114 115 116 117 118 119 148 149 150 151 176 177 178 179 180 181
+120
+ July August September
+Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 182 213 214 215 216 217 244 245
+183 184 185 186 187 188 189 218 219 220 221 222 223 224 246 247 248 249 250 251 252
+190 191 192 193 194 195 196 225 226 227 228 229 230 231 253 254 255 256 257 258 259
+197 198 199 200 201 202 203 232 233 234 235 236 237 238 260 261 262 263 264 265 266
+204 205 206 207 208 209 210 239 240 241 242 243 267 268 269 270 271 272 273
+211 212
+ October November December
+Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+274 275 276 277 278 279 280 305 306 307 308 335 336
+281 282 283 284 285 286 287 309 310 311 312 313 314 315 337 338 339 340 341 342 343
+288 289 290 291 292 293 294 316 317 318 319 320 321 322 344 345 346 347 348 349 350
+295 296 297 298 299 300 301 323 324 325 326 327 328 329 351 352 353 354 355 356 357
+302 303 304 330 331 332 333 334 358 359 360 361 362 363 364
+ 365
diff --git a/tests/expected/cal/year-ysjw b/tests/expected/cal/year-ysjw
new file mode 100644
index 0000000..800ec0c
--- /dev/null
+++ b/tests/expected/cal/year-ysjw
@@ -0,0 +1,35 @@
+Julian - Sunday-based week with week numbers
+ 2006
+
+ January February March
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+ 1 1 2 3 4 5 6 7 5 32 33 34 35 9 60 61 62 63
+ 2 8 9 10 11 12 13 14 6 36 37 38 39 40 41 42 10 64 65 66 67 68 69 70
+ 3 15 16 17 18 19 20 21 7 43 44 45 46 47 48 49 11 71 72 73 74 75 76 77
+ 4 22 23 24 25 26 27 28 8 50 51 52 53 54 55 56 12 78 79 80 81 82 83 84
+ 5 29 30 31 9 57 58 59 13 85 86 87 88 89 90
+
+ April May June
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+13 91 18 121 122 123 124 125 126 22 152 153 154
+14 92 93 94 95 96 97 98 19 127 128 129 130 131 132 133 23 155 156 157 158 159 160 161
+15 99 100 101 102 103 104 105 20 134 135 136 137 138 139 140 24 162 163 164 165 166 167 168
+16 106 107 108 109 110 111 112 21 141 142 143 144 145 146 147 25 169 170 171 172 173 174 175
+17 113 114 115 116 117 118 119 22 148 149 150 151 26 176 177 178 179 180 181
+18 120
+ July August September
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+26 182 31 213 214 215 216 217 35 244 245
+27 183 184 185 186 187 188 189 32 218 219 220 221 222 223 224 36 246 247 248 249 250 251 252
+28 190 191 192 193 194 195 196 33 225 226 227 228 229 230 231 37 253 254 255 256 257 258 259
+29 197 198 199 200 201 202 203 34 232 233 234 235 236 237 238 38 260 261 262 263 264 265 266
+30 204 205 206 207 208 209 210 35 239 240 241 242 243 39 267 268 269 270 271 272 273
+31 211 212
+ October November December
+ Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
+40 274 275 276 277 278 279 280 44 305 306 307 308 48 335 336
+41 281 282 283 284 285 286 287 45 309 310 311 312 313 314 315 49 337 338 339 340 341 342 343
+42 288 289 290 291 292 293 294 46 316 317 318 319 320 321 322 50 344 345 346 347 348 349 350
+43 295 296 297 298 299 300 301 47 323 324 325 326 327 328 329 51 351 352 353 354 355 356 357
+44 302 303 304 48 330 331 332 333 334 52 358 359 360 361 362 363 364
+ 53 365
diff --git a/tests/expected/cal/year-ysw b/tests/expected/cal/year-ysw
new file mode 100644
index 0000000..c61f778
--- /dev/null
+++ b/tests/expected/cal/year-ysw
@@ -0,0 +1,35 @@
+Gregorian - Sunday-based week with week numbers
+ 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 1 2 3 4 5 6 7 5 1 2 3 4 9 1 2 3 4
+ 2 8 9 10 11 12 13 14 6 5 6 7 8 9 10 11 10 5 6 7 8 9 10 11
+ 3 15 16 17 18 19 20 21 7 12 13 14 15 16 17 18 11 12 13 14 15 16 17 18
+ 4 22 23 24 25 26 27 28 8 19 20 21 22 23 24 25 12 19 20 21 22 23 24 25
+ 5 29 30 31 9 26 27 28 13 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
+13 1 18 1 2 3 4 5 6 22 1 2 3
+14 2 3 4 5 6 7 8 19 7 8 9 10 11 12 13 23 4 5 6 7 8 9 10
+15 9 10 11 12 13 14 15 20 14 15 16 17 18 19 20 24 11 12 13 14 15 16 17
+16 16 17 18 19 20 21 22 21 21 22 23 24 25 26 27 25 18 19 20 21 22 23 24
+17 23 24 25 26 27 28 29 22 28 29 30 31 26 25 26 27 28 29 30
+18 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
+26 1 31 1 2 3 4 5 35 1 2
+27 2 3 4 5 6 7 8 32 6 7 8 9 10 11 12 36 3 4 5 6 7 8 9
+28 9 10 11 12 13 14 15 33 13 14 15 16 17 18 19 37 10 11 12 13 14 15 16
+29 16 17 18 19 20 21 22 34 20 21 22 23 24 25 26 38 17 18 19 20 21 22 23
+30 23 24 25 26 27 28 29 35 27 28 29 30 31 39 24 25 26 27 28 29 30
+31 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
+40 1 2 3 4 5 6 7 44 1 2 3 4 48 1 2
+41 8 9 10 11 12 13 14 45 5 6 7 8 9 10 11 49 3 4 5 6 7 8 9
+42 15 16 17 18 19 20 21 46 12 13 14 15 16 17 18 50 10 11 12 13 14 15 16
+43 22 23 24 25 26 27 28 47 19 20 21 22 23 24 25 51 17 18 19 20 21 22 23
+44 29 30 31 48 26 27 28 29 30 52 24 25 26 27 28 29 30
+ 53 31
diff --git a/tests/expected/chfn/gecos b/tests/expected/chfn/gecos
new file mode 100644
index 0000000..af7b81b
--- /dev/null
+++ b/tests/expected/chfn/gecos
@@ -0,0 +1,6 @@
+Initialize user
+testuser_chfn_test:x:9899:9899::/home/testuser_chfn_test:/bin/bash
+Changing finger information for testuser_chfn_test.
+
+Finger information changed.
+testuser_chfn_test:x:9899:9899:test_gecos:/home/testuser_chfn_test:/bin/bash
diff --git a/tests/expected/col/io b/tests/expected/col/io
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/col/io
diff --git a/tests/expected/col/io-allocate-here b/tests/expected/col/io-allocate-here
new file mode 100644
index 0000000..a8a72ea
--- /dev/null
+++ b/tests/expected/col/io-allocate-here
@@ -0,0 +1,2 @@
+ 2
+13
diff --git a/tests/expected/col/io-cr b/tests/expected/col/io-cr
new file mode 100644
index 0000000..68b1bf4
--- /dev/null
+++ b/tests/expected/col/io-cr
@@ -0,0 +1 @@
+12
diff --git a/tests/expected/col/io-cs-alternate b/tests/expected/col/io-cs-alternate
new file mode 100644
index 0000000..ef71bac
--- /dev/null
+++ b/tests/expected/col/io-cs-alternate
@@ -0,0 +1 @@
+1 2
diff --git a/tests/expected/col/io-cs-normal b/tests/expected/col/io-cs-normal
new file mode 100644
index 0000000..8e508a0
--- /dev/null
+++ b/tests/expected/col/io-cs-normal
@@ -0,0 +1,2 @@
+ 0
+<B
diff --git a/tests/expected/col/io-esc-backspace b/tests/expected/col/io-esc-backspace
new file mode 100644
index 0000000..48082f7
--- /dev/null
+++ b/tests/expected/col/io-esc-backspace
@@ -0,0 +1 @@
+12
diff --git a/tests/expected/col/io-esc-tab b/tests/expected/col/io-esc-tab
new file mode 100644
index 0000000..a464d9d
--- /dev/null
+++ b/tests/expected/col/io-esc-tab
@@ -0,0 +1,2 @@
+
+1
diff --git a/tests/expected/col/io-flushing b/tests/expected/col/io-flushing
new file mode 100644
index 0000000..ed94203
--- /dev/null
+++ b/tests/expected/col/io-flushing
@@ -0,0 +1,199 @@
+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
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
diff --git a/tests/expected/col/io-half-line b/tests/expected/col/io-half-line
new file mode 100644
index 0000000..5ae15e2
--- /dev/null
+++ b/tests/expected/col/io-half-line
@@ -0,0 +1,2 @@
+9 1
+9 \ No newline at end of file
diff --git a/tests/expected/col/io-reverse-lf b/tests/expected/col/io-reverse-lf
new file mode 100644
index 0000000..abee444
--- /dev/null
+++ b/tests/expected/col/io-reverse-lf
@@ -0,0 +1,2 @@
+13
+2
diff --git a/tests/expected/col/io-so-si b/tests/expected/col/io-so-si
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/col/io-so-si
diff --git a/tests/expected/col/io-tab-backspace b/tests/expected/col/io-tab-backspace
new file mode 100644
index 0000000..2f80e61
--- /dev/null
+++ b/tests/expected/col/io-tab-backspace
@@ -0,0 +1 @@
+1 2
diff --git a/tests/expected/col/io-trailing-spaces b/tests/expected/col/io-trailing-spaces
new file mode 100644
index 0000000..1191247
--- /dev/null
+++ b/tests/expected/col/io-trailing-spaces
@@ -0,0 +1,2 @@
+1
+2
diff --git a/tests/expected/col/io-various-spaces b/tests/expected/col/io-various-spaces
new file mode 100644
index 0000000..9874d64
--- /dev/null
+++ b/tests/expected/col/io-various-spaces
@@ -0,0 +1 @@
+1 2
diff --git a/tests/expected/col/io-vt1 b/tests/expected/col/io-vt1
new file mode 100644
index 0000000..ff8730b
--- /dev/null
+++ b/tests/expected/col/io-vt1
@@ -0,0 +1,3 @@
+1
+243
+5
diff --git a/tests/expected/col/io-vt2 b/tests/expected/col/io-vt2
new file mode 100644
index 0000000..4a5062e
--- /dev/null
+++ b/tests/expected/col/io-vt2
@@ -0,0 +1,5 @@
+ c
+
+ b
+
+a
diff --git a/tests/expected/col/multibyte-invalid b/tests/expected/col/multibyte-invalid
new file mode 100644
index 0000000..ebae97c
--- /dev/null
+++ b/tests/expected/col/multibyte-invalid
@@ -0,0 +1 @@
+abc\x80\x80jkl
diff --git a/tests/expected/col/multibyte-valid b/tests/expected/col/multibyte-valid
new file mode 100644
index 0000000..e35d95c
--- /dev/null
+++ b/tests/expected/col/multibyte-valid
@@ -0,0 +1 @@
+Dateiname der Versandh\xfclle
diff --git a/tests/expected/col/newlines b/tests/expected/col/newlines
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/col/newlines
diff --git a/tests/expected/col/newlines-one-line-no-nl b/tests/expected/col/newlines-one-line-no-nl
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/expected/col/newlines-one-line-no-nl
@@ -0,0 +1 @@
+1
diff --git a/tests/expected/col/newlines-one-line-with-nl b/tests/expected/col/newlines-one-line-with-nl
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/expected/col/newlines-one-line-with-nl
@@ -0,0 +1 @@
+1
diff --git a/tests/expected/col/newlines-second-line-no-nl b/tests/expected/col/newlines-second-line-no-nl
new file mode 100644
index 0000000..1191247
--- /dev/null
+++ b/tests/expected/col/newlines-second-line-no-nl
@@ -0,0 +1,2 @@
+1
+2
diff --git a/tests/expected/col/newlines-second-line-with-nl b/tests/expected/col/newlines-second-line-with-nl
new file mode 100644
index 0000000..1191247
--- /dev/null
+++ b/tests/expected/col/newlines-second-line-with-nl
@@ -0,0 +1,2 @@
+1
+2
diff --git a/tests/expected/col/newlines-zero-length-file b/tests/expected/col/newlines-zero-length-file
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/col/newlines-zero-length-file
diff --git a/tests/expected/col/options b/tests/expected/col/options
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/col/options
diff --git a/tests/expected/col/options-no-backspaces b/tests/expected/col/options-no-backspaces
new file mode 100644
index 0000000..9d6cf4b
--- /dev/null
+++ b/tests/expected/col/options-no-backspaces
@@ -0,0 +1 @@
+FIXME
diff --git a/tests/expected/col/options-pass b/tests/expected/col/options-pass
new file mode 100644
index 0000000..5ff7376
--- /dev/null
+++ b/tests/expected/col/options-pass
@@ -0,0 +1,2 @@
+ab
+ab
diff --git a/tests/expected/col/options-spaces b/tests/expected/col/options-spaces
new file mode 100644
index 0000000..dfcf712
--- /dev/null
+++ b/tests/expected/col/options-spaces
@@ -0,0 +1 @@
+ 1
diff --git a/tests/expected/col/options-tabs b/tests/expected/col/options-tabs
new file mode 100644
index 0000000..c84197b
--- /dev/null
+++ b/tests/expected/col/options-tabs
@@ -0,0 +1 @@
+ 1
diff --git a/tests/expected/colcrt/functional-half-lines b/tests/expected/colcrt/functional-half-lines
new file mode 100644
index 0000000..a7957f8
--- /dev/null
+++ b/tests/expected/colcrt/functional-half-lines
@@ -0,0 +1,89 @@
+
+ 100
+ -
+ 101
+ --
+ 102
+ ---
+ 103 x
+ - --
+ 104 shift
+
+ 105 esc9
+
+ 106 esc8
+
+ 107 esc
+
+ 108 esc6
+
+ 109 backspace
+
+ 110 tab tab
+
+ 111 abc efg
+ - -
+ 112 |---|
+
+ 113 | x |
+
+ 114 | |
+ ---
+ 115 line longer than 132 characters line longer than 132 characters line longer than 132 characters line longer than 132 ch01234
+ - - - - - - - - - - - - - - - - - - -
+ 116 nulls
+
+ 117 next line ascii 0 - 127
+
+ 118
+
+ 119
+ -
+
+ 200
+ ---
+ 201 abc
+
+ 202 abc
+ -
+ 203 a bc
+ -
+ 204 ab c
+ -
+ 205 abc
+ -
+ 206 abc
+ --
+ 207 a bc
+ --
+ 208 ab c
+ --
+ 209 abc
+ --
+ 210 a bc
+ - -
+ 211 ab c
+ - -
+ 212 a b c
+ - -
+ 213 a bc
+ --
+ 214 a bc
+ - -
+ 215 abc
+ --
+ 216 abc
+ - -
+ 217 a b c
+ - - -
+ 218 a bc
+ - --
+ 219 a bc
+ -- -
+ 220 abc
+ - --
+ 221 abc
+ ---
+ 222 abc
+ ---
+return value: 0
diff --git a/tests/expected/colcrt/functional-no-options b/tests/expected/colcrt/functional-no-options
new file mode 100644
index 0000000..4b41b07
--- /dev/null
+++ b/tests/expected/colcrt/functional-no-options
@@ -0,0 +1,74 @@
+ 100
+ -
+ 101
+ --
+ 102
+ ---
+ 103 x
+ - --
+ 104 shift
+ 105 esc9
+ 106 esc8
+ 107 esc
+ 108 esc6
+ 109 backspace
+ 110 tab tab
+ 111 abc efg
+ - -
+ 112 |---|
+ 113 | x |
+ 114 | |
+ ---
+ 115 line longer than 132 characters line longer than 132 characters line longer than 132 characters line longer than 132 ch01234
+ - - - - - - - - - - - - - - - - - - -
+ 116 nulls
+ 117 next line ascii 0 - 127
+ 118
+ 119
+ -
+ 200
+ ---
+ 201 abc
+ 202 abc
+ -
+ 203 a bc
+ -
+ 204 ab c
+ -
+ 205 abc
+ -
+ 206 abc
+ --
+ 207 a bc
+ --
+ 208 ab c
+ --
+ 209 abc
+ --
+ 210 a bc
+ - -
+ 211 ab c
+ - -
+ 212 a b c
+ - -
+ 213 a bc
+ --
+ 214 a bc
+ - -
+ 215 abc
+ --
+ 216 abc
+ - -
+ 217 a b c
+ - - -
+ 218 a bc
+ - --
+ 219 a bc
+ -- -
+ 220 abc
+ - --
+ 221 abc
+ ---
+ 222 abc
+ ---
+return value: 0
diff --git a/tests/expected/colcrt/functional-no-underlining b/tests/expected/colcrt/functional-no-underlining
new file mode 100644
index 0000000..306734c
--- /dev/null
+++ b/tests/expected/colcrt/functional-no-underlining
@@ -0,0 +1,44 @@
+ 100
+ 101
+ 102
+ 103 x
+ 104 shift
+ 105 esc9
+ 106 esc8
+ 107 esc
+ 108 esc6
+ 109 backspace
+ 110 tab tab
+ 111 abc efg
+ 112 |---|
+ 113 | x |
+ 114 | |
+ 115 line longer than 132 characters line longer than 132 characters line longer than 132 characters line longer than 132 ch01234
+ 116 nulls
+ 117 next line ascii 0 - 127
+ 118
+ 119
+ 200
+ 201 abc
+ 202 abc
+ 203 a bc
+ 204 ab c
+ 205 abc
+ 206 abc
+ 207 a bc
+ 208 ab c
+ 209 abc
+ 210 a bc
+ 211 ab c
+ 212 a b c
+ 213 a bc
+ 214 a bc
+ 215 abc
+ 216 abc
+ 217 a b c
+ 218 a bc
+ 219 a bc
+ 220 abc
+ 221 abc
+ 222 abc
+return value: 0
diff --git a/tests/expected/colcrt/functional-short-options b/tests/expected/colcrt/functional-short-options
new file mode 100644
index 0000000..bd2d44b
--- /dev/null
+++ b/tests/expected/colcrt/functional-short-options
@@ -0,0 +1,89 @@
+
+ 100
+
+ 101
+
+ 102
+
+ 103 x
+
+ 104 shift
+
+ 105 esc9
+
+ 106 esc8
+
+ 107 esc
+
+ 108 esc6
+
+ 109 backspace
+
+ 110 tab tab
+
+ 111 abc efg
+
+ 112 |---|
+
+ 113 | x |
+
+ 114 | |
+
+ 115 line longer than 132 characters line longer than 132 characters line longer than 132 characters line longer than 132 ch01234
+
+ 116 nulls
+
+ 117 next line ascii 0 - 127
+
+ 118
+
+ 119
+
+
+ 200
+
+ 201 abc
+
+ 202 abc
+
+ 203 a bc
+
+ 204 ab c
+
+ 205 abc
+
+ 206 abc
+
+ 207 a bc
+
+ 208 ab c
+
+ 209 abc
+
+ 210 a bc
+
+ 211 ab c
+
+ 212 a b c
+
+ 213 a bc
+
+ 214 a bc
+
+ 215 abc
+
+ 216 abc
+
+ 217 a b c
+
+ 218 a bc
+
+ 219 a bc
+
+ 220 abc
+
+ 221 abc
+
+ 222 abc
+
+return value: 0
diff --git a/tests/expected/colcrt/regressions-crash1 b/tests/expected/colcrt/regressions-crash1
new file mode 100644
index 0000000..67a7b1c
--- /dev/null
+++ b/tests/expected/colcrt/regressions-crash1
@@ -0,0 +1,2 @@
+ W U; U; D f U; D f D f > @W ]~ K- - ---- -- -- - -- -- ---- -- ---- -- - -- --- --
+return value: 0
diff --git a/tests/expected/colcrt/regressions-crash2 b/tests/expected/colcrt/regressions-crash2
new file mode 100644
index 0000000..11ebf74
--- /dev/null
+++ b/tests/expected/colcrt/regressions-crash2
@@ -0,0 +1,10 @@
+
+FGHIKIJKN\
+MN9|
+XYZRnT RnTUV| NXP:w
+MN
+'QRnTUVWXYZQRnTU
+MN9|
+XYZ nT RnTUV| NXP:w
+ -
+MNOP.return value: 0
diff --git a/tests/expected/colcrt/regressions-hang1 b/tests/expected/colcrt/regressions-hang1
new file mode 100644
index 0000000..cb16e46
--- /dev/null
+++ b/tests/expected/colcrt/regressions-hang1
@@ -0,0 +1,3 @@
+789:;<=>=>?IABUVNXYZ[ `abcdefgg !"#$%&'()*+,-./01234)*:,-./0123456789:;[=>?1234)*:,-./0123456789:;[=>?4456789:;<=>?IABUVN`abcdefg !"
+ -
+return value: 0
diff --git a/tests/expected/colrm/rm2-2 b/tests/expected/colrm/rm2-2
new file mode 100644
index 0000000..bdd45ad
--- /dev/null
+++ b/tests/expected/colrm/rm2-2
@@ -0,0 +1,3 @@
+a b
+c d
+e g
diff --git a/tests/expected/column/columnate b/tests/expected/column/columnate
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/column/columnate
diff --git a/tests/expected/column/columnate-fill-cols-250 b/tests/expected/column/columnate-fill-cols-250
new file mode 100644
index 0000000..9648915
--- /dev/null
+++ b/tests/expected/column/columnate-fill-cols-250
@@ -0,0 +1 @@
+AAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCC DDDDDDDDDDDDDDDDD EEEEEEEEEEEEE FFFFFFFFFFFFFFFFFFF XXXXXXX YYYYYYYYYYY ZZZZZZZZZZZ
diff --git a/tests/expected/column/columnate-fill-cols-50 b/tests/expected/column/columnate-fill-cols-50
new file mode 100644
index 0000000..d287c15
--- /dev/null
+++ b/tests/expected/column/columnate-fill-cols-50
@@ -0,0 +1,5 @@
+AAAAAAAAAAAAAAAAAAAA FFFFFFFFFFFFFFFFFFF
+BBBBBBBBBBBBBBBBBBBBB XXXXXXX
+CCCCCCCCCCCCCCCC YYYYYYYYYYY
+DDDDDDDDDDDDDDDDD ZZZZZZZZZZZ
+EEEEEEEEEEEEE
diff --git a/tests/expected/column/columnate-fill-cols-80 b/tests/expected/column/columnate-fill-cols-80
new file mode 100644
index 0000000..a004406
--- /dev/null
+++ b/tests/expected/column/columnate-fill-cols-80
@@ -0,0 +1,3 @@
+AAAAAAAAAAAAAAAAAAAA DDDDDDDDDDDDDDDDD XXXXXXX
+BBBBBBBBBBBBBBBBBBBBB EEEEEEEEEEEEE YYYYYYYYYYY
+CCCCCCCCCCCCCCCC FFFFFFFFFFFFFFFFFFF ZZZZZZZZZZZ
diff --git a/tests/expected/column/columnate-fill-rows-250 b/tests/expected/column/columnate-fill-rows-250
new file mode 100644
index 0000000..9648915
--- /dev/null
+++ b/tests/expected/column/columnate-fill-rows-250
@@ -0,0 +1 @@
+AAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCC DDDDDDDDDDDDDDDDD EEEEEEEEEEEEE FFFFFFFFFFFFFFFFFFF XXXXXXX YYYYYYYYYYY ZZZZZZZZZZZ
diff --git a/tests/expected/column/columnate-fill-rows-50 b/tests/expected/column/columnate-fill-rows-50
new file mode 100644
index 0000000..9f35a13
--- /dev/null
+++ b/tests/expected/column/columnate-fill-rows-50
@@ -0,0 +1,5 @@
+AAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBB
+CCCCCCCCCCCCCCCC DDDDDDDDDDDDDDDDD
+EEEEEEEEEEEEE FFFFFFFFFFFFFFFFFFF
+XXXXXXX YYYYYYYYYYY
+ZZZZZZZZZZZ
diff --git a/tests/expected/column/columnate-fill-rows-80 b/tests/expected/column/columnate-fill-rows-80
new file mode 100644
index 0000000..92635f7
--- /dev/null
+++ b/tests/expected/column/columnate-fill-rows-80
@@ -0,0 +1,3 @@
+AAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCC
+DDDDDDDDDDDDDDDDD EEEEEEEEEEEEE FFFFFFFFFFFFFFFFFFF
+XXXXXXX YYYYYYYYYYY ZZZZZZZZZZZ
diff --git a/tests/expected/column/invalid-multibyte b/tests/expected/column/invalid-multibyte
new file mode 100644
index 0000000..5b0c745
--- /dev/null
+++ b/tests/expected/column/invalid-multibyte
@@ -0,0 +1 @@
+\x94~
diff --git a/tests/expected/column/multi-file b/tests/expected/column/multi-file
new file mode 100644
index 0000000..c0ee32d
--- /dev/null
+++ b/tests/expected/column/multi-file
@@ -0,0 +1,10 @@
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
+0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
diff --git a/tests/expected/column/separator_table b/tests/expected/column/separator_table
new file mode 100644
index 0000000..bf974c3
--- /dev/null
+++ b/tests/expected/column/separator_table
@@ -0,0 +1,10 @@
+0 1 3 4 5
+0 1 3 4 5
+0 1 3 4 5
+0 1 3 4 5
+0 1 3 4 5
+0 1 3 4 5
+0 1 3 4 5
+0 1 3 4 5
+0 1 3 4 5
+0 1 3 4 5
diff --git a/tests/expected/column/table b/tests/expected/column/table
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/column/table
diff --git a/tests/expected/column/table-default b/tests/expected/column/table-default
new file mode 100644
index 0000000..5fc905d
--- /dev/null
+++ b/tests/expected/column/table-default
@@ -0,0 +1,6 @@
+AAA BBBB C DDDD
+A BBB CCCC DDD
+AA BB CCC DD
+AAAA B CC D
+AA BB CC DD
+AAAAA BBB CCC DDDD
diff --git a/tests/expected/column/table-empty-column b/tests/expected/column/table-empty-column
new file mode 100644
index 0000000..ed32da9
--- /dev/null
+++ b/tests/expected/column/table-empty-column
@@ -0,0 +1 @@
+:a:b
diff --git a/tests/expected/column/table-empty-column-at-eol b/tests/expected/column/table-empty-column-at-eol
new file mode 100644
index 0000000..948cf94
--- /dev/null
+++ b/tests/expected/column/table-empty-column-at-eol
@@ -0,0 +1 @@
+|
diff --git a/tests/expected/column/table-empty-column-at-eol2 b/tests/expected/column/table-empty-column-at-eol2
new file mode 100644
index 0000000..7c43785
--- /dev/null
+++ b/tests/expected/column/table-empty-column-at-eol2
@@ -0,0 +1 @@
+||
diff --git a/tests/expected/column/table-empty-lines b/tests/expected/column/table-empty-lines
new file mode 100644
index 0000000..5e8fb21
--- /dev/null
+++ b/tests/expected/column/table-empty-lines
@@ -0,0 +1,6 @@
+
+A B CCC
+AA BBB AA
+AAA BB C
+
+AAAA BBBB CCCC
diff --git a/tests/expected/column/table-headers b/tests/expected/column/table-headers
new file mode 100644
index 0000000..cd8d643
--- /dev/null
+++ b/tests/expected/column/table-headers
@@ -0,0 +1,42 @@
+MAJMIN TARGET VFS-OPTS PROP TYPE SOURCE FS-OPTS
+0:17 /sys rw,nosuid,nodev,noexec,relatime shared:6 sysfs sysfs rw
+0:4 /proc rw,nosuid,nodev,noexec,relatime shared:5 proc proc rw
+0:6 /dev rw,nosuid shared:2 devtmpfs devtmpfs rw,size=8175740k,nr_inodes=2043935,mode=755
+0:18 /sys/kernel/security rw,nosuid,nodev,noexec,relatime shared:7 securityfs securityfs rw
+0:19 /dev/shm rw,nosuid,nodev shared:3 tmpfs tmpfs rw
+0:20 /dev/pts rw,nosuid,noexec,relatime shared:4 devpts devpts rw,gid=5,mode=620,ptmxmode=000
+0:21 /run rw,nosuid,nodev shared:23 tmpfs tmpfs rw,mode=755
+0:22 /sys/fs/cgroup ro,nosuid,nodev,noexec shared:8 tmpfs tmpfs ro,mode=755
+0:23 /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:9 cgroup cgroup rw,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
+0:24 /sys/fs/pstore rw,nosuid,nodev,noexec,relatime shared:20 pstore pstore rw
+0:25 /sys/firmware/efi/efivars rw,nosuid,nodev,noexec,relatime shared:21 efivarfs efivarfs rw
+0:26 /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime shared:10 cgroup cgroup rw,blkio
+0:27 /sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime shared:11 cgroup cgroup rw,cpu,cpuacct
+0:28 /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime shared:12 cgroup cgroup rw,devices
+0:29 /sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime shared:13 cgroup cgroup rw,hugetlb
+0:30 /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime shared:14 cgroup cgroup rw,pids
+0:31 /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:15 cgroup cgroup rw,memory
+0:32 /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:16 cgroup cgroup rw,cpuset
+0:33 /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime shared:17 cgroup cgroup rw,perf_event
+0:34 /sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime shared:18 cgroup cgroup rw,net_cls,net_prio
+0:35 /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:19 cgroup cgroup rw,freezer
+0:36 /sys/kernel/config rw,relatime shared:22 configfs configfs rw
+8:4 / rw,relatime shared:1 ext4 /dev/sda4 rw,data=ordered
+0:37 /proc/sys/fs/binfmt_misc rw,relatime shared:24 autofs systemd-1 rw,fd=37,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12781
+0:7 /sys/kernel/debug rw,relatime shared:25 debugfs debugfs rw
+0:38 /dev/hugepages rw,relatime shared:26 hugetlbfs hugetlbfs rw
+0:16 /dev/mqueue rw,relatime shared:27 mqueue mqueue rw
+0:39 /proc/sys/fs/binfmt_misc rw,relatime shared:28 binfmt_misc binfmt_misc rw
+0:40 /proc/fs/nfsd rw,relatime shared:29 nfsd nfsd rw
+0:41 /tmp rw,nosuid,nodev shared:30 tmpfs tmpfs rw
+8:3 /home rw,relatime shared:31 ext4 /dev/sda3 rw,data=ordered
+8:2 /boot rw,relatime shared:32 ext4 /dev/sda2 rw,data=ordered
+8:5 /home/games rw,relatime shared:33 ext4 /dev/sda5 rw,data=ordered
+8:1 /boot/efi rw,relatime shared:34 vfat /dev/sda1 rw,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro
+8:17 /home/archive rw,relatime shared:35 ext4 /dev/sdb1 rw,data=ordered
+0:43 /var/lib/nfs/rpc_pipefs rw,relatime shared:36 rpc_pipefs sunrpc rw
+0:47 /sys/fs/fuse/connections rw,relatime shared:163 fusectl fusectl rw
+0:46 /run/user/1000 rw,nosuid,nodev,relatime shared:158 tmpfs tmpfs rw,size=1637324k,mode=700,uid=1000,gid=1000
+0:45 /run/user/1000/gvfs rw,nosuid,nodev,relatime shared:153 fuse.gvfsd-fuse gvfsd-fuse rw,user_id=1000,group_id=1000
+0:44 /run/user/0 rw,nosuid,nodev,relatime shared:114 tmpfs tmpfs rw,size=1637324k,mode=700
+0:48 /mnt/sounds rw,relatime shared:119 cifs //sr.net.home/sounds rw,vers=1.0,cache=strict,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=65536,echo_interval=60,actimeo=1
diff --git a/tests/expected/column/table-hide b/tests/expected/column/table-hide
new file mode 100644
index 0000000..3276f94
--- /dev/null
+++ b/tests/expected/column/table-hide
@@ -0,0 +1,41 @@
+/sys rw,nosuid,nodev,noexec,relatime sysfs sysfs rw
+/proc rw,nosuid,nodev,noexec,relatime proc proc rw
+/dev rw,nosuid devtmpfs devtmpfs rw,size=8175740k,nr_inodes=2043935,mode=755
+/sys/kernel/security rw,nosuid,nodev,noexec,relatime securityfs securityfs rw
+/dev/shm rw,nosuid,nodev tmpfs tmpfs rw
+/dev/pts rw,nosuid,noexec,relatime devpts devpts rw,gid=5,mode=620,ptmxmode=000
+/run rw,nosuid,nodev tmpfs tmpfs rw,mode=755
+/sys/fs/cgroup ro,nosuid,nodev,noexec tmpfs tmpfs ro,mode=755
+/sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
+/sys/fs/pstore rw,nosuid,nodev,noexec,relatime pstore pstore rw
+/sys/firmware/efi/efivars rw,nosuid,nodev,noexec,relatime efivarfs efivarfs rw
+/sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,blkio
+/sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,cpu,cpuacct
+/sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,devices
+/sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,hugetlb
+/sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,pids
+/sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,memory
+/sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,cpuset
+/sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,perf_event
+/sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,net_cls,net_prio
+/sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime cgroup cgroup rw,freezer
+/sys/kernel/config rw,relatime configfs configfs rw
+/ rw,relatime ext4 /dev/sda4 rw,data=ordered
+/proc/sys/fs/binfmt_misc rw,relatime autofs systemd-1 rw,fd=37,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12781
+/sys/kernel/debug rw,relatime debugfs debugfs rw
+/dev/hugepages rw,relatime hugetlbfs hugetlbfs rw
+/dev/mqueue rw,relatime mqueue mqueue rw
+/proc/sys/fs/binfmt_misc rw,relatime binfmt_misc binfmt_misc rw
+/proc/fs/nfsd rw,relatime nfsd nfsd rw
+/tmp rw,nosuid,nodev tmpfs tmpfs rw
+/home rw,relatime ext4 /dev/sda3 rw,data=ordered
+/boot rw,relatime ext4 /dev/sda2 rw,data=ordered
+/home/games rw,relatime ext4 /dev/sda5 rw,data=ordered
+/boot/efi rw,relatime vfat /dev/sda1 rw,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro
+/home/archive rw,relatime ext4 /dev/sdb1 rw,data=ordered
+/var/lib/nfs/rpc_pipefs rw,relatime rpc_pipefs sunrpc rw
+/sys/fs/fuse/connections rw,relatime fusectl fusectl rw
+/run/user/1000 rw,nosuid,nodev,relatime tmpfs tmpfs rw,size=1637324k,mode=700,uid=1000,gid=1000
+/run/user/1000/gvfs rw,nosuid,nodev,relatime fuse.gvfsd-fuse gvfsd-fuse rw,user_id=1000,group_id=1000
+/run/user/0 rw,nosuid,nodev,relatime tmpfs tmpfs rw,size=1637324k,mode=700
+/mnt/sounds rw,relatime cifs //sr.net.home/sounds rw,vers=1.0,cache=strict,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=65536,echo_interval=60,actimeo=1
diff --git a/tests/expected/column/table-input-separator b/tests/expected/column/table-input-separator
new file mode 100644
index 0000000..477e64b
--- /dev/null
+++ b/tests/expected/column/table-input-separator
@@ -0,0 +1,6 @@
+AAA BBBB C DDDD
+ BBB CCCC DDD
+AA BB DD
+AAAA B CC D
+AA CC DD
+AAAAA BBB CCC DDDD
diff --git a/tests/expected/column/table-input-separator-space b/tests/expected/column/table-input-separator-space
new file mode 100644
index 0000000..477e64b
--- /dev/null
+++ b/tests/expected/column/table-input-separator-space
@@ -0,0 +1,6 @@
+AAA BBBB C DDDD
+ BBB CCCC DDD
+AA BB DD
+AAAA B CC D
+AA CC DD
+AAAAA BBB CCC DDDD
diff --git a/tests/expected/column/table-long b/tests/expected/column/table-long
new file mode 100644
index 0000000..0752367
--- /dev/null
+++ b/tests/expected/column/table-long
@@ -0,0 +1,41 @@
+17 62 0:17 / /sys rw,nosuid,nodev,noexec,relatime shared:6 - sysfs sysfs rw
+18 62 0:4 / /proc rw,nosuid,nodev,noexec,relatime shared:5 - proc proc rw
+19 62 0:6 / /dev rw,nosuid shared:2 - devtmpfs devtmpfs rw,size=8175740k,nr_inodes=2043935,mode=755
+20 17 0:18 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime shared:7 - securityfs securityfs rw
+21 19 0:19 / /dev/shm rw,nosuid,nodev shared:3 - tmpfs tmpfs rw
+22 19 0:20 / /dev/pts rw,nosuid,noexec,relatime shared:4 - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+23 62 0:21 / /run rw,nosuid,nodev shared:23 - tmpfs tmpfs rw,mode=755
+24 17 0:22 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:8 - tmpfs tmpfs ro,mode=755
+25 24 0:23 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:9 - cgroup cgroup rw,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
+26 17 0:24 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime shared:20 - pstore pstore rw
+27 17 0:25 / /sys/firmware/efi/efivars rw,nosuid,nodev,noexec,relatime shared:21 - efivarfs efivarfs rw
+28 24 0:26 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime shared:10 - cgroup cgroup rw,blkio
+29 24 0:27 / /sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime shared:11 - cgroup cgroup rw,cpu,cpuacct
+30 24 0:28 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime shared:12 - cgroup cgroup rw,devices
+31 24 0:29 / /sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime shared:13 - cgroup cgroup rw,hugetlb
+32 24 0:30 / /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime shared:14 - cgroup cgroup rw,pids
+33 24 0:31 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:15 - cgroup cgroup rw,memory
+34 24 0:32 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:16 - cgroup cgroup rw,cpuset
+35 24 0:33 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime shared:17 - cgroup cgroup rw,perf_event
+36 24 0:34 / /sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime shared:18 - cgroup cgroup rw,net_cls,net_prio
+37 24 0:35 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:19 - cgroup cgroup rw,freezer
+60 17 0:36 / /sys/kernel/config rw,relatime shared:22 - configfs configfs rw
+62 0 8:4 / / rw,relatime shared:1 - ext4 /dev/sda4 rw,data=ordered
+38 18 0:37 / /proc/sys/fs/binfmt_misc rw,relatime shared:24 - autofs systemd-1 rw,fd=37,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12781
+39 17 0:7 / /sys/kernel/debug rw,relatime shared:25 - debugfs debugfs rw
+40 19 0:38 / /dev/hugepages rw,relatime shared:26 - hugetlbfs hugetlbfs rw
+41 19 0:16 / /dev/mqueue rw,relatime shared:27 - mqueue mqueue rw
+42 38 0:39 / /proc/sys/fs/binfmt_misc rw,relatime shared:28 - binfmt_misc binfmt_misc rw
+75 18 0:40 / /proc/fs/nfsd rw,relatime shared:29 - nfsd nfsd rw
+77 62 0:41 / /tmp rw,nosuid,nodev shared:30 - tmpfs tmpfs rw
+80 62 8:3 / /home rw,relatime shared:31 - ext4 /dev/sda3 rw,data=ordered
+81 62 8:2 / /boot rw,relatime shared:32 - ext4 /dev/sda2 rw,data=ordered
+84 80 8:5 / /home/games rw,relatime shared:33 - ext4 /dev/sda5 rw,data=ordered
+86 81 8:1 / /boot/efi rw,relatime shared:34 - vfat /dev/sda1 rw,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro
+88 80 8:17 / /home/archive rw,relatime shared:35 - ext4 /dev/sdb1 rw,data=ordered
+90 62 0:43 / /var/lib/nfs/rpc_pipefs rw,relatime shared:36 - rpc_pipefs sunrpc rw
+223 17 0:47 / /sys/fs/fuse/connections rw,relatime shared:163 - fusectl fusectl rw
+217 23 0:46 / /run/user/1000 rw,nosuid,nodev,relatime shared:158 - tmpfs tmpfs rw,size=1637324k,mode=700,uid=1000,gid=1000
+203 217 0:45 / /run/user/1000/gvfs rw,nosuid,nodev,relatime shared:153 - fuse.gvfsd-fuse gvfsd-fuse rw,user_id=1000,group_id=1000
+171 23 0:44 / /run/user/0 rw,nosuid,nodev,relatime shared:114 - tmpfs tmpfs rw,size=1637324k,mode=700
+177 62 0:48 / /mnt/sounds rw,relatime shared:119 - cifs //sr.net.home/sounds rw,vers=1.0,cache=strict,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=65536,echo_interval=60,actimeo=1
diff --git a/tests/expected/column/table-neg-1 b/tests/expected/column/table-neg-1
new file mode 100644
index 0000000..994c533
--- /dev/null
+++ b/tests/expected/column/table-neg-1
@@ -0,0 +1 @@
+A |B |C | D
diff --git a/tests/expected/column/table-neg-1-2 b/tests/expected/column/table-neg-1-2
new file mode 100644
index 0000000..b2ed204
--- /dev/null
+++ b/tests/expected/column/table-neg-1-2
@@ -0,0 +1 @@
+A |B | C| D
diff --git a/tests/expected/column/table-neg-2 b/tests/expected/column/table-neg-2
new file mode 100644
index 0000000..43cf96c
--- /dev/null
+++ b/tests/expected/column/table-neg-2
@@ -0,0 +1 @@
+A |B | C|D
diff --git a/tests/expected/column/table-noempty-lines b/tests/expected/column/table-noempty-lines
new file mode 100644
index 0000000..6a45fee
--- /dev/null
+++ b/tests/expected/column/table-noempty-lines
@@ -0,0 +1,4 @@
+A B CCC
+AA BBB AA
+AAA BB C
+AAAA BBBB CCCC
diff --git a/tests/expected/column/table-order b/tests/expected/column/table-order
new file mode 100644
index 0000000..432d3c9
--- /dev/null
+++ b/tests/expected/column/table-order
@@ -0,0 +1,42 @@
+TARGET SOURCE TYPE VFS-OPTS
+/sys sysfs sysfs rw,nosuid,nodev,noexec,relatime
+/proc proc proc rw,nosuid,nodev,noexec,relatime
+/dev devtmpfs devtmpfs rw,nosuid
+/sys/kernel/security securityfs securityfs rw,nosuid,nodev,noexec,relatime
+/dev/shm tmpfs tmpfs rw,nosuid,nodev
+/dev/pts devpts devpts rw,nosuid,noexec,relatime
+/run tmpfs tmpfs rw,nosuid,nodev
+/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec
+/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatime
+/sys/firmware/efi/efivars efivarfs efivarfs rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/net_cls,net_prio cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime
+/sys/kernel/config configfs configfs rw,relatime
+/ /dev/sda4 ext4 rw,relatime
+/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime
+/sys/kernel/debug debugfs debugfs rw,relatime
+/dev/hugepages hugetlbfs hugetlbfs rw,relatime
+/dev/mqueue mqueue mqueue rw,relatime
+/proc/sys/fs/binfmt_misc binfmt_misc binfmt_misc rw,relatime
+/proc/fs/nfsd nfsd nfsd rw,relatime
+/tmp tmpfs tmpfs rw,nosuid,nodev
+/home /dev/sda3 ext4 rw,relatime
+/boot /dev/sda2 ext4 rw,relatime
+/home/games /dev/sda5 ext4 rw,relatime
+/boot/efi /dev/sda1 vfat rw,relatime
+/home/archive /dev/sdb1 ext4 rw,relatime
+/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime
+/sys/fs/fuse/connections fusectl fusectl rw,relatime
+/run/user/1000 tmpfs tmpfs rw,nosuid,nodev,relatime
+/run/user/1000/gvfs gvfsd-fuse fuse.gvfsd-fuse rw,nosuid,nodev,relatime
+/run/user/0 tmpfs tmpfs rw,nosuid,nodev,relatime
+/mnt/sounds //sr.net.home/sounds cifs rw,relatime
diff --git a/tests/expected/column/table-output-separator b/tests/expected/column/table-output-separator
new file mode 100644
index 0000000..c9199db
--- /dev/null
+++ b/tests/expected/column/table-output-separator
@@ -0,0 +1,6 @@
+AAA |BBBB|C |DDDD
+A |BBB |CCCC|DDD
+AA |BB |CCC |DD
+AAAA |B |CC |D
+AA |BB |CC |DD
+AAAAA|BBB |CCC |DDDD
diff --git a/tests/expected/column/table-range b/tests/expected/column/table-range
new file mode 100644
index 0000000..e0f7d4c
--- /dev/null
+++ b/tests/expected/column/table-range
@@ -0,0 +1 @@
+A | B| C|D
diff --git a/tests/expected/column/table-right b/tests/expected/column/table-right
new file mode 100644
index 0000000..7bb0124
--- /dev/null
+++ b/tests/expected/column/table-right
@@ -0,0 +1,42 @@
+MAJMIN TARGET TYPE SOURCE
+0:17 /sys sysfs sysfs
+0:4 /proc proc proc
+0:6 /dev devtmpfs devtmpfs
+0:18 /sys/kernel/security securityfs securityfs
+0:19 /dev/shm tmpfs tmpfs
+0:20 /dev/pts devpts devpts
+0:21 /run tmpfs tmpfs
+0:22 /sys/fs/cgroup tmpfs tmpfs
+0:23 /sys/fs/cgroup/systemd cgroup cgroup
+0:24 /sys/fs/pstore pstore pstore
+0:25 /sys/firmware/efi/efivars efivarfs efivarfs
+0:26 /sys/fs/cgroup/blkio cgroup cgroup
+0:27 /sys/fs/cgroup/cpu,cpuacct cgroup cgroup
+0:28 /sys/fs/cgroup/devices cgroup cgroup
+0:29 /sys/fs/cgroup/hugetlb cgroup cgroup
+0:30 /sys/fs/cgroup/pids cgroup cgroup
+0:31 /sys/fs/cgroup/memory cgroup cgroup
+0:32 /sys/fs/cgroup/cpuset cgroup cgroup
+0:33 /sys/fs/cgroup/perf_event cgroup cgroup
+0:34 /sys/fs/cgroup/net_cls,net_prio cgroup cgroup
+0:35 /sys/fs/cgroup/freezer cgroup cgroup
+0:36 /sys/kernel/config configfs configfs
+8:4 / ext4 /dev/sda4
+0:37 /proc/sys/fs/binfmt_misc autofs systemd-1
+0:7 /sys/kernel/debug debugfs debugfs
+0:38 /dev/hugepages hugetlbfs hugetlbfs
+0:16 /dev/mqueue mqueue mqueue
+0:39 /proc/sys/fs/binfmt_misc binfmt_misc binfmt_misc
+0:40 /proc/fs/nfsd nfsd nfsd
+0:41 /tmp tmpfs tmpfs
+8:3 /home ext4 /dev/sda3
+8:2 /boot ext4 /dev/sda2
+8:5 /home/games ext4 /dev/sda5
+8:1 /boot/efi vfat /dev/sda1
+8:17 /home/archive ext4 /dev/sdb1
+0:43 /var/lib/nfs/rpc_pipefs rpc_pipefs sunrpc
+0:47 /sys/fs/fuse/connections fusectl fusectl
+0:46 /run/user/1000 tmpfs tmpfs
+0:45 /run/user/1000/gvfs fuse.gvfsd-fuse gvfsd-fuse
+0:44 /run/user/0 tmpfs tmpfs
+0:48 /mnt/sounds cifs //sr.net.home/sounds
diff --git a/tests/expected/column/table-tree b/tests/expected/column/table-tree
new file mode 100644
index 0000000..1f1110b
--- /dev/null
+++ b/tests/expected/column/table-tree
@@ -0,0 +1,42 @@
+TARGET SOURCE TYPE VFS-OPTS
+/ /dev/sda4 ext4 rw,relatime
+|-/sys sysfs sysfs rw,nosuid,nodev,noexec,relatime
+| |-/sys/kernel/security securityfs securityfs rw,nosuid,nodev,noexec,relatime
+| |-/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec
+| | |-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | |-/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | |-/sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | |-/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | |-/sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | |-/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | |-/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | |-/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | |-/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | |-/sys/fs/cgroup/net_cls,net_prio cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| | `-/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime
+| |-/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatime
+| |-/sys/firmware/efi/efivars efivarfs efivarfs rw,nosuid,nodev,noexec,relatime
+| |-/sys/kernel/config configfs configfs rw,relatime
+| |-/sys/kernel/debug debugfs debugfs rw,relatime
+| `-/sys/fs/fuse/connections fusectl fusectl rw,relatime
+|-/proc proc proc rw,nosuid,nodev,noexec,relatime
+| |-/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime
+| | `-/proc/sys/fs/binfmt_misc binfmt_misc binfmt_misc rw,relatime
+| `-/proc/fs/nfsd nfsd nfsd rw,relatime
+|-/dev devtmpfs devtmpfs rw,nosuid
+| |-/dev/shm tmpfs tmpfs rw,nosuid,nodev
+| |-/dev/pts devpts devpts rw,nosuid,noexec,relatime
+| |-/dev/hugepages hugetlbfs hugetlbfs rw,relatime
+| `-/dev/mqueue mqueue mqueue rw,relatime
+|-/run tmpfs tmpfs rw,nosuid,nodev
+| |-/run/user/1000 tmpfs tmpfs rw,nosuid,nodev,relatime
+| | `-/run/user/1000/gvfs gvfsd-fuse fuse.gvfsd-fuse rw,nosuid,nodev,relatime
+| `-/run/user/0 tmpfs tmpfs rw,nosuid,nodev,relatime
+|-/tmp tmpfs tmpfs rw,nosuid,nodev
+|-/home /dev/sda3 ext4 rw,relatime
+| |-/home/games /dev/sda5 ext4 rw,relatime
+| `-/home/archive /dev/sdb1 ext4 rw,relatime
+|-/boot /dev/sda2 ext4 rw,relatime
+| `-/boot/efi /dev/sda1 vfat rw,relatime
+|-/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime
+`-/mnt/sounds //sr.net.home/sounds cifs rw,relatime
diff --git a/tests/expected/column/table-truncate b/tests/expected/column/table-truncate
new file mode 100644
index 0000000..6741dcb
--- /dev/null
+++ b/tests/expected/column/table-truncate
@@ -0,0 +1,42 @@
+MAJMIN TARGET VFS-OPTS PROP TYPE SOURCE FS-OPTS
+0:17 /sys rw,nosui shared:6 sysfs sysfs rw
+0:4 /proc rw,nosui shared:5 proc proc rw
+0:6 /dev rw,nosui shared:2 devtmpfs devtmpfs rw,size
+0:18 /sys/kernel/security rw,nosui shared:7 securityfs securityfs rw
+0:19 /dev/shm rw,nosui shared:3 tmpfs tmpfs rw
+0:20 /dev/pts rw,nosui shared:4 devpts devpts rw,gid=
+0:21 /run rw,nosui shared:23 tmpfs tmpfs rw,mode
+0:22 /sys/fs/cgroup ro,nosui shared:8 tmpfs tmpfs ro,mode
+0:23 /sys/fs/cgroup/systemd rw,nosui shared:9 cgroup cgroup rw,xatt
+0:24 /sys/fs/pstore rw,nosui shared:20 pstore pstore rw
+0:25 /sys/firmware/efi/efivars rw,nosui shared:21 efivarfs efivarfs rw
+0:26 /sys/fs/cgroup/blkio rw,nosui shared:10 cgroup cgroup rw,blki
+0:27 /sys/fs/cgroup/cpu,cpuacct rw,nosui shared:11 cgroup cgroup rw,cpu,
+0:28 /sys/fs/cgroup/devices rw,nosui shared:12 cgroup cgroup rw,devi
+0:29 /sys/fs/cgroup/hugetlb rw,nosui shared:13 cgroup cgroup rw,huge
+0:30 /sys/fs/cgroup/pids rw,nosui shared:14 cgroup cgroup rw,pids
+0:31 /sys/fs/cgroup/memory rw,nosui shared:15 cgroup cgroup rw,memo
+0:32 /sys/fs/cgroup/cpuset rw,nosui shared:16 cgroup cgroup rw,cpus
+0:33 /sys/fs/cgroup/perf_event rw,nosui shared:17 cgroup cgroup rw,perf
+0:34 /sys/fs/cgroup/net_cls,net_prio rw,nosui shared:18 cgroup cgroup rw,net_
+0:35 /sys/fs/cgroup/freezer rw,nosui shared:19 cgroup cgroup rw,free
+0:36 /sys/kernel/config rw,relat shared:22 configfs configfs rw
+8:4 / rw,relat shared:1 ext4 /dev/sda4 rw,data
+0:37 /proc/sys/fs/binfmt_misc rw,relat shared:24 autofs systemd-1 rw,fd=3
+0:7 /sys/kernel/debug rw,relat shared:25 debugfs debugfs rw
+0:38 /dev/hugepages rw,relat shared:26 hugetlbfs hugetlbfs rw
+0:16 /dev/mqueue rw,relat shared:27 mqueue mqueue rw
+0:39 /proc/sys/fs/binfmt_misc rw,relat shared:28 binfmt_misc binfmt_misc rw
+0:40 /proc/fs/nfsd rw,relat shared:29 nfsd nfsd rw
+0:41 /tmp rw,nosui shared:30 tmpfs tmpfs rw
+8:3 /home rw,relat shared:31 ext4 /dev/sda3 rw,data
+8:2 /boot rw,relat shared:32 ext4 /dev/sda2 rw,data
+8:5 /home/games rw,relat shared:33 ext4 /dev/sda5 rw,data
+8:1 /boot/efi rw,relat shared:34 vfat /dev/sda1 rw,fmas
+8:17 /home/archive rw,relat shared:35 ext4 /dev/sdb1 rw,data
+0:43 /var/lib/nfs/rpc_pipefs rw,relat shared:36 rpc_pipefs sunrpc rw
+0:47 /sys/fs/fuse/connections rw,relat shared:163 fusectl fusectl rw
+0:46 /run/user/1000 rw,nosui shared:158 tmpfs tmpfs rw,size
+0:45 /run/user/1000/gvfs rw,nosui shared:153 fuse.gvfsd-fuse gvfsd-fuse rw,user
+0:44 /run/user/0 rw,nosui shared:114 tmpfs tmpfs rw,size
+0:48 /mnt/sounds rw,relat shared:119 cifs //sr.net.home/sounds rw,vers
diff --git a/tests/expected/column/table-wrap b/tests/expected/column/table-wrap
new file mode 100644
index 0000000..47585dd
--- /dev/null
+++ b/tests/expected/column/table-wrap
@@ -0,0 +1,56 @@
+MAJMIN TARGET TYPE SOURCE FS-OPTS
+0:17 /sys sysfs sysfs rw
+0:4 /proc proc proc rw
+0:6 /dev devtmpfs devtmpfs rw,size=8175740k,nr_inodes=204
+ 3935,mode=755
+0:18 /sys/kernel/security securityfs securityfs rw
+0:19 /dev/shm tmpfs tmpfs rw
+0:20 /dev/pts devpts devpts rw,gid=5,mode=620,ptmxmode=000
+0:21 /run tmpfs tmpfs rw,mode=755
+0:22 /sys/fs/cgroup tmpfs tmpfs ro,mode=755
+0:23 /sys/fs/cgroup/systemd cgroup cgroup rw,xattr,release_agent=/usr/li
+ b/systemd/systemd-cgroups-agen
+ t,name=systemd
+0:24 /sys/fs/pstore pstore pstore rw
+0:25 /sys/firmware/efi/efivars efivarfs efivarfs rw
+0:26 /sys/fs/cgroup/blkio cgroup cgroup rw,blkio
+0:27 /sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,cpu,cpuacct
+0:28 /sys/fs/cgroup/devices cgroup cgroup rw,devices
+0:29 /sys/fs/cgroup/hugetlb cgroup cgroup rw,hugetlb
+0:30 /sys/fs/cgroup/pids cgroup cgroup rw,pids
+0:31 /sys/fs/cgroup/memory cgroup cgroup rw,memory
+0:32 /sys/fs/cgroup/cpuset cgroup cgroup rw,cpuset
+0:33 /sys/fs/cgroup/perf_event cgroup cgroup rw,perf_event
+0:34 /sys/fs/cgroup/net_cls,net_prio cgroup cgroup rw,net_cls,net_prio
+0:35 /sys/fs/cgroup/freezer cgroup cgroup rw,freezer
+0:36 /sys/kernel/config configfs configfs rw
+8:4 / ext4 /dev/sda4 rw,data=ordered
+0:37 /proc/sys/fs/binfmt_misc autofs systemd-1 rw,fd=37,pgrp=1,timeout=0,minp
+ roto=5,maxproto=5,direct,pipe_
+ ino=12781
+0:7 /sys/kernel/debug debugfs debugfs rw
+0:38 /dev/hugepages hugetlbfs hugetlbfs rw
+0:16 /dev/mqueue mqueue mqueue rw
+0:39 /proc/sys/fs/binfmt_misc binfmt_misc binfmt_misc rw
+0:40 /proc/fs/nfsd nfsd nfsd rw
+0:41 /tmp tmpfs tmpfs rw
+8:3 /home ext4 /dev/sda3 rw,data=ordered
+8:2 /boot ext4 /dev/sda2 rw,data=ordered
+8:5 /home/games ext4 /dev/sda5 rw,data=ordered
+8:1 /boot/efi vfat /dev/sda1 rw,fmask=0077,dmask=0077,codep
+ age=437,iocharset=ascii,shortn
+ ame=winnt,errors=remount-ro
+8:17 /home/archive ext4 /dev/sdb1 rw,data=ordered
+0:43 /var/lib/nfs/rpc_pipefs rpc_pipefs sunrpc rw
+0:47 /sys/fs/fuse/connections fusectl fusectl rw
+0:46 /run/user/1000 tmpfs tmpfs rw,size=1637324k,mode=700,uid=
+ 1000,gid=1000
+0:45 /run/user/1000/gvfs fuse.gvfsd-fuse gvfsd-fuse rw,user_id=1000,group_id=1000
+0:44 /run/user/0 tmpfs tmpfs rw,size=1637324k,mode=700
+0:48 /mnt/sounds cifs //sr.net.home/sounds rw,vers=1.0,cache=strict,usern
+ ame=kzak,domain=SRGROUP,uid=0,
+ noforceuid,gid=0,noforcegid,ad
+ dr=192.168.111.1,unix,posixpat
+ hs,serverino,mapposix,acl,rsiz
+ e=1048576,wsize=65536,echo_int
+ erval=60,actimeo=1
diff --git a/tests/expected/cramfs/doubles b/tests/expected/cramfs/doubles
new file mode 100644
index 0000000..5641c66
--- /dev/null
+++ b/tests/expected/cramfs/doubles
@@ -0,0 +1,3 @@
+create mountpoint dir
+create cramfs image
+umount the image
diff --git a/tests/expected/cramfs/fsck-bad-header-nopad-4K-be b/tests/expected/cramfs/fsck-bad-header-nopad-4K-be
new file mode 100644
index 0000000..9235faa
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-nopad-4K-be
@@ -0,0 +1,21 @@
+## size: 0
+ret: 4
+
+## size: 75
+ret: 4
+
+## size: 76
+ret: 4
+
+## size: 4095
+ret: 4
+
+## size: 4096
+ret: 0
+
+## size: 4097
+ret: 4
+
+## size: 4294967295
+ret: 4
+
diff --git a/tests/expected/cramfs/fsck-bad-header-nopad-4K-be.err b/tests/expected/cramfs/fsck-bad-header-nopad-4K-be.err
new file mode 100644
index 0000000..0f1e9e8
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-nopad-4K-be.err
@@ -0,0 +1,15 @@
+## size: 0
+fsck.cramfs: superblock size (0) too small
+## size: 75
+fsck.cramfs: superblock size (75) too small
+## size: 76
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 4095
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 4096
+## size: 4097
+fsck.cramfs: file length too short
+## size: 4294967295
+fsck.cramfs: file length too short
diff --git a/tests/expected/cramfs/fsck-bad-header-nopad-4K-le b/tests/expected/cramfs/fsck-bad-header-nopad-4K-le
new file mode 100644
index 0000000..9235faa
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-nopad-4K-le
@@ -0,0 +1,21 @@
+## size: 0
+ret: 4
+
+## size: 75
+ret: 4
+
+## size: 76
+ret: 4
+
+## size: 4095
+ret: 4
+
+## size: 4096
+ret: 0
+
+## size: 4097
+ret: 4
+
+## size: 4294967295
+ret: 4
+
diff --git a/tests/expected/cramfs/fsck-bad-header-nopad-4K-le.err b/tests/expected/cramfs/fsck-bad-header-nopad-4K-le.err
new file mode 100644
index 0000000..0f1e9e8
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-nopad-4K-le.err
@@ -0,0 +1,15 @@
+## size: 0
+fsck.cramfs: superblock size (0) too small
+## size: 75
+fsck.cramfs: superblock size (75) too small
+## size: 76
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 4095
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 4096
+## size: 4097
+fsck.cramfs: file length too short
+## size: 4294967295
+fsck.cramfs: file length too short
diff --git a/tests/expected/cramfs/fsck-bad-header-pad-4K-be b/tests/expected/cramfs/fsck-bad-header-pad-4K-be
new file mode 100644
index 0000000..78c6bd2
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-pad-4K-be
@@ -0,0 +1,21 @@
+## size: 76
+ret: 4
+
+## size: 587
+ret: 4
+
+## size: 588
+ret: 4
+
+## size: 4095
+ret: 4
+
+## size: 4096
+ret: 0
+
+## size: 4097
+ret: 4
+
+## size: 4294967295
+ret: 4
+
diff --git a/tests/expected/cramfs/fsck-bad-header-pad-4K-be.err b/tests/expected/cramfs/fsck-bad-header-pad-4K-be.err
new file mode 100644
index 0000000..27e45df
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-pad-4K-be.err
@@ -0,0 +1,15 @@
+## size: 76
+fsck.cramfs: superblock size (76) too small
+## size: 587
+fsck.cramfs: superblock size (587) too small
+## size: 588
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 4095
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 4096
+## size: 4097
+fsck.cramfs: file length too short
+## size: 4294967295
+fsck.cramfs: file length too short
diff --git a/tests/expected/cramfs/fsck-bad-header-pad-4K-le b/tests/expected/cramfs/fsck-bad-header-pad-4K-le
new file mode 100644
index 0000000..78c6bd2
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-pad-4K-le
@@ -0,0 +1,21 @@
+## size: 76
+ret: 4
+
+## size: 587
+ret: 4
+
+## size: 588
+ret: 4
+
+## size: 4095
+ret: 4
+
+## size: 4096
+ret: 0
+
+## size: 4097
+ret: 4
+
+## size: 4294967295
+ret: 4
+
diff --git a/tests/expected/cramfs/fsck-bad-header-pad-4K-le.err b/tests/expected/cramfs/fsck-bad-header-pad-4K-le.err
new file mode 100644
index 0000000..27e45df
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-pad-4K-le.err
@@ -0,0 +1,15 @@
+## size: 76
+fsck.cramfs: superblock size (76) too small
+## size: 587
+fsck.cramfs: superblock size (587) too small
+## size: 588
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 4095
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 4096
+## size: 4097
+fsck.cramfs: file length too short
+## size: 4294967295
+fsck.cramfs: file length too short
diff --git a/tests/expected/cramfs/fsck-bad-header-pad-64K-be b/tests/expected/cramfs/fsck-bad-header-pad-64K-be
new file mode 100644
index 0000000..b9c559e
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-pad-64K-be
@@ -0,0 +1,21 @@
+## size: 76
+ret: 4
+
+## size: 587
+ret: 4
+
+## size: 588
+ret: 4
+
+## size: 65535
+ret: 4
+
+## size: 65536
+ret: 0
+
+## size: 65537
+ret: 4
+
+## size: 4294967295
+ret: 4
+
diff --git a/tests/expected/cramfs/fsck-bad-header-pad-64K-be.err b/tests/expected/cramfs/fsck-bad-header-pad-64K-be.err
new file mode 100644
index 0000000..817ba7b
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-pad-64K-be.err
@@ -0,0 +1,15 @@
+## size: 76
+fsck.cramfs: superblock size (76) too small
+## size: 587
+fsck.cramfs: superblock size (587) too small
+## size: 588
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 65535
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 65536
+## size: 65537
+fsck.cramfs: file length too short
+## size: 4294967295
+fsck.cramfs: file length too short
diff --git a/tests/expected/cramfs/fsck-bad-header-pad-64K-le b/tests/expected/cramfs/fsck-bad-header-pad-64K-le
new file mode 100644
index 0000000..b9c559e
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-pad-64K-le
@@ -0,0 +1,21 @@
+## size: 76
+ret: 4
+
+## size: 587
+ret: 4
+
+## size: 588
+ret: 4
+
+## size: 65535
+ret: 4
+
+## size: 65536
+ret: 0
+
+## size: 65537
+ret: 4
+
+## size: 4294967295
+ret: 4
+
diff --git a/tests/expected/cramfs/fsck-bad-header-pad-64K-le.err b/tests/expected/cramfs/fsck-bad-header-pad-64K-le.err
new file mode 100644
index 0000000..817ba7b
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header-pad-64K-le.err
@@ -0,0 +1,15 @@
+## size: 76
+fsck.cramfs: superblock size (76) too small
+## size: 587
+fsck.cramfs: superblock size (587) too small
+## size: 588
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 65535
+fsck.cramfs: file extends past end of filesystem
+fsck.cramfs: crc error
+## size: 65536
+## size: 65537
+fsck.cramfs: file length too short
+## size: 4294967295
+fsck.cramfs: file length too short
diff --git a/tests/expected/cramfs/fsck-bad-header.err b/tests/expected/cramfs/fsck-bad-header.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/cramfs/fsck-bad-header.err
diff --git a/tests/expected/cramfs/fsck-endianness b/tests/expected/cramfs/fsck-endianness
new file mode 100644
index 0000000..a7591b6
--- /dev/null
+++ b/tests/expected/cramfs/fsck-endianness
@@ -0,0 +1,8 @@
+extract from little endian
+little
+create big endian
+bc0b7bbef02765d32e07faa735d2e0c6
+extract from big endian
+big
+create little endian
+4666f0d2b661f9f3962877edabadb210
diff --git a/tests/expected/cramfs/mkfs b/tests/expected/cramfs/mkfs
new file mode 100644
index 0000000..1c44097
--- /dev/null
+++ b/tests/expected/cramfs/mkfs
@@ -0,0 +1,4124 @@
+create mountpoint dir
+generate data
+list checksums from original data
+0011a72f38da668f94edfa1d50743e2a ./dir-009/data.009
+0071beb4baa599141a7e446334d58300 ./dir-097/data.001
+00873c875f3461fb9f5baa9a039f218f ./dir-093/data.002
+0120fb81269598438e84f3fe10b24658 ./dir-100/data.010
+013b8ae5c4b011b87b142e5d60645f98 ./dir-020/data.010
+0167791462ffcaba8c221426c25cf455 ./dir-092/data.000
+01936c37169cc786cdc724abbf1961e3 ./dir-094/data.003
+01e5a8bee864f99bcfde91b2f501fa56 ./dir-062/data.004
+024b1d4cb93660f125e6f4783e26972c ./dir-072/data.003
+029c1199d16bc8da2afd2fe1c47b6859 ./dir-077/data.001
+02a1c0a82771c59236eb9f337dd0b4da ./dir-073/data.000
+032cdb1ac223adf9ed45278e64f265f0 ./dir-083/data.007
+03655d081ce567a4d5fc8e0c3dc59e3a ./dir-085/data.006
+0397e01cf6805728256fa9272ab672c4 ./dir-062/data.003
+03a58cec58f7b74c0d8803e5a05da20d ./dir-107/data.004
+03b3b16547b25e9484c516f5e88e5c75 ./dir-089/data.006
+03b4ed70f96d5c693bcf7f5a479ecd9f ./dir-014/data.007
+03d8a4ac5add5a95f3d9cac8f847c8e7 ./dir-023/data.000
+03de2f0958a76e9d01389b919c69ec96 ./dir-079/data.004
+043fa6cba08946ad508ca890a42f0644 ./dir-005/data.004
+04beac49e6d1f1f9067da249f8953fe9 ./dir-041/data.002
+04bf36721c9da55b2fd6780a5a6dcef0 ./dir-012/data.009
+052ac7ff047928a4f1c0d8bf38320483 ./dir-000/data.003
+053b15396096c2751d9e32b186bf0948 ./dir-035/data.005
+058879e070d51c1e2487d481f9c43b78 ./dir-071/data.007
+05bd438d7a151ebec24cceffb792c3bb ./dir-104/data.009
+05bd9b692ef2ff2c3e2e22a582bfc25c ./dir-021/data.006
+06492dee50157f379eabbe811bcb5ac7 ./dir-073/data.009
+068c724e76dba0c887c5323de7b7a434 ./dir-021/data.004
+069379abfd9f26e203c53923443e58a4 ./dir-094/data.006
+06c36f5db0c02127dbbca75c5d7c130c ./dir-104/data.006
+06d219d83d0d2142e9f7a06372e82f81 ./dir-110/data.010
+06df718f885fd71f2568940b616528c3 ./dir-059/data.001
+070178230ea47e90d00f9a6fa1975fd2 ./dir-079/data.005
+072c1d1755a4af7855dfea3c68cf270a ./dir-065/data.008
+07cd767ef24d4ec057ab98d0b4b388a9 ./dir-091/data.002
+081029b7d8bb27f6c4f79a2e4ba67d85 ./dir-070/data.005
+08268088254256c25894c6d76902cd61 ./dir-037/data.007
+0829c20c81113eec0759e5fdd74b1d3e ./dir-056/data.005
+08310ad78cbd3d6ee1864e5c145248d9 ./dir-103/data.001
+08478c7a523a8725107ad804a7dcda1e ./dir-096/data.003
+08763d238e02d7ab57d762b58038e38c ./dir-054/data.000
+08f96bf68eea8b82bce1a5c1565075be ./dir-060/data.003
+090ed88036a9618e4c44858db399793d ./dir-044/data.008
+092baa8d2659ed94803e652be4c8afe4 ./dir-099/data.009
+093d2d4597015cae42df7d3e2e3bf802 ./dir-062/data.009
+096b7a4f67a561fa2933bbefba032c67 ./dir-025/data.010
+099bf4107ae009497abf52d6d08f5b36 ./dir-013/data.006
+09b4f5a2b49ceba752a604297ab60635 ./dir-049/data.006
+09ca2509b418b5721188ea044ef6b4c2 ./dir-062/data.005
+09d6a844a0f194f884c8bfa6ed830a0e ./dir-106/data.007
+09d9867f561d35d2de37d9ae29400ee0 ./dir-084/data.001
+0a4f9161096ecf8ff8397cffcd9bf2c7 ./dir-000/data.002
+0a54f2a8347cad7e806cd0280b617463 ./dir-017/data.005
+0ada042828a700ad2489a23473d8e90e ./dir-003/data.004
+0afd3b49f16d29ebbc6f479a39ce7bfa ./dir-037/data.003
+0b0fb72f03db99cc722d4aaf2a98e5b6 ./dir-010/data.005
+0b508b5021efe48abeafb59bce6a3f6d ./dir-094/data.009
+0b938f0fe7bbb651b1d25f7763ae6d52 ./dir-052/data.004
+0b99746f048b6e421a452e930253bb15 ./dir-056/data.008
+0baaaee1ecaeb5f9cf8b7567afd4ef89 ./dir-026/data.001
+0bbccf04109b26f8d4f1cccb00f727e9 ./dir-053/data.004
+0c1e3c869b0adaa7ce93879a151776df ./dir-001/data.006
+0c8211ef42d75892c707f022e2a7d452 ./dir-043/data.004
+0c9298aefe72004d34643eddef8f4f1f ./dir-109/data.007
+0cfcc152235ac2f1569c390084b6d442 ./dir-012/data.006
+0d13557f56667831a853d422f40cb88d ./dir-014/data.006
+0d3cd9b22b91391d17c30e79fc892a62 ./dir-062/data.008
+0da117532cade43a9b42b681dbb4d97b ./dir-047/data.000
+0db8aea5ecef040742e4d9b3baa76dd6 ./dir-030/data.001
+0dbac1d697cc77685e1fb884916c1ae5 ./dir-026/data.004
+0dbded4d22453c74ed8ca876c759c1d0 ./dir-025/data.006
+0dc89ad916055c7321ad89e135d5b565 ./dir-051/data.006
+0dcc1bb5b8c671fa906a4c027f781149 ./dir-002/data.008
+0def9e49d46f81887afd6004ba27966e ./dir-017/data.003
+0e12577e454a44866f54f99738637d3e ./dir-059/data.004
+0e20a7189f0a9d2435f3bca1c3a6111b ./dir-053/data.003
+0e387d4e1d2669edd5527676dc5aec88 ./dir-092/data.001
+0e4d615c2aafda7ca9e24ce5c4637047 ./dir-046/data.006
+0e64c356b46f76923195fd49d452cda9 ./dir-092/data.004
+0e8d99a3b34733488d4d0e91837ae625 ./dir-010/data.003
+0e93cb8206b3d92c6b377f5f0ae6c3ca ./dir-101/data.008
+0f048b9bda6f694d90e961a5f83ae200 ./dir-039/data.009
+0f5cdc65ef8473f32533e3f56dca2ea4 ./dir-039/data.010
+0f99dffbb780bf4ac5381f2f14782a6e ./dir-041/data.000
+1029e912f6ecc9305585e8333d71602c ./dir-101/data.004
+103b8e299b6ed5b47d5eb6af7d04d85f ./dir-001/data.008
+10417903b3128497ffae512e9413d2bb ./dir-069/data.000
+108c615627e3a2874ffcd0c7daf93fab ./dir-049/data.002
+10e6e1097c9a4c17aeb211a2920e872a ./dir-080/data.010
+10fb5da04134c663b0554af084e2a7ec ./dir-095/data.000
+114f6bc0fcd87635a6bf304008e9b5c4 ./dir-093/data.000
+1151ae62db155a01571d7c79ee9307d3 ./dir-002/data.010
+11b3dec2bff965af6b36670dfd7ae573 ./dir-056/data.001
+11e361b75dffbe0ed09cda638d87e2cd ./dir-047/data.007
+11e9c06c0d7c355f1bb0bf8ad3376acb ./dir-083/data.001
+11fb59cb3557081ed7219666b74374b4 ./dir-004/data.005
+1251803d9b31ceb1ee2900a8407c762f ./dir-018/data.004
+125f71c5016e92b3659070ed04f58be6 ./dir-060/data.007
+12aa5d0dac0eb51e7d22b88246282f03 ./dir-093/data.006
+12cfb3af86b7cc141a3fe9a6268726a5 ./dir-024/data.005
+132af7005255cc4b038ad9021eca3840 ./dir-066/data.005
+13c8eb071c8e8bd68421d37f925601e4 ./dir-016/data.000
+13dd14e55cda92def6f11db482434a00 ./dir-022/data.008
+13f67366ee5c8adb40e80d3a5cd17fb7 ./dir-066/data.001
+13fb236e5f27b789fc31f1cf5b1b8892 ./dir-015/data.003
+14506c18804debcebf27a377aa04eaa6 ./dir-087/data.007
+14528bfaa0a1aca63cbc80acab96f800 ./dir-051/data.008
+148cf5c5feb722092441ec87b7a5611a ./dir-025/data.007
+149b7674a92796bec7f6066bbdef9a3c ./dir-027/data.007
+14da08b2d85bfc81c0b0b92817989791 ./dir-033/data.002
+1500a4c5054d87dd61c392f33868da4b ./dir-038/data.010
+15987cb3da62f45c7aee7a0ab9518206 ./dir-089/data.001
+15c05327f337c7d7414d472fa770ec3c ./dir-038/data.003
+15ccd5a312eb772c85a44a63099322af ./dir-045/data.005
+15f30a3264c0f8c57e6d7497a4064fed ./dir-100/data.003
+16156718becebf0f975136dca6c6ae56 ./dir-042/data.005
+1624d2a4ead61cb3c8e25c21794ea679 ./dir-106/data.006
+168b97bda8aa6f795d8f7272194d1d5a ./dir-020/data.006
+168f7eb82dd7eb78c4a5221d2e581dde ./dir-065/data.002
+16cf8c6acd3cd1ca2fc4bfc9b543982a ./dir-007/data.009
+1714933b11a4a8e600057565866ec423 ./dir-080/data.009
+1745656f9601fbd5163144500eda6568 ./dir-057/data.004
+179353ce148c37425d766ea5b43dc32b ./dir-023/data.007
+17f7787457e5fd1a8601dd2375eea777 ./dir-036/data.003
+1815c6317528cafd2a1e61429d29e1cf ./dir-008/data.003
+1836fd39b05d94a860d727f972a18729 ./dir-029/data.007
+186992572e97dc0a3688b2202c066a70 ./dir-066/data.008
+18b4a437d81acf594cc1482031987f61 ./dir-058/data.009
+18d978c6f54b50bacc51b5be2a6ba6de ./dir-051/data.002
+18edf33da2c7e85b6a2d54b04f79665e ./dir-093/data.009
+1947681ebdb65cfc6a48556ea9d923d9 ./dir-023/data.005
+1969ecd225b9d6fa4029bf673dbea4de ./dir-036/data.007
+19a34f8c9016cea8d58f02b816d4475d ./dir-065/data.003
+19c3f7ba63f64cd6e84d28e974834101 ./dir-012/data.002
+1a35e19c6fab4fa1d818e6efb79a7b18 ./dir-052/data.003
+1a92fd5a4821e924461429577491407d ./dir-002/data.001
+1a973f2c00d0090607a05d608b81897f ./dir-088/data.005
+1acdab480c52a454ba5552c29516d933 ./dir-073/data.006
+1ad17c4603609a36a704914e6f91d1e6 ./dir-034/data.002
+1b1ddfb88f0cf37d96a44edeb26629f9 ./dir-043/data.010
+1bb53747be6ad8a3e7da57c60ae54bf4 ./dir-047/data.010
+1bbb6b1ea7806b92e431aa481ba53256 ./dir-059/data.009
+1befcc0040c6a3b7e936a89b7dcc8d1f ./dir-054/data.003
+1bf3d96c63f0825a0238b3c711b2add1 ./dir-104/data.004
+1bfe6367c46e50e34f9f68debe2fd9e5 ./dir-062/data.002
+1c05f31466a6b05f1d73120760421b07 ./dir-017/data.002
+1c100fa4a99a635b39826fbf32a185ea ./dir-046/data.000
+1c4070f6f2506a5d59dac63579db5c5f ./dir-009/data.010
+1d286ac5a7f4477b07cbf2b8fa608f31 ./dir-022/data.007
+1d842f952850ecb07b9f8ab59cdbbdfc ./dir-074/data.009
+1dabe77be130077a1e2de7b1b243638f ./dir-108/data.001
+1e4b90e70c5531193b82cc3b615853a3 ./dir-083/data.010
+1e4b99c0c6c97cbe59c01b6b81cdd55a ./dir-000/data.004
+1e6fd4ee4737ee447ade2165104f4dc3 ./dir-044/data.001
+1e82a5e977e75d6ff12ba4e4b8121994 ./dir-025/data.001
+1f0a7ad9330818153e6d13705389f506 ./dir-098/data.004
+1faa10ff54c51e9e6a691d2020b28180 ./dir-013/data.009
+1fbafd0531f5dbf3e84a85c3afef7159 ./dir-091/data.004
+201882708185fd15ab164826e7e4ab3b ./dir-007/data.005
+2028e25ee7ea2410b05c96e2531999af ./dir-008/data.009
+204f64ca934489c9c321b7716abe6137 ./dir-013/data.010
+209ca1185749f5f760f3c2b1eeabcf94 ./dir-080/data.007
+2104bfa0d5cc81662f0f251dc88ed1f0 ./dir-002/data.007
+213356c6e050aa1f44fdb67554d9987d ./dir-100/data.006
+21ce95875b349ac8c4a5661ec7fb1c5a ./dir-108/data.009
+225117899bdd50b6fd754fac468523e6 ./dir-046/data.004
+22c7c4d61b254e67bfb62292f6813300 ./dir-006/data.009
+2305cdd515ea03e0e3d9dd7893c48e5e ./dir-093/data.007
+2343947bcb2aca5a583434e20b9afe83 ./dir-031/data.001
+237c5d3b7a556670a119b6bedf4a7a44 ./dir-064/data.005
+23887fc97d5de846dbb9b26fe48560e2 ./dir-105/data.003
+23e98c99c14dc74bf33f40f8438d5947 ./dir-035/data.002
+23f2dcf6bb0454fd2058442ab6c92b32 ./dir-059/data.008
+23facd50784b91efe2e5e81678bf04bb ./dir-069/data.006
+242be68b3720e5868e7f7652da5af043 ./dir-006/data.001
+24a863973f8ef674b357e1189b40de69 ./dir-060/data.000
+24c9f4371c9367eb54479198db061748 ./dir-070/data.010
+2537510cef5e66126ab4a5f2038de98b ./dir-011/data.004
+253e7dc0307e545fb44fb5e621883895 ./dir-002/data.000
+257394c9dca3db7e737ffa1d0419317d ./dir-074/data.000
+2585dcfae46bc4c444f34416e48da371 ./dir-050/data.009
+2595c5d5f15648f5b784cc327a0b9480 ./dir-077/data.010
+25d83de09d075036c37f4fa4084e81f3 ./dir-066/data.006
+25dabb63db7e69e49a20078e3f1c7398 ./dir-103/data.004
+265905e58360d4ee4cabe7fa24eb49bc ./dir-086/data.007
+269bc4b7f4d16c66907d450356661b6e ./dir-088/data.008
+26b6a74e3dabfd3c9a465f7053387f19 ./dir-013/data.000
+26b71d2a0e43c9837d567662bf9c7a01 ./dir-036/data.006
+26ba9e7bf1ffa275602ac235642aec22 ./dir-063/data.006
+270c63b19d9b4c9866df1a7a9d964ba3 ./dir-058/data.001
+2747d5dfdbd4f5ce76642911fd1cd7ba ./dir-037/data.006
+275719a7d2e10fd0cc0dbd406a5dd284 ./dir-030/data.003
+27974aa4801a7c3af842899272b9f6d5 ./dir-032/data.002
+27a1a827d803996650be7554790209bb ./dir-098/data.010
+283c9f8d3dc59cff4850ca6d976545d0 ./dir-010/data.010
+28503c859c89b5d9953f5bf084b44409 ./dir-096/data.006
+28ba83018c7f8d79a4bfb2aa94ecf777 ./dir-107/data.007
+28f2c7408277657e4c2c5b2e8017bcaf ./dir-088/data.006
+290616007d76bbe05a61c73693a9b070 ./dir-001/data.010
+29092e94be3e74a246c24383f920753f ./dir-035/data.006
+2957ae96634044a42bbc4bb0707cd202 ./dir-067/data.006
+2a11d7eceb35d8ff8248f0ec67a4ee55 ./dir-004/data.002
+2a39f7493e5646a38e9f71eb202dbc2d ./dir-029/data.005
+2a4b4ff47d7ab9711757637f480c0586 ./dir-096/data.004
+2a5a748d65991f63f6da39a97a22ccfd ./dir-108/data.000
+2a8860739f9d2dbda65e4d852e0fd309 ./dir-076/data.001
+2a8d705b90b82af455acfa7d9c0fc3c9 ./dir-069/data.009
+2ace4b0d8ef122bd918e8d538714ee73 ./dir-084/data.002
+2b08c2f1783f865051369bf41b47f960 ./dir-023/data.003
+2b31b68d17ec63b0e1a50176c49030e4 ./dir-076/data.007
+2b360e9c50225e1ebf8bf95fc0939e2f ./dir-006/data.005
+2b545e6e6ca3b6638b618c34aaefdbf2 ./dir-100/data.001
+2b5d18108e0309354b4f80b185e2323a ./dir-057/data.010
+2b82448e6fccac3441d9f7d7a13074d4 ./dir-031/data.007
+2bcc2819a288ee4ec2c9c00c585f67d9 ./dir-027/data.001
+2cbc9b3922e5d75a8c4e575e53065f2f ./dir-109/data.000
+2ce7c9d5e1a4aed1e9dec1aa85021f4c ./dir-010/data.006
+2cf7c6e038d3744275d8ffb8b4ab52d0 ./dir-096/data.001
+2d0494a350a570bf86596eb5dcd3e575 ./dir-059/data.007
+2d1cae3d5151bebe12ae7d97d9efb92d ./dir-008/data.004
+2d27ec0d318cf56d8ecc226a972db677 ./dir-027/data.002
+2d392a7b3dcfa6ee1399de9416a41b60 ./dir-083/data.005
+2d4433b6e32bda8e563f042fb799e86d ./dir-110/data.002
+2d70c129d857d22a8266c2e5f3ee4563 ./dir-048/data.001
+2d76b9784bbb68c670aeae134f1c6c32 ./dir-095/data.001
+2dbef0445d1b450b88b9e5817741f295 ./dir-072/data.002
+2dc184e8ece7744de9912d4671f2f116 ./dir-044/data.009
+2df5877dff7f77e48aa45bb96de9f362 ./dir-071/data.010
+2e03f7b258d00c0c5ff10425a701b457 ./dir-082/data.010
+2e0bf9030092dd77ed44cd7a25497496 ./dir-072/data.006
+2e0ee79666904e3629c801f2e39eeef4 ./dir-009/data.001
+2e43ada234775adb77188a840eee1525 ./dir-020/data.009
+2e648a138f04daba3ec30d9ee8502a03 ./dir-028/data.002
+2e90cd54f80352ec7d03fa98737245b5 ./dir-034/data.009
+2f253cb5c065c90cbc5d6667413862a8 ./dir-066/data.009
+2f51608cd1c0aed64f2b0b65fa1020c3 ./dir-025/data.009
+2f8d68bc8ec1c5db8ce2f70c87f91e68 ./dir-067/data.003
+2fa01a6b14ea91c02460c0beb70f69c7 ./dir-003/data.005
+2fd76fadb124c701e852763131480457 ./dir-009/data.007
+301e96925429a577cffd3805c2b6781e ./dir-060/data.005
+304d034c10c3f2e8659b25049028dd60 ./dir-104/data.003
+305eb027ab22375e29f6ce544fbd07bc ./dir-063/data.002
+30a44eacd0af674f1725fda3b7448f4d ./dir-101/data.009
+31179c50bc1553cce235c9aa625c16ae ./dir-105/data.010
+313fdb8585c16ffdeb009c0d3256a3b1 ./dir-078/data.000
+3169cdf524ba2005644d09ce2d72d694 ./dir-100/data.000
+31c5b7365750ca7fbf789c4ca325018d ./dir-107/data.009
+32928650dc72f8810007effa8db00119 ./dir-035/data.008
+32af92e23e453c72417acf56d3ab6fde ./dir-033/data.007
+32cf1dfcb9bd72353f46993006cb2d0c ./dir-003/data.007
+32e3f72b1fca5ac3176e8dbe110e757a ./dir-104/data.005
+3398bf733d4d26a7a8304740381a8333 ./dir-036/data.008
+33e82dbebbf710a1b203655510443ff1 ./dir-037/data.009
+33fc502a0d0616f76551446ef1965c30 ./dir-065/data.005
+3481e8b218141e6e6dc9b75296508b15 ./dir-033/data.004
+34a1997ca886d7c13ba4936f4c8e0daa ./dir-019/data.005
+34c9936c46a847152125e583839c12c6 ./dir-043/data.003
+34f102b63e5308964e2f9725caf6ec2c ./dir-088/data.000
+34f1627786d8d7715842af2bcbc92dd8 ./dir-022/data.000
+357671e20f590900a3869bc29dbee1fd ./dir-051/data.009
+35d3a1bd5dd1a3f7d0b50fb2c5406645 ./dir-039/data.003
+35ecc0144bca35f519985aaa15be26cb ./dir-106/data.004
+35ffbe6e62da5b0ae9c06363600b0715 ./dir-049/data.000
+3603dd8c1f2346ed0770aa548513eb34 ./dir-024/data.002
+361b845aa30dbd442cf2f0b87ad4741a ./dir-055/data.002
+361fd9b6648f95ff7eec8d717d179bc0 ./dir-089/data.008
+36270a415097865dba68478f69628db1 ./dir-003/data.006
+3653a989b9764b2fd530324a98ec8218 ./dir-067/data.004
+36551af77706ae56dc228c1151caa7a6 ./dir-062/data.000
+36b55f77570d1b46380d6018f52661e7 ./dir-109/data.004
+36d68b9cfc51aacce08065d37eb500c6 ./dir-102/data.003
+36fc31babad89ef26acd0337a79286d3 ./dir-049/data.004
+3704c5fd6a446d530bcca18004f2b31d ./dir-081/data.008
+3707760798d4e50da70bae0e8d2c4c28 ./dir-095/data.010
+371719fe5cd052be2a63c6444ec77413 ./dir-044/data.002
+37594be41d8293c0351865a708e2af05 ./dir-063/data.007
+3790a2bce420a800ff76ddc55d4c0d0b ./dir-086/data.001
+37d9e0f2d9a39dbd9fb06c4dbc1d932e ./dir-065/data.000
+38131b5fcb1ba7f74bc3fb89091d67fc ./dir-104/data.001
+382085df5f142fde02b492569b27f7d3 ./dir-078/data.001
+38307eabf1109b786760384dbe7013a2 ./dir-074/data.010
+383aec3d236bde3134bbb811487594ae ./dir-071/data.006
+386bd313b7144bdb7121d9d3cffd8019 ./dir-095/data.002
+38837c036576ad2afb1382e10d229658 ./dir-109/data.001
+38993a904f2d37087a5c4ed413d331d4 ./dir-081/data.007
+38d82c4bbcd2def41636f02151bf5319 ./dir-084/data.004
+392ccf5865fdf0dcfa599034934e4fcf ./dir-072/data.009
+392d6c23d5b6a58ba4553cfef5245191 ./dir-109/data.009
+3973246571d48f5fbe9ddc337ca2c8c9 ./dir-017/data.001
+39de945a763bd83bde787879294c9b49 ./dir-005/data.002
+3a4f397262e2b830fbaffed4d03b37e9 ./dir-016/data.002
+3a8363fc39e4211afe3ede5688f94705 ./dir-077/data.004
+3a897a684dd2b32b4fcc2275988fd080 ./dir-018/data.008
+3a94ca85ac994f47e8010011fc5c9582 ./dir-000/data.006
+3af8ed9c599b06ff2d99fe5563380c30 ./dir-103/data.003
+3b1922fb43fb222b573a9f44bb805e0d ./dir-029/data.009
+3b72b8b4984cd51e67ed03f59da716b0 ./dir-023/data.004
+3b8a656973178c5815451d8c64fa1d21 ./dir-009/data.002
+3ba72c45fd0177d48f6a7a5121fab5a5 ./dir-003/data.001
+3bebd9b6fa4aeb9772ca238fb88ddcf4 ./dir-073/data.010
+3c99ce08823c1c1b24e1c77574cb7bdd ./dir-075/data.005
+3ca50a374e0c46ccc35caba06244a592 ./dir-073/data.004
+3ce0c739083cc21ae6f19eb377258fb3 ./dir-097/data.006
+3cea42052a833a1c65ab6d3de7db95ff ./dir-044/data.005
+3d05c1ebb7adbd72eae064b2b16ed5bd ./dir-015/data.008
+3d362d4af7ac442b0be8a6e1eaed1222 ./dir-058/data.003
+3d3fa69ef78ff4eec72c4a7d62d44320 ./dir-057/data.001
+3da10311ab35b313bcea0b3dcd3ec320 ./dir-085/data.007
+3da5bfc1f121da4a35c5c1a26bdf2871 ./dir-080/data.006
+3dfd203b61606012e3fe4d794026de45 ./dir-060/data.008
+3eb835385bbaa4c12dc66ad5a5787ac3 ./dir-110/data.003
+3ebf14bea5f774ed68dc3aaecfd4c7a7 ./dir-086/data.006
+3ecabfe3d7e0f39d1b77feb30bb2149a ./dir-108/data.006
+4017217c1fc3620f00a63bf7451d7d58 ./dir-011/data.005
+40565e6e9eaeba9538e068d7fc212025 ./dir-030/data.007
+409803908e1249d811421fdf5e7221aa ./dir-011/data.006
+409f1a5df32b48cc615b80f895333125 ./dir-070/data.006
+40da236dcfb37628a7383f110a34ca91 ./dir-018/data.003
+411bceae3a164955533dbad618dcdb19 ./dir-042/data.000
+4129b05173c9dc800c811c1c6ab554f5 ./dir-046/data.008
+412efdab02674ab591ee02c1e5f31d0f ./dir-102/data.005
+41315d3d575108a52e0fc5b07c503177 ./dir-034/data.001
+4141aa05325ffb5c530391d899cd2bcc ./dir-099/data.003
+4174e6169d645307ca8675205d40c853 ./dir-004/data.009
+41bcffb4e71780db8fed9818124e5b6c ./dir-063/data.003
+41ce67b35ee64b9e86c13efcfdd26ce3 ./dir-050/data.010
+434b0fa579b255430214de352151d112 ./dir-041/data.008
+434b26f00c175f276a54105171251d52 ./dir-106/data.005
+435ca233503eefbac946d3ca654f9cc0 ./dir-072/data.010
+437ba3bb8dbb675b158dae0f59d6a445 ./dir-061/data.010
+43c49573357ed53dcc2e364ce112b62d ./dir-061/data.005
+4404b6e4f59a841fe9a3ae2e41c4c488 ./dir-071/data.000
+4426aa424dd25ce972b63b5c47b9530f ./dir-090/data.006
+4448d6c8b60d7a4b08b534ac1059d668 ./dir-089/data.002
+4472ba00b77a4dce904589c457b1bc97 ./dir-106/data.001
+44861e8e164ea51709c069fa286134c6 ./dir-056/data.002
+44961468f08ee80c619adf0154e96a9f ./dir-101/data.010
+44b702805a58f14493bae3c2f2716dc7 ./dir-088/data.007
+44c7d952d5b9528c1263ed11b5dc2ae5 ./dir-012/data.000
+44c825fbf1d23fcabf45e42e395423cd ./dir-085/data.008
+44e3ec8f10255d109773f3204a5020e9 ./dir-022/data.006
+45034f1052987e5d9e2d4bc0f463ec7a ./dir-025/data.004
+451ee4f9e926765a2c07f89b1a2fe078 ./dir-000/data.007
+452b4b43200d2ece30016ae96415718a ./dir-084/data.009
+4535f5d99abee30fe2e0d67098dabc62 ./dir-098/data.000
+45622ac4ee28752eb56eaccfb5462c50 ./dir-016/data.010
+459ba24d0e03a81f8f6ed35700f46460 ./dir-101/data.002
+45af2dca2eebc714cd0ad63f77ceaaa6 ./dir-040/data.008
+45be06fe6e509b43b6f68c52835d54b8 ./dir-016/data.003
+45c250d9570716010f4161f1bff5e450 ./dir-026/data.005
+45ed7a5a54578d5985153ff70330c228 ./dir-011/data.008
+45fe9fcae165a9d88afa27fc3c933406 ./dir-095/data.008
+461b0786590556a5729e1e23512db49e ./dir-037/data.005
+4647cb2043f623bae8860e7e8b58834a ./dir-013/data.008
+468171cdd32b0e94c96a9be1f298738a ./dir-044/data.000
+4690dd33ffa2329e5bc456ca24ec7f72 ./dir-031/data.009
+46f75198e440d8dfb43207eb4965c2c6 ./dir-028/data.006
+4710eacd6b6df6fc6ac2da5ebca94546 ./dir-003/data.009
+472cf0ecd1b1691bfaa8d5fb86c21366 ./dir-075/data.002
+47344f3f3f3a806ff636267eb39369e0 ./dir-082/data.006
+47d6c7304f9210ee16dc2dc5fc2a95ed ./dir-048/data.005
+4829f629b1e545f4cf68f50e9f5e6209 ./dir-022/data.005
+484a291638f8224eb40442351f3e7f41 ./dir-054/data.006
+48e42891bf2fe053538884127b0a50ce ./dir-021/data.001
+49077e5943a100b6771a44be07704a4b ./dir-010/data.001
+493e84baf6c02b38324071c87f0afb4c ./dir-024/data.003
+49a02c341e5de4bfd938ea0326ddd811 ./dir-096/data.009
+49b11279f83f22ff537134bbcc84ff92 ./dir-099/data.002
+49d6ab85b50ab5386f8282a7b98a2083 ./dir-026/data.002
+4a1113a862eec6fc1a29a75a985f02ca ./dir-044/data.007
+4a209585e44265cb0f363756602fca0c ./dir-027/data.010
+4a3a6543fefb560f2383615d905a6a96 ./dir-053/data.007
+4a4c1cc3c778ca8a5ece35295591c423 ./dir-089/data.010
+4a8a0e0c68ee95b541bcf37ceb6fca38 ./dir-032/data.000
+4b7be12f2afafa942663af88a2a34797 ./dir-107/data.002
+4bdf8bf31569a06880b85e176703d3c5 ./dir-038/data.009
+4bf489ff656fef7ba0f643ce64f3abc0 ./dir-038/data.008
+4c010f92cfd01db492b981f234a68437 ./dir-015/data.009
+4c7badffa374dc118c81ff0d04f316b4 ./dir-032/data.007
+4c8f651cae18db445c8bb03efaf57622 ./dir-055/data.006
+4cb4c1f1d3bbf4fda768b972661567fa ./dir-033/data.001
+4cbc6cc296c87027ed9695c018ab5307 ./dir-068/data.004
+4d064d4959a79abc8e3d073675d6c001 ./dir-002/data.009
+4d0e137ae9bd6e011cc974daf47e514f ./dir-020/data.007
+4dfae4a9ef4e894b3cd8209a4ae78bce ./dir-068/data.006
+4e0f932047dc3244c2fe215002ea8ad2 ./dir-099/data.000
+4e26ef37e9c5b6925ad2938e9b5d68f1 ./dir-043/data.006
+4e41ff62e105358125e0b0330a042fdc ./dir-001/data.007
+4e45a4b7ccbd79003283b6e47d69327c ./dir-093/data.004
+4e548f34d5bbeb56fa7eb58cb4222837 ./dir-098/data.009
+4eb2096e115b6e2e7639881ce734ca09 ./dir-012/data.008
+4ec96ab3466c9011cd1555abe6992acf ./dir-029/data.002
+4ec9bd108f0df0b186f0777b60dbe941 ./dir-011/data.003
+4ed5125c06e4188a8e73369cec758b9d ./dir-028/data.001
+4ed6c21f5b75c31336cc7873e795ea4d ./dir-063/data.000
+4f14cfa2698af420ae1ae5e40ce45a5e ./dir-033/data.003
+4f3ff759eb10d55898f3b189c6b8c80d ./dir-000/data.009
+4f66d35fac82aa35322ad3cc5b6905db ./dir-001/data.000
+4f898916010eb8aadb72e455d5b821a5 ./dir-051/data.000
+5026fd8e09c8daef0a1da96a28833150 ./dir-081/data.005
+50389a4e73a9a472b5a5c4a8910d7e96 ./dir-011/data.000
+503b514c984dae8ff69f8bfefa824fb9 ./dir-016/data.001
+5048be8c2e8e765ddb63c3b371852b72 ./dir-053/data.002
+5067419869faec43f85c8c327c3d378d ./dir-008/data.000
+50725a5941d26b2947677bfe0c7761fe ./dir-066/data.010
+50771c76a8213245be499adf1d4311d3 ./dir-100/data.004
+5118ac53d3c7b31072833f966efa7e9f ./dir-064/data.006
+5144c4da0e2a374d95ff48a34c3297c9 ./dir-092/data.002
+514b076e0f0511f216379950f2714f90 ./dir-024/data.004
+515ee463937cf2a3ff157b7891f96eb6 ./dir-052/data.009
+516264e6cd37058c67a6791d59482dda ./dir-080/data.005
+51632cb7f44f5bac30f5d6f4a9edec79 ./dir-097/data.009
+516e6bbb96f69262d57f3a660bc801b2 ./dir-090/data.003
+51ce73b1230c06d1539e6de542b63006 ./dir-007/data.006
+51dbe24d360ca38feac1b436754f9b4d ./dir-089/data.007
+51eaedbaf33988a48e6af65a5b117d38 ./dir-016/data.005
+521dd773fc4171de150b5f8995a88d21 ./dir-009/data.006
+52693bd5407a2471cf5156afefdaf888 ./dir-027/data.006
+52731e0ad3028c530bb4802a4754c408 ./dir-008/data.001
+52ddff97b316a494f4737e0614850f57 ./dir-069/data.002
+5301844c968d05257f1e6531e8ce0d54 ./dir-003/data.008
+53763fd0a894b8e121c281cee01f9402 ./dir-068/data.005
+53d4507a2df8d22076d81da5c0100ebc ./dir-008/data.002
+53f5cc09d57af60fe72559eca2f1a603 ./dir-011/data.007
+546662c6282b5d422413f53037df0d54 ./dir-073/data.001
+5482b2507dc94c8edde840b619b34944 ./dir-081/data.002
+54a6b5192a4fb2d1f2b26866d13c05c2 ./dir-088/data.010
+54c3a5328276de092919bf966e9dd7ad ./dir-066/data.003
+54e78419ba7cf291e26f1160bcd09469 ./dir-028/data.007
+55241d2474b0bee70f50e7629fba3a10 ./dir-070/data.007
+553e65cb3ee0a9a5572826ff4401487c ./dir-054/data.002
+55adf518280a54532de6c33c258a8e6c ./dir-080/data.008
+55b8d57f3beec6a8075221f08752ff42 ./dir-102/data.004
+55c76bdb82f8fa4e0d22f9e41ad3ad0a ./dir-075/data.001
+55c8d13f682a62306c8d29746bd7e6fa ./dir-026/data.009
+55d59fcb49c07ef165b3108621f08ab0 ./dir-071/data.001
+55d66d74201a3a3e5b2d53f9fbb52bbc ./dir-019/data.009
+55d891ada51edc5dec3837cba7c5f2fa ./dir-041/data.006
+55de7aed4c69e32378352e6dd9a3e5ce ./dir-057/data.008
+569f645920cb1a54093de547cd92f337 ./dir-085/data.003
+56ef2f747789aa2ab1ef6c7947b50ed4 ./dir-067/data.000
+571ada4c832aa9ed66403352b06a07df ./dir-016/data.006
+574ce2273f4e17cd6739a1772d43fb67 ./dir-090/data.001
+587e740432de54932b49f4b0b1a9d8cd ./dir-067/data.008
+59226032ef2efb991fffc5d2d2a67dd0 ./dir-098/data.006
+592e2927e0468af2a86bb10e2a5cbffc ./dir-068/data.007
+594f1a21b98ca4a8b8981164f46edd0a ./dir-023/data.006
+59a3f6ffb6432a768ffcfc390ba0d5e4 ./dir-005/data.007
+59a5751a44478789aa08853a7fbcb4fc ./dir-035/data.004
+5a034a2cdb1b397b435c7119a725e622 ./dir-108/data.003
+5aabd813ce725146f47bc73d9449b50e ./dir-107/data.005
+5ac445c2b46c50497deb1e2df3987646 ./dir-065/data.006
+5b62c14d607c393885cd0a77b445a0e3 ./dir-014/data.008
+5b8b4050492565d8661a4431c7d9f0f3 ./dir-010/data.009
+5bbac4ec67fa84d40d8a8a4ba9d00d31 ./dir-015/data.010
+5c0252cdd7cd0d144583c673e26a4cc6 ./dir-042/data.002
+5c1840580df0a528059088e45f23f837 ./dir-091/data.010
+5c24175346dc431720a833da4348aa78 ./dir-105/data.004
+5c2e4b18bb6e78ea09b958f03ba0e750 ./dir-068/data.010
+5c4c416cee200ee67bec2029cb56b6db ./dir-077/data.002
+5c535e14b7cd449a40893ee6a22f60e1 ./dir-031/data.006
+5cd631f166a2970f7aeb8960ace0f8ef ./dir-082/data.000
+5d6a823c24460b343c6e1cb74f9bdb8e ./dir-038/data.000
+5d869905fdbd4409d87d484db8cfd7ee ./dir-058/data.006
+5de94c0de3c4688b56b0d2fd2a892b98 ./dir-026/data.010
+5e5742ef3a3e4f4384ecfbd9663a18eb ./dir-105/data.006
+5e5a607a9b6945a1f4d17922466f86eb ./dir-028/data.008
+5e824e0add90548b50e8def0e0ea15af ./dir-051/data.004
+5edaeebaf220564c0f9fae53cab3b8ad ./dir-064/data.002
+5f2ebfc0810170305609aaa17d3b61a3 ./dir-096/data.005
+5f495116cabd24317cff89e1b946f93b ./dir-068/data.000
+5f82c03aee04bbc7b13bbe81d86f39d2 ./dir-036/data.001
+5fb6b749a06a1cd8e9e8b29383bfbf4d ./dir-090/data.008
+5fc369bef72f37987eb22899e8abe816 ./dir-076/data.000
+602dfd7dc13dca72e5cdb2a55d10e2d7 ./dir-005/data.006
+603c4a2b2591514fe3f89847fe45c9b9 ./dir-101/data.007
+6069799fce0384528b5b6f2978a5923c ./dir-101/data.001
+60a16f4eba5fcac35a449692e475ccae ./dir-088/data.003
+60a3276323425d3942c38a9d916fbcac ./dir-039/data.008
+60a658d52f59389789cbcfcaab41a1d8 ./dir-063/data.008
+60d6c79df48202637082c2213d4ccfdf ./dir-075/data.004
+60d87fb1da7baa439822269fd05467dc ./dir-028/data.005
+60f939a750264ce597002a4c5aa38b0c ./dir-012/data.007
+61724bf9d882734d00cbf2174586cf1e ./dir-081/data.000
+61baca9d4f0c0e1ad440f516eeeccf24 ./dir-040/data.002
+61bd0e648bc1911d452de89d4edcac81 ./dir-038/data.006
+61e13adcedfa2dc97c6fb131c48143af ./dir-078/data.009
+62102e0bb6e4a034d0df190864d3034b ./dir-078/data.005
+624fe86964a8866aa072ca98944d1cfc ./dir-072/data.005
+628a3ac4c873a169d8a3fa9df6615f4c ./dir-109/data.010
+62e10821dc2f80b608f7d789fe83923c ./dir-060/data.010
+633726cd4b41178c5506dd2b2eae0281 ./dir-012/data.005
+636f3b4bbc5e0d8b9042f1dbb35079ab ./dir-074/data.008
+637db8942597652106bd84d1c15341e4 ./dir-097/data.004
+63eb33e88241210c050942ca97a576ec ./dir-040/data.007
+64046b982a59442839a2d09b7470cf52 ./dir-053/data.008
+640b550e180d7c42c2d44f2ed2d7a43f ./dir-015/data.005
+642aed69a28a94bc3fa488fc6527b20f ./dir-016/data.009
+64bf70a1cd945cf459a07ec4631eaf0c ./dir-098/data.001
+654eb3426a0cfccbf51d147f29f8eb4e ./dir-022/data.001
+65bd86cae100830f420cb55dac2e15a4 ./dir-110/data.005
+65cedc58f0c41c8fdae422035b3750b8 ./dir-090/data.002
+666402e134e6ff70cba029c9852b0f97 ./dir-015/data.000
+667548fd68810e209ea97fe7b3fca1f6 ./dir-012/data.003
+6675d5082ea5133f6831499c95739594 ./dir-011/data.001
+669ffc163b66fc3abac6611758613a5d ./dir-089/data.004
+671e2b2280638d8e1d3a8f6b1d7ea8e7 ./dir-032/data.004
+675de03baf8db6f80962ed278b6e7a11 ./dir-110/data.000
+67a8ef2542009e755df5c9ac6f853d80 ./dir-026/data.000
+67bd34a30a05eb26b3f62a075cd856f4 ./dir-038/data.002
+67cffaada9805a90b11355402e635cae ./dir-056/data.007
+67ddfa9b4150737deff4914cb35fd713 ./dir-027/data.008
+6820b342440583f51722b9eb61b48d63 ./dir-088/data.004
+68336b681102e16e64f88a95cf470b72 ./dir-038/data.007
+683aa79bd3cdcdac7aa10ad1e2b0e028 ./dir-033/data.000
+6856991caa694e83caf6c0fca0233b82 ./dir-092/data.008
+68a46055103f6e733e5cceb707f6dd0f ./dir-004/data.003
+68e9e651dc7a564de214b282b9b5c757 ./dir-008/data.007
+6907dfe18a37643916742ba964bdab5d ./dir-027/data.005
+693f9c8b20a8a9279c4d43c80c3fa984 ./dir-097/data.008
+694e99f3b5dc56ba062fffe8381f8731 ./dir-000/data.001
+695cdc5bc7ba46e6aa38950daab71636 ./dir-050/data.005
+6967af8156573e442a1b6bd56d0a4893 ./dir-035/data.003
+69c1a52d538a67bf2a7e5c33379533b8 ./dir-017/data.000
+6a1bd41da62d260f746e0b01c7a13403 ./dir-052/data.000
+6a71aa155d598b5ad2fd6756da3c278a ./dir-098/data.003
+6a85596f81522c38c958910a4c0487d7 ./dir-060/data.004
+6aa3bbb45b6231513e0bee62e9a12a9b ./dir-080/data.003
+6ae19e39f7857f176f021a8cfe768a66 ./dir-023/data.002
+6af7255b3318607b1d5a7894d8caac25 ./dir-082/data.004
+6b780e7f72be3df9db712580acafd0fa ./dir-102/data.010
+6b7cadcbf875ee5ad53b47298abfaae0 ./dir-080/data.001
+6b8533dbffebb6ef2c1fd48e1df6ed19 ./dir-050/data.004
+6bc9e3203e2738ee225be6a45da6d077 ./dir-059/data.010
+6bdfbab8a4b20d71aca5aec66cf4c07f ./dir-071/data.002
+6be3c35f28f68861840f0345f70ff511 ./dir-011/data.010
+6bfa83d47d895ac06f74abcdfe24dbd5 ./dir-067/data.009
+6c324e185cf24623b8eab7daa010e222 ./dir-023/data.008
+6c32f3d5d270bf507f57edf28ac20214 ./dir-105/data.009
+6c8cb56bd81e30ebdb0167ea9c37f14d ./dir-001/data.005
+6c93aac45d9e019e7beec4a708a3033f ./dir-087/data.008
+6caf414d04c342f829887570993579d7 ./dir-089/data.003
+6d2229a029fe6481590413f2db98aa02 ./dir-002/data.005
+6d2a24dfc83ec50692a139bb2c4c61d6 ./dir-082/data.001
+6d38deab9a096a0487e9318265837589 ./dir-022/data.002
+6d3a2f17df2c7210851a2c0d52393c0c ./dir-023/data.010
+6d75df376c491371990eb1de004227ea ./dir-067/data.001
+6d931b032c977bd48eece3900cb75cbc ./dir-031/data.010
+6dd22b9dda6d6347c1bd9afec4793a4f ./dir-070/data.002
+6dd7811a0c6fc4d0742d46707145a3e5 ./dir-004/data.004
+6e32a7359307837e8ac9823de823555c ./dir-046/data.010
+6e5cc8f5f8c2a07b9de4a8b781d5b5e5 ./dir-050/data.006
+6e843730df663e5647de7ac5bd45a9e4 ./dir-074/data.001
+6edd462bc21cf66cbcba400669a8bb5e ./dir-007/data.010
+6ee09737e92a796d494ff85721185da3 ./dir-079/data.001
+6ef6e7d86580f5d0f7736bb57e93f4b2 ./dir-048/data.009
+6f314ada6407cc32b1f3e8d903b5c9b5 ./dir-017/data.008
+6f49da0120119efa5e4f89de195b4d2e ./dir-048/data.000
+6f69257227a260127a65a133508b0319 ./dir-109/data.005
+6f86c9c9ddf31fff41a6e48b52e05a06 ./dir-078/data.003
+6f957949973905e40beea6e33e465d0a ./dir-092/data.006
+6fbe3644be2de3423204d79bce06c40f ./dir-106/data.003
+70296c938c1220bf726197fc521c5da2 ./dir-083/data.006
+7047e1b8a6351da3504977a4c96edb72 ./dir-097/data.002
+7051be81c22bf0e394e8d89a6cc78a20 ./dir-028/data.004
+7077cac646a5b37a418664d366de8d2a ./dir-086/data.008
+70c913bbc3454d3af1d3b97a0851b903 ./dir-085/data.000
+70dbb0dcaf2612b4952b341651ad0c1e ./dir-065/data.007
+71214fecdee78675ad95b492df4017ef ./dir-040/data.004
+7171c7a1796cbc2355c6adb03c312daa ./dir-032/data.001
+71841f91ab1c873938ff4b4f018b2221 ./dir-014/data.002
+71a2294412b3029f236a254cb335ac98 ./dir-103/data.008
+71a6994ef2bf8368aaa2362bcfccdca7 ./dir-019/data.007
+71b4da91bd5142d3342d67d322fef2e5 ./dir-084/data.007
+71dbfc9057fca54a5a183446775e32b8 ./dir-016/data.008
+7214fcff02d0743210d754a37fb98b0c ./dir-102/data.008
+72ce0ff3d78837675c538e6a02a67557 ./dir-068/data.003
+72edc28e71c24a8c04faaa3c2645d936 ./dir-064/data.003
+72ee0b7f236d0c1de171c8618a8e8c7f ./dir-078/data.008
+732b1e0f0ab56898793589bef25f29f3 ./dir-017/data.006
+73bcb49ca5ca609cbb65147cfd405f3f ./dir-105/data.001
+73fd28f9099c39d6d2c92355c060d6ed ./dir-068/data.009
+74374dec8765151f8270209dca6fc5c6 ./dir-098/data.007
+7502ae05db65a32459a2b97996419065 ./dir-046/data.005
+752e6e003b2a63ee5329d9629fc11e37 ./dir-066/data.007
+753b5b925a36ef26874b53df2ebfa061 ./dir-075/data.006
+753e065141176ff596bf2e1ae61ee7eb ./dir-051/data.007
+756432d8f72aad038e5485bbe24bafaf ./dir-106/data.000
+7565d1674164a015c42a2f5011cc087f ./dir-000/data.010
+75aeb3ea4fbd1d50430bbe04e2932b16 ./dir-093/data.001
+75b713f785ac4a9b1d088421f23ed1dd ./dir-008/data.006
+75df7f36eefa42c3638bc5b6a97d55cc ./dir-062/data.006
+75f4acedcce3de89a05b4c098b4f8118 ./dir-084/data.000
+761c8e415dfea226f53be2957780ba69 ./dir-000/data.000
+763c7d41210a0ca975eb99d0e17f4b20 ./dir-058/data.007
+7652846932bd547c814ea86462891fe5 ./dir-036/data.000
+766be2a004cea2f84f9aeb40eb9e5124 ./dir-006/data.004
+7672a3a631d8cebaeeb10b4eeee2f374 ./dir-097/data.010
+767d0c476c9468d63e0871af2cef1738 ./dir-060/data.009
+76c9efefaa60ee3fba78597b33c5f575 ./dir-090/data.004
+76e0a18196e6b9e8f1860791d5e70146 ./dir-075/data.008
+771b05fea5ba6da4cdba84683c070c95 ./dir-053/data.006
+77586b0c211ae906be9094d049370678 ./dir-021/data.003
+77c306d850bed70af9a433a685820431 ./dir-050/data.000
+787d7e089b2520fb323825c0f34f1019 ./dir-047/data.004
+789ae7e99a3a3ff41688d0da0baa5491 ./dir-049/data.008
+78bc020188a5927d1bdd8a00916e7bdc ./dir-047/data.003
+78e4a29d866eeee6f16dac2923ff9039 ./dir-020/data.002
+79adfb3d2a7487932511a5a4279b61d4 ./dir-027/data.000
+7a27a666e2737841367056a9d8fd9d5c ./dir-060/data.002
+7a53dddb70aee58e5661427249ee7038 ./dir-076/data.008
+7a95a94fa02effa09895b4cf9f806fa8 ./dir-053/data.009
+7adef604167c2a7031d11a61876f5e3f ./dir-056/data.006
+7afcc18fdeed24a4b6582f0cb8c8d63a ./dir-079/data.007
+7b806c0a3bd12973c5540a4a661ea698 ./dir-010/data.000
+7b91d10dc9a73501e2695fd03efca8a5 ./dir-064/data.004
+7ba6781b9f6a2102f6ee77e4bcd67e7d ./dir-102/data.007
+7bbc6a3d08c8aafe49f38286ea190736 ./dir-054/data.008
+7bc0ff8f58b050e3588a70ea5a899c2a ./dir-069/data.007
+7c2955cbe8d8635b43f067b782a8d22a ./dir-013/data.002
+7c96eeeb60a073929017e8830287f7ad ./dir-094/data.007
+7cedf898a8fe0dcd9e6e2fd98a74ab8b ./dir-082/data.005
+7d32425b7c104604f90ef5081a066d65 ./dir-015/data.002
+7dbc4d0b5e092ec07d71821d06cec150 ./dir-086/data.003
+7deabfdda68c09ca7212ea05659e9927 ./dir-017/data.004
+7e26cc30612356a343b39f0229ac3d46 ./dir-019/data.003
+7e7c2baf1cc7562b407fca1085c05d16 ./dir-074/data.004
+7e9b0ff66ef80bb5257831f7d04961b5 ./dir-020/data.008
+7ebe836d841b63662eead6beb412d4bc ./dir-107/data.000
+7f49e79851b7b45cd2d33175fa1b2969 ./dir-081/data.001
+7f667fbd3cc3f285932aaf92da189d1c ./dir-044/data.004
+7f84ad2226952dc3a2cad38c3ee2970c ./dir-007/data.001
+8045151192b49a8da4d2c8e6762ccba2 ./dir-107/data.010
+8048e0cba222cc165575eace3922e5b0 ./dir-039/data.000
+8049aa75ee4cb1b4c3bba59df67e47dd ./dir-068/data.002
+808aad824b9e2e465bca41efd1f52954 ./dir-100/data.005
+80940fad75c724a99076c376892083f5 ./dir-008/data.010
+809ad8f87b1d349538479eb8255fbd95 ./dir-087/data.010
+80b12631328b0da15def5ab7ff5923fa ./dir-094/data.002
+80b3adbeaf7752f4b28690bf34277a97 ./dir-082/data.009
+811f2222bf3e3261eddfa7c5b3d081b9 ./dir-046/data.009
+812008464e6378f41d6992b5ffcbeb84 ./dir-046/data.003
+8177492799584288b6d0912ddc3c5788 ./dir-010/data.002
+81fd13878406544d396fb0d907c9a41b ./dir-045/data.006
+8200bdc10480c0f32e2f83cd68515f7e ./dir-084/data.006
+820408ace3493250d98e8674b8187a91 ./dir-052/data.010
+821172e54e4afd62f705d226331c7fb5 ./dir-085/data.005
+826812a36105fcdf4d5500a6df0f08d2 ./dir-085/data.009
+82e160cb68fcd731ffd8c982eb669922 ./dir-034/data.000
+82f2bdcb4728e3ad2ad42688c776051f ./dir-006/data.008
+82fd0c7b72399922c915d56ff6966f09 ./dir-105/data.007
+83961ca3a7fdce7ec70696e2174653c7 ./dir-086/data.004
+83991d573bbd643493c94fe76fca77fc ./dir-006/data.007
+84455e279527682dc16597ccd64ba260 ./dir-103/data.010
+847ce91c4f37960bff5d34020b42ed52 ./dir-069/data.003
+847e94154fe39fcb40974901fd05b59d ./dir-057/data.009
+84a7ce38c6202fdb6b898df285446663 ./dir-106/data.008
+84aba2f561813a9bac0b4c06620152ae ./dir-051/data.001
+84c575bc39d6c0c91600a2dd9e453698 ./dir-078/data.002
+8512e02e44103f6767b334345dc73575 ./dir-049/data.003
+8520bdcd365dbbea56b48e181e892e6f ./dir-035/data.010
+85616c0da662f396d301cb1e6bdd7bd4 ./dir-013/data.004
+85ec836e67e6f2baeec01f665eb23e29 ./dir-095/data.003
+8603067c193e4a1c357801b381641dfb ./dir-092/data.003
+8611a66ab011033b3c906ba7b89e6c2d ./dir-037/data.000
+86378c2ea396585297f165531e6c7890 ./dir-025/data.000
+866430b5d3911c736376d7e660a81f00 ./dir-042/data.007
+86bc362ddc0cecdb48e4ef489efe9dd9 ./dir-005/data.008
+872a73bbce2c848a584e9382d62a7a8a ./dir-090/data.007
+874c93e05f4f32beff5051c4af86b8e4 ./dir-072/data.000
+876a2dd3d630d98143203693874f60d0 ./dir-091/data.000
+87a4a13a15b175b8b943cefdfe3e74e9 ./dir-091/data.008
+87dced824e8413e02cdbf539f8de061b ./dir-086/data.010
+87f5881d5c4a894085307aa10fdb105a ./dir-041/data.009
+87f8e92c8f1a1c8433398808abaf8165 ./dir-109/data.003
+881243716ba4e3c5ff3dd342c21c040b ./dir-082/data.003
+888da3d26656442aa1c19e2e477e59de ./dir-083/data.009
+88fa1bd87fa31d853e36bd503526227d ./dir-043/data.005
+89221d01c894262e97b15e7f5791e14d ./dir-014/data.001
+897ed3d984bf5f1368fabf49f3b0f12b ./dir-072/data.001
+89a503f5d1a1d9b94eadf14a3d7a7dd5 ./dir-045/data.000
+89e6081c35cdd3b86a836cff51971184 ./dir-065/data.009
+89f0acd75ca963beab0cabbffd628724 ./dir-091/data.001
+89f499b0da40af76802f0e03da77f6f6 ./dir-040/data.010
+8a010b14ef676d4304eef73b1f1f78e2 ./dir-004/data.007
+8a1283493ee60b494a58e6ace7452907 ./dir-089/data.009
+8a62a8742ed78023043d4eaec5b1e904 ./dir-098/data.002
+8a6b0c4f2c04e96d5315868996fcdda7 ./dir-108/data.004
+8a82ff49e710bd88450867a3f440b0da ./dir-075/data.009
+8a87b4e00c531cd577a39012397a0f87 ./dir-079/data.000
+8ab93bfdd9e62f3d6da0dbbc53ebffa1 ./dir-076/data.004
+8b09b7d62a3735681da36371657e14f3 ./dir-039/data.007
+8b93f04b52bd1fb0781f9d46ac7a290f ./dir-025/data.002
+8bd5650b0e7d4fbf6973214c2f507801 ./dir-047/data.002
+8bd5bfac106c68cffb3a098c4d157cf1 ./dir-063/data.010
+8c4ff8f780a98e39295f500278a1d887 ./dir-095/data.009
+8d1110f9accc804fc48bb2ee4af6bbf1 ./dir-110/data.009
+8d4261e80352070d2800f528932e37f4 ./dir-055/data.000
+8db08f66dee19a548b3e6eb3a1560980 ./dir-094/data.010
+8df75fe710ddf2316dd13f8065e4bf41 ./dir-087/data.001
+8df80279f2b2051d65bcf1f7a7dea7d9 ./dir-097/data.000
+8e58a42cf383173c0dcd6694402bc946 ./dir-014/data.003
+8e9933936e026159534f451cd0548d4b ./dir-029/data.001
+8e9e45218d17ae1aac57d24ba4417d9c ./dir-070/data.000
+8eab2b1d1ea2a5926ea5e276587543c4 ./dir-024/data.000
+8ee65e80da3449425d6c8cedc7be72fc ./dir-099/data.001
+8ef64875a9b9969869cb0f25a32fa0fd ./dir-039/data.004
+8f7b88afa2cfae0a337e1e330e9507aa ./dir-075/data.010
+8fd4eab768c4b5905e416725de423f55 ./dir-087/data.006
+8ffc927df86dd4c5e3966e9d0566e449 ./dir-014/data.000
+904a6d1b29b6b346d17fe5548b90cb6b ./dir-059/data.005
+904f618fe84960f4d495a2cbf494a179 ./dir-026/data.008
+90e643a0ead24f11449be2c13d739a53 ./dir-017/data.007
+91361fc94a17d6bd001d136355b85354 ./dir-024/data.008
+91850aa3831a821d375c416cf048d830 ./dir-012/data.010
+91f1499f9fc21e74879459600a825654 ./dir-103/data.000
+9207ec877c2fc0c887adbe81b97d7160 ./dir-023/data.009
+923fae1aad1f7f087f7d56be0a949abb ./dir-024/data.007
+924e608e16d18589a9932fc76ab7dad0 ./dir-090/data.005
+927968828d5c3065804466c0b654dfb4 ./dir-054/data.005
+9297c8e3209ad6c3e9eb803d5114753c ./dir-030/data.008
+92b3887179362557a9063adf548b2bd7 ./dir-081/data.010
+92f662f16c3768db5eeda3b60f4f0ade ./dir-022/data.003
+93b7c4d5373a364b8e3e26d077c980c7 ./dir-079/data.002
+93eb15b53e6879eba9e23c2f636e73a6 ./dir-061/data.000
+940bee1d330002cf234a338b63d07911 ./dir-068/data.001
+94172e924a7cdda629f202e115e86e96 ./dir-062/data.007
+94449220fca6a95893857a459eeeeec6 ./dir-000/data.005
+944a60c5820889ac6c204378ab8ec684 ./dir-065/data.010
+94611f97f30b3216ee306a97ee063285 ./dir-106/data.002
+95c4f44dbc662a1b80f231c03a1831a2 ./dir-031/data.005
+95f34bf560977aabf56b2374bfd801fc ./dir-031/data.000
+960b3433addbe419445506e4070e704c ./dir-031/data.004
+96fcc5df339caff14311a24a81134714 ./dir-042/data.006
+9706dd7a7ae979b858155dea8d54cb4e ./dir-033/data.008
+9873fcaaaf129d922cb29c10dd7665a1 ./dir-066/data.002
+989348123dcd08ee33c351e9156dd581 ./dir-005/data.009
+98af23ac4dc89133c749cb7968878859 ./dir-041/data.005
+98b72fa1526e20c16ab02546b656a925 ./dir-069/data.005
+99019e5feeacecd628b79b1eb7e161f7 ./dir-071/data.008
+9914beac14681493f7a7aa19a0f1bd8e ./dir-035/data.000
+993c2c1b64d4d9049df6d5d7cb56c4c7 ./dir-051/data.010
+999490bc33ec2a56ab230b6da8b1c1d1 ./dir-045/data.002
+99b70a3b5235ebfd1de6e096d54ab41f ./dir-083/data.008
+99b81b1024129991e19b010ee0f1299e ./dir-108/data.010
+9a0e0cb9a2f89fa8c888a7310b491aa3 ./dir-074/data.002
+9a2d63c1b47aa35a0d647d278d7b13b3 ./dir-020/data.005
+9a77b017cb714648bb338853717ad7e8 ./dir-059/data.006
+9af3052d79e03234d51790bca3f62abd ./dir-103/data.006
+9b1308d9a71f3d07df20c64ee9485215 ./dir-009/data.004
+9b243e7923207feeba44ef8967835213 ./dir-029/data.006
+9b25cc77ec3884b9b115f34a61aa6b1a ./dir-036/data.002
+9b4475d68d99b0d8b5b724b161ec3858 ./dir-079/data.003
+9b7bfa3dfb1223c084a732a460010ba6 ./dir-027/data.004
+9bd2393f4167104c602f462cff973c9f ./dir-058/data.005
+9c430e6db8f1530dfcab40de1ae320ee ./dir-058/data.000
+9c48ff0e9fc213cb2b483db230feb345 ./dir-022/data.009
+9c9a3eff549dee88a35c589ddd9d218b ./dir-018/data.001
+9ccd05ac96fe9192a6e3c9b864f51cc5 ./dir-043/data.002
+9cf33a7c891d6c7472267d57ca6cbc66 ./dir-046/data.002
+9d21fb30afaaef79aecb0da9815c347b ./dir-050/data.001
+9df2cd9f95fe997c8de62c5481d3c93f ./dir-034/data.003
+9e3b8430c7cb870803ec286c13718b02 ./dir-003/data.003
+9ea9c7d6b9fb3188ba0821136c228e7e ./dir-095/data.004
+9edf9a0560752008ceaaa4ae3ed5785e ./dir-071/data.005
+9f549656466f70f622c9df1c4ccc9521 ./dir-033/data.005
+9f80958140d65b5e0fb9a52167b1c422 ./dir-099/data.006
+9fa7f92a21ba500140aff17d8762a6aa ./dir-076/data.010
+9fd3b2804f593374def5a302a8b450c4 ./dir-074/data.005
+a0339de2c013f2d03f756a8144639897 ./dir-061/data.009
+a0a270ce379fd4d991d9ca728d63b36a ./dir-012/data.004
+a121b30fa0ad50b4e829a45879cc5edf ./dir-101/data.006
+a18b68c77ce90b9bdaca1ae55282337d ./dir-110/data.004
+a1e2cad8e97c82f3253442cff997bcf0 ./dir-080/data.000
+a238e250723b41101f07cfca17f11564 ./dir-045/data.008
+a246c5c6c1f823eb413af37d34b3bfff ./dir-077/data.008
+a29c24e21e6f607570f76e5625d3dc99 ./dir-032/data.003
+a341d8b152be8d341782db5ab1d7aabf ./dir-084/data.010
+a35ec86b31d73849147880eea4297fd0 ./dir-063/data.001
+a3891cd6855c346b07f6d1cd385c49b5 ./dir-094/data.004
+a3d9410efb0b1ff6600b3f627971fd16 ./dir-042/data.001
+a40587138ced04b20fb2527354606f2c ./dir-076/data.006
+a469810e4d1daa13f3e9b2e6f68b8d13 ./dir-004/data.006
+a4c13da90cbcf2f1624a4b2c2a9bb233 ./dir-109/data.008
+a4d4d492179eb2dca7ce30571c8ef3ba ./dir-007/data.004
+a52da0aa1a7acd8778fe6f40f0f8c0a9 ./dir-061/data.004
+a554b9068ef406ca372f9189304a82b7 ./dir-059/data.003
+a581e75f84f4ac6ad9e70e5b6bea53a4 ./dir-095/data.006
+a6055d0047d814a31f32e4185441d4a1 ./dir-007/data.007
+a60741e209b726fda4e969bf344f4aea ./dir-069/data.001
+a6395a9bcf53506cef1c6b62cc37f2d4 ./dir-003/data.000
+a65040955884d1c6e4d54ad9299a08e2 ./dir-062/data.001
+a65457550d23807b21c1afa93e9d21ef ./dir-035/data.009
+a66e2aef802f92385bf38b01ce8b0c80 ./dir-031/data.003
+a6952c83f6a406ed1baa2b1251bccfff ./dir-032/data.010
+a73aa26f62de99e97e691379ff64e838 ./dir-055/data.010
+a73ad6b847af80b66f4b37bf752e1097 ./dir-096/data.002
+a78d53e617d31d29d07a1bc8d463e456 ./dir-096/data.010
+a7903334dab2c9948a9460d94ffd27eb ./dir-082/data.002
+a7957cd1bfb38bb265c2d909bf4f0b21 ./dir-026/data.007
+a79df6152da4b78ece663f4b95d20cd3 ./dir-041/data.010
+a7aa7f0213d41db9b7a2d63c90f77772 ./dir-053/data.001
+a8111a4439244ed9de6e0c5944d7ffa1 ./dir-029/data.008
+a82b1e769c33fe701194d95fccf029c8 ./dir-010/data.004
+a8573ca8719910d3ea25839cf529d441 ./dir-091/data.009
+a85c6629da53d32a0ed0d3c8b0a26c72 ./dir-077/data.005
+a8a137df04b87ac736e158515ec71a42 ./dir-087/data.000
+a8a7ac87c426aa047b573b2dcbc4a0e6 ./dir-058/data.008
+a8c038a03f5bc2e6b52f02b8c5c52cb2 ./dir-054/data.009
+a8c4c1f924133ec0c8360901bcf6c199 ./dir-094/data.001
+a8e06c98144819d98e809492f08aa29c ./dir-035/data.001
+a93a49fd784c6ad90385ea022ecd2343 ./dir-045/data.010
+a95c46ac7047b8866dd9225ee4d648c6 ./dir-054/data.007
+a97f9c6c523f5479046377eca793ef53 ./dir-040/data.000
+a9a50ed2b165d548a1aca2e4b306d06b ./dir-048/data.006
+a9ba09df546930ba27663df0227b047a ./dir-002/data.003
+aa122bfd760ea4dc50aecf4f533c65aa ./dir-016/data.004
+aa3eb53c7a7a77690e996a5c0c1ccfae ./dir-024/data.010
+aa61a5d5f336b0b50e6b1d0796b890ae ./dir-088/data.009
+aa6fef63c3b2bbb9c17c9bd7308c5306 ./dir-036/data.004
+ab0f881f872563bd7846c3432ef7fce6 ./dir-003/data.010
+ab1ea1fe95b3af7db64aa8fa146760bc ./dir-093/data.008
+ab5acd6c59415e13dc791e3f300bccd2 ./dir-039/data.001
+abf175effd6c04dbedc04a31f009ef72 ./dir-038/data.004
+ac00bb6001e354a604063f1e31a8fe3c ./dir-028/data.000
+ac0eee49e473726deb56d47a823198d9 ./dir-086/data.009
+ac6e1f616fcab93bebea12c3dd1fefee ./dir-065/data.001
+ac8e596fdf6279e40fd0085bb0f34165 ./dir-084/data.005
+acc1ee7febd100ab23b6a479d3001825 ./dir-061/data.001
+acdbe2e496d6ae23c0f0dcfb0ea6faa8 ./dir-005/data.005
+ace9c8b5dd8e55dd13735c649c9d4af5 ./dir-099/data.008
+acf5cb2c7b1eb4390a60a1774bc4bab0 ./dir-090/data.009
+ad24114c9cb8f035ade2e862d9abafa8 ./dir-053/data.010
+ad320cdbfbfa5cf6c7b7a8c40a686193 ./dir-021/data.000
+ad5b2d548dbbfe6ab0e21437bb2e1f2d ./dir-019/data.001
+ade98adeb45ab19c7ce8d42782dc04a7 ./dir-087/data.005
+adefc5856d2a4595beeb1adcbd172221 ./dir-019/data.008
+ae81c953786cec82d0f1f9435b0d0c0d ./dir-056/data.009
+aebbeeb5e421cb8ad2e831a302742a6e ./dir-081/data.003
+aec4978b81441da9cba9008549fd58b4 ./dir-103/data.007
+aef628d7676ae21153a87e0f1ee0827d ./dir-053/data.000
+af9385b7625684c3d153854bfbc427fb ./dir-057/data.007
+af949e292c736dec64c29b35dbc94cf3 ./dir-104/data.008
+afb68dd90956c729c49211aa5cc974d3 ./dir-018/data.000
+afc5cceaed901e3baf26410e530b2112 ./dir-043/data.007
+afd05141be6f865a64e93908e05ab2e7 ./dir-070/data.004
+b050f6f0b55cafd91af8b5bfed9d7ef0 ./dir-106/data.010
+b06bca53b131304a89d152fa869e8d44 ./dir-006/data.006
+b07e07d9eb5b9765d5916910d3022a15 ./dir-041/data.003
+b099661d0dc7e777e94b88a768792aba ./dir-029/data.000
+b0f9fbc3889843756c2fbbdbc8e95c80 ./dir-052/data.007
+b141e0746d771b642b80789e2cee78b7 ./dir-055/data.005
+b15458b8d28b4ff277aa19d644c3f01e ./dir-078/data.004
+b19692bfcc887a0326ea0d9ff777b708 ./dir-082/data.008
+b1a0f67c22211b60eaa3ad043300ec39 ./dir-077/data.007
+b1cb07d7f4ab031522a1092cda009ea5 ./dir-024/data.009
+b228391e5b674f6e320f46c92a231a6d ./dir-013/data.001
+b231b16938922b62bc313c4dc791e89f ./dir-040/data.001
+b235e667fe06e2333d3d4f4cfeb11d8e ./dir-061/data.007
+b25e47b8e6084a771082a79d2964125d ./dir-042/data.008
+b2a5017e913a254b33c8fc51a0304745 ./dir-018/data.005
+b329dad6ad85c65a9222b8b261e86361 ./dir-008/data.008
+b33cd0e18b5a2384dc05a46f69b09059 ./dir-007/data.000
+b33f13624a7a7cfc50fef0456d74947a ./dir-097/data.005
+b367a0363b574a8455b841cada04accd ./dir-047/data.005
+b3c5ac9af4d7a04325182806453958ba ./dir-103/data.005
+b3dfc8b0fb7616287af6f7757207b6b8 ./dir-033/data.009
+b41d0afa4d57823e34d11e64bd6534a6 ./dir-087/data.009
+b445b7e624e7f1f7a5be6541a3a93a8a ./dir-043/data.009
+b46cf4a767a2d389800dda0374917427 ./dir-057/data.002
+b4c65166180c16e5437fbfe03af4b5d4 ./dir-015/data.004
+b4ccf8da14998cbe721c990de46c9edc ./dir-032/data.008
+b54b392b4cff92f8151d58cb92e688a0 ./dir-067/data.007
+b5934cbce1651c12cbb4e618e091f435 ./dir-102/data.001
+b5c1e57ffa0ceb0947170f610075f3b0 ./dir-043/data.001
+b5c8f4ca9d2cff5245b847e21c7df049 ./dir-050/data.002
+b61bf319c57da4eb4f121fd5c535760c ./dir-015/data.007
+b67fb5ee7b93061ade64929492590f5c ./dir-097/data.003
+b690077ebb25c2605ef0ee3372894cec ./dir-044/data.003
+b6c20ced9ffe0e91fbf7c4d71cc451bc ./dir-075/data.007
+b7538f880d91a07037290f98027ed306 ./dir-040/data.009
+b79f1bdb5bbb47e5d965e90137ddf26e ./dir-015/data.006
+b7b7cad8720d0f99fdbd7984caad8831 ./dir-061/data.006
+b7f56c9ebadcae8bd7b30e14bde0b5d2 ./dir-014/data.005
+b7f6d1118ee932c65f1e5a1931d6c8ff ./dir-014/data.009
+b84ac96cedb442fe235cffc8aa31199f ./dir-017/data.010
+b88c57aba26f8e1c085cfc7ae11888d0 ./dir-073/data.005
+b8bf171ed4f5f905cf8f7dab6a82a7d3 ./dir-021/data.002
+b8c336dd6ec7df5cb3f70ac79e169221 ./dir-108/data.005
+b8de847d8af8329206b516f825945439 ./dir-107/data.008
+b91053058f5cb868a65eb00ffc8c85db ./dir-018/data.007
+b983ec5e2696dec42e886e4aaf24c2dd ./dir-041/data.001
+ba18e6af480799cb61acf0e3984413d9 ./dir-023/data.001
+ba1c86b4c7519e9987fc62e04e14b93f ./dir-100/data.009
+ba3d3735db7501bb45a1bc37a1c90d91 ./dir-039/data.006
+ba5dff4458e438a37f7020a6997cb3eb ./dir-102/data.002
+ba71ea66885339efc504f581fa9d05fa ./dir-021/data.010
+bab7340230caffd9abe45a213cc7c94d ./dir-044/data.006
+bacf759099d3ce33cde104f0fd09404b ./dir-107/data.006
+bb3dc9d92e7c13191502f9ca2d9a2a46 ./dir-034/data.006
+bbf62db3e277893ae705b95df057c676 ./dir-046/data.001
+bc9a15ee53571be04ca1992754d407bc ./dir-037/data.001
+bcadd63e00fad4b7f09f32cf50c606f8 ./dir-078/data.010
+bce43f4bc32e3b431ce88e714ebde4e7 ./dir-078/data.007
+bd57ca2552a35196422eb254d0b6689b ./dir-010/data.007
+bd6d9661ef44ee94f3a576794ba2e972 ./dir-083/data.000
+bd85e8c8c0fd4ffd0a8abdd38675e4a7 ./dir-061/data.002
+bd8e9c392bc76c3d04ce23a376cf7941 ./dir-104/data.010
+bda8d53c45c521c5a7fcccf19e0fd4d2 ./dir-052/data.006
+bda946d7293089f487dbcf64564b7d79 ./dir-051/data.003
+bdd285092faf5a19c9a8b3fbd1162d64 ./dir-101/data.000
+bdf39b893567b3a6329a36dac48b516c ./dir-099/data.005
+bdf56ade34628d9a2e757b2bc6eb0e0c ./dir-013/data.007
+be507a830dc09b8c6d802d45647edb55 ./dir-104/data.002
+bf106a60eed1963cd3e58461c38cda87 ./dir-034/data.010
+bf21e493d536385c45df037b2e9cdb45 ./dir-089/data.000
+bfb0f4ba9a8588bec3cef4ede6a3bb57 ./dir-106/data.009
+bfda868277a6c6c0e25795ad73316074 ./dir-032/data.006
+bfdac2c988de39cec95a59f8a090636d ./dir-092/data.009
+c01bde4e9fd7733b6a915284ac12c4e8 ./dir-108/data.007
+c056ff72a9b187332dca300fbb81226e ./dir-026/data.003
+c0b2182de19c1695b71277d4fbfacc18 ./dir-052/data.001
+c0b94a538176aa6986cafa2e2fd8fe8c ./dir-045/data.004
+c0e16a96014a13995e537e8e39b0155e ./dir-052/data.002
+c1cf14e3812a8b9933911da679c49f8f ./dir-072/data.007
+c1ef0ec1fe3cc64d705d5499b6ee622e ./dir-110/data.001
+c2129120bc96703d28928d567bc5df58 ./dir-025/data.005
+c2429dbcf4929ef886b612147e8efbb3 ./dir-048/data.008
+c281f9a42b51ea7af93e5a88c1216120 ./dir-084/data.008
+c2c2abb9e870d144dde05ec6d7a979da ./dir-028/data.003
+c2f1846025293c2560ef44a2287ca948 ./dir-007/data.002
+c2f6da08e3e6c04fa04dbe47d9d91ead ./dir-085/data.001
+c35373fb9888c30272d2f574c0a9423b ./dir-079/data.010
+c372e35177aa3286cb5508590b191302 ./dir-051/data.005
+c3cc90dd33b6e5ed10081456f070c447 ./dir-085/data.002
+c47011f9488a8b8b5510aa96ef11fe57 ./dir-039/data.005
+c4958fb09eff0dd518b8a6997c6b71fc ./dir-017/data.009
+c53849249fad0defdf837bbddfa15489 ./dir-077/data.000
+c56775690b961bd0425dfd3d83dc4fa7 ./dir-066/data.000
+c5804311215078aacda89591c40bb4c2 ./dir-005/data.001
+c5b3227aa5484919dca0da947390419a ./dir-096/data.000
+c5caf8575038ceca91b140d9d0e3b24e ./dir-069/data.008
+c61fca3e05f9a8596ffed3f1512c8fd9 ./dir-024/data.001
+c672d7b16693c1848fb2331fd483ba5d ./dir-067/data.010
+c6c64e1a31b6593f2e35798cdfb9a67e ./dir-103/data.009
+c6e7741f3d499cb592e84ee501ae7c12 ./dir-056/data.000
+c734f450ed20e0e6ebe7e52ebeb40c27 ./dir-095/data.007
+c765acd0fddfdd8dd25c1e3b578ab8d2 ./dir-021/data.005
+c77831ccfd2a1c1842c475f2395e586c ./dir-004/data.010
+c78b32a24f2ffaa7a64a910871c7c2da ./dir-086/data.005
+c7aa9ec8f4a91d993ebc357f7c4d624c ./dir-012/data.001
+c7b6276dd9c53abc7824b172377fa566 ./dir-073/data.008
+c7bd7f81b81f3a3dffc9aa6d8903a5d4 ./dir-020/data.004
+c7d3088dbb470b1f8e659795e9ae001a ./dir-072/data.004
+c7db30e49010acd441ca071b159e8952 ./dir-093/data.005
+c87a70665e49298558c54e7b11150bdc ./dir-073/data.007
+c8c52776a8e9b3f43b55c112de4b3615 ./dir-055/data.001
+c90dd7ad53022e2ec777b401a2056794 ./dir-032/data.009
+c91679d9ccec60ec58fec6e5ecb71cde ./dir-001/data.004
+c9283d1db619943708a58a0d4e072490 ./dir-098/data.008
+c97100eaa0d5b50c2986ad2d7a4ab4c6 ./dir-105/data.002
+c9ca93c8b91e23c7d884985261c727bd ./dir-087/data.003
+c9f613e36059f6a2ebb21dcb5ac2e544 ./dir-098/data.005
+c9fb7d08b76286f726d349933453cdaa ./dir-102/data.000
+ca026e1fce7342eea8d59b5ef15ae1b9 ./dir-018/data.002
+ca1b624cfe0398448567862acb496721 ./dir-002/data.006
+ca5dd894a005c13702e966d04a58657a ./dir-074/data.007
+ca690ddf1d9488d3aae5de667b46e3c6 ./dir-071/data.009
+cabb2940fafe7ddf2643830f7542cc4f ./dir-070/data.008
+cacc98cea7525be670fba062e921386f ./dir-027/data.009
+caf930731a2124520be71f7bdbf5147f ./dir-030/data.005
+cb30fa3d22c32ff5b466a216d7e4174c ./dir-041/data.007
+cb353cc900a10c0020fcc40d20fb772c ./dir-050/data.003
+cba8191118e1823bb38f80321b98d7a5 ./dir-032/data.005
+cbf68202741c92a6a1a1345ba40dbc1c ./dir-019/data.004
+cbf9667ac181f5100cf3d7d179f07c26 ./dir-014/data.010
+cbfe24d7f1aef20746adda09edfa0b12 ./dir-072/data.008
+cc2567a2350fee4c5187a00bc0615d5e ./dir-054/data.004
+cc798615c0b02d53f6827240ee654f98 ./dir-064/data.010
+cc83d5b78aa34ff3d82957c7d69ee16a ./dir-013/data.003
+cca5c0bdd6d0eb18b7cdec2bcbb59754 ./dir-076/data.009
+cd6be4b1b25de9bff66ad8191eac7d4c ./dir-042/data.004
+cdcd5240e78c13357281153c4a41395e ./dir-087/data.004
+ce0dec612db80a92a176ce190b19a754 ./dir-070/data.001
+ce3392cd4d81de001fb397ba1655c0c8 ./dir-010/data.008
+ce58a0e50d16d75c45ce9447bc868b45 ./dir-018/data.009
+cf5fb8cbfe7235521fd7878d964badaf ./dir-022/data.004
+cfbe0f69b35baa9133b6355cd2bd6d08 ./dir-094/data.008
+cfc01799332549522a823077147adff0 ./dir-056/data.003
+cfde64c362835a72c8cedfe6477bda56 ./dir-079/data.008
+cff6f29c1536291d54498fb539c6681f ./dir-002/data.002
+d119223e0da07f005012bf6fef415b5c ./dir-082/data.007
+d16dbb40ad04cfe09048dfa56977ca3c ./dir-044/data.010
+d1dbfddf209f6a070bcf48353abdbd8b ./dir-040/data.003
+d1e5806bdc06ae2231b6f9b1a3fa1f0c ./dir-001/data.001
+d2229c5a61c0ccf7b139714484231a84 ./dir-001/data.009
+d244204b0e63d7c33b2dd3e5d2237748 ./dir-036/data.005
+d253d09ebe6df96b84565b3bf26e8bbc ./dir-030/data.002
+d2703dfcb228a9885d58eb6bf8c4318a ./dir-088/data.002
+d27c78713f252e2393ea942abcf4a4ac ./dir-048/data.007
+d2b6e1db7ab88233015e7d8fa5a6bb81 ./dir-021/data.009
+d2be814d2ae5f33723cc8794614483fb ./dir-008/data.005
+d2bf7c23465b9455a3ca27b50cc123ff ./dir-073/data.002
+d2c1b2b6ca16f4e4ff9750926aefacd4 ./dir-030/data.010
+d34362c0b86a934e848478067760c863 ./dir-021/data.008
+d34799931eeefa914727e0822c667fc5 ./dir-031/data.008
+d35a62ef99570c5ef5bb6291bbb36cc9 ./dir-101/data.003
+d39fdbbfcd1e15fda146977224126f8b ./dir-011/data.009
+d3eb0f4bb3b04b412907e453c82bb89f ./dir-035/data.007
+d40f0f333fc2f02a4266d363897f3334 ./dir-045/data.009
+d44fff6de24382f14b0426101e737354 ./dir-110/data.008
+d460686d5f374017452fe62e3f95b4d4 ./dir-105/data.008
+d461cc84eb03cc6db78e0720648d15e4 ./dir-061/data.003
+d463379d1811241dc56a4ccc9bf68dfc ./dir-076/data.005
+d46c8c7b7c0b54ebd046c6209d1f8afa ./dir-054/data.001
+d4d0fae354af6cdcc3202c9aa8ff2e9a ./dir-019/data.002
+d4f3040cabb5fbce85528e25f20cdeab ./dir-061/data.008
+d51be6c824d053d4e75720d6c8f515ff ./dir-001/data.002
+d540ef78ac829556f9933dd6579db7ae ./dir-091/data.003
+d54f188240ba83df0932dffbb36007fb ./dir-021/data.007
+d5b52c7c054a27ba342bc7e53bfe131e ./dir-081/data.009
+d5c7cd835ff19cb7c70e17d3134263bf ./dir-074/data.006
+d5fb3204d70d906a74b760999e5b266c ./dir-042/data.003
+d67493efc7f10910daab14016546a47b ./dir-059/data.000
+d68ed1553d2660f509612d8ddd8bcd62 ./dir-056/data.004
+d6f097c83e62877b98951bead0282dff ./dir-040/data.005
+d6ffc513ced7b0c1005dd11f10924b88 ./dir-055/data.008
+d7a69319272c26b24631cc0abb1521eb ./dir-053/data.005
+d7c2447c79f584c5a4b2ec525c586129 ./dir-031/data.002
+d7e552057b420dabf022aa6b8267946a ./dir-030/data.006
+d87260bd7bf4aa6ec556d77bf958a36d ./dir-060/data.001
+d87f53fa0fad9af8218a27fa1b69c070 ./dir-080/data.002
+d8f379df1febe77c86990017745edebc ./dir-034/data.005
+d945d5a070b995162293f1c77ff15527 ./dir-018/data.010
+d9ed49e99f63581ccafe915b76f3f96d ./dir-102/data.006
+d9fca3922fa0e01fd527f8db69589425 ./dir-088/data.001
+da09dfe4cb9bd06c37473254e857139c ./dir-076/data.003
+da18c9351bceb7f342718d50fb062544 ./dir-006/data.003
+da247fc6c9e1f840d7ef58e86bbed220 ./dir-019/data.000
+da2e4fd85a49ba6b0c7659c7abf99ad1 ./dir-089/data.005
+da57bb441160e6555b30c75915288bf5 ./dir-099/data.004
+da9218453d4c99672e702f0fd7b9c0c0 ./dir-014/data.004
+dab2bec775140e6203daa6ec122f049e ./dir-071/data.003
+dab99d3d9dfc9d5c9f0d525716153562 ./dir-075/data.003
+dadc6c41f41b3ff28706df675eaa96b5 ./dir-004/data.000
+daff2d6af09718e4825b22b98f00b7e9 ./dir-003/data.002
+daff63e9d1ae3734d069d0dc0305be72 ./dir-109/data.006
+db210b89b1004f031eadd847e5a0645b ./dir-043/data.008
+db2b0158388ee251970c6454c8cd9a97 ./dir-083/data.002
+db49a13bd7e2320210df3a006f7e9f6f ./dir-043/data.000
+dbdba9607f2d777e10ddc67f50950e2e ./dir-057/data.005
+dc09e8a41db214d248148efbf9605f95 ./dir-081/data.004
+dc0a7007675041b30317afaf44ee708e ./dir-064/data.001
+dc153ae714532e2d34f1b7ea044b6ff9 ./dir-096/data.008
+dc1f4da785733bbb2897d94ce78bc7bf ./dir-071/data.004
+dc2f22dae3a3d34a18929506cfc6f277 ./dir-029/data.003
+dc40f9a57dfacd21d602218898ab93e7 ./dir-058/data.004
+dc98758c6a9b39a6a3deae298d579c4e ./dir-042/data.009
+dccd562a4a98653a3fe96d77741ddbeb ./dir-104/data.000
+dce7e7c23b5cba5b96b11d5300e00afe ./dir-056/data.010
+dd006052a28552fa069abf5043462570 ./dir-049/data.009
+dd079bd050dd7b83ff6a8e2fb5773ed4 ./dir-049/data.010
+dd898a6ab8739c0cf16dd72034bc7668 ./dir-046/data.007
+dd8c233b992da6babbcbc9ce7879051b ./dir-097/data.007
+dd981304897bc330f690d2040aa1e53f ./dir-047/data.009
+ddcd7ea13cae57498088c1994619b3be ./dir-020/data.001
+de7fe274e770b4dabdeb867fa92a12bc ./dir-109/data.002
+de8a70eee3e508a723d3b5d2a9901316 ./dir-055/data.004
+deb960b1268705a472e3b46181ccebfe ./dir-042/data.010
+debf081b6824f07c5f6c22db6bc152a6 ./dir-086/data.002
+e003aaecb77df91f04990cd45eff2dbc ./dir-018/data.006
+e0596ce1f833197052bf72fa4e45ec28 ./dir-074/data.003
+e06e45e369dc2fa98b18c35268ef81c7 ./dir-037/data.010
+e0c2f2d375b3fa8c0c47a029bb18cc39 ./dir-009/data.000
+e0d48247fcfaa83930555edf8a6647df ./dir-041/data.004
+e0fe16303d99ec21e6dd13ac27d2b5fa ./dir-083/data.004
+e13007540bfd0bccdceda2f824ae3236 ./dir-092/data.010
+e131a83d7b706104b800bcba7e89a9f0 ./dir-009/data.008
+e1697901fb44ebccf438fb056c1cbb03 ./dir-007/data.003
+e1be15cad90b65114aff80e0f922e988 ./dir-034/data.008
+e2e34027afd431af2b5ef0bc815a1623 ./dir-100/data.002
+e32174de64d871b47b38ab874aa50a39 ./dir-102/data.009
+e33dcc8d7ffd1e0fccfb71c6715f6e56 ./dir-049/data.007
+e382a45df3024ad97563f9c13a195181 ./dir-105/data.005
+e3a104190d1c461ffdac462d66dee7ad ./dir-090/data.010
+e45c6752ab067602a7e9a71b9f9105e3 ./dir-045/data.003
+e492d468364872187d50021aa490c367 ./dir-092/data.007
+e49ff5b90e7e7704d5c829c41a859c86 ./dir-047/data.001
+e4a0756e3e92ac6b266c4b26dd43d27e ./dir-064/data.008
+e4a0dbb8ed00208e9a4d293d1c259989 ./dir-105/data.000
+e4e5e5b2642d322e1b9539bb021e1228 ./dir-064/data.009
+e4e9447cdd3ee6f4a753a9fa3bc1823f ./dir-037/data.004
+e5c21a2614775ebb798752e4dbba7f52 ./dir-107/data.001
+e5d87d25b8fdce6d6f30b52230761884 ./dir-070/data.009
+e5f2783896a89baeef0c5f68d0f47382 ./dir-110/data.007
+e6b75284cc6be5b80c57dc613373eec5 ./dir-086/data.000
+e6eecf8a727f4ee6852e2f62fb941b70 ./dir-039/data.002
+e7068f5918b4ce52344808f68ad0a085 ./dir-002/data.004
+e76d156c81829e84fe6688266fb52e37 ./dir-048/data.004
+e776126c38f075d4d2d3ea5e81e36e28 ./dir-094/data.005
+e783cb0562a591793f817a659e708470 ./dir-070/data.003
+e7bd906fce62b116f9088b58737b32c9 ./dir-091/data.006
+e7c710fe94754f90fb64f9e7e89351fc ./dir-069/data.010
+e81eff29b7729656cf2e06ec4a604185 ./dir-048/data.010
+e82627067c5c15970580acf5939be216 ./dir-030/data.000
+e845537c1977f66004c079beb9af5d74 ./dir-067/data.002
+e8649a3c6600e3624f6f2c1ab36bd5fc ./dir-036/data.009
+e88289300b2f2dbcca4c69b96abb31e3 ./dir-060/data.006
+e92f7f1b0a07ac60b05786d5725967ae ./dir-005/data.003
+e9d61885e0bbe1341a7789ecba127ab3 ./dir-020/data.003
+e9d9fb125da6f7296c0ee69235fdc55d ./dir-040/data.006
+e9ebdcc7fc5ce3ec40ec2c22b56a0c5e ./dir-057/data.003
+e9eeeaccd7c260f610226d199dcc1133 ./dir-001/data.003
+e9fe2dd437c71180558c00664d96936e ./dir-057/data.000
+ea2d20b5948278f55f8700bb7cfb525e ./dir-094/data.000
+ea3a40a6ed7c5c7badcddc829240451f ./dir-000/data.008
+ea60b89846ffe9098f376100a15fd623 ./dir-019/data.006
+eab0df7e354bdd20324ff75aa354c67e ./dir-036/data.010
+eac4ad9e6789702729f14d480254df13 ./dir-078/data.006
+eae751b2f5890a8a2e66842500875489 ./dir-064/data.007
+eb213def8582bf9c391032ab810224a4 ./dir-030/data.004
+eb2239dc1c3284a743ec2480b66a440a ./dir-095/data.005
+eb39335474a5f114496e45855d65965b ./dir-030/data.009
+eb49c652a3a9b67f48bed5f453c513fb ./dir-091/data.005
+eb8ab8adf1fd8e2e81eceaa2e405becf ./dir-015/data.001
+ec111bdd9562902ed047cddc4e291e0f ./dir-011/data.002
+ed6738198877ba672174a23b39aaf0ca ./dir-050/data.008
+ed87c44257e44baa0486784489fe1eb7 ./dir-093/data.003
+edae2f977e8885aabcafea140e4ea445 ./dir-103/data.002
+ee03c3c5c80c543bf52029381455e0da ./dir-093/data.010
+ee90d8d8a67c5f06de9a35a505bd4d82 ./dir-005/data.010
+ee98acc4ba7f594a49b86364edcf4312 ./dir-047/data.006
+ef45a01355157d5c4a8ac9783d30b000 ./dir-099/data.010
+efe6dab69eb3503886b623ab24ae32e0 ./dir-033/data.006
+f0230c53db8fb9ff1a66eec12b28d3c0 ./dir-029/data.010
+f038a202cce579e29ed75ef2f8ec9205 ./dir-077/data.009
+f067ef339dbfa373842d6beb5d4c5839 ./dir-006/data.000
+f06af3887a662caed220e9fe98c12f6f ./dir-007/data.008
+f09311e30b55f3199d6b5891cf717bb5 ./dir-080/data.004
+f0b69d2184753e5341681ddf9bc0df32 ./dir-037/data.008
+f0db3f70a37f660ce31bfe0600b80b49 ./dir-087/data.002
+f127bead521c0da62f4a607ebd6627b6 ./dir-057/data.006
+f18ba5b02bbf03abe12fca65564dcb95 ./dir-108/data.008
+f1bf04664350afb4ce5a5f0dd245d2c5 ./dir-038/data.001
+f1d367dea7bb98a9bddd4f5cc7a9798e ./dir-065/data.004
+f1e646f46c36449c3412aed4cb164968 ./dir-110/data.006
+f214ca488221c804a5557a9b809afd65 ./dir-045/data.007
+f237d0598589a542815fbf5ef59751cc ./dir-054/data.010
+f2577aa82791ecbf27b9085a22c23ff9 ./dir-059/data.002
+f2616b2ea0b3ce8565e568c0ed8efacc ./dir-079/data.009
+f2cc443362b156a2228f4a69fe4102bf ./dir-084/data.003
+f2df3b5bbcb225df895cdac384145d84 ./dir-020/data.000
+f329736caf4ce7d80213defa11f3c65a ./dir-025/data.003
+f34fd4ff678b218e8780724d3bd2a420 ./dir-029/data.004
+f39243bebe1bbc71e85de2b3d8d7122a ./dir-107/data.003
+f49b053513974d593dcc2c461c96e2a0 ./dir-028/data.010
+f4c0d20fecc04dbf7a204e105f836893 ./dir-101/data.005
+f4cfb0beced90e2adf96d3f2fa2ba465 ./dir-034/data.007
+f4d745c385f037aafef08310fb194a2c ./dir-066/data.004
+f5084ae9ded9833ee8c63281f5ed1641 ./dir-058/data.002
+f519dd2fcfc3047101faf90bcf18654d ./dir-049/data.005
+f5258302f6ab8a38a7b6b05b10d35097 ./dir-055/data.009
+f5323d4d915d67f9d777d52374cd27c0 ./dir-016/data.007
+f5e7738a9f2c3d02929d009724336023 ./dir-067/data.005
+f62d0c3b799b25730fb6a43d0014f220 ./dir-022/data.010
+f6abfdb63fb4c981814704fedd4b18d0 ./dir-058/data.010
+f6f7d42879db7621ad209d45bd9d6a0a ./dir-013/data.005
+f70fa856aa1740b7ed824a5439665b0f ./dir-062/data.010
+f72df01f8f290bc6e05f972db7a01f90 ./dir-048/data.002
+f73a183eab3ffe4070277b9e7f23da56 ./dir-037/data.002
+f7f7b2f1b136a01d8a9b3f1f6c3f9e88 ./dir-025/data.008
+f81c088c701a88d9b396e30f98776064 ./dir-033/data.010
+f897e7735ef1808a5a7bf6129cf0e0c9 ./dir-092/data.005
+f8a696717bb5a5adecf00ddd097d8d0c ./dir-091/data.007
+f8e2186f04d4cb6801acc2c0a68d810a ./dir-049/data.001
+f8f774997c9388bb7a6d593e6224e998 ./dir-104/data.007
+f90e54c08be11e4aacdf3c02dff8ee1b ./dir-083/data.003
+f9111bb9930d80cea7b7db64f092d597 ./dir-068/data.008
+f969de462dd1b58a64bc75adbe73016d ./dir-045/data.001
+f984f85a77d57c6bd3b366771fd98ea4 ./dir-063/data.005
+f9a468508fd7e6db5a77e3101daf22b3 ./dir-100/data.008
+f9c8e6c3a0c4a938ceb033f151e541ea ./dir-077/data.003
+f9f909982ea33e776b985ee5aca5378a ./dir-052/data.005
+fa411f1f9f559b4ee3dd109c2e59b106 ./dir-081/data.006
+faa2bbf820f78b39454c4feebe08a3c5 ./dir-004/data.001
+fab4fefd2d8eb77c4f36c89959ae7980 ./dir-073/data.003
+fb2388d03c2723f15728bda9c1dc2762 ./dir-024/data.006
+fb524e3bb758f32e7d34e538a5e40560 ./dir-019/data.010
+fb539fb081f4a95ac5b5b5e11343e2b7 ./dir-052/data.008
+fb7dd48f35c128212b78551cceda244c ./dir-038/data.005
+fb8aa16acb9f7292384e265585f4dd37 ./dir-055/data.003
+fbd1db4da87c1ed8082d9cf94fc424aa ./dir-027/data.003
+fc04e84bb6c640f890854fc5775b9d8a ./dir-034/data.004
+fc21a043990d03703003a506b0662821 ./dir-005/data.000
+fc2a45f10e52e18918d25d640f751457 ./dir-099/data.007
+fc2e476a6d1b7ce71b51bd43816891a3 ./dir-096/data.007
+fc304616f24322e26a4666c0e7181e7e ./dir-006/data.002
+fc906d13df56dfc5580af823ca1af610 ./dir-077/data.006
+fc97b066c0af8f2fa40f2bc91cae3b56 ./dir-063/data.009
+fc9bd58f8f126a8406987360b64a91fe ./dir-004/data.008
+fcbaf30100050cc1bb990e98d30605b9 ./dir-006/data.010
+fcd7a6b7924260b997ae603eadfae59f ./dir-090/data.000
+fd1decb314835cbb95d4aa6e7bdf3359 ./dir-075/data.000
+fd38d0ddd60429b3c7071867a8fcfbc0 ./dir-047/data.008
+fd3e4c487cae1c68f05ea2dc81cba74c ./dir-055/data.007
+fd63004ae886ce8e520756c6eff04835 ./dir-009/data.003
+fe086b79a2c29f13437c1346a8cb53f4 ./dir-009/data.005
+fe3505df1642e9d306269e2e07ab1089 ./dir-064/data.000
+fe4f310b776e309503f523b8a26d3ba8 ./dir-085/data.010
+fe68ec6607c15f0ceabada101b382b0e ./dir-069/data.004
+fe7751a5487172303de648672602c28a ./dir-076/data.002
+feb8b69e6224a7ea72e881e3f4a45b32 ./dir-028/data.009
+fed540a11f00f1f80470be7b491fc45c ./dir-108/data.002
+fed5e00dc94ed751061194eccf2c77e2 ./dir-050/data.007
+ff10c7b37d705bc48a1fdee62ea7661f ./dir-079/data.006
+ff13d49326ff8759119e78959de628e9 ./dir-048/data.003
+ff216f0f2e540e9057874b0cb4fdcdb1 ./dir-100/data.007
+ff92bf04634e26a2980ffb6ad47f9c05 ./dir-026/data.006
+ffe078de3583025c4780c8f4305772c3 ./dir-085/data.004
+fff6015c3b8f791f4027791ac0b5f593 ./dir-063/data.004
+
+create cramfs image
+count MD5 from the image
+
+create loop device from image
+check the image
+mount the image
+list the image
+.:
+total 56
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-000
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-001
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-002
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-003
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-004
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-005
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-006
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-007
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-008
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-009
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-010
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-011
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-012
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-013
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-014
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-015
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-016
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-017
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-018
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-019
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-020
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-021
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-022
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-023
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-024
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-025
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-026
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-027
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-028
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-029
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-030
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-031
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-032
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-033
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-034
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-035
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-036
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-037
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-038
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-039
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-040
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-041
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-042
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-043
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-044
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-045
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-046
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-047
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-048
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-049
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-050
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-051
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-052
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-053
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-054
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-055
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-056
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-057
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-058
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-059
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-060
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-061
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-062
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-063
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-064
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-065
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-066
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-067
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-068
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-069
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-070
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-071
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-072
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-073
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-074
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-075
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-076
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-077
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-078
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-079
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-080
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-081
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-082
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-083
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-084
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-085
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-086
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-087
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-088
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-089
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-090
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-091
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-092
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-093
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-094
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-095
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-096
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-097
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-098
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-099
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-100
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-101
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-102
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-103
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-104
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-105
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-106
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-107
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-108
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-109
+drwxr-xr-x 1 root root 220 1970-01-01 01:00 dir-110
+
+./dir-000:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-001:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-002:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-003:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-004:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-005:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-006:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-007:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-008:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-009:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-010:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-011:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-012:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-013:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-014:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-015:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-016:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-017:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-018:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-019:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-020:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-021:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-022:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-023:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-024:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-025:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-026:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-027:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-028:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-029:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-030:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-031:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-032:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-033:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-034:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-035:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-036:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-037:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-038:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-039:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-040:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-041:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-042:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-043:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-044:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-045:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-046:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-047:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-048:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-049:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-050:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-051:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-052:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-053:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-054:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-055:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-056:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-057:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-058:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-059:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-060:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-061:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-062:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-063:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-064:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-065:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-066:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-067:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-068:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-069:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-070:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-071:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-072:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-073:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-074:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-075:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-076:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-077:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-078:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-079:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-080:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-081:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-082:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-083:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-084:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-085:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-086:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-087:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-088:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-089:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-090:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-091:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-092:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-093:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-094:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-095:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-096:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-097:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-098:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-099:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-100:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-101:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-102:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-103:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-104:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-105:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-106:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-107:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-108:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-109:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+./dir-110:
+total 6
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.000
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.001
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.002
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.003
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.004
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.005
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.006
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.007
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.008
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.009
+-rw-r--r-- 1 root root 15 1970-01-01 01:00 data.010
+
+list checksums from new data
+0011a72f38da668f94edfa1d50743e2a ./dir-009/data.009
+0071beb4baa599141a7e446334d58300 ./dir-097/data.001
+00873c875f3461fb9f5baa9a039f218f ./dir-093/data.002
+0120fb81269598438e84f3fe10b24658 ./dir-100/data.010
+013b8ae5c4b011b87b142e5d60645f98 ./dir-020/data.010
+0167791462ffcaba8c221426c25cf455 ./dir-092/data.000
+01936c37169cc786cdc724abbf1961e3 ./dir-094/data.003
+01e5a8bee864f99bcfde91b2f501fa56 ./dir-062/data.004
+024b1d4cb93660f125e6f4783e26972c ./dir-072/data.003
+029c1199d16bc8da2afd2fe1c47b6859 ./dir-077/data.001
+02a1c0a82771c59236eb9f337dd0b4da ./dir-073/data.000
+032cdb1ac223adf9ed45278e64f265f0 ./dir-083/data.007
+03655d081ce567a4d5fc8e0c3dc59e3a ./dir-085/data.006
+0397e01cf6805728256fa9272ab672c4 ./dir-062/data.003
+03a58cec58f7b74c0d8803e5a05da20d ./dir-107/data.004
+03b3b16547b25e9484c516f5e88e5c75 ./dir-089/data.006
+03b4ed70f96d5c693bcf7f5a479ecd9f ./dir-014/data.007
+03d8a4ac5add5a95f3d9cac8f847c8e7 ./dir-023/data.000
+03de2f0958a76e9d01389b919c69ec96 ./dir-079/data.004
+043fa6cba08946ad508ca890a42f0644 ./dir-005/data.004
+04beac49e6d1f1f9067da249f8953fe9 ./dir-041/data.002
+04bf36721c9da55b2fd6780a5a6dcef0 ./dir-012/data.009
+052ac7ff047928a4f1c0d8bf38320483 ./dir-000/data.003
+053b15396096c2751d9e32b186bf0948 ./dir-035/data.005
+058879e070d51c1e2487d481f9c43b78 ./dir-071/data.007
+05bd438d7a151ebec24cceffb792c3bb ./dir-104/data.009
+05bd9b692ef2ff2c3e2e22a582bfc25c ./dir-021/data.006
+06492dee50157f379eabbe811bcb5ac7 ./dir-073/data.009
+068c724e76dba0c887c5323de7b7a434 ./dir-021/data.004
+069379abfd9f26e203c53923443e58a4 ./dir-094/data.006
+06c36f5db0c02127dbbca75c5d7c130c ./dir-104/data.006
+06d219d83d0d2142e9f7a06372e82f81 ./dir-110/data.010
+06df718f885fd71f2568940b616528c3 ./dir-059/data.001
+070178230ea47e90d00f9a6fa1975fd2 ./dir-079/data.005
+072c1d1755a4af7855dfea3c68cf270a ./dir-065/data.008
+07cd767ef24d4ec057ab98d0b4b388a9 ./dir-091/data.002
+081029b7d8bb27f6c4f79a2e4ba67d85 ./dir-070/data.005
+08268088254256c25894c6d76902cd61 ./dir-037/data.007
+0829c20c81113eec0759e5fdd74b1d3e ./dir-056/data.005
+08310ad78cbd3d6ee1864e5c145248d9 ./dir-103/data.001
+08478c7a523a8725107ad804a7dcda1e ./dir-096/data.003
+08763d238e02d7ab57d762b58038e38c ./dir-054/data.000
+08f96bf68eea8b82bce1a5c1565075be ./dir-060/data.003
+090ed88036a9618e4c44858db399793d ./dir-044/data.008
+092baa8d2659ed94803e652be4c8afe4 ./dir-099/data.009
+093d2d4597015cae42df7d3e2e3bf802 ./dir-062/data.009
+096b7a4f67a561fa2933bbefba032c67 ./dir-025/data.010
+099bf4107ae009497abf52d6d08f5b36 ./dir-013/data.006
+09b4f5a2b49ceba752a604297ab60635 ./dir-049/data.006
+09ca2509b418b5721188ea044ef6b4c2 ./dir-062/data.005
+09d6a844a0f194f884c8bfa6ed830a0e ./dir-106/data.007
+09d9867f561d35d2de37d9ae29400ee0 ./dir-084/data.001
+0a4f9161096ecf8ff8397cffcd9bf2c7 ./dir-000/data.002
+0a54f2a8347cad7e806cd0280b617463 ./dir-017/data.005
+0ada042828a700ad2489a23473d8e90e ./dir-003/data.004
+0afd3b49f16d29ebbc6f479a39ce7bfa ./dir-037/data.003
+0b0fb72f03db99cc722d4aaf2a98e5b6 ./dir-010/data.005
+0b508b5021efe48abeafb59bce6a3f6d ./dir-094/data.009
+0b938f0fe7bbb651b1d25f7763ae6d52 ./dir-052/data.004
+0b99746f048b6e421a452e930253bb15 ./dir-056/data.008
+0baaaee1ecaeb5f9cf8b7567afd4ef89 ./dir-026/data.001
+0bbccf04109b26f8d4f1cccb00f727e9 ./dir-053/data.004
+0c1e3c869b0adaa7ce93879a151776df ./dir-001/data.006
+0c8211ef42d75892c707f022e2a7d452 ./dir-043/data.004
+0c9298aefe72004d34643eddef8f4f1f ./dir-109/data.007
+0cfcc152235ac2f1569c390084b6d442 ./dir-012/data.006
+0d13557f56667831a853d422f40cb88d ./dir-014/data.006
+0d3cd9b22b91391d17c30e79fc892a62 ./dir-062/data.008
+0da117532cade43a9b42b681dbb4d97b ./dir-047/data.000
+0db8aea5ecef040742e4d9b3baa76dd6 ./dir-030/data.001
+0dbac1d697cc77685e1fb884916c1ae5 ./dir-026/data.004
+0dbded4d22453c74ed8ca876c759c1d0 ./dir-025/data.006
+0dc89ad916055c7321ad89e135d5b565 ./dir-051/data.006
+0dcc1bb5b8c671fa906a4c027f781149 ./dir-002/data.008
+0def9e49d46f81887afd6004ba27966e ./dir-017/data.003
+0e12577e454a44866f54f99738637d3e ./dir-059/data.004
+0e20a7189f0a9d2435f3bca1c3a6111b ./dir-053/data.003
+0e387d4e1d2669edd5527676dc5aec88 ./dir-092/data.001
+0e4d615c2aafda7ca9e24ce5c4637047 ./dir-046/data.006
+0e64c356b46f76923195fd49d452cda9 ./dir-092/data.004
+0e8d99a3b34733488d4d0e91837ae625 ./dir-010/data.003
+0e93cb8206b3d92c6b377f5f0ae6c3ca ./dir-101/data.008
+0f048b9bda6f694d90e961a5f83ae200 ./dir-039/data.009
+0f5cdc65ef8473f32533e3f56dca2ea4 ./dir-039/data.010
+0f99dffbb780bf4ac5381f2f14782a6e ./dir-041/data.000
+1029e912f6ecc9305585e8333d71602c ./dir-101/data.004
+103b8e299b6ed5b47d5eb6af7d04d85f ./dir-001/data.008
+10417903b3128497ffae512e9413d2bb ./dir-069/data.000
+108c615627e3a2874ffcd0c7daf93fab ./dir-049/data.002
+10e6e1097c9a4c17aeb211a2920e872a ./dir-080/data.010
+10fb5da04134c663b0554af084e2a7ec ./dir-095/data.000
+114f6bc0fcd87635a6bf304008e9b5c4 ./dir-093/data.000
+1151ae62db155a01571d7c79ee9307d3 ./dir-002/data.010
+11b3dec2bff965af6b36670dfd7ae573 ./dir-056/data.001
+11e361b75dffbe0ed09cda638d87e2cd ./dir-047/data.007
+11e9c06c0d7c355f1bb0bf8ad3376acb ./dir-083/data.001
+11fb59cb3557081ed7219666b74374b4 ./dir-004/data.005
+1251803d9b31ceb1ee2900a8407c762f ./dir-018/data.004
+125f71c5016e92b3659070ed04f58be6 ./dir-060/data.007
+12aa5d0dac0eb51e7d22b88246282f03 ./dir-093/data.006
+12cfb3af86b7cc141a3fe9a6268726a5 ./dir-024/data.005
+132af7005255cc4b038ad9021eca3840 ./dir-066/data.005
+13c8eb071c8e8bd68421d37f925601e4 ./dir-016/data.000
+13dd14e55cda92def6f11db482434a00 ./dir-022/data.008
+13f67366ee5c8adb40e80d3a5cd17fb7 ./dir-066/data.001
+13fb236e5f27b789fc31f1cf5b1b8892 ./dir-015/data.003
+14506c18804debcebf27a377aa04eaa6 ./dir-087/data.007
+14528bfaa0a1aca63cbc80acab96f800 ./dir-051/data.008
+148cf5c5feb722092441ec87b7a5611a ./dir-025/data.007
+149b7674a92796bec7f6066bbdef9a3c ./dir-027/data.007
+14da08b2d85bfc81c0b0b92817989791 ./dir-033/data.002
+1500a4c5054d87dd61c392f33868da4b ./dir-038/data.010
+15987cb3da62f45c7aee7a0ab9518206 ./dir-089/data.001
+15c05327f337c7d7414d472fa770ec3c ./dir-038/data.003
+15ccd5a312eb772c85a44a63099322af ./dir-045/data.005
+15f30a3264c0f8c57e6d7497a4064fed ./dir-100/data.003
+16156718becebf0f975136dca6c6ae56 ./dir-042/data.005
+1624d2a4ead61cb3c8e25c21794ea679 ./dir-106/data.006
+168b97bda8aa6f795d8f7272194d1d5a ./dir-020/data.006
+168f7eb82dd7eb78c4a5221d2e581dde ./dir-065/data.002
+16cf8c6acd3cd1ca2fc4bfc9b543982a ./dir-007/data.009
+1714933b11a4a8e600057565866ec423 ./dir-080/data.009
+1745656f9601fbd5163144500eda6568 ./dir-057/data.004
+179353ce148c37425d766ea5b43dc32b ./dir-023/data.007
+17f7787457e5fd1a8601dd2375eea777 ./dir-036/data.003
+1815c6317528cafd2a1e61429d29e1cf ./dir-008/data.003
+1836fd39b05d94a860d727f972a18729 ./dir-029/data.007
+186992572e97dc0a3688b2202c066a70 ./dir-066/data.008
+18b4a437d81acf594cc1482031987f61 ./dir-058/data.009
+18d978c6f54b50bacc51b5be2a6ba6de ./dir-051/data.002
+18edf33da2c7e85b6a2d54b04f79665e ./dir-093/data.009
+1947681ebdb65cfc6a48556ea9d923d9 ./dir-023/data.005
+1969ecd225b9d6fa4029bf673dbea4de ./dir-036/data.007
+19a34f8c9016cea8d58f02b816d4475d ./dir-065/data.003
+19c3f7ba63f64cd6e84d28e974834101 ./dir-012/data.002
+1a35e19c6fab4fa1d818e6efb79a7b18 ./dir-052/data.003
+1a92fd5a4821e924461429577491407d ./dir-002/data.001
+1a973f2c00d0090607a05d608b81897f ./dir-088/data.005
+1acdab480c52a454ba5552c29516d933 ./dir-073/data.006
+1ad17c4603609a36a704914e6f91d1e6 ./dir-034/data.002
+1b1ddfb88f0cf37d96a44edeb26629f9 ./dir-043/data.010
+1bb53747be6ad8a3e7da57c60ae54bf4 ./dir-047/data.010
+1bbb6b1ea7806b92e431aa481ba53256 ./dir-059/data.009
+1befcc0040c6a3b7e936a89b7dcc8d1f ./dir-054/data.003
+1bf3d96c63f0825a0238b3c711b2add1 ./dir-104/data.004
+1bfe6367c46e50e34f9f68debe2fd9e5 ./dir-062/data.002
+1c05f31466a6b05f1d73120760421b07 ./dir-017/data.002
+1c100fa4a99a635b39826fbf32a185ea ./dir-046/data.000
+1c4070f6f2506a5d59dac63579db5c5f ./dir-009/data.010
+1d286ac5a7f4477b07cbf2b8fa608f31 ./dir-022/data.007
+1d842f952850ecb07b9f8ab59cdbbdfc ./dir-074/data.009
+1dabe77be130077a1e2de7b1b243638f ./dir-108/data.001
+1e4b90e70c5531193b82cc3b615853a3 ./dir-083/data.010
+1e4b99c0c6c97cbe59c01b6b81cdd55a ./dir-000/data.004
+1e6fd4ee4737ee447ade2165104f4dc3 ./dir-044/data.001
+1e82a5e977e75d6ff12ba4e4b8121994 ./dir-025/data.001
+1f0a7ad9330818153e6d13705389f506 ./dir-098/data.004
+1faa10ff54c51e9e6a691d2020b28180 ./dir-013/data.009
+1fbafd0531f5dbf3e84a85c3afef7159 ./dir-091/data.004
+201882708185fd15ab164826e7e4ab3b ./dir-007/data.005
+2028e25ee7ea2410b05c96e2531999af ./dir-008/data.009
+204f64ca934489c9c321b7716abe6137 ./dir-013/data.010
+209ca1185749f5f760f3c2b1eeabcf94 ./dir-080/data.007
+2104bfa0d5cc81662f0f251dc88ed1f0 ./dir-002/data.007
+213356c6e050aa1f44fdb67554d9987d ./dir-100/data.006
+21ce95875b349ac8c4a5661ec7fb1c5a ./dir-108/data.009
+225117899bdd50b6fd754fac468523e6 ./dir-046/data.004
+22c7c4d61b254e67bfb62292f6813300 ./dir-006/data.009
+2305cdd515ea03e0e3d9dd7893c48e5e ./dir-093/data.007
+2343947bcb2aca5a583434e20b9afe83 ./dir-031/data.001
+237c5d3b7a556670a119b6bedf4a7a44 ./dir-064/data.005
+23887fc97d5de846dbb9b26fe48560e2 ./dir-105/data.003
+23e98c99c14dc74bf33f40f8438d5947 ./dir-035/data.002
+23f2dcf6bb0454fd2058442ab6c92b32 ./dir-059/data.008
+23facd50784b91efe2e5e81678bf04bb ./dir-069/data.006
+242be68b3720e5868e7f7652da5af043 ./dir-006/data.001
+24a863973f8ef674b357e1189b40de69 ./dir-060/data.000
+24c9f4371c9367eb54479198db061748 ./dir-070/data.010
+2537510cef5e66126ab4a5f2038de98b ./dir-011/data.004
+253e7dc0307e545fb44fb5e621883895 ./dir-002/data.000
+257394c9dca3db7e737ffa1d0419317d ./dir-074/data.000
+2585dcfae46bc4c444f34416e48da371 ./dir-050/data.009
+2595c5d5f15648f5b784cc327a0b9480 ./dir-077/data.010
+25d83de09d075036c37f4fa4084e81f3 ./dir-066/data.006
+25dabb63db7e69e49a20078e3f1c7398 ./dir-103/data.004
+265905e58360d4ee4cabe7fa24eb49bc ./dir-086/data.007
+269bc4b7f4d16c66907d450356661b6e ./dir-088/data.008
+26b6a74e3dabfd3c9a465f7053387f19 ./dir-013/data.000
+26b71d2a0e43c9837d567662bf9c7a01 ./dir-036/data.006
+26ba9e7bf1ffa275602ac235642aec22 ./dir-063/data.006
+270c63b19d9b4c9866df1a7a9d964ba3 ./dir-058/data.001
+2747d5dfdbd4f5ce76642911fd1cd7ba ./dir-037/data.006
+275719a7d2e10fd0cc0dbd406a5dd284 ./dir-030/data.003
+27974aa4801a7c3af842899272b9f6d5 ./dir-032/data.002
+27a1a827d803996650be7554790209bb ./dir-098/data.010
+283c9f8d3dc59cff4850ca6d976545d0 ./dir-010/data.010
+28503c859c89b5d9953f5bf084b44409 ./dir-096/data.006
+28ba83018c7f8d79a4bfb2aa94ecf777 ./dir-107/data.007
+28f2c7408277657e4c2c5b2e8017bcaf ./dir-088/data.006
+290616007d76bbe05a61c73693a9b070 ./dir-001/data.010
+29092e94be3e74a246c24383f920753f ./dir-035/data.006
+2957ae96634044a42bbc4bb0707cd202 ./dir-067/data.006
+2a11d7eceb35d8ff8248f0ec67a4ee55 ./dir-004/data.002
+2a39f7493e5646a38e9f71eb202dbc2d ./dir-029/data.005
+2a4b4ff47d7ab9711757637f480c0586 ./dir-096/data.004
+2a5a748d65991f63f6da39a97a22ccfd ./dir-108/data.000
+2a8860739f9d2dbda65e4d852e0fd309 ./dir-076/data.001
+2a8d705b90b82af455acfa7d9c0fc3c9 ./dir-069/data.009
+2ace4b0d8ef122bd918e8d538714ee73 ./dir-084/data.002
+2b08c2f1783f865051369bf41b47f960 ./dir-023/data.003
+2b31b68d17ec63b0e1a50176c49030e4 ./dir-076/data.007
+2b360e9c50225e1ebf8bf95fc0939e2f ./dir-006/data.005
+2b545e6e6ca3b6638b618c34aaefdbf2 ./dir-100/data.001
+2b5d18108e0309354b4f80b185e2323a ./dir-057/data.010
+2b82448e6fccac3441d9f7d7a13074d4 ./dir-031/data.007
+2bcc2819a288ee4ec2c9c00c585f67d9 ./dir-027/data.001
+2cbc9b3922e5d75a8c4e575e53065f2f ./dir-109/data.000
+2ce7c9d5e1a4aed1e9dec1aa85021f4c ./dir-010/data.006
+2cf7c6e038d3744275d8ffb8b4ab52d0 ./dir-096/data.001
+2d0494a350a570bf86596eb5dcd3e575 ./dir-059/data.007
+2d1cae3d5151bebe12ae7d97d9efb92d ./dir-008/data.004
+2d27ec0d318cf56d8ecc226a972db677 ./dir-027/data.002
+2d392a7b3dcfa6ee1399de9416a41b60 ./dir-083/data.005
+2d4433b6e32bda8e563f042fb799e86d ./dir-110/data.002
+2d70c129d857d22a8266c2e5f3ee4563 ./dir-048/data.001
+2d76b9784bbb68c670aeae134f1c6c32 ./dir-095/data.001
+2dbef0445d1b450b88b9e5817741f295 ./dir-072/data.002
+2dc184e8ece7744de9912d4671f2f116 ./dir-044/data.009
+2df5877dff7f77e48aa45bb96de9f362 ./dir-071/data.010
+2e03f7b258d00c0c5ff10425a701b457 ./dir-082/data.010
+2e0bf9030092dd77ed44cd7a25497496 ./dir-072/data.006
+2e0ee79666904e3629c801f2e39eeef4 ./dir-009/data.001
+2e43ada234775adb77188a840eee1525 ./dir-020/data.009
+2e648a138f04daba3ec30d9ee8502a03 ./dir-028/data.002
+2e90cd54f80352ec7d03fa98737245b5 ./dir-034/data.009
+2f253cb5c065c90cbc5d6667413862a8 ./dir-066/data.009
+2f51608cd1c0aed64f2b0b65fa1020c3 ./dir-025/data.009
+2f8d68bc8ec1c5db8ce2f70c87f91e68 ./dir-067/data.003
+2fa01a6b14ea91c02460c0beb70f69c7 ./dir-003/data.005
+2fd76fadb124c701e852763131480457 ./dir-009/data.007
+301e96925429a577cffd3805c2b6781e ./dir-060/data.005
+304d034c10c3f2e8659b25049028dd60 ./dir-104/data.003
+305eb027ab22375e29f6ce544fbd07bc ./dir-063/data.002
+30a44eacd0af674f1725fda3b7448f4d ./dir-101/data.009
+31179c50bc1553cce235c9aa625c16ae ./dir-105/data.010
+313fdb8585c16ffdeb009c0d3256a3b1 ./dir-078/data.000
+3169cdf524ba2005644d09ce2d72d694 ./dir-100/data.000
+31c5b7365750ca7fbf789c4ca325018d ./dir-107/data.009
+32928650dc72f8810007effa8db00119 ./dir-035/data.008
+32af92e23e453c72417acf56d3ab6fde ./dir-033/data.007
+32cf1dfcb9bd72353f46993006cb2d0c ./dir-003/data.007
+32e3f72b1fca5ac3176e8dbe110e757a ./dir-104/data.005
+3398bf733d4d26a7a8304740381a8333 ./dir-036/data.008
+33e82dbebbf710a1b203655510443ff1 ./dir-037/data.009
+33fc502a0d0616f76551446ef1965c30 ./dir-065/data.005
+3481e8b218141e6e6dc9b75296508b15 ./dir-033/data.004
+34a1997ca886d7c13ba4936f4c8e0daa ./dir-019/data.005
+34c9936c46a847152125e583839c12c6 ./dir-043/data.003
+34f102b63e5308964e2f9725caf6ec2c ./dir-088/data.000
+34f1627786d8d7715842af2bcbc92dd8 ./dir-022/data.000
+357671e20f590900a3869bc29dbee1fd ./dir-051/data.009
+35d3a1bd5dd1a3f7d0b50fb2c5406645 ./dir-039/data.003
+35ecc0144bca35f519985aaa15be26cb ./dir-106/data.004
+35ffbe6e62da5b0ae9c06363600b0715 ./dir-049/data.000
+3603dd8c1f2346ed0770aa548513eb34 ./dir-024/data.002
+361b845aa30dbd442cf2f0b87ad4741a ./dir-055/data.002
+361fd9b6648f95ff7eec8d717d179bc0 ./dir-089/data.008
+36270a415097865dba68478f69628db1 ./dir-003/data.006
+3653a989b9764b2fd530324a98ec8218 ./dir-067/data.004
+36551af77706ae56dc228c1151caa7a6 ./dir-062/data.000
+36b55f77570d1b46380d6018f52661e7 ./dir-109/data.004
+36d68b9cfc51aacce08065d37eb500c6 ./dir-102/data.003
+36fc31babad89ef26acd0337a79286d3 ./dir-049/data.004
+3704c5fd6a446d530bcca18004f2b31d ./dir-081/data.008
+3707760798d4e50da70bae0e8d2c4c28 ./dir-095/data.010
+371719fe5cd052be2a63c6444ec77413 ./dir-044/data.002
+37594be41d8293c0351865a708e2af05 ./dir-063/data.007
+3790a2bce420a800ff76ddc55d4c0d0b ./dir-086/data.001
+37d9e0f2d9a39dbd9fb06c4dbc1d932e ./dir-065/data.000
+38131b5fcb1ba7f74bc3fb89091d67fc ./dir-104/data.001
+382085df5f142fde02b492569b27f7d3 ./dir-078/data.001
+38307eabf1109b786760384dbe7013a2 ./dir-074/data.010
+383aec3d236bde3134bbb811487594ae ./dir-071/data.006
+386bd313b7144bdb7121d9d3cffd8019 ./dir-095/data.002
+38837c036576ad2afb1382e10d229658 ./dir-109/data.001
+38993a904f2d37087a5c4ed413d331d4 ./dir-081/data.007
+38d82c4bbcd2def41636f02151bf5319 ./dir-084/data.004
+392ccf5865fdf0dcfa599034934e4fcf ./dir-072/data.009
+392d6c23d5b6a58ba4553cfef5245191 ./dir-109/data.009
+3973246571d48f5fbe9ddc337ca2c8c9 ./dir-017/data.001
+39de945a763bd83bde787879294c9b49 ./dir-005/data.002
+3a4f397262e2b830fbaffed4d03b37e9 ./dir-016/data.002
+3a8363fc39e4211afe3ede5688f94705 ./dir-077/data.004
+3a897a684dd2b32b4fcc2275988fd080 ./dir-018/data.008
+3a94ca85ac994f47e8010011fc5c9582 ./dir-000/data.006
+3af8ed9c599b06ff2d99fe5563380c30 ./dir-103/data.003
+3b1922fb43fb222b573a9f44bb805e0d ./dir-029/data.009
+3b72b8b4984cd51e67ed03f59da716b0 ./dir-023/data.004
+3b8a656973178c5815451d8c64fa1d21 ./dir-009/data.002
+3ba72c45fd0177d48f6a7a5121fab5a5 ./dir-003/data.001
+3bebd9b6fa4aeb9772ca238fb88ddcf4 ./dir-073/data.010
+3c99ce08823c1c1b24e1c77574cb7bdd ./dir-075/data.005
+3ca50a374e0c46ccc35caba06244a592 ./dir-073/data.004
+3ce0c739083cc21ae6f19eb377258fb3 ./dir-097/data.006
+3cea42052a833a1c65ab6d3de7db95ff ./dir-044/data.005
+3d05c1ebb7adbd72eae064b2b16ed5bd ./dir-015/data.008
+3d362d4af7ac442b0be8a6e1eaed1222 ./dir-058/data.003
+3d3fa69ef78ff4eec72c4a7d62d44320 ./dir-057/data.001
+3da10311ab35b313bcea0b3dcd3ec320 ./dir-085/data.007
+3da5bfc1f121da4a35c5c1a26bdf2871 ./dir-080/data.006
+3dfd203b61606012e3fe4d794026de45 ./dir-060/data.008
+3eb835385bbaa4c12dc66ad5a5787ac3 ./dir-110/data.003
+3ebf14bea5f774ed68dc3aaecfd4c7a7 ./dir-086/data.006
+3ecabfe3d7e0f39d1b77feb30bb2149a ./dir-108/data.006
+4017217c1fc3620f00a63bf7451d7d58 ./dir-011/data.005
+40565e6e9eaeba9538e068d7fc212025 ./dir-030/data.007
+409803908e1249d811421fdf5e7221aa ./dir-011/data.006
+409f1a5df32b48cc615b80f895333125 ./dir-070/data.006
+40da236dcfb37628a7383f110a34ca91 ./dir-018/data.003
+411bceae3a164955533dbad618dcdb19 ./dir-042/data.000
+4129b05173c9dc800c811c1c6ab554f5 ./dir-046/data.008
+412efdab02674ab591ee02c1e5f31d0f ./dir-102/data.005
+41315d3d575108a52e0fc5b07c503177 ./dir-034/data.001
+4141aa05325ffb5c530391d899cd2bcc ./dir-099/data.003
+4174e6169d645307ca8675205d40c853 ./dir-004/data.009
+41bcffb4e71780db8fed9818124e5b6c ./dir-063/data.003
+41ce67b35ee64b9e86c13efcfdd26ce3 ./dir-050/data.010
+434b0fa579b255430214de352151d112 ./dir-041/data.008
+434b26f00c175f276a54105171251d52 ./dir-106/data.005
+435ca233503eefbac946d3ca654f9cc0 ./dir-072/data.010
+437ba3bb8dbb675b158dae0f59d6a445 ./dir-061/data.010
+43c49573357ed53dcc2e364ce112b62d ./dir-061/data.005
+4404b6e4f59a841fe9a3ae2e41c4c488 ./dir-071/data.000
+4426aa424dd25ce972b63b5c47b9530f ./dir-090/data.006
+4448d6c8b60d7a4b08b534ac1059d668 ./dir-089/data.002
+4472ba00b77a4dce904589c457b1bc97 ./dir-106/data.001
+44861e8e164ea51709c069fa286134c6 ./dir-056/data.002
+44961468f08ee80c619adf0154e96a9f ./dir-101/data.010
+44b702805a58f14493bae3c2f2716dc7 ./dir-088/data.007
+44c7d952d5b9528c1263ed11b5dc2ae5 ./dir-012/data.000
+44c825fbf1d23fcabf45e42e395423cd ./dir-085/data.008
+44e3ec8f10255d109773f3204a5020e9 ./dir-022/data.006
+45034f1052987e5d9e2d4bc0f463ec7a ./dir-025/data.004
+451ee4f9e926765a2c07f89b1a2fe078 ./dir-000/data.007
+452b4b43200d2ece30016ae96415718a ./dir-084/data.009
+4535f5d99abee30fe2e0d67098dabc62 ./dir-098/data.000
+45622ac4ee28752eb56eaccfb5462c50 ./dir-016/data.010
+459ba24d0e03a81f8f6ed35700f46460 ./dir-101/data.002
+45af2dca2eebc714cd0ad63f77ceaaa6 ./dir-040/data.008
+45be06fe6e509b43b6f68c52835d54b8 ./dir-016/data.003
+45c250d9570716010f4161f1bff5e450 ./dir-026/data.005
+45ed7a5a54578d5985153ff70330c228 ./dir-011/data.008
+45fe9fcae165a9d88afa27fc3c933406 ./dir-095/data.008
+461b0786590556a5729e1e23512db49e ./dir-037/data.005
+4647cb2043f623bae8860e7e8b58834a ./dir-013/data.008
+468171cdd32b0e94c96a9be1f298738a ./dir-044/data.000
+4690dd33ffa2329e5bc456ca24ec7f72 ./dir-031/data.009
+46f75198e440d8dfb43207eb4965c2c6 ./dir-028/data.006
+4710eacd6b6df6fc6ac2da5ebca94546 ./dir-003/data.009
+472cf0ecd1b1691bfaa8d5fb86c21366 ./dir-075/data.002
+47344f3f3f3a806ff636267eb39369e0 ./dir-082/data.006
+47d6c7304f9210ee16dc2dc5fc2a95ed ./dir-048/data.005
+4829f629b1e545f4cf68f50e9f5e6209 ./dir-022/data.005
+484a291638f8224eb40442351f3e7f41 ./dir-054/data.006
+48e42891bf2fe053538884127b0a50ce ./dir-021/data.001
+49077e5943a100b6771a44be07704a4b ./dir-010/data.001
+493e84baf6c02b38324071c87f0afb4c ./dir-024/data.003
+49a02c341e5de4bfd938ea0326ddd811 ./dir-096/data.009
+49b11279f83f22ff537134bbcc84ff92 ./dir-099/data.002
+49d6ab85b50ab5386f8282a7b98a2083 ./dir-026/data.002
+4a1113a862eec6fc1a29a75a985f02ca ./dir-044/data.007
+4a209585e44265cb0f363756602fca0c ./dir-027/data.010
+4a3a6543fefb560f2383615d905a6a96 ./dir-053/data.007
+4a4c1cc3c778ca8a5ece35295591c423 ./dir-089/data.010
+4a8a0e0c68ee95b541bcf37ceb6fca38 ./dir-032/data.000
+4b7be12f2afafa942663af88a2a34797 ./dir-107/data.002
+4bdf8bf31569a06880b85e176703d3c5 ./dir-038/data.009
+4bf489ff656fef7ba0f643ce64f3abc0 ./dir-038/data.008
+4c010f92cfd01db492b981f234a68437 ./dir-015/data.009
+4c7badffa374dc118c81ff0d04f316b4 ./dir-032/data.007
+4c8f651cae18db445c8bb03efaf57622 ./dir-055/data.006
+4cb4c1f1d3bbf4fda768b972661567fa ./dir-033/data.001
+4cbc6cc296c87027ed9695c018ab5307 ./dir-068/data.004
+4d064d4959a79abc8e3d073675d6c001 ./dir-002/data.009
+4d0e137ae9bd6e011cc974daf47e514f ./dir-020/data.007
+4dfae4a9ef4e894b3cd8209a4ae78bce ./dir-068/data.006
+4e0f932047dc3244c2fe215002ea8ad2 ./dir-099/data.000
+4e26ef37e9c5b6925ad2938e9b5d68f1 ./dir-043/data.006
+4e41ff62e105358125e0b0330a042fdc ./dir-001/data.007
+4e45a4b7ccbd79003283b6e47d69327c ./dir-093/data.004
+4e548f34d5bbeb56fa7eb58cb4222837 ./dir-098/data.009
+4eb2096e115b6e2e7639881ce734ca09 ./dir-012/data.008
+4ec96ab3466c9011cd1555abe6992acf ./dir-029/data.002
+4ec9bd108f0df0b186f0777b60dbe941 ./dir-011/data.003
+4ed5125c06e4188a8e73369cec758b9d ./dir-028/data.001
+4ed6c21f5b75c31336cc7873e795ea4d ./dir-063/data.000
+4f14cfa2698af420ae1ae5e40ce45a5e ./dir-033/data.003
+4f3ff759eb10d55898f3b189c6b8c80d ./dir-000/data.009
+4f66d35fac82aa35322ad3cc5b6905db ./dir-001/data.000
+4f898916010eb8aadb72e455d5b821a5 ./dir-051/data.000
+5026fd8e09c8daef0a1da96a28833150 ./dir-081/data.005
+50389a4e73a9a472b5a5c4a8910d7e96 ./dir-011/data.000
+503b514c984dae8ff69f8bfefa824fb9 ./dir-016/data.001
+5048be8c2e8e765ddb63c3b371852b72 ./dir-053/data.002
+5067419869faec43f85c8c327c3d378d ./dir-008/data.000
+50725a5941d26b2947677bfe0c7761fe ./dir-066/data.010
+50771c76a8213245be499adf1d4311d3 ./dir-100/data.004
+5118ac53d3c7b31072833f966efa7e9f ./dir-064/data.006
+5144c4da0e2a374d95ff48a34c3297c9 ./dir-092/data.002
+514b076e0f0511f216379950f2714f90 ./dir-024/data.004
+515ee463937cf2a3ff157b7891f96eb6 ./dir-052/data.009
+516264e6cd37058c67a6791d59482dda ./dir-080/data.005
+51632cb7f44f5bac30f5d6f4a9edec79 ./dir-097/data.009
+516e6bbb96f69262d57f3a660bc801b2 ./dir-090/data.003
+51ce73b1230c06d1539e6de542b63006 ./dir-007/data.006
+51dbe24d360ca38feac1b436754f9b4d ./dir-089/data.007
+51eaedbaf33988a48e6af65a5b117d38 ./dir-016/data.005
+521dd773fc4171de150b5f8995a88d21 ./dir-009/data.006
+52693bd5407a2471cf5156afefdaf888 ./dir-027/data.006
+52731e0ad3028c530bb4802a4754c408 ./dir-008/data.001
+52ddff97b316a494f4737e0614850f57 ./dir-069/data.002
+5301844c968d05257f1e6531e8ce0d54 ./dir-003/data.008
+53763fd0a894b8e121c281cee01f9402 ./dir-068/data.005
+53d4507a2df8d22076d81da5c0100ebc ./dir-008/data.002
+53f5cc09d57af60fe72559eca2f1a603 ./dir-011/data.007
+546662c6282b5d422413f53037df0d54 ./dir-073/data.001
+5482b2507dc94c8edde840b619b34944 ./dir-081/data.002
+54a6b5192a4fb2d1f2b26866d13c05c2 ./dir-088/data.010
+54c3a5328276de092919bf966e9dd7ad ./dir-066/data.003
+54e78419ba7cf291e26f1160bcd09469 ./dir-028/data.007
+55241d2474b0bee70f50e7629fba3a10 ./dir-070/data.007
+553e65cb3ee0a9a5572826ff4401487c ./dir-054/data.002
+55adf518280a54532de6c33c258a8e6c ./dir-080/data.008
+55b8d57f3beec6a8075221f08752ff42 ./dir-102/data.004
+55c76bdb82f8fa4e0d22f9e41ad3ad0a ./dir-075/data.001
+55c8d13f682a62306c8d29746bd7e6fa ./dir-026/data.009
+55d59fcb49c07ef165b3108621f08ab0 ./dir-071/data.001
+55d66d74201a3a3e5b2d53f9fbb52bbc ./dir-019/data.009
+55d891ada51edc5dec3837cba7c5f2fa ./dir-041/data.006
+55de7aed4c69e32378352e6dd9a3e5ce ./dir-057/data.008
+569f645920cb1a54093de547cd92f337 ./dir-085/data.003
+56ef2f747789aa2ab1ef6c7947b50ed4 ./dir-067/data.000
+571ada4c832aa9ed66403352b06a07df ./dir-016/data.006
+574ce2273f4e17cd6739a1772d43fb67 ./dir-090/data.001
+587e740432de54932b49f4b0b1a9d8cd ./dir-067/data.008
+59226032ef2efb991fffc5d2d2a67dd0 ./dir-098/data.006
+592e2927e0468af2a86bb10e2a5cbffc ./dir-068/data.007
+594f1a21b98ca4a8b8981164f46edd0a ./dir-023/data.006
+59a3f6ffb6432a768ffcfc390ba0d5e4 ./dir-005/data.007
+59a5751a44478789aa08853a7fbcb4fc ./dir-035/data.004
+5a034a2cdb1b397b435c7119a725e622 ./dir-108/data.003
+5aabd813ce725146f47bc73d9449b50e ./dir-107/data.005
+5ac445c2b46c50497deb1e2df3987646 ./dir-065/data.006
+5b62c14d607c393885cd0a77b445a0e3 ./dir-014/data.008
+5b8b4050492565d8661a4431c7d9f0f3 ./dir-010/data.009
+5bbac4ec67fa84d40d8a8a4ba9d00d31 ./dir-015/data.010
+5c0252cdd7cd0d144583c673e26a4cc6 ./dir-042/data.002
+5c1840580df0a528059088e45f23f837 ./dir-091/data.010
+5c24175346dc431720a833da4348aa78 ./dir-105/data.004
+5c2e4b18bb6e78ea09b958f03ba0e750 ./dir-068/data.010
+5c4c416cee200ee67bec2029cb56b6db ./dir-077/data.002
+5c535e14b7cd449a40893ee6a22f60e1 ./dir-031/data.006
+5cd631f166a2970f7aeb8960ace0f8ef ./dir-082/data.000
+5d6a823c24460b343c6e1cb74f9bdb8e ./dir-038/data.000
+5d869905fdbd4409d87d484db8cfd7ee ./dir-058/data.006
+5de94c0de3c4688b56b0d2fd2a892b98 ./dir-026/data.010
+5e5742ef3a3e4f4384ecfbd9663a18eb ./dir-105/data.006
+5e5a607a9b6945a1f4d17922466f86eb ./dir-028/data.008
+5e824e0add90548b50e8def0e0ea15af ./dir-051/data.004
+5edaeebaf220564c0f9fae53cab3b8ad ./dir-064/data.002
+5f2ebfc0810170305609aaa17d3b61a3 ./dir-096/data.005
+5f495116cabd24317cff89e1b946f93b ./dir-068/data.000
+5f82c03aee04bbc7b13bbe81d86f39d2 ./dir-036/data.001
+5fb6b749a06a1cd8e9e8b29383bfbf4d ./dir-090/data.008
+5fc369bef72f37987eb22899e8abe816 ./dir-076/data.000
+602dfd7dc13dca72e5cdb2a55d10e2d7 ./dir-005/data.006
+603c4a2b2591514fe3f89847fe45c9b9 ./dir-101/data.007
+6069799fce0384528b5b6f2978a5923c ./dir-101/data.001
+60a16f4eba5fcac35a449692e475ccae ./dir-088/data.003
+60a3276323425d3942c38a9d916fbcac ./dir-039/data.008
+60a658d52f59389789cbcfcaab41a1d8 ./dir-063/data.008
+60d6c79df48202637082c2213d4ccfdf ./dir-075/data.004
+60d87fb1da7baa439822269fd05467dc ./dir-028/data.005
+60f939a750264ce597002a4c5aa38b0c ./dir-012/data.007
+61724bf9d882734d00cbf2174586cf1e ./dir-081/data.000
+61baca9d4f0c0e1ad440f516eeeccf24 ./dir-040/data.002
+61bd0e648bc1911d452de89d4edcac81 ./dir-038/data.006
+61e13adcedfa2dc97c6fb131c48143af ./dir-078/data.009
+62102e0bb6e4a034d0df190864d3034b ./dir-078/data.005
+624fe86964a8866aa072ca98944d1cfc ./dir-072/data.005
+628a3ac4c873a169d8a3fa9df6615f4c ./dir-109/data.010
+62e10821dc2f80b608f7d789fe83923c ./dir-060/data.010
+633726cd4b41178c5506dd2b2eae0281 ./dir-012/data.005
+636f3b4bbc5e0d8b9042f1dbb35079ab ./dir-074/data.008
+637db8942597652106bd84d1c15341e4 ./dir-097/data.004
+63eb33e88241210c050942ca97a576ec ./dir-040/data.007
+64046b982a59442839a2d09b7470cf52 ./dir-053/data.008
+640b550e180d7c42c2d44f2ed2d7a43f ./dir-015/data.005
+642aed69a28a94bc3fa488fc6527b20f ./dir-016/data.009
+64bf70a1cd945cf459a07ec4631eaf0c ./dir-098/data.001
+654eb3426a0cfccbf51d147f29f8eb4e ./dir-022/data.001
+65bd86cae100830f420cb55dac2e15a4 ./dir-110/data.005
+65cedc58f0c41c8fdae422035b3750b8 ./dir-090/data.002
+666402e134e6ff70cba029c9852b0f97 ./dir-015/data.000
+667548fd68810e209ea97fe7b3fca1f6 ./dir-012/data.003
+6675d5082ea5133f6831499c95739594 ./dir-011/data.001
+669ffc163b66fc3abac6611758613a5d ./dir-089/data.004
+671e2b2280638d8e1d3a8f6b1d7ea8e7 ./dir-032/data.004
+675de03baf8db6f80962ed278b6e7a11 ./dir-110/data.000
+67a8ef2542009e755df5c9ac6f853d80 ./dir-026/data.000
+67bd34a30a05eb26b3f62a075cd856f4 ./dir-038/data.002
+67cffaada9805a90b11355402e635cae ./dir-056/data.007
+67ddfa9b4150737deff4914cb35fd713 ./dir-027/data.008
+6820b342440583f51722b9eb61b48d63 ./dir-088/data.004
+68336b681102e16e64f88a95cf470b72 ./dir-038/data.007
+683aa79bd3cdcdac7aa10ad1e2b0e028 ./dir-033/data.000
+6856991caa694e83caf6c0fca0233b82 ./dir-092/data.008
+68a46055103f6e733e5cceb707f6dd0f ./dir-004/data.003
+68e9e651dc7a564de214b282b9b5c757 ./dir-008/data.007
+6907dfe18a37643916742ba964bdab5d ./dir-027/data.005
+693f9c8b20a8a9279c4d43c80c3fa984 ./dir-097/data.008
+694e99f3b5dc56ba062fffe8381f8731 ./dir-000/data.001
+695cdc5bc7ba46e6aa38950daab71636 ./dir-050/data.005
+6967af8156573e442a1b6bd56d0a4893 ./dir-035/data.003
+69c1a52d538a67bf2a7e5c33379533b8 ./dir-017/data.000
+6a1bd41da62d260f746e0b01c7a13403 ./dir-052/data.000
+6a71aa155d598b5ad2fd6756da3c278a ./dir-098/data.003
+6a85596f81522c38c958910a4c0487d7 ./dir-060/data.004
+6aa3bbb45b6231513e0bee62e9a12a9b ./dir-080/data.003
+6ae19e39f7857f176f021a8cfe768a66 ./dir-023/data.002
+6af7255b3318607b1d5a7894d8caac25 ./dir-082/data.004
+6b780e7f72be3df9db712580acafd0fa ./dir-102/data.010
+6b7cadcbf875ee5ad53b47298abfaae0 ./dir-080/data.001
+6b8533dbffebb6ef2c1fd48e1df6ed19 ./dir-050/data.004
+6bc9e3203e2738ee225be6a45da6d077 ./dir-059/data.010
+6bdfbab8a4b20d71aca5aec66cf4c07f ./dir-071/data.002
+6be3c35f28f68861840f0345f70ff511 ./dir-011/data.010
+6bfa83d47d895ac06f74abcdfe24dbd5 ./dir-067/data.009
+6c324e185cf24623b8eab7daa010e222 ./dir-023/data.008
+6c32f3d5d270bf507f57edf28ac20214 ./dir-105/data.009
+6c8cb56bd81e30ebdb0167ea9c37f14d ./dir-001/data.005
+6c93aac45d9e019e7beec4a708a3033f ./dir-087/data.008
+6caf414d04c342f829887570993579d7 ./dir-089/data.003
+6d2229a029fe6481590413f2db98aa02 ./dir-002/data.005
+6d2a24dfc83ec50692a139bb2c4c61d6 ./dir-082/data.001
+6d38deab9a096a0487e9318265837589 ./dir-022/data.002
+6d3a2f17df2c7210851a2c0d52393c0c ./dir-023/data.010
+6d75df376c491371990eb1de004227ea ./dir-067/data.001
+6d931b032c977bd48eece3900cb75cbc ./dir-031/data.010
+6dd22b9dda6d6347c1bd9afec4793a4f ./dir-070/data.002
+6dd7811a0c6fc4d0742d46707145a3e5 ./dir-004/data.004
+6e32a7359307837e8ac9823de823555c ./dir-046/data.010
+6e5cc8f5f8c2a07b9de4a8b781d5b5e5 ./dir-050/data.006
+6e843730df663e5647de7ac5bd45a9e4 ./dir-074/data.001
+6edd462bc21cf66cbcba400669a8bb5e ./dir-007/data.010
+6ee09737e92a796d494ff85721185da3 ./dir-079/data.001
+6ef6e7d86580f5d0f7736bb57e93f4b2 ./dir-048/data.009
+6f314ada6407cc32b1f3e8d903b5c9b5 ./dir-017/data.008
+6f49da0120119efa5e4f89de195b4d2e ./dir-048/data.000
+6f69257227a260127a65a133508b0319 ./dir-109/data.005
+6f86c9c9ddf31fff41a6e48b52e05a06 ./dir-078/data.003
+6f957949973905e40beea6e33e465d0a ./dir-092/data.006
+6fbe3644be2de3423204d79bce06c40f ./dir-106/data.003
+70296c938c1220bf726197fc521c5da2 ./dir-083/data.006
+7047e1b8a6351da3504977a4c96edb72 ./dir-097/data.002
+7051be81c22bf0e394e8d89a6cc78a20 ./dir-028/data.004
+7077cac646a5b37a418664d366de8d2a ./dir-086/data.008
+70c913bbc3454d3af1d3b97a0851b903 ./dir-085/data.000
+70dbb0dcaf2612b4952b341651ad0c1e ./dir-065/data.007
+71214fecdee78675ad95b492df4017ef ./dir-040/data.004
+7171c7a1796cbc2355c6adb03c312daa ./dir-032/data.001
+71841f91ab1c873938ff4b4f018b2221 ./dir-014/data.002
+71a2294412b3029f236a254cb335ac98 ./dir-103/data.008
+71a6994ef2bf8368aaa2362bcfccdca7 ./dir-019/data.007
+71b4da91bd5142d3342d67d322fef2e5 ./dir-084/data.007
+71dbfc9057fca54a5a183446775e32b8 ./dir-016/data.008
+7214fcff02d0743210d754a37fb98b0c ./dir-102/data.008
+72ce0ff3d78837675c538e6a02a67557 ./dir-068/data.003
+72edc28e71c24a8c04faaa3c2645d936 ./dir-064/data.003
+72ee0b7f236d0c1de171c8618a8e8c7f ./dir-078/data.008
+732b1e0f0ab56898793589bef25f29f3 ./dir-017/data.006
+73bcb49ca5ca609cbb65147cfd405f3f ./dir-105/data.001
+73fd28f9099c39d6d2c92355c060d6ed ./dir-068/data.009
+74374dec8765151f8270209dca6fc5c6 ./dir-098/data.007
+7502ae05db65a32459a2b97996419065 ./dir-046/data.005
+752e6e003b2a63ee5329d9629fc11e37 ./dir-066/data.007
+753b5b925a36ef26874b53df2ebfa061 ./dir-075/data.006
+753e065141176ff596bf2e1ae61ee7eb ./dir-051/data.007
+756432d8f72aad038e5485bbe24bafaf ./dir-106/data.000
+7565d1674164a015c42a2f5011cc087f ./dir-000/data.010
+75aeb3ea4fbd1d50430bbe04e2932b16 ./dir-093/data.001
+75b713f785ac4a9b1d088421f23ed1dd ./dir-008/data.006
+75df7f36eefa42c3638bc5b6a97d55cc ./dir-062/data.006
+75f4acedcce3de89a05b4c098b4f8118 ./dir-084/data.000
+761c8e415dfea226f53be2957780ba69 ./dir-000/data.000
+763c7d41210a0ca975eb99d0e17f4b20 ./dir-058/data.007
+7652846932bd547c814ea86462891fe5 ./dir-036/data.000
+766be2a004cea2f84f9aeb40eb9e5124 ./dir-006/data.004
+7672a3a631d8cebaeeb10b4eeee2f374 ./dir-097/data.010
+767d0c476c9468d63e0871af2cef1738 ./dir-060/data.009
+76c9efefaa60ee3fba78597b33c5f575 ./dir-090/data.004
+76e0a18196e6b9e8f1860791d5e70146 ./dir-075/data.008
+771b05fea5ba6da4cdba84683c070c95 ./dir-053/data.006
+77586b0c211ae906be9094d049370678 ./dir-021/data.003
+77c306d850bed70af9a433a685820431 ./dir-050/data.000
+787d7e089b2520fb323825c0f34f1019 ./dir-047/data.004
+789ae7e99a3a3ff41688d0da0baa5491 ./dir-049/data.008
+78bc020188a5927d1bdd8a00916e7bdc ./dir-047/data.003
+78e4a29d866eeee6f16dac2923ff9039 ./dir-020/data.002
+79adfb3d2a7487932511a5a4279b61d4 ./dir-027/data.000
+7a27a666e2737841367056a9d8fd9d5c ./dir-060/data.002
+7a53dddb70aee58e5661427249ee7038 ./dir-076/data.008
+7a95a94fa02effa09895b4cf9f806fa8 ./dir-053/data.009
+7adef604167c2a7031d11a61876f5e3f ./dir-056/data.006
+7afcc18fdeed24a4b6582f0cb8c8d63a ./dir-079/data.007
+7b806c0a3bd12973c5540a4a661ea698 ./dir-010/data.000
+7b91d10dc9a73501e2695fd03efca8a5 ./dir-064/data.004
+7ba6781b9f6a2102f6ee77e4bcd67e7d ./dir-102/data.007
+7bbc6a3d08c8aafe49f38286ea190736 ./dir-054/data.008
+7bc0ff8f58b050e3588a70ea5a899c2a ./dir-069/data.007
+7c2955cbe8d8635b43f067b782a8d22a ./dir-013/data.002
+7c96eeeb60a073929017e8830287f7ad ./dir-094/data.007
+7cedf898a8fe0dcd9e6e2fd98a74ab8b ./dir-082/data.005
+7d32425b7c104604f90ef5081a066d65 ./dir-015/data.002
+7dbc4d0b5e092ec07d71821d06cec150 ./dir-086/data.003
+7deabfdda68c09ca7212ea05659e9927 ./dir-017/data.004
+7e26cc30612356a343b39f0229ac3d46 ./dir-019/data.003
+7e7c2baf1cc7562b407fca1085c05d16 ./dir-074/data.004
+7e9b0ff66ef80bb5257831f7d04961b5 ./dir-020/data.008
+7ebe836d841b63662eead6beb412d4bc ./dir-107/data.000
+7f49e79851b7b45cd2d33175fa1b2969 ./dir-081/data.001
+7f667fbd3cc3f285932aaf92da189d1c ./dir-044/data.004
+7f84ad2226952dc3a2cad38c3ee2970c ./dir-007/data.001
+8045151192b49a8da4d2c8e6762ccba2 ./dir-107/data.010
+8048e0cba222cc165575eace3922e5b0 ./dir-039/data.000
+8049aa75ee4cb1b4c3bba59df67e47dd ./dir-068/data.002
+808aad824b9e2e465bca41efd1f52954 ./dir-100/data.005
+80940fad75c724a99076c376892083f5 ./dir-008/data.010
+809ad8f87b1d349538479eb8255fbd95 ./dir-087/data.010
+80b12631328b0da15def5ab7ff5923fa ./dir-094/data.002
+80b3adbeaf7752f4b28690bf34277a97 ./dir-082/data.009
+811f2222bf3e3261eddfa7c5b3d081b9 ./dir-046/data.009
+812008464e6378f41d6992b5ffcbeb84 ./dir-046/data.003
+8177492799584288b6d0912ddc3c5788 ./dir-010/data.002
+81fd13878406544d396fb0d907c9a41b ./dir-045/data.006
+8200bdc10480c0f32e2f83cd68515f7e ./dir-084/data.006
+820408ace3493250d98e8674b8187a91 ./dir-052/data.010
+821172e54e4afd62f705d226331c7fb5 ./dir-085/data.005
+826812a36105fcdf4d5500a6df0f08d2 ./dir-085/data.009
+82e160cb68fcd731ffd8c982eb669922 ./dir-034/data.000
+82f2bdcb4728e3ad2ad42688c776051f ./dir-006/data.008
+82fd0c7b72399922c915d56ff6966f09 ./dir-105/data.007
+83961ca3a7fdce7ec70696e2174653c7 ./dir-086/data.004
+83991d573bbd643493c94fe76fca77fc ./dir-006/data.007
+84455e279527682dc16597ccd64ba260 ./dir-103/data.010
+847ce91c4f37960bff5d34020b42ed52 ./dir-069/data.003
+847e94154fe39fcb40974901fd05b59d ./dir-057/data.009
+84a7ce38c6202fdb6b898df285446663 ./dir-106/data.008
+84aba2f561813a9bac0b4c06620152ae ./dir-051/data.001
+84c575bc39d6c0c91600a2dd9e453698 ./dir-078/data.002
+8512e02e44103f6767b334345dc73575 ./dir-049/data.003
+8520bdcd365dbbea56b48e181e892e6f ./dir-035/data.010
+85616c0da662f396d301cb1e6bdd7bd4 ./dir-013/data.004
+85ec836e67e6f2baeec01f665eb23e29 ./dir-095/data.003
+8603067c193e4a1c357801b381641dfb ./dir-092/data.003
+8611a66ab011033b3c906ba7b89e6c2d ./dir-037/data.000
+86378c2ea396585297f165531e6c7890 ./dir-025/data.000
+866430b5d3911c736376d7e660a81f00 ./dir-042/data.007
+86bc362ddc0cecdb48e4ef489efe9dd9 ./dir-005/data.008
+872a73bbce2c848a584e9382d62a7a8a ./dir-090/data.007
+874c93e05f4f32beff5051c4af86b8e4 ./dir-072/data.000
+876a2dd3d630d98143203693874f60d0 ./dir-091/data.000
+87a4a13a15b175b8b943cefdfe3e74e9 ./dir-091/data.008
+87dced824e8413e02cdbf539f8de061b ./dir-086/data.010
+87f5881d5c4a894085307aa10fdb105a ./dir-041/data.009
+87f8e92c8f1a1c8433398808abaf8165 ./dir-109/data.003
+881243716ba4e3c5ff3dd342c21c040b ./dir-082/data.003
+888da3d26656442aa1c19e2e477e59de ./dir-083/data.009
+88fa1bd87fa31d853e36bd503526227d ./dir-043/data.005
+89221d01c894262e97b15e7f5791e14d ./dir-014/data.001
+897ed3d984bf5f1368fabf49f3b0f12b ./dir-072/data.001
+89a503f5d1a1d9b94eadf14a3d7a7dd5 ./dir-045/data.000
+89e6081c35cdd3b86a836cff51971184 ./dir-065/data.009
+89f0acd75ca963beab0cabbffd628724 ./dir-091/data.001
+89f499b0da40af76802f0e03da77f6f6 ./dir-040/data.010
+8a010b14ef676d4304eef73b1f1f78e2 ./dir-004/data.007
+8a1283493ee60b494a58e6ace7452907 ./dir-089/data.009
+8a62a8742ed78023043d4eaec5b1e904 ./dir-098/data.002
+8a6b0c4f2c04e96d5315868996fcdda7 ./dir-108/data.004
+8a82ff49e710bd88450867a3f440b0da ./dir-075/data.009
+8a87b4e00c531cd577a39012397a0f87 ./dir-079/data.000
+8ab93bfdd9e62f3d6da0dbbc53ebffa1 ./dir-076/data.004
+8b09b7d62a3735681da36371657e14f3 ./dir-039/data.007
+8b93f04b52bd1fb0781f9d46ac7a290f ./dir-025/data.002
+8bd5650b0e7d4fbf6973214c2f507801 ./dir-047/data.002
+8bd5bfac106c68cffb3a098c4d157cf1 ./dir-063/data.010
+8c4ff8f780a98e39295f500278a1d887 ./dir-095/data.009
+8d1110f9accc804fc48bb2ee4af6bbf1 ./dir-110/data.009
+8d4261e80352070d2800f528932e37f4 ./dir-055/data.000
+8db08f66dee19a548b3e6eb3a1560980 ./dir-094/data.010
+8df75fe710ddf2316dd13f8065e4bf41 ./dir-087/data.001
+8df80279f2b2051d65bcf1f7a7dea7d9 ./dir-097/data.000
+8e58a42cf383173c0dcd6694402bc946 ./dir-014/data.003
+8e9933936e026159534f451cd0548d4b ./dir-029/data.001
+8e9e45218d17ae1aac57d24ba4417d9c ./dir-070/data.000
+8eab2b1d1ea2a5926ea5e276587543c4 ./dir-024/data.000
+8ee65e80da3449425d6c8cedc7be72fc ./dir-099/data.001
+8ef64875a9b9969869cb0f25a32fa0fd ./dir-039/data.004
+8f7b88afa2cfae0a337e1e330e9507aa ./dir-075/data.010
+8fd4eab768c4b5905e416725de423f55 ./dir-087/data.006
+8ffc927df86dd4c5e3966e9d0566e449 ./dir-014/data.000
+904a6d1b29b6b346d17fe5548b90cb6b ./dir-059/data.005
+904f618fe84960f4d495a2cbf494a179 ./dir-026/data.008
+90e643a0ead24f11449be2c13d739a53 ./dir-017/data.007
+91361fc94a17d6bd001d136355b85354 ./dir-024/data.008
+91850aa3831a821d375c416cf048d830 ./dir-012/data.010
+91f1499f9fc21e74879459600a825654 ./dir-103/data.000
+9207ec877c2fc0c887adbe81b97d7160 ./dir-023/data.009
+923fae1aad1f7f087f7d56be0a949abb ./dir-024/data.007
+924e608e16d18589a9932fc76ab7dad0 ./dir-090/data.005
+927968828d5c3065804466c0b654dfb4 ./dir-054/data.005
+9297c8e3209ad6c3e9eb803d5114753c ./dir-030/data.008
+92b3887179362557a9063adf548b2bd7 ./dir-081/data.010
+92f662f16c3768db5eeda3b60f4f0ade ./dir-022/data.003
+93b7c4d5373a364b8e3e26d077c980c7 ./dir-079/data.002
+93eb15b53e6879eba9e23c2f636e73a6 ./dir-061/data.000
+940bee1d330002cf234a338b63d07911 ./dir-068/data.001
+94172e924a7cdda629f202e115e86e96 ./dir-062/data.007
+94449220fca6a95893857a459eeeeec6 ./dir-000/data.005
+944a60c5820889ac6c204378ab8ec684 ./dir-065/data.010
+94611f97f30b3216ee306a97ee063285 ./dir-106/data.002
+95c4f44dbc662a1b80f231c03a1831a2 ./dir-031/data.005
+95f34bf560977aabf56b2374bfd801fc ./dir-031/data.000
+960b3433addbe419445506e4070e704c ./dir-031/data.004
+96fcc5df339caff14311a24a81134714 ./dir-042/data.006
+9706dd7a7ae979b858155dea8d54cb4e ./dir-033/data.008
+9873fcaaaf129d922cb29c10dd7665a1 ./dir-066/data.002
+989348123dcd08ee33c351e9156dd581 ./dir-005/data.009
+98af23ac4dc89133c749cb7968878859 ./dir-041/data.005
+98b72fa1526e20c16ab02546b656a925 ./dir-069/data.005
+99019e5feeacecd628b79b1eb7e161f7 ./dir-071/data.008
+9914beac14681493f7a7aa19a0f1bd8e ./dir-035/data.000
+993c2c1b64d4d9049df6d5d7cb56c4c7 ./dir-051/data.010
+999490bc33ec2a56ab230b6da8b1c1d1 ./dir-045/data.002
+99b70a3b5235ebfd1de6e096d54ab41f ./dir-083/data.008
+99b81b1024129991e19b010ee0f1299e ./dir-108/data.010
+9a0e0cb9a2f89fa8c888a7310b491aa3 ./dir-074/data.002
+9a2d63c1b47aa35a0d647d278d7b13b3 ./dir-020/data.005
+9a77b017cb714648bb338853717ad7e8 ./dir-059/data.006
+9af3052d79e03234d51790bca3f62abd ./dir-103/data.006
+9b1308d9a71f3d07df20c64ee9485215 ./dir-009/data.004
+9b243e7923207feeba44ef8967835213 ./dir-029/data.006
+9b25cc77ec3884b9b115f34a61aa6b1a ./dir-036/data.002
+9b4475d68d99b0d8b5b724b161ec3858 ./dir-079/data.003
+9b7bfa3dfb1223c084a732a460010ba6 ./dir-027/data.004
+9bd2393f4167104c602f462cff973c9f ./dir-058/data.005
+9c430e6db8f1530dfcab40de1ae320ee ./dir-058/data.000
+9c48ff0e9fc213cb2b483db230feb345 ./dir-022/data.009
+9c9a3eff549dee88a35c589ddd9d218b ./dir-018/data.001
+9ccd05ac96fe9192a6e3c9b864f51cc5 ./dir-043/data.002
+9cf33a7c891d6c7472267d57ca6cbc66 ./dir-046/data.002
+9d21fb30afaaef79aecb0da9815c347b ./dir-050/data.001
+9df2cd9f95fe997c8de62c5481d3c93f ./dir-034/data.003
+9e3b8430c7cb870803ec286c13718b02 ./dir-003/data.003
+9ea9c7d6b9fb3188ba0821136c228e7e ./dir-095/data.004
+9edf9a0560752008ceaaa4ae3ed5785e ./dir-071/data.005
+9f549656466f70f622c9df1c4ccc9521 ./dir-033/data.005
+9f80958140d65b5e0fb9a52167b1c422 ./dir-099/data.006
+9fa7f92a21ba500140aff17d8762a6aa ./dir-076/data.010
+9fd3b2804f593374def5a302a8b450c4 ./dir-074/data.005
+a0339de2c013f2d03f756a8144639897 ./dir-061/data.009
+a0a270ce379fd4d991d9ca728d63b36a ./dir-012/data.004
+a121b30fa0ad50b4e829a45879cc5edf ./dir-101/data.006
+a18b68c77ce90b9bdaca1ae55282337d ./dir-110/data.004
+a1e2cad8e97c82f3253442cff997bcf0 ./dir-080/data.000
+a238e250723b41101f07cfca17f11564 ./dir-045/data.008
+a246c5c6c1f823eb413af37d34b3bfff ./dir-077/data.008
+a29c24e21e6f607570f76e5625d3dc99 ./dir-032/data.003
+a341d8b152be8d341782db5ab1d7aabf ./dir-084/data.010
+a35ec86b31d73849147880eea4297fd0 ./dir-063/data.001
+a3891cd6855c346b07f6d1cd385c49b5 ./dir-094/data.004
+a3d9410efb0b1ff6600b3f627971fd16 ./dir-042/data.001
+a40587138ced04b20fb2527354606f2c ./dir-076/data.006
+a469810e4d1daa13f3e9b2e6f68b8d13 ./dir-004/data.006
+a4c13da90cbcf2f1624a4b2c2a9bb233 ./dir-109/data.008
+a4d4d492179eb2dca7ce30571c8ef3ba ./dir-007/data.004
+a52da0aa1a7acd8778fe6f40f0f8c0a9 ./dir-061/data.004
+a554b9068ef406ca372f9189304a82b7 ./dir-059/data.003
+a581e75f84f4ac6ad9e70e5b6bea53a4 ./dir-095/data.006
+a6055d0047d814a31f32e4185441d4a1 ./dir-007/data.007
+a60741e209b726fda4e969bf344f4aea ./dir-069/data.001
+a6395a9bcf53506cef1c6b62cc37f2d4 ./dir-003/data.000
+a65040955884d1c6e4d54ad9299a08e2 ./dir-062/data.001
+a65457550d23807b21c1afa93e9d21ef ./dir-035/data.009
+a66e2aef802f92385bf38b01ce8b0c80 ./dir-031/data.003
+a6952c83f6a406ed1baa2b1251bccfff ./dir-032/data.010
+a73aa26f62de99e97e691379ff64e838 ./dir-055/data.010
+a73ad6b847af80b66f4b37bf752e1097 ./dir-096/data.002
+a78d53e617d31d29d07a1bc8d463e456 ./dir-096/data.010
+a7903334dab2c9948a9460d94ffd27eb ./dir-082/data.002
+a7957cd1bfb38bb265c2d909bf4f0b21 ./dir-026/data.007
+a79df6152da4b78ece663f4b95d20cd3 ./dir-041/data.010
+a7aa7f0213d41db9b7a2d63c90f77772 ./dir-053/data.001
+a8111a4439244ed9de6e0c5944d7ffa1 ./dir-029/data.008
+a82b1e769c33fe701194d95fccf029c8 ./dir-010/data.004
+a8573ca8719910d3ea25839cf529d441 ./dir-091/data.009
+a85c6629da53d32a0ed0d3c8b0a26c72 ./dir-077/data.005
+a8a137df04b87ac736e158515ec71a42 ./dir-087/data.000
+a8a7ac87c426aa047b573b2dcbc4a0e6 ./dir-058/data.008
+a8c038a03f5bc2e6b52f02b8c5c52cb2 ./dir-054/data.009
+a8c4c1f924133ec0c8360901bcf6c199 ./dir-094/data.001
+a8e06c98144819d98e809492f08aa29c ./dir-035/data.001
+a93a49fd784c6ad90385ea022ecd2343 ./dir-045/data.010
+a95c46ac7047b8866dd9225ee4d648c6 ./dir-054/data.007
+a97f9c6c523f5479046377eca793ef53 ./dir-040/data.000
+a9a50ed2b165d548a1aca2e4b306d06b ./dir-048/data.006
+a9ba09df546930ba27663df0227b047a ./dir-002/data.003
+aa122bfd760ea4dc50aecf4f533c65aa ./dir-016/data.004
+aa3eb53c7a7a77690e996a5c0c1ccfae ./dir-024/data.010
+aa61a5d5f336b0b50e6b1d0796b890ae ./dir-088/data.009
+aa6fef63c3b2bbb9c17c9bd7308c5306 ./dir-036/data.004
+ab0f881f872563bd7846c3432ef7fce6 ./dir-003/data.010
+ab1ea1fe95b3af7db64aa8fa146760bc ./dir-093/data.008
+ab5acd6c59415e13dc791e3f300bccd2 ./dir-039/data.001
+abf175effd6c04dbedc04a31f009ef72 ./dir-038/data.004
+ac00bb6001e354a604063f1e31a8fe3c ./dir-028/data.000
+ac0eee49e473726deb56d47a823198d9 ./dir-086/data.009
+ac6e1f616fcab93bebea12c3dd1fefee ./dir-065/data.001
+ac8e596fdf6279e40fd0085bb0f34165 ./dir-084/data.005
+acc1ee7febd100ab23b6a479d3001825 ./dir-061/data.001
+acdbe2e496d6ae23c0f0dcfb0ea6faa8 ./dir-005/data.005
+ace9c8b5dd8e55dd13735c649c9d4af5 ./dir-099/data.008
+acf5cb2c7b1eb4390a60a1774bc4bab0 ./dir-090/data.009
+ad24114c9cb8f035ade2e862d9abafa8 ./dir-053/data.010
+ad320cdbfbfa5cf6c7b7a8c40a686193 ./dir-021/data.000
+ad5b2d548dbbfe6ab0e21437bb2e1f2d ./dir-019/data.001
+ade98adeb45ab19c7ce8d42782dc04a7 ./dir-087/data.005
+adefc5856d2a4595beeb1adcbd172221 ./dir-019/data.008
+ae81c953786cec82d0f1f9435b0d0c0d ./dir-056/data.009
+aebbeeb5e421cb8ad2e831a302742a6e ./dir-081/data.003
+aec4978b81441da9cba9008549fd58b4 ./dir-103/data.007
+aef628d7676ae21153a87e0f1ee0827d ./dir-053/data.000
+af9385b7625684c3d153854bfbc427fb ./dir-057/data.007
+af949e292c736dec64c29b35dbc94cf3 ./dir-104/data.008
+afb68dd90956c729c49211aa5cc974d3 ./dir-018/data.000
+afc5cceaed901e3baf26410e530b2112 ./dir-043/data.007
+afd05141be6f865a64e93908e05ab2e7 ./dir-070/data.004
+b050f6f0b55cafd91af8b5bfed9d7ef0 ./dir-106/data.010
+b06bca53b131304a89d152fa869e8d44 ./dir-006/data.006
+b07e07d9eb5b9765d5916910d3022a15 ./dir-041/data.003
+b099661d0dc7e777e94b88a768792aba ./dir-029/data.000
+b0f9fbc3889843756c2fbbdbc8e95c80 ./dir-052/data.007
+b141e0746d771b642b80789e2cee78b7 ./dir-055/data.005
+b15458b8d28b4ff277aa19d644c3f01e ./dir-078/data.004
+b19692bfcc887a0326ea0d9ff777b708 ./dir-082/data.008
+b1a0f67c22211b60eaa3ad043300ec39 ./dir-077/data.007
+b1cb07d7f4ab031522a1092cda009ea5 ./dir-024/data.009
+b228391e5b674f6e320f46c92a231a6d ./dir-013/data.001
+b231b16938922b62bc313c4dc791e89f ./dir-040/data.001
+b235e667fe06e2333d3d4f4cfeb11d8e ./dir-061/data.007
+b25e47b8e6084a771082a79d2964125d ./dir-042/data.008
+b2a5017e913a254b33c8fc51a0304745 ./dir-018/data.005
+b329dad6ad85c65a9222b8b261e86361 ./dir-008/data.008
+b33cd0e18b5a2384dc05a46f69b09059 ./dir-007/data.000
+b33f13624a7a7cfc50fef0456d74947a ./dir-097/data.005
+b367a0363b574a8455b841cada04accd ./dir-047/data.005
+b3c5ac9af4d7a04325182806453958ba ./dir-103/data.005
+b3dfc8b0fb7616287af6f7757207b6b8 ./dir-033/data.009
+b41d0afa4d57823e34d11e64bd6534a6 ./dir-087/data.009
+b445b7e624e7f1f7a5be6541a3a93a8a ./dir-043/data.009
+b46cf4a767a2d389800dda0374917427 ./dir-057/data.002
+b4c65166180c16e5437fbfe03af4b5d4 ./dir-015/data.004
+b4ccf8da14998cbe721c990de46c9edc ./dir-032/data.008
+b54b392b4cff92f8151d58cb92e688a0 ./dir-067/data.007
+b5934cbce1651c12cbb4e618e091f435 ./dir-102/data.001
+b5c1e57ffa0ceb0947170f610075f3b0 ./dir-043/data.001
+b5c8f4ca9d2cff5245b847e21c7df049 ./dir-050/data.002
+b61bf319c57da4eb4f121fd5c535760c ./dir-015/data.007
+b67fb5ee7b93061ade64929492590f5c ./dir-097/data.003
+b690077ebb25c2605ef0ee3372894cec ./dir-044/data.003
+b6c20ced9ffe0e91fbf7c4d71cc451bc ./dir-075/data.007
+b7538f880d91a07037290f98027ed306 ./dir-040/data.009
+b79f1bdb5bbb47e5d965e90137ddf26e ./dir-015/data.006
+b7b7cad8720d0f99fdbd7984caad8831 ./dir-061/data.006
+b7f56c9ebadcae8bd7b30e14bde0b5d2 ./dir-014/data.005
+b7f6d1118ee932c65f1e5a1931d6c8ff ./dir-014/data.009
+b84ac96cedb442fe235cffc8aa31199f ./dir-017/data.010
+b88c57aba26f8e1c085cfc7ae11888d0 ./dir-073/data.005
+b8bf171ed4f5f905cf8f7dab6a82a7d3 ./dir-021/data.002
+b8c336dd6ec7df5cb3f70ac79e169221 ./dir-108/data.005
+b8de847d8af8329206b516f825945439 ./dir-107/data.008
+b91053058f5cb868a65eb00ffc8c85db ./dir-018/data.007
+b983ec5e2696dec42e886e4aaf24c2dd ./dir-041/data.001
+ba18e6af480799cb61acf0e3984413d9 ./dir-023/data.001
+ba1c86b4c7519e9987fc62e04e14b93f ./dir-100/data.009
+ba3d3735db7501bb45a1bc37a1c90d91 ./dir-039/data.006
+ba5dff4458e438a37f7020a6997cb3eb ./dir-102/data.002
+ba71ea66885339efc504f581fa9d05fa ./dir-021/data.010
+bab7340230caffd9abe45a213cc7c94d ./dir-044/data.006
+bacf759099d3ce33cde104f0fd09404b ./dir-107/data.006
+bb3dc9d92e7c13191502f9ca2d9a2a46 ./dir-034/data.006
+bbf62db3e277893ae705b95df057c676 ./dir-046/data.001
+bc9a15ee53571be04ca1992754d407bc ./dir-037/data.001
+bcadd63e00fad4b7f09f32cf50c606f8 ./dir-078/data.010
+bce43f4bc32e3b431ce88e714ebde4e7 ./dir-078/data.007
+bd57ca2552a35196422eb254d0b6689b ./dir-010/data.007
+bd6d9661ef44ee94f3a576794ba2e972 ./dir-083/data.000
+bd85e8c8c0fd4ffd0a8abdd38675e4a7 ./dir-061/data.002
+bd8e9c392bc76c3d04ce23a376cf7941 ./dir-104/data.010
+bda8d53c45c521c5a7fcccf19e0fd4d2 ./dir-052/data.006
+bda946d7293089f487dbcf64564b7d79 ./dir-051/data.003
+bdd285092faf5a19c9a8b3fbd1162d64 ./dir-101/data.000
+bdf39b893567b3a6329a36dac48b516c ./dir-099/data.005
+bdf56ade34628d9a2e757b2bc6eb0e0c ./dir-013/data.007
+be507a830dc09b8c6d802d45647edb55 ./dir-104/data.002
+bf106a60eed1963cd3e58461c38cda87 ./dir-034/data.010
+bf21e493d536385c45df037b2e9cdb45 ./dir-089/data.000
+bfb0f4ba9a8588bec3cef4ede6a3bb57 ./dir-106/data.009
+bfda868277a6c6c0e25795ad73316074 ./dir-032/data.006
+bfdac2c988de39cec95a59f8a090636d ./dir-092/data.009
+c01bde4e9fd7733b6a915284ac12c4e8 ./dir-108/data.007
+c056ff72a9b187332dca300fbb81226e ./dir-026/data.003
+c0b2182de19c1695b71277d4fbfacc18 ./dir-052/data.001
+c0b94a538176aa6986cafa2e2fd8fe8c ./dir-045/data.004
+c0e16a96014a13995e537e8e39b0155e ./dir-052/data.002
+c1cf14e3812a8b9933911da679c49f8f ./dir-072/data.007
+c1ef0ec1fe3cc64d705d5499b6ee622e ./dir-110/data.001
+c2129120bc96703d28928d567bc5df58 ./dir-025/data.005
+c2429dbcf4929ef886b612147e8efbb3 ./dir-048/data.008
+c281f9a42b51ea7af93e5a88c1216120 ./dir-084/data.008
+c2c2abb9e870d144dde05ec6d7a979da ./dir-028/data.003
+c2f1846025293c2560ef44a2287ca948 ./dir-007/data.002
+c2f6da08e3e6c04fa04dbe47d9d91ead ./dir-085/data.001
+c35373fb9888c30272d2f574c0a9423b ./dir-079/data.010
+c372e35177aa3286cb5508590b191302 ./dir-051/data.005
+c3cc90dd33b6e5ed10081456f070c447 ./dir-085/data.002
+c47011f9488a8b8b5510aa96ef11fe57 ./dir-039/data.005
+c4958fb09eff0dd518b8a6997c6b71fc ./dir-017/data.009
+c53849249fad0defdf837bbddfa15489 ./dir-077/data.000
+c56775690b961bd0425dfd3d83dc4fa7 ./dir-066/data.000
+c5804311215078aacda89591c40bb4c2 ./dir-005/data.001
+c5b3227aa5484919dca0da947390419a ./dir-096/data.000
+c5caf8575038ceca91b140d9d0e3b24e ./dir-069/data.008
+c61fca3e05f9a8596ffed3f1512c8fd9 ./dir-024/data.001
+c672d7b16693c1848fb2331fd483ba5d ./dir-067/data.010
+c6c64e1a31b6593f2e35798cdfb9a67e ./dir-103/data.009
+c6e7741f3d499cb592e84ee501ae7c12 ./dir-056/data.000
+c734f450ed20e0e6ebe7e52ebeb40c27 ./dir-095/data.007
+c765acd0fddfdd8dd25c1e3b578ab8d2 ./dir-021/data.005
+c77831ccfd2a1c1842c475f2395e586c ./dir-004/data.010
+c78b32a24f2ffaa7a64a910871c7c2da ./dir-086/data.005
+c7aa9ec8f4a91d993ebc357f7c4d624c ./dir-012/data.001
+c7b6276dd9c53abc7824b172377fa566 ./dir-073/data.008
+c7bd7f81b81f3a3dffc9aa6d8903a5d4 ./dir-020/data.004
+c7d3088dbb470b1f8e659795e9ae001a ./dir-072/data.004
+c7db30e49010acd441ca071b159e8952 ./dir-093/data.005
+c87a70665e49298558c54e7b11150bdc ./dir-073/data.007
+c8c52776a8e9b3f43b55c112de4b3615 ./dir-055/data.001
+c90dd7ad53022e2ec777b401a2056794 ./dir-032/data.009
+c91679d9ccec60ec58fec6e5ecb71cde ./dir-001/data.004
+c9283d1db619943708a58a0d4e072490 ./dir-098/data.008
+c97100eaa0d5b50c2986ad2d7a4ab4c6 ./dir-105/data.002
+c9ca93c8b91e23c7d884985261c727bd ./dir-087/data.003
+c9f613e36059f6a2ebb21dcb5ac2e544 ./dir-098/data.005
+c9fb7d08b76286f726d349933453cdaa ./dir-102/data.000
+ca026e1fce7342eea8d59b5ef15ae1b9 ./dir-018/data.002
+ca1b624cfe0398448567862acb496721 ./dir-002/data.006
+ca5dd894a005c13702e966d04a58657a ./dir-074/data.007
+ca690ddf1d9488d3aae5de667b46e3c6 ./dir-071/data.009
+cabb2940fafe7ddf2643830f7542cc4f ./dir-070/data.008
+cacc98cea7525be670fba062e921386f ./dir-027/data.009
+caf930731a2124520be71f7bdbf5147f ./dir-030/data.005
+cb30fa3d22c32ff5b466a216d7e4174c ./dir-041/data.007
+cb353cc900a10c0020fcc40d20fb772c ./dir-050/data.003
+cba8191118e1823bb38f80321b98d7a5 ./dir-032/data.005
+cbf68202741c92a6a1a1345ba40dbc1c ./dir-019/data.004
+cbf9667ac181f5100cf3d7d179f07c26 ./dir-014/data.010
+cbfe24d7f1aef20746adda09edfa0b12 ./dir-072/data.008
+cc2567a2350fee4c5187a00bc0615d5e ./dir-054/data.004
+cc798615c0b02d53f6827240ee654f98 ./dir-064/data.010
+cc83d5b78aa34ff3d82957c7d69ee16a ./dir-013/data.003
+cca5c0bdd6d0eb18b7cdec2bcbb59754 ./dir-076/data.009
+cd6be4b1b25de9bff66ad8191eac7d4c ./dir-042/data.004
+cdcd5240e78c13357281153c4a41395e ./dir-087/data.004
+ce0dec612db80a92a176ce190b19a754 ./dir-070/data.001
+ce3392cd4d81de001fb397ba1655c0c8 ./dir-010/data.008
+ce58a0e50d16d75c45ce9447bc868b45 ./dir-018/data.009
+cf5fb8cbfe7235521fd7878d964badaf ./dir-022/data.004
+cfbe0f69b35baa9133b6355cd2bd6d08 ./dir-094/data.008
+cfc01799332549522a823077147adff0 ./dir-056/data.003
+cfde64c362835a72c8cedfe6477bda56 ./dir-079/data.008
+cff6f29c1536291d54498fb539c6681f ./dir-002/data.002
+d119223e0da07f005012bf6fef415b5c ./dir-082/data.007
+d16dbb40ad04cfe09048dfa56977ca3c ./dir-044/data.010
+d1dbfddf209f6a070bcf48353abdbd8b ./dir-040/data.003
+d1e5806bdc06ae2231b6f9b1a3fa1f0c ./dir-001/data.001
+d2229c5a61c0ccf7b139714484231a84 ./dir-001/data.009
+d244204b0e63d7c33b2dd3e5d2237748 ./dir-036/data.005
+d253d09ebe6df96b84565b3bf26e8bbc ./dir-030/data.002
+d2703dfcb228a9885d58eb6bf8c4318a ./dir-088/data.002
+d27c78713f252e2393ea942abcf4a4ac ./dir-048/data.007
+d2b6e1db7ab88233015e7d8fa5a6bb81 ./dir-021/data.009
+d2be814d2ae5f33723cc8794614483fb ./dir-008/data.005
+d2bf7c23465b9455a3ca27b50cc123ff ./dir-073/data.002
+d2c1b2b6ca16f4e4ff9750926aefacd4 ./dir-030/data.010
+d34362c0b86a934e848478067760c863 ./dir-021/data.008
+d34799931eeefa914727e0822c667fc5 ./dir-031/data.008
+d35a62ef99570c5ef5bb6291bbb36cc9 ./dir-101/data.003
+d39fdbbfcd1e15fda146977224126f8b ./dir-011/data.009
+d3eb0f4bb3b04b412907e453c82bb89f ./dir-035/data.007
+d40f0f333fc2f02a4266d363897f3334 ./dir-045/data.009
+d44fff6de24382f14b0426101e737354 ./dir-110/data.008
+d460686d5f374017452fe62e3f95b4d4 ./dir-105/data.008
+d461cc84eb03cc6db78e0720648d15e4 ./dir-061/data.003
+d463379d1811241dc56a4ccc9bf68dfc ./dir-076/data.005
+d46c8c7b7c0b54ebd046c6209d1f8afa ./dir-054/data.001
+d4d0fae354af6cdcc3202c9aa8ff2e9a ./dir-019/data.002
+d4f3040cabb5fbce85528e25f20cdeab ./dir-061/data.008
+d51be6c824d053d4e75720d6c8f515ff ./dir-001/data.002
+d540ef78ac829556f9933dd6579db7ae ./dir-091/data.003
+d54f188240ba83df0932dffbb36007fb ./dir-021/data.007
+d5b52c7c054a27ba342bc7e53bfe131e ./dir-081/data.009
+d5c7cd835ff19cb7c70e17d3134263bf ./dir-074/data.006
+d5fb3204d70d906a74b760999e5b266c ./dir-042/data.003
+d67493efc7f10910daab14016546a47b ./dir-059/data.000
+d68ed1553d2660f509612d8ddd8bcd62 ./dir-056/data.004
+d6f097c83e62877b98951bead0282dff ./dir-040/data.005
+d6ffc513ced7b0c1005dd11f10924b88 ./dir-055/data.008
+d7a69319272c26b24631cc0abb1521eb ./dir-053/data.005
+d7c2447c79f584c5a4b2ec525c586129 ./dir-031/data.002
+d7e552057b420dabf022aa6b8267946a ./dir-030/data.006
+d87260bd7bf4aa6ec556d77bf958a36d ./dir-060/data.001
+d87f53fa0fad9af8218a27fa1b69c070 ./dir-080/data.002
+d8f379df1febe77c86990017745edebc ./dir-034/data.005
+d945d5a070b995162293f1c77ff15527 ./dir-018/data.010
+d9ed49e99f63581ccafe915b76f3f96d ./dir-102/data.006
+d9fca3922fa0e01fd527f8db69589425 ./dir-088/data.001
+da09dfe4cb9bd06c37473254e857139c ./dir-076/data.003
+da18c9351bceb7f342718d50fb062544 ./dir-006/data.003
+da247fc6c9e1f840d7ef58e86bbed220 ./dir-019/data.000
+da2e4fd85a49ba6b0c7659c7abf99ad1 ./dir-089/data.005
+da57bb441160e6555b30c75915288bf5 ./dir-099/data.004
+da9218453d4c99672e702f0fd7b9c0c0 ./dir-014/data.004
+dab2bec775140e6203daa6ec122f049e ./dir-071/data.003
+dab99d3d9dfc9d5c9f0d525716153562 ./dir-075/data.003
+dadc6c41f41b3ff28706df675eaa96b5 ./dir-004/data.000
+daff2d6af09718e4825b22b98f00b7e9 ./dir-003/data.002
+daff63e9d1ae3734d069d0dc0305be72 ./dir-109/data.006
+db210b89b1004f031eadd847e5a0645b ./dir-043/data.008
+db2b0158388ee251970c6454c8cd9a97 ./dir-083/data.002
+db49a13bd7e2320210df3a006f7e9f6f ./dir-043/data.000
+dbdba9607f2d777e10ddc67f50950e2e ./dir-057/data.005
+dc09e8a41db214d248148efbf9605f95 ./dir-081/data.004
+dc0a7007675041b30317afaf44ee708e ./dir-064/data.001
+dc153ae714532e2d34f1b7ea044b6ff9 ./dir-096/data.008
+dc1f4da785733bbb2897d94ce78bc7bf ./dir-071/data.004
+dc2f22dae3a3d34a18929506cfc6f277 ./dir-029/data.003
+dc40f9a57dfacd21d602218898ab93e7 ./dir-058/data.004
+dc98758c6a9b39a6a3deae298d579c4e ./dir-042/data.009
+dccd562a4a98653a3fe96d77741ddbeb ./dir-104/data.000
+dce7e7c23b5cba5b96b11d5300e00afe ./dir-056/data.010
+dd006052a28552fa069abf5043462570 ./dir-049/data.009
+dd079bd050dd7b83ff6a8e2fb5773ed4 ./dir-049/data.010
+dd898a6ab8739c0cf16dd72034bc7668 ./dir-046/data.007
+dd8c233b992da6babbcbc9ce7879051b ./dir-097/data.007
+dd981304897bc330f690d2040aa1e53f ./dir-047/data.009
+ddcd7ea13cae57498088c1994619b3be ./dir-020/data.001
+de7fe274e770b4dabdeb867fa92a12bc ./dir-109/data.002
+de8a70eee3e508a723d3b5d2a9901316 ./dir-055/data.004
+deb960b1268705a472e3b46181ccebfe ./dir-042/data.010
+debf081b6824f07c5f6c22db6bc152a6 ./dir-086/data.002
+e003aaecb77df91f04990cd45eff2dbc ./dir-018/data.006
+e0596ce1f833197052bf72fa4e45ec28 ./dir-074/data.003
+e06e45e369dc2fa98b18c35268ef81c7 ./dir-037/data.010
+e0c2f2d375b3fa8c0c47a029bb18cc39 ./dir-009/data.000
+e0d48247fcfaa83930555edf8a6647df ./dir-041/data.004
+e0fe16303d99ec21e6dd13ac27d2b5fa ./dir-083/data.004
+e13007540bfd0bccdceda2f824ae3236 ./dir-092/data.010
+e131a83d7b706104b800bcba7e89a9f0 ./dir-009/data.008
+e1697901fb44ebccf438fb056c1cbb03 ./dir-007/data.003
+e1be15cad90b65114aff80e0f922e988 ./dir-034/data.008
+e2e34027afd431af2b5ef0bc815a1623 ./dir-100/data.002
+e32174de64d871b47b38ab874aa50a39 ./dir-102/data.009
+e33dcc8d7ffd1e0fccfb71c6715f6e56 ./dir-049/data.007
+e382a45df3024ad97563f9c13a195181 ./dir-105/data.005
+e3a104190d1c461ffdac462d66dee7ad ./dir-090/data.010
+e45c6752ab067602a7e9a71b9f9105e3 ./dir-045/data.003
+e492d468364872187d50021aa490c367 ./dir-092/data.007
+e49ff5b90e7e7704d5c829c41a859c86 ./dir-047/data.001
+e4a0756e3e92ac6b266c4b26dd43d27e ./dir-064/data.008
+e4a0dbb8ed00208e9a4d293d1c259989 ./dir-105/data.000
+e4e5e5b2642d322e1b9539bb021e1228 ./dir-064/data.009
+e4e9447cdd3ee6f4a753a9fa3bc1823f ./dir-037/data.004
+e5c21a2614775ebb798752e4dbba7f52 ./dir-107/data.001
+e5d87d25b8fdce6d6f30b52230761884 ./dir-070/data.009
+e5f2783896a89baeef0c5f68d0f47382 ./dir-110/data.007
+e6b75284cc6be5b80c57dc613373eec5 ./dir-086/data.000
+e6eecf8a727f4ee6852e2f62fb941b70 ./dir-039/data.002
+e7068f5918b4ce52344808f68ad0a085 ./dir-002/data.004
+e76d156c81829e84fe6688266fb52e37 ./dir-048/data.004
+e776126c38f075d4d2d3ea5e81e36e28 ./dir-094/data.005
+e783cb0562a591793f817a659e708470 ./dir-070/data.003
+e7bd906fce62b116f9088b58737b32c9 ./dir-091/data.006
+e7c710fe94754f90fb64f9e7e89351fc ./dir-069/data.010
+e81eff29b7729656cf2e06ec4a604185 ./dir-048/data.010
+e82627067c5c15970580acf5939be216 ./dir-030/data.000
+e845537c1977f66004c079beb9af5d74 ./dir-067/data.002
+e8649a3c6600e3624f6f2c1ab36bd5fc ./dir-036/data.009
+e88289300b2f2dbcca4c69b96abb31e3 ./dir-060/data.006
+e92f7f1b0a07ac60b05786d5725967ae ./dir-005/data.003
+e9d61885e0bbe1341a7789ecba127ab3 ./dir-020/data.003
+e9d9fb125da6f7296c0ee69235fdc55d ./dir-040/data.006
+e9ebdcc7fc5ce3ec40ec2c22b56a0c5e ./dir-057/data.003
+e9eeeaccd7c260f610226d199dcc1133 ./dir-001/data.003
+e9fe2dd437c71180558c00664d96936e ./dir-057/data.000
+ea2d20b5948278f55f8700bb7cfb525e ./dir-094/data.000
+ea3a40a6ed7c5c7badcddc829240451f ./dir-000/data.008
+ea60b89846ffe9098f376100a15fd623 ./dir-019/data.006
+eab0df7e354bdd20324ff75aa354c67e ./dir-036/data.010
+eac4ad9e6789702729f14d480254df13 ./dir-078/data.006
+eae751b2f5890a8a2e66842500875489 ./dir-064/data.007
+eb213def8582bf9c391032ab810224a4 ./dir-030/data.004
+eb2239dc1c3284a743ec2480b66a440a ./dir-095/data.005
+eb39335474a5f114496e45855d65965b ./dir-030/data.009
+eb49c652a3a9b67f48bed5f453c513fb ./dir-091/data.005
+eb8ab8adf1fd8e2e81eceaa2e405becf ./dir-015/data.001
+ec111bdd9562902ed047cddc4e291e0f ./dir-011/data.002
+ed6738198877ba672174a23b39aaf0ca ./dir-050/data.008
+ed87c44257e44baa0486784489fe1eb7 ./dir-093/data.003
+edae2f977e8885aabcafea140e4ea445 ./dir-103/data.002
+ee03c3c5c80c543bf52029381455e0da ./dir-093/data.010
+ee90d8d8a67c5f06de9a35a505bd4d82 ./dir-005/data.010
+ee98acc4ba7f594a49b86364edcf4312 ./dir-047/data.006
+ef45a01355157d5c4a8ac9783d30b000 ./dir-099/data.010
+efe6dab69eb3503886b623ab24ae32e0 ./dir-033/data.006
+f0230c53db8fb9ff1a66eec12b28d3c0 ./dir-029/data.010
+f038a202cce579e29ed75ef2f8ec9205 ./dir-077/data.009
+f067ef339dbfa373842d6beb5d4c5839 ./dir-006/data.000
+f06af3887a662caed220e9fe98c12f6f ./dir-007/data.008
+f09311e30b55f3199d6b5891cf717bb5 ./dir-080/data.004
+f0b69d2184753e5341681ddf9bc0df32 ./dir-037/data.008
+f0db3f70a37f660ce31bfe0600b80b49 ./dir-087/data.002
+f127bead521c0da62f4a607ebd6627b6 ./dir-057/data.006
+f18ba5b02bbf03abe12fca65564dcb95 ./dir-108/data.008
+f1bf04664350afb4ce5a5f0dd245d2c5 ./dir-038/data.001
+f1d367dea7bb98a9bddd4f5cc7a9798e ./dir-065/data.004
+f1e646f46c36449c3412aed4cb164968 ./dir-110/data.006
+f214ca488221c804a5557a9b809afd65 ./dir-045/data.007
+f237d0598589a542815fbf5ef59751cc ./dir-054/data.010
+f2577aa82791ecbf27b9085a22c23ff9 ./dir-059/data.002
+f2616b2ea0b3ce8565e568c0ed8efacc ./dir-079/data.009
+f2cc443362b156a2228f4a69fe4102bf ./dir-084/data.003
+f2df3b5bbcb225df895cdac384145d84 ./dir-020/data.000
+f329736caf4ce7d80213defa11f3c65a ./dir-025/data.003
+f34fd4ff678b218e8780724d3bd2a420 ./dir-029/data.004
+f39243bebe1bbc71e85de2b3d8d7122a ./dir-107/data.003
+f49b053513974d593dcc2c461c96e2a0 ./dir-028/data.010
+f4c0d20fecc04dbf7a204e105f836893 ./dir-101/data.005
+f4cfb0beced90e2adf96d3f2fa2ba465 ./dir-034/data.007
+f4d745c385f037aafef08310fb194a2c ./dir-066/data.004
+f5084ae9ded9833ee8c63281f5ed1641 ./dir-058/data.002
+f519dd2fcfc3047101faf90bcf18654d ./dir-049/data.005
+f5258302f6ab8a38a7b6b05b10d35097 ./dir-055/data.009
+f5323d4d915d67f9d777d52374cd27c0 ./dir-016/data.007
+f5e7738a9f2c3d02929d009724336023 ./dir-067/data.005
+f62d0c3b799b25730fb6a43d0014f220 ./dir-022/data.010
+f6abfdb63fb4c981814704fedd4b18d0 ./dir-058/data.010
+f6f7d42879db7621ad209d45bd9d6a0a ./dir-013/data.005
+f70fa856aa1740b7ed824a5439665b0f ./dir-062/data.010
+f72df01f8f290bc6e05f972db7a01f90 ./dir-048/data.002
+f73a183eab3ffe4070277b9e7f23da56 ./dir-037/data.002
+f7f7b2f1b136a01d8a9b3f1f6c3f9e88 ./dir-025/data.008
+f81c088c701a88d9b396e30f98776064 ./dir-033/data.010
+f897e7735ef1808a5a7bf6129cf0e0c9 ./dir-092/data.005
+f8a696717bb5a5adecf00ddd097d8d0c ./dir-091/data.007
+f8e2186f04d4cb6801acc2c0a68d810a ./dir-049/data.001
+f8f774997c9388bb7a6d593e6224e998 ./dir-104/data.007
+f90e54c08be11e4aacdf3c02dff8ee1b ./dir-083/data.003
+f9111bb9930d80cea7b7db64f092d597 ./dir-068/data.008
+f969de462dd1b58a64bc75adbe73016d ./dir-045/data.001
+f984f85a77d57c6bd3b366771fd98ea4 ./dir-063/data.005
+f9a468508fd7e6db5a77e3101daf22b3 ./dir-100/data.008
+f9c8e6c3a0c4a938ceb033f151e541ea ./dir-077/data.003
+f9f909982ea33e776b985ee5aca5378a ./dir-052/data.005
+fa411f1f9f559b4ee3dd109c2e59b106 ./dir-081/data.006
+faa2bbf820f78b39454c4feebe08a3c5 ./dir-004/data.001
+fab4fefd2d8eb77c4f36c89959ae7980 ./dir-073/data.003
+fb2388d03c2723f15728bda9c1dc2762 ./dir-024/data.006
+fb524e3bb758f32e7d34e538a5e40560 ./dir-019/data.010
+fb539fb081f4a95ac5b5b5e11343e2b7 ./dir-052/data.008
+fb7dd48f35c128212b78551cceda244c ./dir-038/data.005
+fb8aa16acb9f7292384e265585f4dd37 ./dir-055/data.003
+fbd1db4da87c1ed8082d9cf94fc424aa ./dir-027/data.003
+fc04e84bb6c640f890854fc5775b9d8a ./dir-034/data.004
+fc21a043990d03703003a506b0662821 ./dir-005/data.000
+fc2a45f10e52e18918d25d640f751457 ./dir-099/data.007
+fc2e476a6d1b7ce71b51bd43816891a3 ./dir-096/data.007
+fc304616f24322e26a4666c0e7181e7e ./dir-006/data.002
+fc906d13df56dfc5580af823ca1af610 ./dir-077/data.006
+fc97b066c0af8f2fa40f2bc91cae3b56 ./dir-063/data.009
+fc9bd58f8f126a8406987360b64a91fe ./dir-004/data.008
+fcbaf30100050cc1bb990e98d30605b9 ./dir-006/data.010
+fcd7a6b7924260b997ae603eadfae59f ./dir-090/data.000
+fd1decb314835cbb95d4aa6e7bdf3359 ./dir-075/data.000
+fd38d0ddd60429b3c7071867a8fcfbc0 ./dir-047/data.008
+fd3e4c487cae1c68f05ea2dc81cba74c ./dir-055/data.007
+fd63004ae886ce8e520756c6eff04835 ./dir-009/data.003
+fe086b79a2c29f13437c1346a8cb53f4 ./dir-009/data.005
+fe3505df1642e9d306269e2e07ab1089 ./dir-064/data.000
+fe4f310b776e309503f523b8a26d3ba8 ./dir-085/data.010
+fe68ec6607c15f0ceabada101b382b0e ./dir-069/data.004
+fe7751a5487172303de648672602c28a ./dir-076/data.002
+feb8b69e6224a7ea72e881e3f4a45b32 ./dir-028/data.009
+fed540a11f00f1f80470be7b491fc45c ./dir-108/data.002
+fed5e00dc94ed751061194eccf2c77e2 ./dir-050/data.007
+ff10c7b37d705bc48a1fdee62ea7661f ./dir-079/data.006
+ff13d49326ff8759119e78959de628e9 ./dir-048/data.003
+ff216f0f2e540e9057874b0cb4fdcdb1 ./dir-100/data.007
+ff92bf04634e26a2980ffb6ad47f9c05 ./dir-026/data.006
+ffe078de3583025c4780c8f4305772c3 ./dir-085/data.004
+fff6015c3b8f791f4027791ac0b5f593 ./dir-063/data.004
+
+umount the image
diff --git a/tests/expected/cramfs/mkfs-endianness b/tests/expected/cramfs/mkfs-endianness
new file mode 100644
index 0000000..9cf394b
--- /dev/null
+++ b/tests/expected/cramfs/mkfs-endianness
@@ -0,0 +1,80 @@
+create little endian
+00000000 45 3d cd 28 00 10 00 00 03 00 00 00 00 00 00 00 |E=.(............|
+00000010 43 6f 6d 70 72 65 73 73 65 64 20 52 4f 4d 46 53 |Compressed ROMFS|
+00000020 9b d3 39 ca 00 00 00 00 05 00 00 00 05 00 00 00 |..9.............|
+00000030 43 6f 6d 70 72 65 73 73 65 64 00 00 00 00 00 00 |Compressed......|
+00000040 ed 41 00 00 10 00 00 00 c0 04 00 00 ed 41 00 00 |.A...........A..|
+00000050 10 00 00 00 c1 05 00 00 64 69 72 41 ed 41 00 00 |........dirA.A..|
+00000060 20 00 00 00 c1 06 00 00 64 69 72 42 a4 81 00 00 | .......dirB....|
+00000070 00 02 00 00 c1 08 00 00 61 00 00 00 a4 81 00 00 |........a.......|
+00000080 00 3c 00 00 c1 0c 00 00 62 00 00 00 cb 00 00 00 |.<......b.......|
+00000090 78 9c 0b 49 2d 2e c9 cc 4b 57 48 2e 4a cc 4d 2b |x..I-...KWH.J.M+|
+000000a0 56 30 34 32 36 31 35 33 b7 b0 34 50 70 cd 4b c9 |V0426153..4Pp.K.|
+000000b0 4c cc cb 4b 2d 2e 56 48 ce 48 4d ce c6 27 c7 15 |L..K-.VH.HM..'..|
+000000c0 32 6a cc d0 34 06 00 37 c8 a2 81 00 33 01 00 00 |2j..4..7....3...|
+000000d0 8d 01 00 00 e7 01 00 00 38 02 00 00 78 9c ed cc |........8...x...|
+000000e0 bb 0d 80 30 0c 40 c1 9e 29 3c 02 ff cf 00 6c 90 |...0.@..)<....l.|
+000000f0 05 22 27 40 84 70 81 d9 5f 6c 40 4d f1 ea 93 2e |."'@.p.._l@M....|
+00000100 64 7f 8a ed a2 77 bc 36 97 a6 ed fa 61 9c e6 a5 |d....w.6....a...|
+00000110 96 d5 52 89 66 d9 5d f4 c8 7a 7e 59 15 68 68 68 |..R.f.]..z~Y.hhh|
+00000120 68 68 68 68 68 68 68 68 68 68 68 68 fe db bc 1f |hhhhhhhhhhhh....|
+00000130 dd 0d 28 78 9c ed cc bb 0d 80 30 0c 00 d1 9e 29 |..(x......0....)|
+00000140 3c 02 ff c0 00 6c c0 02 51 30 10 21 5c 60 f6 17 |<....l..Q0.!\`..|
+00000150 0b 20 6a 8a ab ef f4 c2 30 96 32 d9 92 a3 99 ba |. j.....0.2.....|
+00000160 4b da 35 1d c5 ac 7e 67 db 24 5d f1 5c 5d aa ba |K.5...~g.$].\]..|
+00000170 69 bb 3e bc ad 5f 0d 06 06 06 06 06 06 06 06 06 |i.>.._..........|
+00000180 06 06 06 06 06 e6 1f cc 03 76 3d 0d 1a 78 9c ed |.........v=..x..|
+00000190 cc bb 0d 80 30 0c 00 d1 9e 29 3c 02 ff cf 00 6c |....0....)<....l|
+000001a0 c0 02 91 09 10 21 5c 60 f6 17 35 0d 75 8a ab ef |.....!\`..5.u...|
+000001b0 f4 6c 4d c1 2c ba 8b 1e 51 4f a9 ea a6 ed fa 61 |.lM.,...QO.....a|
+000001c0 9c 4a 99 ed db 8a 25 fa 93 6c 17 bd c3 b5 f9 df |.J....%..l......|
+000001d0 0a 03 03 03 03 03 03 03 03 03 03 03 03 03 03 93 |................|
+000001e0 13 f3 02 b1 b2 0e 4d 78 9c cb 4b 57 48 2e 4a cc |......Mx..KWH.J.|
+000001f0 4d 2b 56 30 34 32 36 31 35 33 b7 b0 34 50 70 cd |M+V0426153..4Pp.|
+00000200 4b c9 4c cc cb 4b 2d 2e 56 48 ce 48 4d ce c6 27 |K.L..K-.VH.HM..'|
+00000210 c7 15 92 5a 5c 92 99 37 6a cc a8 31 a3 c6 8c 1a |...Z\..7j..1....|
+00000220 33 6a cc a8 31 a3 c6 8c 1a 33 6a cc a8 31 a3 c6 |3j..1....3j..1..|
+00000230 0c 7e 63 00 d1 5c c9 6a 00 00 00 00 00 00 00 00 |.~c..\.j........|
+00000240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001000
+create big endian
+00000000 28 cd 3d 45 00 00 10 00 00 00 00 03 00 00 00 00 |(.=E............|
+00000010 43 6f 6d 70 72 65 73 73 65 64 20 52 4f 4d 46 53 |Compressed ROMFS|
+00000020 d3 50 cc 02 00 00 00 00 00 00 00 05 00 00 00 05 |.P..............|
+00000030 43 6f 6d 70 72 65 73 73 65 64 00 00 00 00 00 00 |Compressed......|
+00000040 41 ed 00 00 00 00 10 00 00 00 00 13 41 ed 00 00 |A...........A...|
+00000050 00 00 10 00 04 00 00 17 64 69 72 41 41 ed 00 00 |........dirAA...|
+00000060 00 00 20 00 04 00 00 1b 64 69 72 42 81 a4 00 00 |.. .....dirB....|
+00000070 00 02 00 00 04 00 00 23 61 00 00 00 81 a4 00 00 |.......#a.......|
+00000080 00 3c 00 00 04 00 00 33 62 00 00 00 00 00 00 cb |.<.....3b.......|
+00000090 78 9c 0b 49 2d 2e c9 cc 4b 57 48 2e 4a cc 4d 2b |x..I-...KWH.J.M+|
+000000a0 56 30 34 32 36 31 35 33 b7 b0 34 50 70 cd 4b c9 |V0426153..4Pp.K.|
+000000b0 4c cc cb 4b 2d 2e 56 48 ce 48 4d ce c6 27 c7 15 |L..K-.VH.HM..'..|
+000000c0 32 6a cc d0 34 06 00 37 c8 a2 81 00 00 00 01 33 |2j..4..7.......3|
+000000d0 00 00 01 8d 00 00 01 e7 00 00 02 38 78 9c ed cc |...........8x...|
+000000e0 bb 0d 80 30 0c 40 c1 9e 29 3c 02 ff cf 00 6c 90 |...0.@..)<....l.|
+000000f0 05 22 27 40 84 70 81 d9 5f 6c 40 4d f1 ea 93 2e |."'@.p.._l@M....|
+00000100 64 7f 8a ed a2 77 bc 36 97 a6 ed fa 61 9c e6 a5 |d....w.6....a...|
+00000110 96 d5 52 89 66 d9 5d f4 c8 7a 7e 59 15 68 68 68 |..R.f.]..z~Y.hhh|
+00000120 68 68 68 68 68 68 68 68 68 68 68 68 fe db bc 1f |hhhhhhhhhhhh....|
+00000130 dd 0d 28 78 9c ed cc bb 0d 80 30 0c 00 d1 9e 29 |..(x......0....)|
+00000140 3c 02 ff c0 00 6c c0 02 51 30 10 21 5c 60 f6 17 |<....l..Q0.!\`..|
+00000150 0b 20 6a 8a ab ef f4 c2 30 96 32 d9 92 a3 99 ba |. j.....0.2.....|
+00000160 4b da 35 1d c5 ac 7e 67 db 24 5d f1 5c 5d aa ba |K.5...~g.$].\]..|
+00000170 69 bb 3e bc ad 5f 0d 06 06 06 06 06 06 06 06 06 |i.>.._..........|
+00000180 06 06 06 06 06 e6 1f cc 03 76 3d 0d 1a 78 9c ed |.........v=..x..|
+00000190 cc bb 0d 80 30 0c 00 d1 9e 29 3c 02 ff cf 00 6c |....0....)<....l|
+000001a0 c0 02 91 09 10 21 5c 60 f6 17 35 0d 75 8a ab ef |.....!\`..5.u...|
+000001b0 f4 6c 4d c1 2c ba 8b 1e 51 4f a9 ea a6 ed fa 61 |.lM.,...QO.....a|
+000001c0 9c 4a 99 ed db 8a 25 fa 93 6c 17 bd c3 b5 f9 df |.J....%..l......|
+000001d0 0a 03 03 03 03 03 03 03 03 03 03 03 03 03 03 93 |................|
+000001e0 13 f3 02 b1 b2 0e 4d 78 9c cb 4b 57 48 2e 4a cc |......Mx..KWH.J.|
+000001f0 4d 2b 56 30 34 32 36 31 35 33 b7 b0 34 50 70 cd |M+V0426153..4Pp.|
+00000200 4b c9 4c cc cb 4b 2d 2e 56 48 ce 48 4d ce c6 27 |K.L..K-.VH.HM..'|
+00000210 c7 15 92 5a 5c 92 99 37 6a cc a8 31 a3 c6 8c 1a |...Z\..7j..1....|
+00000220 33 6a cc a8 31 a3 c6 8c 1a 33 6a cc a8 31 a3 c6 |3j..1....3j..1..|
+00000230 0c 7e 63 00 d1 5c c9 6a 00 00 00 00 00 00 00 00 |.~c..\.j........|
+00000240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001000
diff --git a/tests/expected/dmesg/colors b/tests/expected/dmesg/colors
new file mode 100644
index 0000000..40aca73
--- /dev/null
+++ b/tests/expected/dmesg/colors
@@ -0,0 +1,105 @@
+kern :emerg : [ 0.000000] example[0]
+kern :alert : [ 1.000000] example[1]
+kern :crit : [ 8.000000] example[2]
+kern :err : [ 27.000000] example[3]
+kern :warn : [ 64.000000] example[4]
+kern :notice: [ 125.000000] example[5]
+kern :info : [ 216.000000] example[6]
+kern :debug : [ 343.000000] example[7]
+user :emerg : [ 512.000000] example[8]
+user :alert : [ 729.000000] example[9]
+user :crit : [ 1000.000000] example[10]
+user :err : [ 1331.000000] example[11]
+user :warn : [ 1728.000000] example[12]
+user :notice: [ 2197.000000] example[13]
+user :info : [ 2744.000000] example[14]
+user :debug : [ 3375.000000] example[15]
+mail :emerg : [ 4096.000000] example[16]
+mail :alert : [ 4913.000000] example[17]
+mail :crit : [ 5832.000000] example[18]
+mail :err : [ 6859.000000] example[19]
+mail :warn : [ 8000.000000] example[20]
+mail :notice: [ 9261.000000] example[21]
+mail :info : [10648.000000] example[22]
+mail :debug : [12167.000000] example[23]
+daemon:emerg : [13824.000000] example[24]
+daemon:alert : [15625.000000] example[25]
+daemon:crit : [17576.000000] example[26]
+daemon:err : [19683.000000] example[27]
+daemon:warn : [21952.000000] example[28]
+daemon:notice: [24389.000000] example[29]
+daemon:info : [27000.000000] example[30]
+daemon:debug : [29791.000000] example[31]
+auth :emerg : [32768.000000] example[32]
+auth :alert : [35937.000000] example[33]
+auth :crit : [39304.000000] example[34]
+auth :err : [42875.000000] example[35]
+auth :warn : [46656.000000] example[36]
+auth :notice: [50653.000000] example[37]
+auth :info : [54872.000000] example[38]
+auth :debug : [59319.000000] example[39]
+syslog:emerg : [64000.000000] example[40]
+syslog:alert : [68921.000000] example[41]
+syslog:crit : [74088.000000] example[42]
+syslog:err : [79507.000000] example[43]
+syslog:warn : [85184.000000] example[44]
+syslog:notice: [91125.000000] example[45]
+syslog:info : [97336.000000] example[46]
+syslog:debug : [103823.000000] example[47]
+lpr :emerg : [110592.000000] example[48]
+lpr :alert : [117649.000000] example[49]
+lpr :crit : [125000.000000] example[50]
+lpr :err : [132651.000000] example[51]
+lpr :warn : [140608.000000] example[52]
+lpr :notice: [148877.000000] example[53]
+lpr :info : [157464.000000] example[54]
+lpr :debug : [166375.000000] example[55]
+news :emerg : [175616.000000] example[56]
+news :alert : [185193.000000] example[57]
+news :crit : [195112.000000] example[58]
+news :err : [205379.000000] example[59]
+news :warn : [216000.000000] example[60]
+news :notice: [226981.000000] example[61]
+news :info : [238328.000000] example[62]
+news :debug : [250047.000000] example[63]
+uucp :emerg : [262144.000000] example[64]
+uucp :alert : [274625.000000] example[65]
+uucp :crit : [287496.000000] example[66]
+uucp :err : [300763.000000] example[67]
+uucp :warn : [314432.000000] example[68]
+uucp :notice: [328509.000000] example[69]
+uucp :info : [343000.000000] example[70]
+uucp :debug : [357911.000000] example[71]
+cron :emerg : [373248.000000] example[72]
+cron :alert : [389017.000000] example[73]
+cron :crit : [405224.000000] example[74]
+cron :err : [421875.000000] example[75]
+cron :warn : [438976.000000] example[76]
+cron :notice: [456533.000000] example[77]
+cron :info : [474552.000000] example[78]
+cron :debug : [493039.000000] example[79]
+authpriv:emerg : [512000.000000] example[80]
+authpriv:alert : [531441.000000] example[81]
+authpriv:crit : [551368.000000] example[82]
+authpriv:err : [571787.000000] example[83]
+authpriv:warn : [592704.000000] example[84]
+authpriv:notice: [614125.000000] example[85]
+authpriv:info : [636056.000000] example[86]
+authpriv:debug : [658503.000000] example[87]
+ftp :emerg : [681472.000000] example[88]
+ftp :alert : [704969.000000] example[89]
+ftp :crit : [729000.000000] example[90]
+ftp :err : [753571.000000] example[91]
+ftp :warn : [778688.000000] example[92]
+ftp :notice: [804357.000000] example[93]
+ftp :info : [830584.000000] example[94]
+ftp :debug : [857375.000000] example[95]
+[884736.000000] example[96]
+[912673.000000] example[97]
+[941192.000000] example[98]
+[970299.000000] example[99]
+[1000000.000000] example[100]
+[1030301.000000] example[101]
+[1061208.000000] example[102]
+[1092727.000000] example[103]
+[1124864.000000] example[104]
diff --git a/tests/expected/dmesg/console-levels b/tests/expected/dmesg/console-levels
new file mode 100644
index 0000000..43615f8
--- /dev/null
+++ b/tests/expected/dmesg/console-levels
@@ -0,0 +1,248 @@
+[ 0.000000] example[0]
+[ 512.000000] example[8]
+[ 4096.000000] example[16]
+[13824.000000] example[24]
+[32768.000000] example[32]
+[64000.000000] example[40]
+[110592.000000] example[48]
+[175616.000000] example[56]
+[262144.000000] example[64]
+[373248.000000] example[72]
+[512000.000000] example[80]
+[681472.000000] example[88]
+[884736.000000] example[96]
+[ 1.000000] example[1]
+[ 729.000000] example[9]
+[ 4913.000000] example[17]
+[15625.000000] example[25]
+[35937.000000] example[33]
+[68921.000000] example[41]
+[117649.000000] example[49]
+[185193.000000] example[57]
+[274625.000000] example[65]
+[389017.000000] example[73]
+[531441.000000] example[81]
+[704969.000000] example[89]
+[912673.000000] example[97]
+[ 8.000000] example[2]
+[ 1000.000000] example[10]
+[ 5832.000000] example[18]
+[17576.000000] example[26]
+[39304.000000] example[34]
+[74088.000000] example[42]
+[125000.000000] example[50]
+[195112.000000] example[58]
+[287496.000000] example[66]
+[405224.000000] example[74]
+[551368.000000] example[82]
+[729000.000000] example[90]
+[941192.000000] example[98]
+[ 27.000000] example[3]
+[ 1331.000000] example[11]
+[ 6859.000000] example[19]
+[19683.000000] example[27]
+[42875.000000] example[35]
+[79507.000000] example[43]
+[132651.000000] example[51]
+[205379.000000] example[59]
+[300763.000000] example[67]
+[421875.000000] example[75]
+[571787.000000] example[83]
+[753571.000000] example[91]
+[970299.000000] example[99]
+[ 64.000000] example[4]
+[ 1728.000000] example[12]
+[ 8000.000000] example[20]
+[21952.000000] example[28]
+[46656.000000] example[36]
+[85184.000000] example[44]
+[140608.000000] example[52]
+[216000.000000] example[60]
+[314432.000000] example[68]
+[438976.000000] example[76]
+[592704.000000] example[84]
+[778688.000000] example[92]
+[1000000.000000] example[100]
+[ 125.000000] example[5]
+[ 2197.000000] example[13]
+[ 9261.000000] example[21]
+[24389.000000] example[29]
+[50653.000000] example[37]
+[91125.000000] example[45]
+[148877.000000] example[53]
+[226981.000000] example[61]
+[328509.000000] example[69]
+[456533.000000] example[77]
+[614125.000000] example[85]
+[804357.000000] example[93]
+[1030301.000000] example[101]
+[ 216.000000] example[6]
+[ 2744.000000] example[14]
+[10648.000000] example[22]
+[27000.000000] example[30]
+[54872.000000] example[38]
+[97336.000000] example[46]
+[157464.000000] example[54]
+[238328.000000] example[62]
+[343000.000000] example[70]
+[474552.000000] example[78]
+[636056.000000] example[86]
+[830584.000000] example[94]
+[1061208.000000] example[102]
+[ 343.000000] example[7]
+[ 3375.000000] example[15]
+[12167.000000] example[23]
+[29791.000000] example[31]
+[59319.000000] example[39]
+[103823.000000] example[47]
+[166375.000000] example[55]
+[250047.000000] example[63]
+[357911.000000] example[71]
+[493039.000000] example[79]
+[658503.000000] example[87]
+[857375.000000] example[95]
+[1092727.000000] example[103]
+[ 0.000000] example[0]
+[ 1.000000] example[1]
+[ 8.000000] example[2]
+[ 27.000000] example[3]
+[ 512.000000] example[8]
+[ 729.000000] example[9]
+[ 1000.000000] example[10]
+[ 1331.000000] example[11]
+[ 4096.000000] example[16]
+[ 4913.000000] example[17]
+[ 5832.000000] example[18]
+[ 6859.000000] example[19]
+[13824.000000] example[24]
+[15625.000000] example[25]
+[17576.000000] example[26]
+[19683.000000] example[27]
+[32768.000000] example[32]
+[35937.000000] example[33]
+[39304.000000] example[34]
+[42875.000000] example[35]
+[64000.000000] example[40]
+[68921.000000] example[41]
+[74088.000000] example[42]
+[79507.000000] example[43]
+[110592.000000] example[48]
+[117649.000000] example[49]
+[125000.000000] example[50]
+[132651.000000] example[51]
+[175616.000000] example[56]
+[185193.000000] example[57]
+[195112.000000] example[58]
+[205379.000000] example[59]
+[262144.000000] example[64]
+[274625.000000] example[65]
+[287496.000000] example[66]
+[300763.000000] example[67]
+[373248.000000] example[72]
+[389017.000000] example[73]
+[405224.000000] example[74]
+[421875.000000] example[75]
+[512000.000000] example[80]
+[531441.000000] example[81]
+[551368.000000] example[82]
+[571787.000000] example[83]
+[681472.000000] example[88]
+[704969.000000] example[89]
+[729000.000000] example[90]
+[753571.000000] example[91]
+[884736.000000] example[96]
+[912673.000000] example[97]
+[941192.000000] example[98]
+[970299.000000] example[99]
+[ 0.000000] example[0]
+[ 512.000000] example[8]
+[ 4096.000000] example[16]
+[13824.000000] example[24]
+[32768.000000] example[32]
+[64000.000000] example[40]
+[110592.000000] example[48]
+[175616.000000] example[56]
+[262144.000000] example[64]
+[373248.000000] example[72]
+[512000.000000] example[80]
+[681472.000000] example[88]
+[884736.000000] example[96]
+[ 27.000000] example[3]
+[ 64.000000] example[4]
+[ 125.000000] example[5]
+[ 216.000000] example[6]
+[ 343.000000] example[7]
+[ 1331.000000] example[11]
+[ 1728.000000] example[12]
+[ 2197.000000] example[13]
+[ 2744.000000] example[14]
+[ 3375.000000] example[15]
+[ 6859.000000] example[19]
+[ 8000.000000] example[20]
+[ 9261.000000] example[21]
+[10648.000000] example[22]
+[12167.000000] example[23]
+[19683.000000] example[27]
+[21952.000000] example[28]
+[24389.000000] example[29]
+[27000.000000] example[30]
+[29791.000000] example[31]
+[42875.000000] example[35]
+[46656.000000] example[36]
+[50653.000000] example[37]
+[54872.000000] example[38]
+[59319.000000] example[39]
+[79507.000000] example[43]
+[85184.000000] example[44]
+[91125.000000] example[45]
+[97336.000000] example[46]
+[103823.000000] example[47]
+[132651.000000] example[51]
+[140608.000000] example[52]
+[148877.000000] example[53]
+[157464.000000] example[54]
+[166375.000000] example[55]
+[205379.000000] example[59]
+[216000.000000] example[60]
+[226981.000000] example[61]
+[238328.000000] example[62]
+[250047.000000] example[63]
+[300763.000000] example[67]
+[314432.000000] example[68]
+[328509.000000] example[69]
+[343000.000000] example[70]
+[357911.000000] example[71]
+[421875.000000] example[75]
+[438976.000000] example[76]
+[456533.000000] example[77]
+[474552.000000] example[78]
+[493039.000000] example[79]
+[571787.000000] example[83]
+[592704.000000] example[84]
+[614125.000000] example[85]
+[636056.000000] example[86]
+[658503.000000] example[87]
+[753571.000000] example[91]
+[778688.000000] example[92]
+[804357.000000] example[93]
+[830584.000000] example[94]
+[857375.000000] example[95]
+[970299.000000] example[99]
+[1000000.000000] example[100]
+[1030301.000000] example[101]
+[1061208.000000] example[102]
+[1092727.000000] example[103]
+[ 343.000000] example[7]
+[ 3375.000000] example[15]
+[12167.000000] example[23]
+[29791.000000] example[31]
+[59319.000000] example[39]
+[103823.000000] example[47]
+[166375.000000] example[55]
+[250047.000000] example[63]
+[357911.000000] example[71]
+[493039.000000] example[79]
+[658503.000000] example[87]
+[857375.000000] example[95]
+[1092727.000000] example[103]
+test_dmesg: unknown level '+'
diff --git a/tests/expected/dmesg/decode b/tests/expected/dmesg/decode
new file mode 100644
index 0000000..f3541a6
--- /dev/null
+++ b/tests/expected/dmesg/decode
@@ -0,0 +1,105 @@
+kern :emerg : [ 0.000000] example[0]
+kern :alert : [ 1.000000] example[1]
+kern :crit : [ 8.000000] example[2]
+kern :err : [ 27.000000] example[3]
+kern :warn : [ 64.000000] example[4]
+kern :notice: [ 125.000000] example[5]
+kern :info : [ 216.000000] example[6]
+kern :debug : [ 343.000000] example[7]
+user :emerg : [ 512.000000] example[8]
+user :alert : [ 729.000000] example[9]
+user :crit : [ 1000.000000] example[10]
+user :err : [ 1331.000000] example[11]
+user :warn : [ 1728.000000] example[12]
+user :notice: [ 2197.000000] example[13]
+user :info : [ 2744.000000] example[14]
+user :debug : [ 3375.000000] example[15]
+mail :emerg : [ 4096.000000] example[16]
+mail :alert : [ 4913.000000] example[17]
+mail :crit : [ 5832.000000] example[18]
+mail :err : [ 6859.000000] example[19]
+mail :warn : [ 8000.000000] example[20]
+mail :notice: [ 9261.000000] example[21]
+mail :info : [10648.000000] example[22]
+mail :debug : [12167.000000] example[23]
+daemon:emerg : [13824.000000] example[24]
+daemon:alert : [15625.000000] example[25]
+daemon:crit : [17576.000000] example[26]
+daemon:err : [19683.000000] example[27]
+daemon:warn : [21952.000000] example[28]
+daemon:notice: [24389.000000] example[29]
+daemon:info : [27000.000000] example[30]
+daemon:debug : [29791.000000] example[31]
+auth :emerg : [32768.000000] example[32]
+auth :alert : [35937.000000] example[33]
+auth :crit : [39304.000000] example[34]
+auth :err : [42875.000000] example[35]
+auth :warn : [46656.000000] example[36]
+auth :notice: [50653.000000] example[37]
+auth :info : [54872.000000] example[38]
+auth :debug : [59319.000000] example[39]
+syslog:emerg : [64000.000000] example[40]
+syslog:alert : [68921.000000] example[41]
+syslog:crit : [74088.000000] example[42]
+syslog:err : [79507.000000] example[43]
+syslog:warn : [85184.000000] example[44]
+syslog:notice: [91125.000000] example[45]
+syslog:info : [97336.000000] example[46]
+syslog:debug : [103823.000000] example[47]
+lpr :emerg : [110592.000000] example[48]
+lpr :alert : [117649.000000] example[49]
+lpr :crit : [125000.000000] example[50]
+lpr :err : [132651.000000] example[51]
+lpr :warn : [140608.000000] example[52]
+lpr :notice: [148877.000000] example[53]
+lpr :info : [157464.000000] example[54]
+lpr :debug : [166375.000000] example[55]
+news :emerg : [175616.000000] example[56]
+news :alert : [185193.000000] example[57]
+news :crit : [195112.000000] example[58]
+news :err : [205379.000000] example[59]
+news :warn : [216000.000000] example[60]
+news :notice: [226981.000000] example[61]
+news :info : [238328.000000] example[62]
+news :debug : [250047.000000] example[63]
+uucp :emerg : [262144.000000] example[64]
+uucp :alert : [274625.000000] example[65]
+uucp :crit : [287496.000000] example[66]
+uucp :err : [300763.000000] example[67]
+uucp :warn : [314432.000000] example[68]
+uucp :notice: [328509.000000] example[69]
+uucp :info : [343000.000000] example[70]
+uucp :debug : [357911.000000] example[71]
+cron :emerg : [373248.000000] example[72]
+cron :alert : [389017.000000] example[73]
+cron :crit : [405224.000000] example[74]
+cron :err : [421875.000000] example[75]
+cron :warn : [438976.000000] example[76]
+cron :notice: [456533.000000] example[77]
+cron :info : [474552.000000] example[78]
+cron :debug : [493039.000000] example[79]
+authpriv:emerg : [512000.000000] example[80]
+authpriv:alert : [531441.000000] example[81]
+authpriv:crit : [551368.000000] example[82]
+authpriv:err : [571787.000000] example[83]
+authpriv:warn : [592704.000000] example[84]
+authpriv:notice: [614125.000000] example[85]
+authpriv:info : [636056.000000] example[86]
+authpriv:debug : [658503.000000] example[87]
+ftp :emerg : [681472.000000] example[88]
+ftp :alert : [704969.000000] example[89]
+ftp :crit : [729000.000000] example[90]
+ftp :err : [753571.000000] example[91]
+ftp :warn : [778688.000000] example[92]
+ftp :notice: [804357.000000] example[93]
+ftp :info : [830584.000000] example[94]
+ftp :debug : [857375.000000] example[95]
+[884736.000000] example[96]
+[912673.000000] example[97]
+[941192.000000] example[98]
+[970299.000000] example[99]
+[1000000.000000] example[100]
+[1030301.000000] example[101]
+[1061208.000000] example[102]
+[1092727.000000] example[103]
+[1124864.000000] example[104]
diff --git a/tests/expected/dmesg/delta b/tests/expected/dmesg/delta
new file mode 100644
index 0000000..01dfec3
--- /dev/null
+++ b/tests/expected/dmesg/delta
@@ -0,0 +1,105 @@
+[ 0.000000 < 0.000000>] example[0]
+[ 1.000000 < 0.000000>] example[1]
+[ 8.000000 < 7.000000>] example[2]
+[ 27.000000 < 19.000000>] example[3]
+[ 64.000000 < 37.000000>] example[4]
+[ 125.000000 < 61.000000>] example[5]
+[ 216.000000 < 91.000000>] example[6]
+[ 343.000000 < 127.000000>] example[7]
+[ 512.000000 < 169.000000>] example[8]
+[ 729.000000 < 217.000000>] example[9]
+[ 1000.000000 < 271.000000>] example[10]
+[ 1331.000000 < 331.000000>] example[11]
+[ 1728.000000 < 397.000000>] example[12]
+[ 2197.000000 < 469.000000>] example[13]
+[ 2744.000000 < 547.000000>] example[14]
+[ 3375.000000 < 631.000000>] example[15]
+[ 4096.000000 < 721.000000>] example[16]
+[ 4913.000000 < 817.000000>] example[17]
+[ 5832.000000 < 919.000000>] example[18]
+[ 6859.000000 < 1027.000000>] example[19]
+[ 8000.000000 < 1141.000000>] example[20]
+[ 9261.000000 < 1261.000000>] example[21]
+[10648.000000 < 1387.000000>] example[22]
+[12167.000000 < 1519.000000>] example[23]
+[13824.000000 < 1657.000000>] example[24]
+[15625.000000 < 1801.000000>] example[25]
+[17576.000000 < 1951.000000>] example[26]
+[19683.000000 < 2107.000000>] example[27]
+[21952.000000 < 2269.000000>] example[28]
+[24389.000000 < 2437.000000>] example[29]
+[27000.000000 < 2611.000000>] example[30]
+[29791.000000 < 2791.000000>] example[31]
+[32768.000000 < 2977.000000>] example[32]
+[35937.000000 < 3169.000000>] example[33]
+[39304.000000 < 3367.000000>] example[34]
+[42875.000000 < 3571.000000>] example[35]
+[46656.000000 < 3781.000000>] example[36]
+[50653.000000 < 3997.000000>] example[37]
+[54872.000000 < 4219.000000>] example[38]
+[59319.000000 < 4447.000000>] example[39]
+[64000.000000 < 4681.000000>] example[40]
+[68921.000000 < 4921.000000>] example[41]
+[74088.000000 < 5167.000000>] example[42]
+[79507.000000 < 5419.000000>] example[43]
+[85184.000000 < 5677.000000>] example[44]
+[91125.000000 < 5941.000000>] example[45]
+[97336.000000 < 6211.000000>] example[46]
+[103823.000000 < 6487.000000>] example[47]
+[110592.000000 < 6769.000000>] example[48]
+[117649.000000 < 7057.000000>] example[49]
+[125000.000000 < 7351.000000>] example[50]
+[132651.000000 < 7651.000000>] example[51]
+[140608.000000 < 7957.000000>] example[52]
+[148877.000000 < 8269.000000>] example[53]
+[157464.000000 < 8587.000000>] example[54]
+[166375.000000 < 8911.000000>] example[55]
+[175616.000000 < 9241.000000>] example[56]
+[185193.000000 < 9577.000000>] example[57]
+[195112.000000 < 9919.000000>] example[58]
+[205379.000000 <10267.000000>] example[59]
+[216000.000000 <10621.000000>] example[60]
+[226981.000000 <10981.000000>] example[61]
+[238328.000000 <11347.000000>] example[62]
+[250047.000000 <11719.000000>] example[63]
+[262144.000000 <12097.000000>] example[64]
+[274625.000000 <12481.000000>] example[65]
+[287496.000000 <12871.000000>] example[66]
+[300763.000000 <13267.000000>] example[67]
+[314432.000000 <13669.000000>] example[68]
+[328509.000000 <14077.000000>] example[69]
+[343000.000000 <14491.000000>] example[70]
+[357911.000000 <14911.000000>] example[71]
+[373248.000000 <15337.000000>] example[72]
+[389017.000000 <15769.000000>] example[73]
+[405224.000000 <16207.000000>] example[74]
+[421875.000000 <16651.000000>] example[75]
+[438976.000000 <17101.000000>] example[76]
+[456533.000000 <17557.000000>] example[77]
+[474552.000000 <18019.000000>] example[78]
+[493039.000000 <18487.000000>] example[79]
+[512000.000000 <18961.000000>] example[80]
+[531441.000000 <19441.000000>] example[81]
+[551368.000000 <19927.000000>] example[82]
+[571787.000000 <20419.000000>] example[83]
+[592704.000000 <20917.000000>] example[84]
+[614125.000000 <21421.000000>] example[85]
+[636056.000000 <21931.000000>] example[86]
+[658503.000000 <22447.000000>] example[87]
+[681472.000000 <22969.000000>] example[88]
+[704969.000000 <23497.000000>] example[89]
+[729000.000000 <24031.000000>] example[90]
+[753571.000000 <24571.000000>] example[91]
+[778688.000000 <25117.000000>] example[92]
+[804357.000000 <25669.000000>] example[93]
+[830584.000000 <26227.000000>] example[94]
+[857375.000000 <26791.000000>] example[95]
+[884736.000000 <27361.000000>] example[96]
+[912673.000000 <27937.000000>] example[97]
+[941192.000000 <28519.000000>] example[98]
+[970299.000000 <29107.000000>] example[99]
+[1000000.000000 <29701.000000>] example[100]
+[1030301.000000 <30301.000000>] example[101]
+[1061208.000000 <30907.000000>] example[102]
+[1092727.000000 <31519.000000>] example[103]
+[1124864.000000 <32137.000000>] example[104]
diff --git a/tests/expected/dmesg/facilities b/tests/expected/dmesg/facilities
new file mode 100644
index 0000000..9733e56
--- /dev/null
+++ b/tests/expected/dmesg/facilities
@@ -0,0 +1,96 @@
+[ 0.000000] example[0]
+[ 1.000000] example[1]
+[ 8.000000] example[2]
+[ 27.000000] example[3]
+[ 64.000000] example[4]
+[ 125.000000] example[5]
+[ 216.000000] example[6]
+[ 343.000000] example[7]
+[ 512.000000] example[8]
+[ 729.000000] example[9]
+[ 1000.000000] example[10]
+[ 1331.000000] example[11]
+[ 1728.000000] example[12]
+[ 2197.000000] example[13]
+[ 2744.000000] example[14]
+[ 3375.000000] example[15]
+[ 4096.000000] example[16]
+[ 4913.000000] example[17]
+[ 5832.000000] example[18]
+[ 6859.000000] example[19]
+[ 8000.000000] example[20]
+[ 9261.000000] example[21]
+[10648.000000] example[22]
+[12167.000000] example[23]
+[13824.000000] example[24]
+[15625.000000] example[25]
+[17576.000000] example[26]
+[19683.000000] example[27]
+[21952.000000] example[28]
+[24389.000000] example[29]
+[27000.000000] example[30]
+[29791.000000] example[31]
+[32768.000000] example[32]
+[35937.000000] example[33]
+[39304.000000] example[34]
+[42875.000000] example[35]
+[46656.000000] example[36]
+[50653.000000] example[37]
+[54872.000000] example[38]
+[59319.000000] example[39]
+[64000.000000] example[40]
+[68921.000000] example[41]
+[74088.000000] example[42]
+[79507.000000] example[43]
+[85184.000000] example[44]
+[91125.000000] example[45]
+[97336.000000] example[46]
+[103823.000000] example[47]
+[110592.000000] example[48]
+[117649.000000] example[49]
+[125000.000000] example[50]
+[132651.000000] example[51]
+[140608.000000] example[52]
+[148877.000000] example[53]
+[157464.000000] example[54]
+[166375.000000] example[55]
+[175616.000000] example[56]
+[185193.000000] example[57]
+[195112.000000] example[58]
+[205379.000000] example[59]
+[216000.000000] example[60]
+[226981.000000] example[61]
+[238328.000000] example[62]
+[250047.000000] example[63]
+[262144.000000] example[64]
+[274625.000000] example[65]
+[287496.000000] example[66]
+[300763.000000] example[67]
+[314432.000000] example[68]
+[328509.000000] example[69]
+[343000.000000] example[70]
+[357911.000000] example[71]
+[373248.000000] example[72]
+[389017.000000] example[73]
+[405224.000000] example[74]
+[421875.000000] example[75]
+[438976.000000] example[76]
+[456533.000000] example[77]
+[474552.000000] example[78]
+[493039.000000] example[79]
+[512000.000000] example[80]
+[531441.000000] example[81]
+[551368.000000] example[82]
+[571787.000000] example[83]
+[592704.000000] example[84]
+[614125.000000] example[85]
+[636056.000000] example[86]
+[658503.000000] example[87]
+[681472.000000] example[88]
+[704969.000000] example[89]
+[729000.000000] example[90]
+[753571.000000] example[91]
+[778688.000000] example[92]
+[804357.000000] example[93]
+[830584.000000] example[94]
+[857375.000000] example[95]
diff --git a/tests/expected/dmesg/indentation b/tests/expected/dmesg/indentation
new file mode 100644
index 0000000..dc08810
--- /dev/null
+++ b/tests/expected/dmesg/indentation
@@ -0,0 +1,35 @@
+[ 1.000000] new
+ line
+[ 2.000000] two
+ new
+ lines
+user :crit : [ 1.000000] new
+ line
+mail :warn : [ 2.000000] two
+ new
+ lines
+[< 0.000000>] new
+ line
+[< 1.000000>] two
+ new
+ lines
+new
+line
+two
+new
+lines
+[Feb13 23:31] new
+ line
+[ +1.000000] two
+ new
+ lines
+[Fri Feb 13 23:31:31 2009] new
+ line
+[Fri Feb 13 23:31:32 2009] two
+ new
+ lines
+2009-02-13T23:31:31,123456+00:00 new
+ line
+2009-02-13T23:31:32,123456+00:00 two
+ new
+ lines
diff --git a/tests/expected/dmesg/limit b/tests/expected/dmesg/limit
new file mode 100644
index 0000000..03569ab
--- /dev/null
+++ b/tests/expected/dmesg/limit
@@ -0,0 +1,4 @@
+[ 1.000000] example[1]
+[ 8.000000] example[2]
+[ 27.000000] example[3]
+[ 64.000000] example[4]
diff --git a/tests/expected/eject/umount-by-disk b/tests/expected/eject/umount-by-disk
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/eject/umount-by-disk
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/eject/umount-by-disk-mounted b/tests/expected/eject/umount-by-disk-mounted
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/eject/umount-by-disk-mounted
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/eject/umount-by-disk-mounted-partition b/tests/expected/eject/umount-by-disk-mounted-partition
new file mode 100644
index 0000000..2a99ba0
--- /dev/null
+++ b/tests/expected/eject/umount-by-disk-mounted-partition
@@ -0,0 +1,2 @@
+Create partitions
+Success
diff --git a/tests/expected/eject/umount-by-partition b/tests/expected/eject/umount-by-partition
new file mode 100644
index 0000000..2a99ba0
--- /dev/null
+++ b/tests/expected/eject/umount-by-partition
@@ -0,0 +1,2 @@
+Create partitions
+Success
diff --git a/tests/expected/eject/umount-by-partition-mounted b/tests/expected/eject/umount-by-partition-mounted
new file mode 100644
index 0000000..2a99ba0
--- /dev/null
+++ b/tests/expected/eject/umount-by-partition-mounted
@@ -0,0 +1,2 @@
+Create partitions
+Success
diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop
new file mode 100644
index 0000000..f2360b5
--- /dev/null
+++ b/tests/expected/fadvise/drop
@@ -0,0 +1,23 @@
+ RES PAGES SIZE FILE
+ 32K 8 32K ddtest
+
+whole file
+status: 0
+RES PAGES SIZE FILE
+ 0B 0 32K ddtest
+
+offset: 8192
+status: 0
+RES PAGES SIZE FILE
+ 8K 2 32K ddtest
+
+length: 16384
+status: 0
+ RES PAGES SIZE FILE
+ 16K 4 32K ddtest
+
+offset: 8192, length: 16384 fd: 42
+status: 0
+ RES PAGES SIZE FILE
+ 16K 4 32K ddtest
+
diff --git a/tests/expected/fdisk/align-512-4K b/tests/expected/fdisk/align-512-4K
new file mode 100644
index 0000000..ec06613
--- /dev/null
+++ b/tests/expected/fdisk/align-512-4K
@@ -0,0 +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.
+
+Command (m for help): Created a new disklabel.
+
+Command (m for help): Partition type
+ p primary (0 primary, 0 extended, 4 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (2 primary, 0 extended, 2 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (3 primary, 0 extended, 1 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 5
+First sector (65536-102399, default 65536): Last sector, +/-sectors or +/-size{K,M,G,T,P} (65536-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 6
+First sector (77824-102399, default 77824): Last sector, +/-sectors or +/-size{K,M,G,T,P} (77824-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 7
+First sector (90112-102399, default 90112): Last sector, +/-sectors or +/-size{K,M,G,T,P} (90112-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 22527 20480 10M 83 Linux
+<removed>2 22528 43007 20480 10M 83 Linux
+<removed>3 43008 63487 20480 10M 83 Linux
+<removed>4 63488 102399 38912 19M 5 Extended
+<removed>5 65536 75775 10240 5M 83 Linux
+<removed>6 77824 88063 10240 5M 83 Linux
+<removed>7 90112 102399 12288 6M 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
+0
+0
+0
+0
+0
diff --git a/tests/expected/fdisk/align-512-4K-63 b/tests/expected/fdisk/align-512-4K-63
new file mode 100644
index 0000000..f7a0c9f
--- /dev/null
+++ b/tests/expected/fdisk/align-512-4K-63
@@ -0,0 +1,81 @@
+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.
+
+Command (m for help): Created a new disklabel.
+
+Command (m for help): Partition type
+ p primary (0 primary, 0 extended, 4 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (2 primary, 0 extended, 2 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (3 primary, 0 extended, 1 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 5
+First sector (61454-102399, default 63487): Last sector, +/-sectors or +/-size{K,M,G,T,P} (63487-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 6
+First sector (61454-102399, default 75775): Last sector, +/-sectors or +/-size{K,M,G,T,P} (75775-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 7
+First sector (61454-102399, default 88063): Last sector, +/-sectors or +/-size{K,M,G,T,P} (88063-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Alignment offset: 3584 bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 7 20486 20480 10M 83 Linux
+<removed>2 20487 40966 20480 10M 83 Linux
+<removed>3 40967 61446 20480 10M 83 Linux
+<removed>4 61447 102399 40953 20M 5 Extended
+<removed>5 63487 73726 10240 5M 83 Linux
+<removed>6 75775 86014 10240 5M 83 Linux
+<removed>7 88063 102399 14337 7M 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
+0
+0
+0
+0
+0
diff --git a/tests/expected/fdisk/align-512-4K-md b/tests/expected/fdisk/align-512-4K-md
new file mode 100644
index 0000000..d8ca0d7
--- /dev/null
+++ b/tests/expected/fdisk/align-512-4K-md
@@ -0,0 +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.
+
+Command (m for help): Created a new disklabel.
+
+Command (m for help): Partition type
+ p primary (0 primary, 0 extended, 4 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+Select (default p): Partition number (2-4, default 2): First sector (51199-102399, default 51200): Last sector, +/-sectors or +/-size{K,M,G,T,P} (51200-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 51198 49151 24M 83 Linux
+<removed>2 51200 100350 49151 24M 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
+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.
+Created a new disklabel.
+
+Command (m for help): Partition type
+ p primary (0 primary, 0 extended, 4 free)
+ e extended (container for logical partitions)
+Select (default p): Partition number (1-4, default 1): First sector (2048-97791, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-97791, default 97791):
+Created a new partition <removed>.
+
+Command (m for help): Partition type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+Select (default p): Partition number (2-4, default 2): First sector (22528-97791, default 22528): Last sector, +/-sectors or +/-size{K,M,G,T,P} (22528-97791, default 97791):
+Created a new partition <removed>.
+
+Command (m for help): Disk <removed>: 47.75 MiB, 50069504 bytes, 97792 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 65536 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>p1 2048 22527 20480 10M 83 Linux
+<removed>p2 22528 43007 20480 10M 83 Linux
+
+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
new file mode 100644
index 0000000..782beca
--- /dev/null
+++ b/tests/expected/fdisk/align-512-512
@@ -0,0 +1,68 @@
+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.
+
+Command (m for help): Created a new disklabel.
+
+Command (m for help): Partition type
+ p primary (0 primary, 0 extended, 4 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (2 primary, 0 extended, 2 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (3 primary, 0 extended, 1 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 5
+First sector (65536-102399, default 65536): Last sector, +/-sectors or +/-size{K,M,G,T,P} (65536-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 6
+First sector (77824-102399, default 77824): Last sector, +/-sectors or +/-size{K,M,G,T,P} (77824-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 7
+First sector (90112-102399, default 90112): Last sector, +/-sectors or +/-size{K,M,G,T,P} (90112-102399, default 102399):
+Created a new partition <removed>.
+
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>p1 2048 22527 20480 10M 83 Linux
+<removed>p2 22528 43007 20480 10M 83 Linux
+<removed>p3 43008 63487 20480 10M 83 Linux
+<removed>p4 63488 102399 38912 19M 5 Extended
+<removed>p5 65536 75775 10240 5M 83 Linux
+<removed>p6 77824 88063 10240 5M 83 Linux
+<removed>p7 90112 102399 12288 6M 83 Linux
+
+Command (m for help):
diff --git a/tests/expected/fdisk/align-512-512-topology b/tests/expected/fdisk/align-512-512-topology
new file mode 100644
index 0000000..2ca9893
--- /dev/null
+++ b/tests/expected/fdisk/align-512-512-topology
@@ -0,0 +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.
+
+Command (m for help): Created a new disklabel.
+
+Command (m for help): Partition type
+ p primary (0 primary, 0 extended, 4 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (2 primary, 0 extended, 2 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): Partition type
+ p primary (3 primary, 0 extended, 1 free)
+ e extended (container for logical partitions)
+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 partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 5
+First sector (65536-102399, default 65536): Last sector, +/-sectors or +/-size{K,M,G,T,P} (65536-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 6
+First sector (77824-102399, default 77824): Last sector, +/-sectors or +/-size{K,M,G,T,P} (77824-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): All primary partitions are in use.
+Adding logical partition 7
+First sector (90112-102399, default 90112): Last sector, +/-sectors or +/-size{K,M,G,T,P} (90112-102399, default 102399):
+Created a new partition <removed>.
+
+Command (m for help): Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 22527 20480 10M 83 Linux
+<removed>2 22528 43007 20480 10M 83 Linux
+<removed>3 43008 63487 20480 10M 83 Linux
+<removed>4 63488 102399 38912 19M 5 Extended
+<removed>5 65536 75775 10240 5M 83 Linux
+<removed>6 77824 88063 10240 5M 83 Linux
+<removed>7 90112 102399 12288 6M 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
+0
+0
+0
+0
+0
diff --git a/tests/expected/fdisk/bsd_0_64.BE b/tests/expected/fdisk/bsd_0_64.BE
new file mode 100644
index 0000000..4f41d03
--- /dev/null
+++ b/tests/expected/fdisk/bsd_0_64.BE
@@ -0,0 +1,213 @@
+BSD_LABELSECTOR=0
+BSD_LABELOFFSET=64
+BSD_EXTRA=
+BYTE_ORDER=BE
+
+Initialize empty image
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Create new DOS partition table
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|
+000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
+Create 1st primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............|
+000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+-------------------
+
+Create 2nd primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 83 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Set 2nd partition type
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>2 4096 20479 16384 a5 FreeBSD 0/65/2 1/70/5
+-------------------
+
+Create default BSD
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200040 82 56 45 57 00 06 00 00 00 00 00 00 00 00 00 00 |.VEW............|
+00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200060 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 3f |...............?|
+00200070 00 00 00 ff 00 00 00 01 00 00 3e c1 00 00 3e c1 |..........>...>.|
+00200080 00 00 00 00 00 00 00 00 0e 10 00 01 00 00 00 00 |................|
+00200090 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....|
+002000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+002000c0 00 00 00 00 82 56 45 57 62 33 00 04 00 00 20 00 |.....VEWb3.... .|
+002000d0 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 |.. .............|
+002000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002000f0 00 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 |......@.........|
+00200100 00 00 00 00 00 00 3e c1 00 00 00 00 00 00 00 00 |......>.........|
+00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200040 82 56 45 57 00 06 00 00 00 00 00 00 00 00 00 00 |.VEW............|
+00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200060 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 3f |...............?|
+00200070 00 00 00 ff 00 00 00 01 00 00 3e c1 00 00 3e c1 |..........>...>.|
+00200080 00 00 00 00 00 00 00 00 0e 10 00 01 00 00 00 00 |................|
+00200090 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....|
+002000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+002000c0 00 00 00 00 82 56 45 57 7d 32 00 04 00 00 20 00 |.....VEW}2.... .|
+002000d0 00 00 20 00 00 00 08 01 00 00 10 00 00 00 00 00 |.. .............|
+002000e0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002000f0 00 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 |......@.........|
+00200100 00 00 00 00 00 00 3e c1 00 00 00 00 00 00 00 00 |......>.........|
+00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+a 4096 6144 2049 1M 4.2BSD 0 0 0
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+
+Command (m for help): Entering nested BSD disklabel.
+
+Command (m for help):
+00 unused 05 4.1BSD 09 4.4LFS 0d boot
+01 swap 06 Eighth Edition 0a unknown 0e ADOS
+02 Version 6 07 4.2BSD 0b HPFS 0f HFS
+03 Version 7 08 MS-DOS 0c ISO-9660 10 AdvFS
+04 System V
+
+Command (m for help):
diff --git a/tests/expected/fdisk/bsd_0_64.LE b/tests/expected/fdisk/bsd_0_64.LE
new file mode 100644
index 0000000..9663f16
--- /dev/null
+++ b/tests/expected/fdisk/bsd_0_64.LE
@@ -0,0 +1,213 @@
+BSD_LABELSECTOR=0
+BSD_LABELOFFSET=64
+BSD_EXTRA=
+BYTE_ORDER=LE
+
+Initialize empty image
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Create new DOS partition table
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|
+000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
+Create 1st primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............|
+000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+-------------------
+
+Create 2nd primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 83 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Set 2nd partition type
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>2 4096 20479 16384 a5 FreeBSD 0/65/2 1/70/5
+-------------------
+
+Create default BSD
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200040 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............|
+00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200060 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...|
+00200070 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..|
+00200080 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................|
+00200090 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 |........ .......|
+002000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+002000c0 00 00 00 00 57 45 56 82 33 62 04 00 00 20 00 00 |....WEV.3b... ..|
+002000d0 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |. ..............|
+002000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002000f0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........|
+00200100 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........|
+00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200040 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............|
+00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200060 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...|
+00200070 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..|
+00200080 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................|
+00200090 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 |........ .......|
+002000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+002000c0 00 00 00 00 57 45 56 82 35 7a 04 00 00 20 00 00 |....WEV.5z... ..|
+002000d0 00 20 00 00 01 08 00 00 00 10 00 00 00 00 00 00 |. ..............|
+002000e0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002000f0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........|
+00200100 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........|
+00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+a 4096 6144 2049 1M 4.2BSD 0 0 0
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+
+Command (m for help): Entering nested BSD disklabel.
+
+Command (m for help):
+00 unused 05 4.1BSD 09 4.4LFS 0d boot
+01 swap 06 Eighth Edition 0a unknown 0e ADOS
+02 Version 6 07 4.2BSD 0b HPFS 0f HFS
+03 Version 7 08 MS-DOS 0c ISO-9660 10 AdvFS
+04 System V
+
+Command (m for help):
diff --git a/tests/expected/fdisk/bsd_0_64_alpha.LE b/tests/expected/fdisk/bsd_0_64_alpha.LE
new file mode 100644
index 0000000..ab39149
--- /dev/null
+++ b/tests/expected/fdisk/bsd_0_64_alpha.LE
@@ -0,0 +1,217 @@
+BSD_LABELSECTOR=0
+BSD_LABELOFFSET=64
+BSD_EXTRA=_alpha
+BYTE_ORDER=LE
+
+Initialize empty image
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Create new DOS partition table
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|
+000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
+Create 1st primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............|
+000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+-------------------
+
+Create 2nd primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............|
+000001d0 01 3e 83 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Set 2nd partition type
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............|
+000001d0 01 3e a5 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 20479 16384 8M a5 FreeBSD
+-------------------
+
+Create default BSD
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............|
+000001d0 01 3e a5 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200040 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............|
+00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200060 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...|
+00200070 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..|
+00200080 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................|
+00200090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+002000c0 00 00 00 00 57 45 56 82 13 62 04 00 00 20 00 00 |....WEV..b... ..|
+002000d0 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |. ..............|
+002000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002000f0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........|
+00200100 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........|
+00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+002001f0 00 00 00 00 00 00 00 00 3a 27 5c 82 1f 23 57 82 |........:'\..#W.|
+00200200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............|
+000001d0 01 3e a5 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200040 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............|
+00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200060 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...|
+00200070 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..|
+00200080 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................|
+00200090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+002000c0 00 00 00 00 57 45 56 82 15 7a 04 00 00 20 00 00 |....WEV..z... ..|
+002000d0 00 20 00 00 01 08 00 00 00 10 00 00 00 00 00 00 |. ..............|
+002000e0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002000f0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........|
+00200100 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........|
+00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+002001f0 00 00 00 00 00 00 00 00 43 4f 5c 82 20 2b 57 82 |........CO\. +W.|
+00200200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+a 4096 6144 2049 1M 4.2BSD 0 0 0
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+
+Command (m for help): Entering nested BSD disklabel.
+
+Command (m for help):
+00 unused 05 4.1BSD 09 4.4LFS 0d boot
+01 swap 06 Eighth Edition 0a unknown 0e ADOS
+02 Version 6 07 4.2BSD 0b HPFS 0f HFS
+03 Version 7 08 ext2 0c ISO-9660 10 AdvFS
+04 System V
+
+Command (m for help):
diff --git a/tests/expected/fdisk/bsd_1_0.BE b/tests/expected/fdisk/bsd_1_0.BE
new file mode 100644
index 0000000..4c201b0
--- /dev/null
+++ b/tests/expected/fdisk/bsd_1_0.BE
@@ -0,0 +1,213 @@
+BSD_LABELSECTOR=1
+BSD_LABELOFFSET=0
+BSD_EXTRA=
+BYTE_ORDER=BE
+
+Initialize empty image
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Create new DOS partition table
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|
+000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
+Create 1st primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............|
+000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+-------------------
+
+Create 2nd primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 83 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Set 2nd partition type
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>2 4096 20479 16384 a5 FreeBSD 0/65/2 1/70/5
+-------------------
+
+Create default BSD
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200200 82 56 45 57 00 06 00 00 00 00 00 00 00 00 00 00 |.VEW............|
+00200210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200220 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 3f |...............?|
+00200230 00 00 00 ff 00 00 00 01 00 00 3e c1 00 00 3e c1 |..........>...>.|
+00200240 00 00 00 00 00 00 00 00 0e 10 00 01 00 00 00 00 |................|
+00200250 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....|
+00200260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200280 00 00 00 00 82 56 45 57 62 33 00 04 00 00 20 00 |.....VEWb3.... .|
+00200290 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 |.. .............|
+002002a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002002b0 00 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 |......@.........|
+002002c0 00 00 00 00 00 00 3e c1 00 00 00 00 00 00 00 00 |......>.........|
+002002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200200 82 56 45 57 00 06 00 00 00 00 00 00 00 00 00 00 |.VEW............|
+00200210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200220 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 3f |...............?|
+00200230 00 00 00 ff 00 00 00 01 00 00 3e c1 00 00 3e c1 |..........>...>.|
+00200240 00 00 00 00 00 00 00 00 0e 10 00 01 00 00 00 00 |................|
+00200250 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....|
+00200260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200280 00 00 00 00 82 56 45 57 7d 32 00 04 00 00 20 00 |.....VEW}2.... .|
+00200290 00 00 20 00 00 00 08 01 00 00 10 00 00 00 00 00 |.. .............|
+002002a0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002002b0 00 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 |......@.........|
+002002c0 00 00 00 00 00 00 3e c1 00 00 00 00 00 00 00 00 |......>.........|
+002002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+a 4096 6144 2049 1M 4.2BSD 0 0 0
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+
+Command (m for help): Entering nested BSD disklabel.
+
+Command (m for help):
+00 unused 05 4.1BSD 09 4.4LFS 0d boot
+01 swap 06 Eighth Edition 0a unknown 0e ADOS
+02 Version 6 07 4.2BSD 0b HPFS 0f HFS
+03 Version 7 08 MS-DOS 0c ISO-9660 10 AdvFS
+04 System V
+
+Command (m for help):
diff --git a/tests/expected/fdisk/bsd_1_0.LE b/tests/expected/fdisk/bsd_1_0.LE
new file mode 100644
index 0000000..3f14e8e
--- /dev/null
+++ b/tests/expected/fdisk/bsd_1_0.LE
@@ -0,0 +1,213 @@
+BSD_LABELSECTOR=1
+BSD_LABELOFFSET=0
+BSD_EXTRA=
+BYTE_ORDER=LE
+
+Initialize empty image
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Create new DOS partition table
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|
+000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
+Create 1st primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............|
+000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+-------------------
+
+Create 2nd primary partition
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 83 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+Set 2nd partition type
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>2 4096 20479 16384 a5 FreeBSD 0/65/2 1/70/5
+-------------------
+
+Create default BSD
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200200 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............|
+00200210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200220 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...|
+00200230 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..|
+00200240 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................|
+00200250 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 |........ .......|
+00200260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200280 00 00 00 00 57 45 56 82 33 62 04 00 00 20 00 00 |....WEV.3b... ..|
+00200290 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |. ..............|
+002002a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002002b0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........|
+002002c0 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........|
+002002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... |
+000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A|
+000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....|
+000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200200 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............|
+00200210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00200220 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...|
+00200230 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..|
+00200240 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................|
+00200250 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 |........ .......|
+00200260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00200280 00 00 00 00 57 45 56 82 35 7a 04 00 00 20 00 00 |....WEV.5z... ..|
+00200290 00 20 00 00 01 08 00 00 00 10 00 00 00 00 00 00 |. ..............|
+002002a0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+002002b0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........|
+002002c0 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........|
+002002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00a00000
+
+---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): 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 / <removed> bytes
+Disklabel type: bsd
+
+Slice Start End Sectors Size Type Fsize Bsize Cpg
+a 4096 6144 2049 1M 4.2BSD 0 0 0
+c 4096 20479 16384 8M unused 0 0 0
+d 0 16064 16065 7.8M unused 0 0 0
+
+Partition table entries are not in disk order.
+
+Command (m for help): Leaving nested disklabel.
+
+Command (m for help):
+-------------------
+
+
+
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+
+Command (m for help): Entering nested BSD disklabel.
+
+Command (m for help):
+00 unused 05 4.1BSD 09 4.4LFS 0d boot
+01 swap 06 Eighth Edition 0a unknown 0e ADOS
+02 Version 6 07 4.2BSD 0b HPFS 0f HFS
+03 Version 7 08 MS-DOS 0c ISO-9660 10 AdvFS
+04 System V
+
+Command (m for help):
diff --git a/tests/expected/fdisk/gpt b/tests/expected/fdisk/gpt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/fdisk/gpt
diff --git a/tests/expected/fdisk/gpt-change-type-by-number b/tests/expected/fdisk/gpt-change-type-by-number
new file mode 100644
index 0000000..33a6630
--- /dev/null
+++ b/tests/expected/fdisk/gpt-change-type-by-number
@@ -0,0 +1,20 @@
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux filesystem
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-change-type-by-uuid b/tests/expected/fdisk/gpt-change-type-by-uuid
new file mode 100644
index 0000000..34b7919
--- /dev/null
+++ b/tests/expected/fdisk/gpt-change-type-by-uuid
@@ -0,0 +1,20 @@
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-corrupt-backup-table b/tests/expected/fdisk/gpt-corrupt-backup-table
new file mode 100644
index 0000000..34b7919
--- /dev/null
+++ b/tests/expected/fdisk/gpt-corrupt-backup-table
@@ -0,0 +1,20 @@
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-corrupt-primary-table b/tests/expected/fdisk/gpt-corrupt-primary-table
new file mode 100644
index 0000000..34b7919
--- /dev/null
+++ b/tests/expected/fdisk/gpt-corrupt-primary-table
@@ -0,0 +1,20 @@
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-create-again-partition b/tests/expected/fdisk/gpt-create-again-partition
new file mode 100644
index 0000000..34b7919
--- /dev/null
+++ b/tests/expected/fdisk/gpt-create-again-partition
@@ -0,0 +1,20 @@
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-create-partitions b/tests/expected/fdisk/gpt-create-partitions
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/fdisk/gpt-create-partitions
diff --git a/tests/expected/fdisk/gpt-delete-partition b/tests/expected/fdisk/gpt-delete-partition
new file mode 100644
index 0000000..ed6cfa0
--- /dev/null
+++ b/tests/expected/fdisk/gpt-delete-partition
@@ -0,0 +1,19 @@
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M EFI System
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux swap
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
+<removed>8 16384 18431 2048 1M Linux filesystem
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-empty-pt b/tests/expected/fdisk/gpt-empty-pt
new file mode 100644
index 0000000..788aa65
--- /dev/null
+++ b/tests/expected/fdisk/gpt-empty-pt
@@ -0,0 +1,12 @@
+Initialize empty image
+Create new GPT partition table
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+-------------------
+
diff --git a/tests/expected/fdisk/gpt-resize b/tests/expected/fdisk/gpt-resize
new file mode 100644
index 0000000..151b5f5
--- /dev/null
+++ b/tests/expected/fdisk/gpt-resize
@@ -0,0 +1,42 @@
+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 / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>p1: Created a new partition <removed>.
+<removed>p2: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>p1 2048 18431 16384 8M Linux filesystem
+
+The partition table has been altered.
+----- fixing after resize: -----
+
+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-128, default 2): First sector (18432-40926, default 18432): Last sector, +/-sectors or +/-size{K,M,G,T,P} (18432-40926, default 38911):
+Created a new partition <removed>.
+
+Command (m for help): The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+
+----- list result: -----
+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 / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>p1 2048 18431 16384 8M Linux filesystem
+<removed>p2 18432 38911 20480 10M Linux filesystem
diff --git a/tests/expected/fdisk/gpt-resize.err b/tests/expected/fdisk/gpt-resize.err
new file mode 100644
index 0000000..ca58735
--- /dev/null
+++ b/tests/expected/fdisk/gpt-resize.err
@@ -0,0 +1,3 @@
+----- fixing after resize: -----
+GPT PMBR size mismatch (20479 != 40959) will be corrected by write.
+The backup GPT table is not on the end of the device. This problem will be corrected by write.
diff --git a/tests/expected/fdisk/id b/tests/expected/fdisk/id
new file mode 100644
index 0000000..960bb6b
--- /dev/null
+++ b/tests/expected/fdisk/id
@@ -0,0 +1 @@
+Initialize empty image
diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x1 b/tests/expected/fdisk/id-create-mbr-with-id-0x1
new file mode 100644
index 0000000..a9527e4
--- /dev/null
+++ b/tests/expected/fdisk/id-create-mbr-with-id-0x1
@@ -0,0 +1 @@
+Disk identifier: 0x00000001
diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc b/tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc
diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x2 b/tests/expected/fdisk/id-create-mbr-with-id-0x2
new file mode 100644
index 0000000..a0a9884
--- /dev/null
+++ b/tests/expected/fdisk/id-create-mbr-with-id-0x2
@@ -0,0 +1 @@
+Disk identifier: 0x00000002
diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc b/tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc
diff --git a/tests/expected/fdisk/id.sparc b/tests/expected/fdisk/id.sparc
new file mode 100644
index 0000000..960bb6b
--- /dev/null
+++ b/tests/expected/fdisk/id.sparc
@@ -0,0 +1 @@
+Initialize empty image
diff --git a/tests/expected/fdisk/mbr-dos-mode b/tests/expected/fdisk/mbr-dos-mode
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode
diff --git a/tests/expected/fdisk/mbr-dos-mode-create-another-log-par b/tests/expected/fdisk/mbr-dos-mode-create-another-log-par
new file mode 100644
index 0000000..61f04c0
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-create-another-log-par
@@ -0,0 +1,20 @@
+9589eaaed698d2402945ab3e513c1eb4 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+<removed>5 6 7 2 83 Linux 5/1/1 6/254/63
+<removed>6 2 3 2 83 Linux 1/1/1 2/254/63
+
+Partition table entries are not in disk order.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-create-extended-par b/tests/expected/fdisk/mbr-dos-mode-create-extended-par
new file mode 100644
index 0000000..3c2229b
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-create-extended-par
@@ -0,0 +1,16 @@
+76987a00b353687cd1dba3ddea9d66f9 mbr-dos-mode.img
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-create-logical-par b/tests/expected/fdisk/mbr-dos-mode-create-logical-par
new file mode 100644
index 0000000..e37c296
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-create-logical-par
@@ -0,0 +1,20 @@
+a1cd6708e4a6d2e5f6bc9d5c0da0cf3b mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+<removed>5 2 3 2 83 Linux 1/1/1 2/254/63
+<removed>6 4 5 2 83 Linux 3/1/1 4/254/63
+<removed>7 6 7 2 83 Linux 5/1/1 6/254/63
+<removed>8 8 9 2 83 Linux 7/1/1 8/254/63
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-create-primary-partition b/tests/expected/fdisk/mbr-dos-mode-create-primary-partition
new file mode 100644
index 0000000..ac8fb0f
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-create-primary-partition
@@ -0,0 +1,15 @@
+ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-delete-extended-par b/tests/expected/fdisk/mbr-dos-mode-delete-extended-par
new file mode 100644
index 0000000..0fbff6e
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-delete-extended-par
@@ -0,0 +1,12 @@
+fc3cdb12326656d7996b09b6f76973e7 mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-delete-logical-par b/tests/expected/fdisk/mbr-dos-mode-delete-logical-par
new file mode 100644
index 0000000..cdae97e
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-delete-logical-par
@@ -0,0 +1,17 @@
+4c6937d529ace5661fb82efb9394154a mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+<removed>5 6 7 2 83 Linux 5/1/1 6/254/63
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-delete-primary-par b/tests/expected/fdisk/mbr-dos-mode-delete-primary-par
new file mode 100644
index 0000000..1b9f0a3
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-delete-primary-par
@@ -0,0 +1,19 @@
+1e6d646e5df66a2664cfbbb13fa9a08a mbr-dos-mode.img
+
+---layout----------
+Disk <removed>: 54.91 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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>2 2 12 12 5 Extended 1/0/1 11/254/63
+<removed>5 6 7 2 83 Linux 5/1/1 6/254/63
+<removed>6 2 3 2 83 Linux 1/1/1 2/254/63
+
+Partition table entries are not in disk order.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-empty-pt b/tests/expected/fdisk/mbr-dos-mode-empty-pt
new file mode 100644
index 0000000..ecb5e4c
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-empty-pt
@@ -0,0 +1,13 @@
+f1c9645dbc14efddc7d8a322685f26eb mbr-dos-mode.img
+57e721e38d1266c2df055067c18f2cf9 mbr-dos-mode.img
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-re-create-primary-par b/tests/expected/fdisk/mbr-dos-mode-re-create-primary-par
new file mode 100644
index 0000000..ac8fb0f
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-re-create-primary-par
@@ -0,0 +1,15 @@
+ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 83 Linux 0/1/1 0/254/63
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-set-partition-type b/tests/expected/fdisk/mbr-dos-mode-set-partition-type
new file mode 100644
index 0000000..2a1aacb
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-set-partition-type
@@ -0,0 +1,15 @@
+4a5dba818f9962a82a086d8b99b89a17 mbr-dos-mode.img
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 1 1 1 bf Solaris 0/1/1 0/254/63
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-dos-mode-set-primary-par-active b/tests/expected/fdisk/mbr-dos-mode-set-primary-par-active
new file mode 100644
index 0000000..5c77ea3
--- /dev/null
+++ b/tests/expected/fdisk/mbr-dos-mode-set-primary-par-active
@@ -0,0 +1,15 @@
+c30e9c761b71cf95c67e758b93706ac5 mbr-dos-mode.img
+
+---layout----------
+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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 * 1 1 1 bf Solaris 0/1/1 0/254/63 80
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete b/tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete
new file mode 100644
index 0000000..a639244
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete
@@ -0,0 +1,19 @@
+Delete primary partition
+7b29a3cda33e990e8a7877b81988b933 mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>3 12288 40959 28672 5 Extended 0/195/4 2/140/10
+<removed>5 26624 30719 4096 83 Linux 1/167/39 1/232/39
+<removed>6 14336 18431 4096 83 Linux 0/227/36 1/37/36
+
+Partition table entries are not in disk order.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-active b/tests/expected/fdisk/mbr-nondos-mode-1st-active
new file mode 100644
index 0000000..564c043
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-1st-active
@@ -0,0 +1,15 @@
+Set primary partition active
+47f024f3b406598a0159400af7382e2c mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 * 2048 8191 6144 83 Linux 0/32/33 0/130/2 80
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary b/tests/expected/fdisk/mbr-nondos-mode-1st-primary
new file mode 100644
index 0000000..8747bb9
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary
@@ -0,0 +1,15 @@
+Create 1st primary partition
+e21e16b7452d82e2a2810a1de8c3db05 mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 8191 6144 83 Linux 0/32/33 0/130/2
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete
new file mode 100644
index 0000000..8aaaa1c
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete
@@ -0,0 +1,20 @@
+Delete primary partition
+0b3611fc71ef2d02842feb621077767e mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>2 8192 12287 4096 83 Linux 0/130/3 0/195/3
+<removed>3 12288 40959 28672 5 Extended 0/195/4 2/140/10
+<removed>5 26624 30719 4096 83 Linux 1/167/39 1/232/39
+<removed>6 14336 18431 4096 83 Linux 0/227/36 1/37/36
+
+Partition table entries are not in disk order.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate
new file mode 100644
index 0000000..c359608
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate
@@ -0,0 +1,15 @@
+Re-create 1st primary partition
+e21e16b7452d82e2a2810a1de8c3db05 mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 8191 6144 83 Linux 0/32/33 0/130/2
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-2nd-primary b/tests/expected/fdisk/mbr-nondos-mode-2nd-primary
new file mode 100644
index 0000000..c3693bf
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-2nd-primary
@@ -0,0 +1,16 @@
+Create 2nd primary partition
+3e928fabe884f6d4906b4d9335e7c6a3 mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 8191 6144 83 Linux 0/32/33 0/130/2
+<removed>2 8192 12287 4096 83 Linux 0/130/3 0/195/3
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-empty-pt b/tests/expected/fdisk/mbr-nondos-mode-empty-pt
new file mode 100644
index 0000000..bc18a70
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-empty-pt
@@ -0,0 +1,14 @@
+Initialize empty image
+8f4e33f3dc3e414ff94e5fb6905cba8c mbr-nondos-mode.img
+Create new DOS partition table
+4e23561dcb81678bb1bd678722c7cbb7 mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-extended b/tests/expected/fdisk/mbr-nondos-mode-extended
new file mode 100644
index 0000000..ba16770
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-extended
@@ -0,0 +1,17 @@
+Create extended partition
+eed98bd91ea08e63ab6cd9aa18ce544e mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 8191 6144 83 Linux 0/32/33 0/130/2
+<removed>2 8192 12287 4096 83 Linux 0/130/3 0/195/3
+<removed>3 12288 40959 28672 5 Extended 0/195/4 2/140/10
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-extended-delete b/tests/expected/fdisk/mbr-nondos-mode-extended-delete
new file mode 100644
index 0000000..b467274
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-extended-delete
@@ -0,0 +1,12 @@
+Delete extended partition
+e1ef48d3d42f4ebcfd5bf4baf5e370e9 mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end b/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end
new file mode 100644
index 0000000..3656a0b
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end
@@ -0,0 +1,47 @@
+Create new DOS partition table (again)
+Create 1st primary at the end of device
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 20000 40959 20960 83 Linux 1/62/30 2/140/10
+-------------------
+
+Create 2nd primary at the begin of device
+
+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 type
+ p primary (1 primary, 0 extended, 3 free)
+ e extended (container for logical partitions)
+Select (default p): Partition number (2-4, default 2): First sector (2048-19999, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-19999, default 19999):
+Created a new partition <removed>.
+
+Command (m for help): The partition table has been altered.
+Syncing disks.
+
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 20000 40959 20960 83 Linux 1/62/30 2/140/10
+<removed>2 2048 19999 17952 83 Linux 0/32/33 1/62/29
+
+Partition table entries are not in disk order.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical b/tests/expected/fdisk/mbr-nondos-mode-logical
new file mode 100644
index 0000000..9987693
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-logical
@@ -0,0 +1,21 @@
+Create logical partitions
+7fda11a0988bcb4822105c70cf75c1f2 mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 8191 6144 83 Linux 0/32/33 0/130/2
+<removed>2 8192 12287 4096 83 Linux 0/130/3 0/195/3
+<removed>3 12288 40959 28672 5 Extended 0/195/4 2/140/10
+<removed>5 14336 18431 4096 83 Linux 0/227/36 1/37/36
+<removed>6 20480 24575 4096 83 Linux 1/70/6 1/135/6
+<removed>7 26624 30719 4096 83 Linux 1/167/39 1/232/39
+<removed>8 32768 36863 4096 83 Linux 2/10/9 2/75/9
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical-delete b/tests/expected/fdisk/mbr-nondos-mode-logical-delete
new file mode 100644
index 0000000..c875b4a
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-logical-delete
@@ -0,0 +1,18 @@
+Delete logical partitions
+e2b25d19e00bfe88ed44ca4ac9216c39 mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 8191 6144 83 Linux 0/32/33 0/130/2
+<removed>2 8192 12287 4096 83 Linux 0/130/3 0/195/3
+<removed>3 12288 40959 28672 5 Extended 0/195/4 2/140/10
+<removed>5 26624 30719 4096 83 Linux 1/167/39 1/232/39
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical-recreate b/tests/expected/fdisk/mbr-nondos-mode-logical-recreate
new file mode 100644
index 0000000..764404b
--- /dev/null
+++ b/tests/expected/fdisk/mbr-nondos-mode-logical-recreate
@@ -0,0 +1,21 @@
+Create another logical partition
+640065c08c007d78166954475cd08ff8 mbr-nondos-mode.img
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 8191 6144 83 Linux 0/32/33 0/130/2
+<removed>2 8192 12287 4096 83 Linux 0/130/3 0/195/3
+<removed>3 12288 40959 28672 5 Extended 0/195/4 2/140/10
+<removed>5 26624 30719 4096 83 Linux 1/167/39 1/232/39
+<removed>6 14336 18431 4096 83 Linux 0/227/36 1/37/36
+
+Partition table entries are not in disk order.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-sort b/tests/expected/fdisk/mbr-sort
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/fdisk/mbr-sort
diff --git a/tests/expected/fdisk/mbr-sort-create-logical-partitions b/tests/expected/fdisk/mbr-sort-create-logical-partitions
new file mode 100644
index 0000000..9bf6cf5
--- /dev/null
+++ b/tests/expected/fdisk/mbr-sort-create-logical-partitions
@@ -0,0 +1,22 @@
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 4096 6143 2048 83 Linux 0/65/2 0/97/33
+<removed>2 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>3 6144 8191 2048 83 Linux 0/97/34 0/130/2
+<removed>4 8192 40959 32768 5 Extended 0/130/3 2/140/10
+<removed>5 14336 16383 2048 83 Linux 0/227/36 1/5/4
+<removed>6 22528 24575 2048 83 Linux 1/102/38 1/135/6
+<removed>7 18432 20479 2048 83 Linux 1/37/37 1/70/5
+<removed>8 10240 12287 2048 83 Linux 0/162/35 0/195/3
+
+Partition table entries are not in disk order.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-sort-create-primary-partitions b/tests/expected/fdisk/mbr-sort-create-primary-partitions
new file mode 100644
index 0000000..0fc5098
--- /dev/null
+++ b/tests/expected/fdisk/mbr-sort-create-primary-partitions
@@ -0,0 +1,18 @@
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 4096 6143 2048 83 Linux 0/65/2 0/97/33
+<removed>2 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>3 6144 8191 2048 83 Linux 0/97/34 0/130/2
+<removed>4 8192 40959 32768 5 Extended 0/130/3 2/140/10
+
+Partition table entries are not in disk order.
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-sort-empty-pt b/tests/expected/fdisk/mbr-sort-empty-pt
new file mode 100644
index 0000000..338ac65
--- /dev/null
+++ b/tests/expected/fdisk/mbr-sort-empty-pt
@@ -0,0 +1,10 @@
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+-------------------
+
diff --git a/tests/expected/fdisk/mbr-sort-fix-order b/tests/expected/fdisk/mbr-sort-fix-order
new file mode 100644
index 0000000..8802009
--- /dev/null
+++ b/tests/expected/fdisk/mbr-sort-fix-order
@@ -0,0 +1,20 @@
+
+---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 / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs
+<removed>1 2048 4095 2048 83 Linux 0/32/33 0/65/1
+<removed>2 4096 6143 2048 83 Linux 0/65/2 0/97/33
+<removed>3 6144 8191 2048 83 Linux 0/97/34 0/130/2
+<removed>4 8192 40959 32768 5 Extended 0/130/3 2/140/10
+<removed>5 10240 12287 2048 83 Linux 0/162/35 0/195/3
+<removed>6 14336 16383 2048 83 Linux 0/227/36 1/5/4
+<removed>7 18432 20479 2048 83 Linux 1/37/37 1/70/5
+<removed>8 22528 24575 2048 83 Linux 1/102/38 1/135/6
+-------------------
+
diff --git a/tests/expected/fdisk/oddinput b/tests/expected/fdisk/oddinput
new file mode 100644
index 0000000..3391422
--- /dev/null
+++ b/tests/expected/fdisk/oddinput
@@ -0,0 +1,7 @@
+---Initialize empty image
+f1c9645dbc14efddc7d8a322685f26eb oddinput.img
+---Empty image listing
+Disk testimage: 10 MiB, 10485760 bytes, 20480 sectors
+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/oddinput.err b/tests/expected/fdisk/oddinput.err
new file mode 100644
index 0000000..c39b607
--- /dev/null
+++ b/tests/expected/fdisk/oddinput.err
@@ -0,0 +1,4 @@
+---Nonexistent file
+fdisk: cannot open _a_file_that_does_not_exist_: ENOENT
+---Too small file
+fdisk: cannot open oddinput.toosmall: EINVAL
diff --git a/tests/expected/fdisk/oddinput.toosmall b/tests/expected/fdisk/oddinput.toosmall
new file mode 100644
index 0000000..06c75ed
--- /dev/null
+++ b/tests/expected/fdisk/oddinput.toosmall
@@ -0,0 +1 @@
+This file is too small
diff --git a/tests/expected/fdisk/sunlabel b/tests/expected/fdisk/sunlabel
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/fdisk/sunlabel
diff --git a/tests/expected/fdisk/sunlabel-create-first-partition b/tests/expected/fdisk/sunlabel-create-first-partition
new file mode 100644
index 0000000..61fecac
--- /dev/null
+++ b/tests/expected/fdisk/sunlabel-create-first-partition
@@ -0,0 +1,16 @@
+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 / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 83 Linux native
diff --git a/tests/expected/fdisk/sunlabel-create-second-partition b/tests/expected/fdisk/sunlabel-create-second-partition
new file mode 100644
index 0000000..f6442d3
--- /dev/null
+++ b/tests/expected/fdisk/sunlabel-create-second-partition
@@ -0,0 +1,29 @@
+
+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 partition <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 / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 4 SunOS usr ur
+<removed>2 129 325 198 6354432 83 Linux native
diff --git a/tests/expected/fdisk/sunlabel-delete-all-partitions b/tests/expected/fdisk/sunlabel-delete-all-partitions
new file mode 100644
index 0000000..0dee636
--- /dev/null
+++ b/tests/expected/fdisk/sunlabel-delete-all-partitions
@@ -0,0 +1 @@
+502ba7a0cfdce2849c3a99881f0590c3 sunlabel.img
diff --git a/tests/expected/fdisk/sunlabel-empty-sun-pt b/tests/expected/fdisk/sunlabel-empty-sun-pt
new file mode 100644
index 0000000..0d38bd7
--- /dev/null
+++ b/tests/expected/fdisk/sunlabel-empty-sun-pt
@@ -0,0 +1,14 @@
+f1c9645dbc14efddc7d8a322685f26eb 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 / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
diff --git a/tests/expected/fdisk/sunlabel-set-first-par-mountable b/tests/expected/fdisk/sunlabel-set-first-par-mountable
new file mode 100644
index 0000000..610dfa1
--- /dev/null
+++ b/tests/expected/fdisk/sunlabel-set-first-par-mountable
@@ -0,0 +1,16 @@
+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 / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 4 SunOS usr ur
diff --git a/tests/expected/fdisk/sunlabel-set-first-par-readonly b/tests/expected/fdisk/sunlabel-set-first-par-readonly
new file mode 100644
index 0000000..042ba76
--- /dev/null
+++ b/tests/expected/fdisk/sunlabel-set-first-par-readonly
@@ -0,0 +1,16 @@
+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 / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 4 SunOS usr r
diff --git a/tests/expected/fdisk/sunlabel-set-partition-sysid b/tests/expected/fdisk/sunlabel-set-partition-sysid
new file mode 100644
index 0000000..b664433
--- /dev/null
+++ b/tests/expected/fdisk/sunlabel-set-partition-sysid
@@ -0,0 +1,16 @@
+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 / <removed> bytes
+Disklabel type: sun
+Label ID: Linux cyl 325 alt 0 hd 1 sec 63
+Rpm: 5400
+Alternate cylinders: 0
+Physical cylinders: 325
+Extra sects/cyl: 0
+Interleave: 1
+
+Device Start End Cylinders Size Id Type Flags
+<removed>1 1 128 129 4128768 4 SunOS usr
diff --git a/tests/expected/fincore/count.4096 b/tests/expected/fincore/count.4096
new file mode 100644
index 0000000..e90044c
--- /dev/null
+++ b/tests/expected/fincore/count.4096
@@ -0,0 +1,53 @@
+[ NO EXCITING FILE ]
+return value: 1
+ 0 0 i_EMPTY_FILE
+return value: 0
+ 1 4095 i_PAGESIZE_-1__incore_
+return value: 0
+ 1 4096 i_JUST_PAGESIZE_incore_
+return value: 0
+ 0 4096 i_JUST_PAGESIZE_directio_
+return value: 0
+ 2 8192 i_TWO_PAGES_incore_
+return value: 0
+ 0 8192 i_TWO_PAGES_directio_
+return value: 0
+ 1 8192 i_TWO_PAGES_mixed_directio_incore_
+return value: 0
+ 1 8192 i_TWO_PAGES_mixed_incore_directio_
+return value: 0
+ 2 134213632 i_WINDOW_SIZE_incore-sparse-incore_
+return value: 0
+ 0 134213632 i_WINDOW_SIZE_directio-sparse-directio_
+return value: 0
+ 1 134213632 i_WINDOW_SIZE_incore-sparse-directio_
+return value: 0
+ 1 134213632 i_WINDOW_SIZE_directio-sparse-incore_
+return value: 0
+ 2 134217728 i_WINDOW_SIZE_+_1_page_incore-sparse-incore_
+return value: 0
+ 0 134217728 i_WINDOW_SIZE_+_1_page_directio-sparse-directio_
+return value: 0
+ 1 134217728 i_WINDOW_SIZE_+_1_page_incore-sparse-directio_
+return value: 0
+ 1 134217728 i_WINDOW_SIZE_+_1_page_directio-sparse-incore_
+return value: 0
+[ MULTIPLE FILES ]
+PAGES SIZE FILE
+ 0 0 i_EMPTY_FILE
+ 1 4095 i_PAGESIZE_-1__incore_
+ 1 4096 i_JUST_PAGESIZE_incore_
+ 0 4096 i_JUST_PAGESIZE_directio_
+ 2 8192 i_TWO_PAGES_incore_
+ 0 8192 i_TWO_PAGES_directio_
+ 1 8192 i_TWO_PAGES_mixed_directio_incore_
+ 1 8192 i_TWO_PAGES_mixed_incore_directio_
+ 2 134213632 i_WINDOW_SIZE_incore-sparse-incore_
+ 0 134213632 i_WINDOW_SIZE_directio-sparse-directio_
+ 1 134213632 i_WINDOW_SIZE_incore-sparse-directio_
+ 1 134213632 i_WINDOW_SIZE_directio-sparse-incore_
+ 2 134217728 i_WINDOW_SIZE_+_1_page_incore-sparse-incore_
+ 0 134217728 i_WINDOW_SIZE_+_1_page_directio-sparse-directio_
+ 1 134217728 i_WINDOW_SIZE_+_1_page_incore-sparse-directio_
+ 1 134217728 i_WINDOW_SIZE_+_1_page_directio-sparse-incore_
+return value: 1
diff --git a/tests/expected/fincore/count.65536 b/tests/expected/fincore/count.65536
new file mode 100644
index 0000000..22d6a08
--- /dev/null
+++ b/tests/expected/fincore/count.65536
@@ -0,0 +1,53 @@
+[ NO EXCITING FILE ]
+return value: 1
+ 0 0 i_EMPTY_FILE
+return value: 0
+ 1 65535 i_PAGESIZE_-1__incore_
+return value: 0
+ 1 65536 i_JUST_PAGESIZE_incore_
+return value: 0
+ 0 65536 i_JUST_PAGESIZE_directio_
+return value: 0
+ 2 131072 i_TWO_PAGES_incore_
+return value: 0
+ 0 131072 i_TWO_PAGES_directio_
+return value: 0
+ 1 131072 i_TWO_PAGES_mixed_directio_incore_
+return value: 0
+ 1 131072 i_TWO_PAGES_mixed_incore_directio_
+return value: 0
+ 2 2147418112 i_WINDOW_SIZE_incore-sparse-incore_
+return value: 0
+ 0 2147418112 i_WINDOW_SIZE_directio-sparse-directio_
+return value: 0
+ 1 2147418112 i_WINDOW_SIZE_incore-sparse-directio_
+return value: 0
+ 1 2147418112 i_WINDOW_SIZE_directio-sparse-incore_
+return value: 0
+ 2 2147483648 i_WINDOW_SIZE_+_1_page_incore-sparse-incore_
+return value: 0
+ 0 2147483648 i_WINDOW_SIZE_+_1_page_directio-sparse-directio_
+return value: 0
+ 1 2147483648 i_WINDOW_SIZE_+_1_page_incore-sparse-directio_
+return value: 0
+ 1 2147483648 i_WINDOW_SIZE_+_1_page_directio-sparse-incore_
+return value: 0
+[ MULTIPLE FILES ]
+PAGES SIZE FILE
+ 0 0 i_EMPTY_FILE
+ 1 65535 i_PAGESIZE_-1__incore_
+ 1 65536 i_JUST_PAGESIZE_incore_
+ 0 65536 i_JUST_PAGESIZE_directio_
+ 2 131072 i_TWO_PAGES_incore_
+ 0 131072 i_TWO_PAGES_directio_
+ 1 131072 i_TWO_PAGES_mixed_directio_incore_
+ 1 131072 i_TWO_PAGES_mixed_incore_directio_
+ 2 2147418112 i_WINDOW_SIZE_incore-sparse-incore_
+ 0 2147418112 i_WINDOW_SIZE_directio-sparse-directio_
+ 1 2147418112 i_WINDOW_SIZE_incore-sparse-directio_
+ 1 2147418112 i_WINDOW_SIZE_directio-sparse-incore_
+ 2 2147483648 i_WINDOW_SIZE_+_1_page_incore-sparse-incore_
+ 0 2147483648 i_WINDOW_SIZE_+_1_page_directio-sparse-directio_
+ 1 2147483648 i_WINDOW_SIZE_+_1_page_incore-sparse-directio_
+ 1 2147483648 i_WINDOW_SIZE_+_1_page_directio-sparse-incore_
+return value: 1
diff --git a/tests/expected/fincore/count.err.4096 b/tests/expected/fincore/count.err.4096
new file mode 100644
index 0000000..e3fad01
--- /dev/null
+++ b/tests/expected/fincore/count.err.4096
@@ -0,0 +1,4 @@
+[ NO EXCITING FILE ]
+fincore: failed to open: no_such_file: No such file or directory
+[ MULTIPLE FILES ]
+fincore: failed to open: no_such_file: No such file or directory
diff --git a/tests/expected/fincore/count.err.65536 b/tests/expected/fincore/count.err.65536
new file mode 100644
index 0000000..e3fad01
--- /dev/null
+++ b/tests/expected/fincore/count.err.65536
@@ -0,0 +1,4 @@
+[ NO EXCITING FILE ]
+fincore: failed to open: no_such_file: No such file or directory
+[ MULTIPLE FILES ]
+fincore: failed to open: no_such_file: No such file or directory
diff --git a/tests/expected/fincore/count.err.nosize b/tests/expected/fincore/count.err.nosize
new file mode 100644
index 0000000..e3fad01
--- /dev/null
+++ b/tests/expected/fincore/count.err.nosize
@@ -0,0 +1,4 @@
+[ NO EXCITING FILE ]
+fincore: failed to open: no_such_file: No such file or directory
+[ MULTIPLE FILES ]
+fincore: failed to open: no_such_file: No such file or directory
diff --git a/tests/expected/fincore/count.nosize b/tests/expected/fincore/count.nosize
new file mode 100644
index 0000000..6fdcea0
--- /dev/null
+++ b/tests/expected/fincore/count.nosize
@@ -0,0 +1,53 @@
+[ NO EXCITING FILE ]
+return value: 1
+ 0 i_EMPTY_FILE
+return value: 0
+ 1 i_PAGESIZE_-1__incore_
+return value: 0
+ 1 i_JUST_PAGESIZE_incore_
+return value: 0
+ 0 i_JUST_PAGESIZE_directio_
+return value: 0
+ 2 i_TWO_PAGES_incore_
+return value: 0
+ 0 i_TWO_PAGES_directio_
+return value: 0
+ 1 i_TWO_PAGES_mixed_directio_incore_
+return value: 0
+ 1 i_TWO_PAGES_mixed_incore_directio_
+return value: 0
+ 2 i_WINDOW_SIZE_incore-sparse-incore_
+return value: 0
+ 0 i_WINDOW_SIZE_directio-sparse-directio_
+return value: 0
+ 1 i_WINDOW_SIZE_incore-sparse-directio_
+return value: 0
+ 1 i_WINDOW_SIZE_directio-sparse-incore_
+return value: 0
+ 2 i_WINDOW_SIZE_+_1_page_incore-sparse-incore_
+return value: 0
+ 0 i_WINDOW_SIZE_+_1_page_directio-sparse-directio_
+return value: 0
+ 1 i_WINDOW_SIZE_+_1_page_incore-sparse-directio_
+return value: 0
+ 1 i_WINDOW_SIZE_+_1_page_directio-sparse-incore_
+return value: 0
+[ MULTIPLE FILES ]
+PAGES FILE
+ 0 i_EMPTY_FILE
+ 1 i_PAGESIZE_-1__incore_
+ 1 i_JUST_PAGESIZE_incore_
+ 0 i_JUST_PAGESIZE_directio_
+ 2 i_TWO_PAGES_incore_
+ 0 i_TWO_PAGES_directio_
+ 1 i_TWO_PAGES_mixed_directio_incore_
+ 1 i_TWO_PAGES_mixed_incore_directio_
+ 2 i_WINDOW_SIZE_incore-sparse-incore_
+ 0 i_WINDOW_SIZE_directio-sparse-directio_
+ 1 i_WINDOW_SIZE_incore-sparse-directio_
+ 1 i_WINDOW_SIZE_directio-sparse-incore_
+ 2 i_WINDOW_SIZE_+_1_page_incore-sparse-incore_
+ 0 i_WINDOW_SIZE_+_1_page_directio-sparse-directio_
+ 1 i_WINDOW_SIZE_+_1_page_incore-sparse-directio_
+ 1 i_WINDOW_SIZE_+_1_page_directio-sparse-incore_
+return value: 1
diff --git a/tests/expected/findmnt/filter-options b/tests/expected/findmnt/filter-options
new file mode 100644
index 0000000..97b0ead
--- /dev/null
+++ b/tests/expected/findmnt/filter-options
@@ -0,0 +1,31 @@
+TARGET SOURCE FSTYPE OPTIONS
+/proc /proc proc rw,relatime
+|-/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/proc/sys/fs/binfmt_misc none binfmt_misc rw,relatime
+`-/proc/bus/usb /proc/bus/usb usbfs rw,relatime
+/sys /sys sysfs rw,relatime
+|-/sys/fs/cgroup tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,mode=755
+| |-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+| |-/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
+| |-/sys/fs/cgroup/ns cgroup cgroup rw,nosuid,nodev,noexec,relatime,ns
+| |-/sys/fs/cgroup/cpu cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu
+| |-/sys/fs/cgroup/cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuacct
+| |-/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
+| |-/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
+| |-/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
+| |-/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls
+| `-/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
+|-/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+|-/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+`-/sys/fs/fuse/connections fusectl fusectl rw,relatime
+/dev udev devtmpfs rw,relatime,size=1983516k,nr_inodes=495879,mode=755
+|-/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000
+|-/dev/shm tmpfs tmpfs rw,relatime
+|-/dev/hugepages systemd-1 autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/dev/hugepages hugetlbfs hugetlbfs rw,relatime
+`-/dev/mqueue systemd-1 autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+ `-/dev/mqueue mqueue mqueue rw,relatime
+/home/kzak/.gvfs gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
+/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime
+/mnt/sounds //foo.home/bar/ cifs 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
+rc=0
diff --git a/tests/expected/findmnt/filter-options-name b/tests/expected/findmnt/filter-options-name
new file mode 100644
index 0000000..3c635ae
--- /dev/null
+++ b/tests/expected/findmnt/filter-options-name
@@ -0,0 +1,7 @@
+TARGET SOURCE FSTYPE OPTIONS
+/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+/dev/hugepages systemd-1 autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+/dev/mqueue systemd-1 autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+rc=0
diff --git a/tests/expected/findmnt/filter-options-nameval b/tests/expected/findmnt/filter-options-nameval
new file mode 100644
index 0000000..21219c5
--- /dev/null
+++ b/tests/expected/findmnt/filter-options-nameval
@@ -0,0 +1,3 @@
+TARGET SOURCE FSTYPE OPTIONS
+/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+rc=0
diff --git a/tests/expected/findmnt/filter-options-nameval-multi b/tests/expected/findmnt/filter-options-nameval-multi
new file mode 100644
index 0000000..f2ab3ce
--- /dev/null
+++ b/tests/expected/findmnt/filter-options-nameval-multi
@@ -0,0 +1,3 @@
+TARGET SOURCE FSTYPE OPTIONS
+/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000
+rc=0
diff --git a/tests/expected/findmnt/filter-options-nameval-neg b/tests/expected/findmnt/filter-options-nameval-neg
new file mode 100644
index 0000000..f0467ef
--- /dev/null
+++ b/tests/expected/findmnt/filter-options-nameval-neg
@@ -0,0 +1,33 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered
+|-/proc /proc proc rw,relatime
+| |-/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| | `-/proc/sys/fs/binfmt_misc none binfmt_misc rw,relatime
+| `-/proc/bus/usb /proc/bus/usb usbfs rw,relatime
+|-/sys /sys sysfs rw,relatime
+| |-/sys/fs/cgroup tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,mode=755
+| | |-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+| | |-/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
+| | |-/sys/fs/cgroup/ns cgroup cgroup rw,nosuid,nodev,noexec,relatime,ns
+| | |-/sys/fs/cgroup/cpu cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu
+| | |-/sys/fs/cgroup/cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuacct
+| | |-/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
+| | |-/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
+| | |-/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
+| | |-/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls
+| | `-/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
+| |-/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/sys/fs/fuse/connections fusectl fusectl rw,relatime
+|-/dev udev devtmpfs rw,relatime,size=1983516k,nr_inodes=495879,mode=755
+| |-/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000
+| |-/dev/shm tmpfs tmpfs rw,relatime
+| |-/dev/hugepages systemd-1 autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| | `-/dev/hugepages hugetlbfs hugetlbfs rw,relatime
+| `-/dev/mqueue systemd-1 autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/dev/mqueue mqueue mqueue rw,relatime
+|-/boot /dev/sda6 ext3 rw,noatime,errors=continue,barrier=0,data=ordered
+|-/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered
+| `-/home/kzak/.gvfs gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
+|-/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime
+`-/mnt/sounds //foo.home/bar/ cifs 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
+rc=0
diff --git a/tests/expected/findmnt/filter-options-neg b/tests/expected/findmnt/filter-options-neg
new file mode 100644
index 0000000..aab2461
--- /dev/null
+++ b/tests/expected/findmnt/filter-options-neg
@@ -0,0 +1,5 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered
+|-/boot /dev/sda6 ext3 rw,noatime,errors=continue,barrier=0,data=ordered
+`-/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered
+rc=0
diff --git a/tests/expected/findmnt/filter-options-no b/tests/expected/findmnt/filter-options-no
new file mode 100644
index 0000000..aab2461
--- /dev/null
+++ b/tests/expected/findmnt/filter-options-no
@@ -0,0 +1,5 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered
+|-/boot /dev/sda6 ext3 rw,noatime,errors=continue,barrier=0,data=ordered
+`-/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered
+rc=0
diff --git a/tests/expected/findmnt/filter-options-no-multi b/tests/expected/findmnt/filter-options-no-multi
new file mode 100644
index 0000000..2d714ae
--- /dev/null
+++ b/tests/expected/findmnt/filter-options-no-multi
@@ -0,0 +1,3 @@
+TARGET SOURCE FSTYPE OPTIONS
+/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
+rc=0
diff --git a/tests/expected/findmnt/filter-types b/tests/expected/findmnt/filter-types
new file mode 100644
index 0000000..8233dac
--- /dev/null
+++ b/tests/expected/findmnt/filter-types
@@ -0,0 +1,4 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered
+`-/boot /dev/sda6 ext3 rw,noatime,errors=continue,barrier=0,data=ordered
+rc=0
diff --git a/tests/expected/findmnt/filter-types-multi b/tests/expected/findmnt/filter-types-multi
new file mode 100644
index 0000000..aab2461
--- /dev/null
+++ b/tests/expected/findmnt/filter-types-multi
@@ -0,0 +1,5 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered
+|-/boot /dev/sda6 ext3 rw,noatime,errors=continue,barrier=0,data=ordered
+`-/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered
+rc=0
diff --git a/tests/expected/findmnt/filter-types-neg b/tests/expected/findmnt/filter-types-neg
new file mode 100644
index 0000000..97b0ead
--- /dev/null
+++ b/tests/expected/findmnt/filter-types-neg
@@ -0,0 +1,31 @@
+TARGET SOURCE FSTYPE OPTIONS
+/proc /proc proc rw,relatime
+|-/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/proc/sys/fs/binfmt_misc none binfmt_misc rw,relatime
+`-/proc/bus/usb /proc/bus/usb usbfs rw,relatime
+/sys /sys sysfs rw,relatime
+|-/sys/fs/cgroup tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,mode=755
+| |-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+| |-/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
+| |-/sys/fs/cgroup/ns cgroup cgroup rw,nosuid,nodev,noexec,relatime,ns
+| |-/sys/fs/cgroup/cpu cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu
+| |-/sys/fs/cgroup/cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuacct
+| |-/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
+| |-/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
+| |-/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
+| |-/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls
+| `-/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
+|-/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+|-/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+`-/sys/fs/fuse/connections fusectl fusectl rw,relatime
+/dev udev devtmpfs rw,relatime,size=1983516k,nr_inodes=495879,mode=755
+|-/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000
+|-/dev/shm tmpfs tmpfs rw,relatime
+|-/dev/hugepages systemd-1 autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/dev/hugepages hugetlbfs hugetlbfs rw,relatime
+`-/dev/mqueue systemd-1 autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+ `-/dev/mqueue mqueue mqueue rw,relatime
+/home/kzak/.gvfs gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
+/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime
+/mnt/sounds //foo.home/bar/ cifs 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
+rc=0
diff --git a/tests/expected/findmnt/outputs-default b/tests/expected/findmnt/outputs-default
new file mode 100644
index 0000000..0159935
--- /dev/null
+++ b/tests/expected/findmnt/outputs-default
@@ -0,0 +1,34 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered
+|-/proc /proc proc rw,relatime
+| |-/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| | `-/proc/sys/fs/binfmt_misc none binfmt_misc rw,relatime
+| `-/proc/bus/usb /proc/bus/usb usbfs rw,relatime
+|-/sys /sys sysfs rw,relatime
+| |-/sys/fs/cgroup tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,mode=755
+| | |-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+| | |-/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
+| | |-/sys/fs/cgroup/ns cgroup cgroup rw,nosuid,nodev,noexec,relatime,ns
+| | |-/sys/fs/cgroup/cpu cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu
+| | |-/sys/fs/cgroup/cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuacct
+| | |-/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
+| | |-/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
+| | |-/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
+| | |-/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls
+| | `-/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
+| |-/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| |-/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/sys/fs/fuse/connections fusectl fusectl rw,relatime
+|-/dev udev devtmpfs rw,relatime,size=1983516k,nr_inodes=495879,mode=755
+| |-/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000
+| |-/dev/shm tmpfs tmpfs rw,relatime
+| |-/dev/hugepages systemd-1 autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| | `-/dev/hugepages hugetlbfs hugetlbfs rw,relatime
+| `-/dev/mqueue systemd-1 autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/dev/mqueue mqueue mqueue rw,relatime
+|-/boot /dev/sda6 ext3 rw,noatime,errors=continue,barrier=0,data=ordered
+|-/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered
+| `-/home/kzak/.gvfs gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
+|-/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime
+`-/mnt/sounds //foo.home/bar/ cifs 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
+rc=0
diff --git a/tests/expected/findmnt/outputs-force-tree b/tests/expected/findmnt/outputs-force-tree
new file mode 100644
index 0000000..0159935
--- /dev/null
+++ b/tests/expected/findmnt/outputs-force-tree
@@ -0,0 +1,34 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered
+|-/proc /proc proc rw,relatime
+| |-/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| | `-/proc/sys/fs/binfmt_misc none binfmt_misc rw,relatime
+| `-/proc/bus/usb /proc/bus/usb usbfs rw,relatime
+|-/sys /sys sysfs rw,relatime
+| |-/sys/fs/cgroup tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,mode=755
+| | |-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+| | |-/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
+| | |-/sys/fs/cgroup/ns cgroup cgroup rw,nosuid,nodev,noexec,relatime,ns
+| | |-/sys/fs/cgroup/cpu cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu
+| | |-/sys/fs/cgroup/cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuacct
+| | |-/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
+| | |-/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
+| | |-/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
+| | |-/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls
+| | `-/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
+| |-/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| |-/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/sys/fs/fuse/connections fusectl fusectl rw,relatime
+|-/dev udev devtmpfs rw,relatime,size=1983516k,nr_inodes=495879,mode=755
+| |-/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000
+| |-/dev/shm tmpfs tmpfs rw,relatime
+| |-/dev/hugepages systemd-1 autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| | `-/dev/hugepages hugetlbfs hugetlbfs rw,relatime
+| `-/dev/mqueue systemd-1 autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/dev/mqueue mqueue mqueue rw,relatime
+|-/boot /dev/sda6 ext3 rw,noatime,errors=continue,barrier=0,data=ordered
+|-/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered
+| `-/home/kzak/.gvfs gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
+|-/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime
+`-/mnt/sounds //foo.home/bar/ cifs 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
+rc=0
diff --git a/tests/expected/findmnt/outputs-kernel b/tests/expected/findmnt/outputs-kernel
new file mode 100644
index 0000000..0159935
--- /dev/null
+++ b/tests/expected/findmnt/outputs-kernel
@@ -0,0 +1,34 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered
+|-/proc /proc proc rw,relatime
+| |-/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| | `-/proc/sys/fs/binfmt_misc none binfmt_misc rw,relatime
+| `-/proc/bus/usb /proc/bus/usb usbfs rw,relatime
+|-/sys /sys sysfs rw,relatime
+| |-/sys/fs/cgroup tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,mode=755
+| | |-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+| | |-/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
+| | |-/sys/fs/cgroup/ns cgroup cgroup rw,nosuid,nodev,noexec,relatime,ns
+| | |-/sys/fs/cgroup/cpu cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu
+| | |-/sys/fs/cgroup/cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuacct
+| | |-/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
+| | |-/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
+| | |-/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
+| | |-/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls
+| | `-/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
+| |-/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| |-/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/sys/fs/fuse/connections fusectl fusectl rw,relatime
+|-/dev udev devtmpfs rw,relatime,size=1983516k,nr_inodes=495879,mode=755
+| |-/dev/pts devpts devpts rw,relatime,gid=5,mode=620,ptmxmode=000
+| |-/dev/shm tmpfs tmpfs rw,relatime
+| |-/dev/hugepages systemd-1 autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| | `-/dev/hugepages hugetlbfs hugetlbfs rw,relatime
+| `-/dev/mqueue systemd-1 autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+| `-/dev/mqueue mqueue mqueue rw,relatime
+|-/boot /dev/sda6 ext3 rw,noatime,errors=continue,barrier=0,data=ordered
+|-/home/kzak /dev/mapper/kzak-home ext4 rw,noatime,barrier=1,data=ordered
+| `-/home/kzak/.gvfs gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
+|-/var/lib/nfs/rpc_pipefs sunrpc rpc_pipefs rw,relatime
+`-/mnt/sounds //foo.home/bar/ cifs 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
+rc=0
diff --git a/tests/expected/findmnt/outputs-messy-mountinfo b/tests/expected/findmnt/outputs-messy-mountinfo
new file mode 100644
index 0000000..c7225a1
--- /dev/null
+++ b/tests/expected/findmnt/outputs-messy-mountinfo
@@ -0,0 +1,31 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda3[/arch] ext4 rw,relatime
+|-/sys sysfs sysfs ro,nosuid,nodev,noexec,relatime
+| `-/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec,mode=755
+| |-/sys/fs/cgroup/perf_event cgroup cgroup ro,nosuid,nodev,noexec,relatime,perf_event
+| |-/sys/fs/cgroup/net_cls cgroup cgroup ro,nosuid,nodev,noexec,relatime,net_cls
+| |-/sys/fs/cgroup/blkio cgroup cgroup ro,nosuid,nodev,noexec,relatime,blkio
+| |-/sys/fs/cgroup/memory cgroup cgroup ro,nosuid,nodev,noexec,relatime,memory
+| |-/sys/fs/cgroup/pids cgroup cgroup ro,nosuid,nodev,noexec,relatime,pids
+| |-/sys/fs/cgroup/cpuset cgroup cgroup ro,nosuid,nodev,noexec,relatime,cpuset
+| |-/sys/fs/cgroup/freezer cgroup cgroup ro,nosuid,nodev,noexec,relatime,freezer
+| |-/sys/fs/cgroup/cpu,cpuacct cgroup cgroup ro,nosuid,nodev,noexec,relatime,cpu,cpuacct
+| |-/sys/fs/cgroup/devices cgroup cgroup ro,nosuid,nodev,noexec,relatime,devices
+| `-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
+|-/dev tmpfs tmpfs rw,nosuid,mode=755
+| |-/dev/mqueue mqueue mqueue rw,relatime
+| |-/dev/hugepages hugetlbfs hugetlbfs rw,relatime
+| |-/dev/shm tmpfs tmpfs rw,nosuid,nodev
+| |-/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666
+| `-/dev/console devpts[/5] devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
+|-/run tmpfs tmpfs rw,nosuid,nodev,mode=755
+| |-/run/user/0 tmpfs tmpfs rw,nosuid,nodev,relatime,size=1634120k,mode=700
+| `-/run/systemd/nspawn/incoming run[/systemd/nspawn/propagate/arch] tmpfs ro,relatime,mode=755
+|-/tmp tmpfs tmpfs rw
+`-/proc proc proc rw,nosuid,nodev,noexec,relatime
+ |-/proc/sys/kernel/random/boot_id tmpfs[/proc-sys-kernel-random-boot-id//deleted] tmpfs rw,nosuid,nodev,mode=755
+ |-/proc/kmsg tmpfs[/kmsg//deleted] tmpfs rw,nosuid,nodev,mode=755
+ |-/proc/sys proc[/sys] proc ro,nosuid,nodev,noexec,relatime
+ | `-/proc/sys/kernel/random/boot_id tmpfs[/proc-sys-kernel-random-boot-id//deleted] tmpfs ro,nosuid,nodev,mode=755
+ `-/proc/sysrq-trigger proc[/sysrq-trigger] proc ro,nosuid,nodev,noexec,relatime
+rc=0
diff --git a/tests/expected/findmnt/outputs-submounts b/tests/expected/findmnt/outputs-submounts
new file mode 100644
index 0000000..d7661e3
--- /dev/null
+++ b/tests/expected/findmnt/outputs-submounts
@@ -0,0 +1,17 @@
+TARGET SOURCE FSTYPE OPTIONS
+/sys /sys sysfs rw,relatime
+|-/sys/fs/cgroup tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,mode=755
+| |-/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+| |-/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
+| |-/sys/fs/cgroup/ns cgroup cgroup rw,nosuid,nodev,noexec,relatime,ns
+| |-/sys/fs/cgroup/cpu cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu
+| |-/sys/fs/cgroup/cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuacct
+| |-/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
+| |-/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
+| |-/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
+| |-/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls
+| `-/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
+|-/sys/kernel/security systemd-1 autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+|-/sys/kernel/debug systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+`-/sys/fs/fuse/connections fusectl fusectl rw,relatime
+rc=0
diff --git a/tests/expected/findmnt/target-non-root b/tests/expected/findmnt/target-non-root
new file mode 100644
index 0000000..3214337
--- /dev/null
+++ b/tests/expected/findmnt/target-non-root
@@ -0,0 +1 @@
+rc=1
diff --git a/tests/expected/findmnt/target-root b/tests/expected/findmnt/target-root
new file mode 100644
index 0000000..a21dbdb
--- /dev/null
+++ b/tests/expected/findmnt/target-root
@@ -0,0 +1,3 @@
+TARGET SOURCE FSTYPE OPTIONS
+/ /dev/sda4 ext3 rw,noatime,errors=continue,user_xattr,acl,barrier=0,data=ordered
+rc=0
diff --git a/tests/expected/fsck/ismounted b/tests/expected/fsck/ismounted
new file mode 100644
index 0000000..bc3bd43
--- /dev/null
+++ b/tests/expected/fsck/ismounted
@@ -0,0 +1 @@
+mounted
diff --git a/tests/expected/getopt/basic b/tests/expected/getopt/basic
new file mode 100644
index 0000000..c2c90ae
--- /dev/null
+++ b/tests/expected/getopt/basic
@@ -0,0 +1,9 @@
+Option a
+Option b, argument `1'
+Option c, argument `2'
+Option a
+Option b, argument `3'
+Option c, no argument
+Remaining arguments:
+--> `foo'
+--> `bar'
diff --git a/tests/expected/getopt/basic.err b/tests/expected/getopt/basic.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/basic.err
diff --git a/tests/expected/getopt/options-alternative_option_clash b/tests/expected/getopt/options-alternative_option_clash
new file mode 100644
index 0000000..04ae19d
--- /dev/null
+++ b/tests/expected/getopt/options-alternative_option_clash
@@ -0,0 +1,2 @@
+ -a --abcde --abcde -a -c --
+exit value: 0
diff --git a/tests/expected/getopt/options-alternative_option_clash.err b/tests/expected/getopt/options-alternative_option_clash.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-alternative_option_clash.err
diff --git a/tests/expected/getopt/options-alternative_option_long b/tests/expected/getopt/options-alternative_option_long
new file mode 100644
index 0000000..0f5fc19
--- /dev/null
+++ b/tests/expected/getopt/options-alternative_option_long
@@ -0,0 +1,2 @@
+ -a --one --two 'MANDATORY' --three 'OPTIONAL' --
+exit value: 0
diff --git a/tests/expected/getopt/options-alternative_option_long.err b/tests/expected/getopt/options-alternative_option_long.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-alternative_option_long.err
diff --git a/tests/expected/getopt/options-alternative_option_short b/tests/expected/getopt/options-alternative_option_short
new file mode 100644
index 0000000..0f5fc19
--- /dev/null
+++ b/tests/expected/getopt/options-alternative_option_short
@@ -0,0 +1,2 @@
+ -a --one --two 'MANDATORY' --three 'OPTIONAL' --
+exit value: 0
diff --git a/tests/expected/getopt/options-alternative_option_short.err b/tests/expected/getopt/options-alternative_option_short.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-alternative_option_short.err
diff --git a/tests/expected/getopt/options-compatible b/tests/expected/getopt/options-compatible
new file mode 100644
index 0000000..f3df58d
--- /dev/null
+++ b/tests/expected/getopt/options-compatible
@@ -0,0 +1,3 @@
+exit value: 2
+ --
+exit value: 0
diff --git a/tests/expected/getopt/options-compatible.err b/tests/expected/getopt/options-compatible.err
new file mode 100644
index 0000000..d2c01b7
--- /dev/null
+++ b/tests/expected/getopt/options-compatible.err
@@ -0,0 +1,2 @@
+getopt: missing optstring argument
+Try 'getopt --help' for more information.
diff --git a/tests/expected/getopt/options-csh b/tests/expected/getopt/options-csh
new file mode 100644
index 0000000..86e48f4
--- /dev/null
+++ b/tests/expected/getopt/options-csh
@@ -0,0 +1,2 @@
+ -a -b '1' -c '2' --a-long --b-long '3' --c-long '' -- 'foo' 'bar'
+exit value: 0
diff --git a/tests/expected/getopt/options-csh.err b/tests/expected/getopt/options-csh.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-csh.err
diff --git a/tests/expected/getopt/options-invalid_getopt_option b/tests/expected/getopt/options-invalid_getopt_option
new file mode 100644
index 0000000..0af0d83
--- /dev/null
+++ b/tests/expected/getopt/options-invalid_getopt_option
@@ -0,0 +1 @@
+exit value: 2
diff --git a/tests/expected/getopt/options-invalid_getopt_option.err b/tests/expected/getopt/options-invalid_getopt_option.err
new file mode 100644
index 0000000..1eb8821
--- /dev/null
+++ b/tests/expected/getopt/options-invalid_getopt_option.err
@@ -0,0 +1,2 @@
+getopt: invalid option -- 'b'
+Try 'getopt --help' for more information.
diff --git a/tests/expected/getopt/options-invocation_model_one b/tests/expected/getopt/options-invocation_model_one
new file mode 100644
index 0000000..ca4ddca
--- /dev/null
+++ b/tests/expected/getopt/options-invocation_model_one
@@ -0,0 +1,2 @@
+ -b -d -e OPTIONAL1 -f -a -c -ISREQUIRED -g BECOMES THREE ARGUMENTS -- ARG0 ARG1 NOT_OPTIONAL ARG2 ARG3
+exit value: 0
diff --git a/tests/expected/getopt/options-invocation_model_one.err b/tests/expected/getopt/options-invocation_model_one.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-invocation_model_one.err
diff --git a/tests/expected/getopt/options-invocation_model_three_as_one b/tests/expected/getopt/options-invocation_model_three_as_one
new file mode 100644
index 0000000..1d4701f
--- /dev/null
+++ b/tests/expected/getopt/options-invocation_model_three_as_one
@@ -0,0 +1,2 @@
+ -b -d '' -e 'OPTIONAL1' -f '' -a -c '-ISREQUIRED' -g 'BECOMES THREE ARGUMENTS' -- 'ARG0' 'ARG1' 'NOT_OPTIONAL' 'ARG2' 'ARG3'
+exit value: 0
diff --git a/tests/expected/getopt/options-invocation_model_three_as_one.err b/tests/expected/getopt/options-invocation_model_three_as_one.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-invocation_model_three_as_one.err
diff --git a/tests/expected/getopt/options-invocation_model_two_as_one b/tests/expected/getopt/options-invocation_model_two_as_one
new file mode 100644
index 0000000..1d4701f
--- /dev/null
+++ b/tests/expected/getopt/options-invocation_model_two_as_one
@@ -0,0 +1,2 @@
+ -b -d '' -e 'OPTIONAL1' -f '' -a -c '-ISREQUIRED' -g 'BECOMES THREE ARGUMENTS' -- 'ARG0' 'ARG1' 'NOT_OPTIONAL' 'ARG2' 'ARG3'
+exit value: 0
diff --git a/tests/expected/getopt/options-invocation_model_two_as_one.err b/tests/expected/getopt/options-invocation_model_two_as_one.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-invocation_model_two_as_one.err
diff --git a/tests/expected/getopt/options-invocation_without_parameters b/tests/expected/getopt/options-invocation_without_parameters
new file mode 100644
index 0000000..0af0d83
--- /dev/null
+++ b/tests/expected/getopt/options-invocation_without_parameters
@@ -0,0 +1 @@
+exit value: 2
diff --git a/tests/expected/getopt/options-invocation_without_parameters.err b/tests/expected/getopt/options-invocation_without_parameters.err
new file mode 100644
index 0000000..d2c01b7
--- /dev/null
+++ b/tests/expected/getopt/options-invocation_without_parameters.err
@@ -0,0 +1,2 @@
+getopt: missing optstring argument
+Try 'getopt --help' for more information.
diff --git a/tests/expected/getopt/options-long_option_ambiguous_1 b/tests/expected/getopt/options-long_option_ambiguous_1
new file mode 100644
index 0000000..3e1a967
--- /dev/null
+++ b/tests/expected/getopt/options-long_option_ambiguous_1
@@ -0,0 +1,2 @@
+ --
+exit value: 1
diff --git a/tests/expected/getopt/options-long_option_ambiguous_1.err b/tests/expected/getopt/options-long_option_ambiguous_1.err
new file mode 100644
index 0000000..1422799
--- /dev/null
+++ b/tests/expected/getopt/options-long_option_ambiguous_1.err
@@ -0,0 +1 @@
+getopt: option '--long' is ambiguous; possibilities: '--long1' '--long2'
diff --git a/tests/expected/getopt/options-longopts b/tests/expected/getopt/options-longopts
new file mode 100644
index 0000000..8ee9953
--- /dev/null
+++ b/tests/expected/getopt/options-longopts
@@ -0,0 +1,2 @@
+ --long1 --thirdlong 'ARGUMENT' --secondlong 'ARG' --abbreviation 'ABBRARG' -a -- 'EXTRA1'
+exit value: 0
diff --git a/tests/expected/getopt/options-longopts.err b/tests/expected/getopt/options-longopts.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-longopts.err
diff --git a/tests/expected/getopt/options-name_option_long b/tests/expected/getopt/options-name_option_long
new file mode 100644
index 0000000..5538e16
--- /dev/null
+++ b/tests/expected/getopt/options-name_option_long
@@ -0,0 +1,2 @@
+ --long -a --
+exit value: 1
diff --git a/tests/expected/getopt/options-name_option_long.err b/tests/expected/getopt/options-name_option_long.err
new file mode 100644
index 0000000..140ce70
--- /dev/null
+++ b/tests/expected/getopt/options-name_option_long.err
@@ -0,0 +1,2 @@
+THIS_PROGRAM: invalid option -- 'b'
+THIS_PROGRAM: unrecognized option '--whatever'
diff --git a/tests/expected/getopt/options-name_option_short b/tests/expected/getopt/options-name_option_short
new file mode 100644
index 0000000..5538e16
--- /dev/null
+++ b/tests/expected/getopt/options-name_option_short
@@ -0,0 +1,2 @@
+ --long -a --
+exit value: 1
diff --git a/tests/expected/getopt/options-name_option_short.err b/tests/expected/getopt/options-name_option_short.err
new file mode 100644
index 0000000..140ce70
--- /dev/null
+++ b/tests/expected/getopt/options-name_option_short.err
@@ -0,0 +1,2 @@
+THIS_PROGRAM: invalid option -- 'b'
+THIS_PROGRAM: unrecognized option '--whatever'
diff --git a/tests/expected/getopt/options-no-arguments b/tests/expected/getopt/options-no-arguments
new file mode 100644
index 0000000..0af0d83
--- /dev/null
+++ b/tests/expected/getopt/options-no-arguments
@@ -0,0 +1 @@
+exit value: 2
diff --git a/tests/expected/getopt/options-no-arguments.err b/tests/expected/getopt/options-no-arguments.err
new file mode 100644
index 0000000..d2c01b7
--- /dev/null
+++ b/tests/expected/getopt/options-no-arguments.err
@@ -0,0 +1,2 @@
+getopt: missing optstring argument
+Try 'getopt --help' for more information.
diff --git a/tests/expected/getopt/options-non-option b/tests/expected/getopt/options-non-option
new file mode 100644
index 0000000..73f0b65
--- /dev/null
+++ b/tests/expected/getopt/options-non-option
@@ -0,0 +1,4 @@
+ -a 'x' -- 'y' '-b' 'z' 'w'
+ -a 'x' -b 'z' -- 'y' 'w'
+ -a 'x' 'y' -b 'z' 'w' --
+exit value: 0
diff --git a/tests/expected/getopt/options-non-option.err b/tests/expected/getopt/options-non-option.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-non-option.err
diff --git a/tests/expected/getopt/options-posix_correctly b/tests/expected/getopt/options-posix_correctly
new file mode 100644
index 0000000..5b2bc33
--- /dev/null
+++ b/tests/expected/getopt/options-posix_correctly
@@ -0,0 +1,4 @@
+ -a -b '1' -c '2' --a-long --b-long '3' --c-long '' -- 'foo' 'bar' 'xyxxy' '--a-long'
+exit value: 0
+ -a -b '1' -c '2' --a-long --b-long '3' --c-long '' -- 'foo' 'bar' 'xyxxy' '--a-long'
+exit value: 0
diff --git a/tests/expected/getopt/options-posix_correctly.err b/tests/expected/getopt/options-posix_correctly.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-posix_correctly.err
diff --git a/tests/expected/getopt/options-quiet_option_long b/tests/expected/getopt/options-quiet_option_long
new file mode 100644
index 0000000..3e1a967
--- /dev/null
+++ b/tests/expected/getopt/options-quiet_option_long
@@ -0,0 +1,2 @@
+ --
+exit value: 1
diff --git a/tests/expected/getopt/options-quiet_option_long.err b/tests/expected/getopt/options-quiet_option_long.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-quiet_option_long.err
diff --git a/tests/expected/getopt/options-quiet_option_short b/tests/expected/getopt/options-quiet_option_short
new file mode 100644
index 0000000..3e1a967
--- /dev/null
+++ b/tests/expected/getopt/options-quiet_option_short
@@ -0,0 +1,2 @@
+ --
+exit value: 1
diff --git a/tests/expected/getopt/options-quiet_option_short.err b/tests/expected/getopt/options-quiet_option_short.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-quiet_option_short.err
diff --git a/tests/expected/getopt/options-quiet_output_option_long b/tests/expected/getopt/options-quiet_output_option_long
new file mode 100644
index 0000000..9e52cd9
--- /dev/null
+++ b/tests/expected/getopt/options-quiet_output_option_long
@@ -0,0 +1 @@
+exit value: 1
diff --git a/tests/expected/getopt/options-quiet_output_option_long.err b/tests/expected/getopt/options-quiet_output_option_long.err
new file mode 100644
index 0000000..4fd8b0b
--- /dev/null
+++ b/tests/expected/getopt/options-quiet_output_option_long.err
@@ -0,0 +1,4 @@
+getopt: invalid option -- 'c'
+getopt: unrecognized option '--unknown'
+getopt: option '--long' is ambiguous; possibilities: '--long1' '--long2'
+getopt: option requires an argument -- 'b'
diff --git a/tests/expected/getopt/options-quiet_output_option_short b/tests/expected/getopt/options-quiet_output_option_short
new file mode 100644
index 0000000..9e52cd9
--- /dev/null
+++ b/tests/expected/getopt/options-quiet_output_option_short
@@ -0,0 +1 @@
+exit value: 1
diff --git a/tests/expected/getopt/options-quiet_output_option_short.err b/tests/expected/getopt/options-quiet_output_option_short.err
new file mode 100644
index 0000000..4fd8b0b
--- /dev/null
+++ b/tests/expected/getopt/options-quiet_output_option_short.err
@@ -0,0 +1,4 @@
+getopt: invalid option -- 'c'
+getopt: unrecognized option '--unknown'
+getopt: option '--long' is ambiguous; possibilities: '--long1' '--long2'
+getopt: option requires an argument -- 'b'
diff --git a/tests/expected/getopt/options-same_long_short_options b/tests/expected/getopt/options-same_long_short_options
new file mode 100644
index 0000000..919d227
--- /dev/null
+++ b/tests/expected/getopt/options-same_long_short_options
@@ -0,0 +1,2 @@
+ -a --a --
+exit value: 0
diff --git a/tests/expected/getopt/options-same_long_short_options.err b/tests/expected/getopt/options-same_long_short_options.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-same_long_short_options.err
diff --git a/tests/expected/getopt/options-sh b/tests/expected/getopt/options-sh
new file mode 100644
index 0000000..86e48f4
--- /dev/null
+++ b/tests/expected/getopt/options-sh
@@ -0,0 +1,2 @@
+ -a -b '1' -c '2' --a-long --b-long '3' --c-long '' -- 'foo' 'bar'
+exit value: 0
diff --git a/tests/expected/getopt/options-sh.err b/tests/expected/getopt/options-sh.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-sh.err
diff --git a/tests/expected/getopt/options-test_for_enhanced_getopt b/tests/expected/getopt/options-test_for_enhanced_getopt
new file mode 100644
index 0000000..539db06
--- /dev/null
+++ b/tests/expected/getopt/options-test_for_enhanced_getopt
@@ -0,0 +1 @@
+exit value: 4
diff --git a/tests/expected/getopt/options-test_for_enhanced_getopt.err b/tests/expected/getopt/options-test_for_enhanced_getopt.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-test_for_enhanced_getopt.err
diff --git a/tests/expected/getopt/options-unknown_options b/tests/expected/getopt/options-unknown_options
new file mode 100644
index 0000000..5538e16
--- /dev/null
+++ b/tests/expected/getopt/options-unknown_options
@@ -0,0 +1,2 @@
+ --long -a --
+exit value: 1
diff --git a/tests/expected/getopt/options-unknown_options.err b/tests/expected/getopt/options-unknown_options.err
new file mode 100644
index 0000000..f8f67fb
--- /dev/null
+++ b/tests/expected/getopt/options-unknown_options.err
@@ -0,0 +1,2 @@
+getopt: invalid option -- 'b'
+getopt: unrecognized option '--whatever'
diff --git a/tests/expected/getopt/options-unquoted_option_bash b/tests/expected/getopt/options-unquoted_option_bash
new file mode 100644
index 0000000..8da362f
--- /dev/null
+++ b/tests/expected/getopt/options-unquoted_option_bash
@@ -0,0 +1,5 @@
+ -a $?!* --long1 "\' -- More
+ than
+one
+line
+exit value: 0
diff --git a/tests/expected/getopt/options-unquoted_option_bash.err b/tests/expected/getopt/options-unquoted_option_bash.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-unquoted_option_bash.err
diff --git a/tests/expected/getopt/options-unquoted_option_tcsh b/tests/expected/getopt/options-unquoted_option_tcsh
new file mode 100644
index 0000000..8da362f
--- /dev/null
+++ b/tests/expected/getopt/options-unquoted_option_tcsh
@@ -0,0 +1,5 @@
+ -a $?!* --long1 "\' -- More
+ than
+one
+line
+exit value: 0
diff --git a/tests/expected/getopt/options-unquoted_option_tcsh.err b/tests/expected/getopt/options-unquoted_option_tcsh.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-unquoted_option_tcsh.err
diff --git a/tests/expected/getopt/options-weird_quoting_bash b/tests/expected/getopt/options-weird_quoting_bash
new file mode 100644
index 0000000..db871ce
--- /dev/null
+++ b/tests/expected/getopt/options-weird_quoting_bash
@@ -0,0 +1,5 @@
+ -a '$?!* ' --long1 '"\'\''' -- 'More
+ than
+one
+line'
+exit value: 0
diff --git a/tests/expected/getopt/options-weird_quoting_bash.err b/tests/expected/getopt/options-weird_quoting_bash.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-weird_quoting_bash.err
diff --git a/tests/expected/getopt/options-weird_quoting_tcsh b/tests/expected/getopt/options-weird_quoting_tcsh
new file mode 100644
index 0000000..9e5b71d
--- /dev/null
+++ b/tests/expected/getopt/options-weird_quoting_tcsh
@@ -0,0 +1,2 @@
+ -a '$?'\!'*'\ '' --long1 '"\\'\''' -- 'More\n'\ 'than\none\nline'
+exit value: 0
diff --git a/tests/expected/getopt/options-weird_quoting_tcsh.err b/tests/expected/getopt/options-weird_quoting_tcsh.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options-weird_quoting_tcsh.err
diff --git a/tests/expected/getopt/options.err b/tests/expected/getopt/options.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/getopt/options.err
diff --git a/tests/expected/hardlink/options-content b/tests/expected/hardlink/options-content
new file mode 100644
index 0000000..a1bfede
--- /dev/null
+++ b/tests/expected/hardlink/options-content
@@ -0,0 +1,26 @@
+dir-1/sdir-1/file-a-1 10 8192 1540236xxx perm
+dir-1/sdir-1/file-a-2 10 8192 1540236xxx perm
+dir-1/sdir-1/file-a-3 10 8192 1540236xxx perm
+dir-1/sdir-1/file-b-1 10 8192 1540236xxx perm
+dir-1/sdir-1/file-b-2 10 8192 1540236xxx perm
+dir-1/sdir-1/file-b-3 10 8192 1540236xxx perm
+dir-1/sdir-1/file-c-1 6 8192 1540236xxx perm
+dir-1/sdir-1/file-c-2 6 8192 1540236xxx perm
+dir-1/sdir-1/file-c-3 6 8192 1540236xxx perm
+dir-1/sdir-2/file-a-1-abcdefghijklmnopqrstxyz-"§$%&()=?*+ 10 8192 1540236xxx perm
+dir-2/sdir-2/file-a-5 10 8192 1540236xxx perm
+dir-2/sdir-2/file-b-5 10 8192 1540236xxx perm
+dir-2/sdir-3/file-b-4 10 8192 1540236xxx perm
+file-a-1 10 8192 1540236xxx perm
+file-a-2 10 8192 1540236xxx perm
+file-a-3 10 8192 1540236xxx perm
+file-a-4 10 8192 1540236xxx perm
+file-a-5 10 8192 1540236xxx perm
+file-b-1 10 8192 1540236xxx perm
+file-b-2 10 8192 1540236xxx perm
+file-b-3 10 8192 1540236xxx perm
+file-b-4 10 8192 1540236xxx perm
+file-b-5 10 8192 1540236xxx perm
+file-c-1 6 8192 1540236xxx perm
+file-c-2 6 8192 1540236xxx perm
+file-c-3 6 8192 1540236xxx perm
diff --git a/tests/expected/hardlink/options-dryrun b/tests/expected/hardlink/options-dryrun
new file mode 100644
index 0000000..6b57823
--- /dev/null
+++ b/tests/expected/hardlink/options-dryrun
@@ -0,0 +1,26 @@
+dir-1/sdir-1/file-a-1 1 8192 1540236330 644
+dir-1/sdir-1/file-a-2 1 8192 1540236330 644
+dir-1/sdir-1/file-a-3 1 8192 1540236423 644
+dir-1/sdir-1/file-b-1 1 8192 1540236383 644
+dir-1/sdir-1/file-b-2 1 8192 1540236383 644
+dir-1/sdir-1/file-b-3 1 8192 1540236430 644
+dir-1/sdir-1/file-c-1 1 8192 1540236330 644
+dir-1/sdir-1/file-c-2 1 8192 1540236330 644
+dir-1/sdir-1/file-c-3 1 8192 1540236548 644
+dir-1/sdir-2/file-a-1-abcdefghijklmnopqrstxyz-"§$%&()=?*+ 1 8192 1540236330 644
+dir-2/sdir-2/file-a-5 1 8192 1540236330 600
+dir-2/sdir-2/file-b-5 1 8192 1540236383 640
+dir-2/sdir-3/file-b-4 1 8192 1540236383 640
+file-a-1 1 8192 1540236330 644
+file-a-2 1 8192 1540236330 644
+file-a-3 1 8192 1540236423 644
+file-a-4 1 8192 1540236330 600
+file-a-5 1 8192 1540236330 600
+file-b-1 1 8192 1540236383 644
+file-b-2 1 8192 1540236383 644
+file-b-3 1 8192 1540236430 644
+file-b-4 1 8192 1540236383 640
+file-b-5 1 8192 1540236383 640
+file-c-1 1 8192 1540236330 644
+file-c-2 1 8192 1540236330 644
+file-c-3 1 8192 1540236548 644
diff --git a/tests/expected/hardlink/options-maximum-size-8191 b/tests/expected/hardlink/options-maximum-size-8191
new file mode 100644
index 0000000..213f01b
--- /dev/null
+++ b/tests/expected/hardlink/options-maximum-size-8191
@@ -0,0 +1,35 @@
+Number of test files: 26
+Mode: real
+Method: [Redacted]
+Files: 26
+Linked: 0 files
+Compared: 0 xattrs
+Compared: [Redacted] files
+Saved: 0 B
+Duration: [Redacted]
+dir-1/sdir-1/file-a-1 1 8192 1540236330 644
+dir-1/sdir-1/file-a-2 1 8192 1540236330 644
+dir-1/sdir-1/file-a-3 1 8192 1540236423 644
+dir-1/sdir-1/file-b-1 1 8192 1540236383 644
+dir-1/sdir-1/file-b-2 1 8192 1540236383 644
+dir-1/sdir-1/file-b-3 1 8192 1540236430 644
+dir-1/sdir-1/file-c-1 1 8192 1540236330 644
+dir-1/sdir-1/file-c-2 1 8192 1540236330 644
+dir-1/sdir-1/file-c-3 1 8192 1540236548 644
+dir-1/sdir-2/file-a-1-abcdefghijklmnopqrstxyz-"§$%&()=?*+ 1 8192 1540236330 644
+dir-2/sdir-2/file-a-5 1 8192 1540236330 600
+dir-2/sdir-2/file-b-5 1 8192 1540236383 640
+dir-2/sdir-3/file-b-4 1 8192 1540236383 640
+file-a-1 1 8192 1540236330 644
+file-a-2 1 8192 1540236330 644
+file-a-3 1 8192 1540236423 644
+file-a-4 1 8192 1540236330 600
+file-a-5 1 8192 1540236330 600
+file-b-1 1 8192 1540236383 644
+file-b-2 1 8192 1540236383 644
+file-b-3 1 8192 1540236430 644
+file-b-4 1 8192 1540236383 640
+file-b-5 1 8192 1540236383 640
+file-c-1 1 8192 1540236330 644
+file-c-2 1 8192 1540236330 644
+file-c-3 1 8192 1540236548 644
diff --git a/tests/expected/hardlink/options-maximum-size-8192 b/tests/expected/hardlink/options-maximum-size-8192
new file mode 100644
index 0000000..9c522d7
--- /dev/null
+++ b/tests/expected/hardlink/options-maximum-size-8192
@@ -0,0 +1,35 @@
+Number of test files: 26
+Mode: real
+Method: [Redacted]
+Files: 26
+Linked: 18 files
+Compared: 0 xattrs
+Compared: [Redacted] files
+Saved: 144 KiB
+Duration: [Redacted]
+dir-1/sdir-1/file-a-1 5 8192 1540236330 644
+dir-1/sdir-1/file-a-2 5 8192 1540236330 644
+dir-1/sdir-1/file-a-3 2 8192 1540236423 644
+dir-1/sdir-1/file-b-1 4 8192 1540236383 644
+dir-1/sdir-1/file-b-2 4 8192 1540236383 644
+dir-1/sdir-1/file-b-3 2 8192 1540236430 644
+dir-1/sdir-1/file-c-1 4 8192 1540236330 644
+dir-1/sdir-1/file-c-2 4 8192 1540236330 644
+dir-1/sdir-1/file-c-3 2 8192 1540236548 644
+dir-1/sdir-2/file-a-1-abcdefghijklmnopqrstxyz-"§$%&()=?*+ 5 8192 1540236330 644
+dir-2/sdir-2/file-a-5 3 8192 1540236330 600
+dir-2/sdir-2/file-b-5 4 8192 1540236383 640
+dir-2/sdir-3/file-b-4 4 8192 1540236383 640
+file-a-1 5 8192 1540236330 644
+file-a-2 5 8192 1540236330 644
+file-a-3 2 8192 1540236423 644
+file-a-4 3 8192 1540236330 600
+file-a-5 3 8192 1540236330 600
+file-b-1 4 8192 1540236383 644
+file-b-2 4 8192 1540236383 644
+file-b-3 2 8192 1540236430 644
+file-b-4 4 8192 1540236383 640
+file-b-5 4 8192 1540236383 640
+file-c-1 4 8192 1540236330 644
+file-c-2 4 8192 1540236330 644
+file-c-3 2 8192 1540236548 644
diff --git a/tests/expected/hardlink/options-nargs b/tests/expected/hardlink/options-nargs
new file mode 100644
index 0000000..49f27bf
--- /dev/null
+++ b/tests/expected/hardlink/options-nargs
@@ -0,0 +1,26 @@
+dir-1/sdir-1/file-a-1 4 8192 1540236330 644
+dir-1/sdir-1/file-a-2 4 8192 1540236330 644
+dir-1/sdir-1/file-a-3 1 8192 1540236423 644
+dir-1/sdir-1/file-b-1 4 8192 1540236383 644
+dir-1/sdir-1/file-b-2 4 8192 1540236383 644
+dir-1/sdir-1/file-b-3 1 8192 1540236430 644
+dir-1/sdir-1/file-c-1 4 8192 1540236330 644
+dir-1/sdir-1/file-c-2 4 8192 1540236330 644
+dir-1/sdir-1/file-c-3 1 8192 1540236548 644
+dir-1/sdir-2/file-a-1-abcdefghijklmnopqrstxyz-"§$%&()=?*+ 1 8192 1540236330 644
+dir-2/sdir-2/file-a-5 1 8192 1540236330 600
+dir-2/sdir-2/file-b-5 1 8192 1540236383 640
+dir-2/sdir-3/file-b-4 1 8192 1540236383 640
+file-a-1 4 8192 1540236330 644
+file-a-2 4 8192 1540236330 644
+file-a-3 1 8192 1540236423 644
+file-a-4 1 8192 1540236330 600
+file-a-5 1 8192 1540236330 600
+file-b-1 4 8192 1540236383 644
+file-b-2 4 8192 1540236383 644
+file-b-3 1 8192 1540236430 644
+file-b-4 1 8192 1540236383 640
+file-b-5 1 8192 1540236383 640
+file-c-1 4 8192 1540236330 644
+file-c-2 4 8192 1540236330 644
+file-c-3 1 8192 1540236548 644
diff --git a/tests/expected/hardlink/options-noregex b/tests/expected/hardlink/options-noregex
new file mode 100644
index 0000000..08291b7
--- /dev/null
+++ b/tests/expected/hardlink/options-noregex
@@ -0,0 +1 @@
+hardlink: option --exclude not supported (built without pcre2)
diff --git a/tests/expected/hardlink/options-orig b/tests/expected/hardlink/options-orig
new file mode 100644
index 0000000..6b57823
--- /dev/null
+++ b/tests/expected/hardlink/options-orig
@@ -0,0 +1,26 @@
+dir-1/sdir-1/file-a-1 1 8192 1540236330 644
+dir-1/sdir-1/file-a-2 1 8192 1540236330 644
+dir-1/sdir-1/file-a-3 1 8192 1540236423 644
+dir-1/sdir-1/file-b-1 1 8192 1540236383 644
+dir-1/sdir-1/file-b-2 1 8192 1540236383 644
+dir-1/sdir-1/file-b-3 1 8192 1540236430 644
+dir-1/sdir-1/file-c-1 1 8192 1540236330 644
+dir-1/sdir-1/file-c-2 1 8192 1540236330 644
+dir-1/sdir-1/file-c-3 1 8192 1540236548 644
+dir-1/sdir-2/file-a-1-abcdefghijklmnopqrstxyz-"§$%&()=?*+ 1 8192 1540236330 644
+dir-2/sdir-2/file-a-5 1 8192 1540236330 600
+dir-2/sdir-2/file-b-5 1 8192 1540236383 640
+dir-2/sdir-3/file-b-4 1 8192 1540236383 640
+file-a-1 1 8192 1540236330 644
+file-a-2 1 8192 1540236330 644
+file-a-3 1 8192 1540236423 644
+file-a-4 1 8192 1540236330 600
+file-a-5 1 8192 1540236330 600
+file-b-1 1 8192 1540236383 644
+file-b-2 1 8192 1540236383 644
+file-b-3 1 8192 1540236430 644
+file-b-4 1 8192 1540236383 640
+file-b-5 1 8192 1540236383 640
+file-c-1 1 8192 1540236330 644
+file-c-2 1 8192 1540236330 644
+file-c-3 1 8192 1540236548 644
diff --git a/tests/expected/hardlink/options-regex-escapes b/tests/expected/hardlink/options-regex-escapes
new file mode 100644
index 0000000..afab5e3
--- /dev/null
+++ b/tests/expected/hardlink/options-regex-escapes
@@ -0,0 +1,26 @@
+dir-1/sdir-1/file-a-1 4 8192 1540236330 644
+dir-1/sdir-1/file-a-2 4 8192 1540236330 644
+dir-1/sdir-1/file-a-3 2 8192 1540236423 644
+dir-1/sdir-1/file-b-1 4 8192 1540236383 644
+dir-1/sdir-1/file-b-2 4 8192 1540236383 644
+dir-1/sdir-1/file-b-3 2 8192 1540236430 644
+dir-1/sdir-1/file-c-1 4 8192 1540236330 644
+dir-1/sdir-1/file-c-2 4 8192 1540236330 644
+dir-1/sdir-1/file-c-3 2 8192 1540236548 644
+dir-1/sdir-2/file-a-1-abcdefghijklmnopqrstxyz-"§$%&()=?*+ 1 8192 1540236330 644
+dir-2/sdir-2/file-a-5 3 8192 1540236330 600
+dir-2/sdir-2/file-b-5 4 8192 1540236383 640
+dir-2/sdir-3/file-b-4 4 8192 1540236383 640
+file-a-1 4 8192 1540236330 644
+file-a-2 4 8192 1540236330 644
+file-a-3 2 8192 1540236423 644
+file-a-4 3 8192 1540236330 600
+file-a-5 3 8192 1540236330 600
+file-b-1 4 8192 1540236383 644
+file-b-2 4 8192 1540236383 644
+file-b-3 2 8192 1540236430 644
+file-b-4 4 8192 1540236383 640
+file-b-5 4 8192 1540236383 640
+file-c-1 4 8192 1540236330 644
+file-c-2 4 8192 1540236330 644
+file-c-3 2 8192 1540236548 644
diff --git a/tests/expected/hexdump/format-strings-1b_char b/tests/expected/hexdump/format-strings-1b_char
new file mode 100644
index 0000000..464f50a
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-1b_char
@@ -0,0 +1,41 @@
+0000000 \0 001 002 003 004 005 006 \a
+0000010 \b \t \n \v \f \r 016 017
+0000020 020 021 022 023 024 025 026 027
+0000030 030 031 032 033 034 035 036 037
+0000040 ! " # $ % & '
+0000050 ( ) * + , - . /
+0000060 0 1 2 3 4 5 6 7
+0000070 8 9 : ; < = > ?
+0000080 @ A B C D E F G
+0000090 H I J K L M N O
+00000a0 P Q R S T U V W
+00000b0 X Y Z [ \ ] ^ _
+00000c0 ` a b c d e f g
+00000d0 h i j k l m n o
+00000e0 p q r s t u v w
+00000f0 x y z { | } ~ 177
+0000100 302 200 302 201 302 202 302 203 302 204 302
+0000110 205 302 206 302 207 302 210 302 211 302 212
+0000120 302 213 302 214 302 215 302 216 302 217
+0000130 302 220 302 221 302 222 302 223 302 224 302
+0000140 225 302 226 302 227 302 230 302 231 302 232
+0000150 302 233 302 234 302 235 302 236 302 237
+0000160 302 240 302 241 302 242 302 243 302 244 302
+0000170 245 302 246 302 247 302 250 302 251 302 252
+0000180 302 253 302 254 302 255 302 256 302 257
+0000190 302 260 302 261 302 262 302 263 302 264 302
+00001a0 265 302 266 302 267 302 270 302 271 302 272
+00001b0 302 273 302 274 302 275 302 276 302 277
+00001c0 303 200 303 201 303 202 303 203 303 204 303
+00001d0 205 303 206 303 207 303 210 303 211 303 212
+00001e0 303 213 303 214 303 215 303 216 303 217
+00001f0 303 220 303 221 303 222 303 223 303 224 303
+0000200 225 303 226 303 227 303 230 303 231 303 232
+0000210 303 233 303 234 303 235 303 236 303 237
+0000220 303 240 303 241 303 242 303 243 303 244 303
+0000230 245 303 246 303 247 303 250 303 251 303 252
+0000240 303 253 303 254 303 255 303 256 303 257
+0000250 303 260 303 261 303 262 303 263 303 264 303
+0000260 265 303 266 303 267 303 270 303 271 303 272
+0000270 303 273 303 274 303 275 303 276 303 277
+0000280
diff --git a/tests/expected/hexdump/format-strings-1b_octal b/tests/expected/hexdump/format-strings-1b_octal
new file mode 100644
index 0000000..519d07f
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-1b_octal
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/format-strings-2b_dec b/tests/expected/hexdump/format-strings-2b_dec
new file mode 100644
index 0000000..788e97f
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-2b_dec
@@ -0,0 +1,41 @@
+0000000 08192 08193 08194 08195 08196 08197 08198 08199
+0000010 08200 08201 08202 08203 08204 08205 08206 08207
+0000020 08208 08209 08210 08211 08212 08213 08214 08215
+0000030 08216 08217 08218 08219 08220 08221 08222 08223
+0000040 08224 08225 08226 08227 08228 08229 08230 08231
+0000050 08232 08233 08234 08235 08236 08237 08238 08239
+0000060 08240 08241 08242 08243 08244 08245 08246 08247
+0000070 08248 08249 08250 08251 08252 08253 08254 08255
+0000080 08256 08257 08258 08259 08260 08261 08262 08263
+0000090 08264 08265 08266 08267 08268 08269 08270 08271
+00000a0 08272 08273 08274 08275 08276 08277 08278 08279
+00000b0 08280 08281 08282 08283 08284 08285 08286 08287
+00000c0 08288 08289 08290 08291 08292 08293 08294 08295
+00000d0 08296 08297 08298 08299 08300 08301 08302 08303
+00000e0 08304 08305 08306 08307 08308 08309 08310 08311
+00000f0 08312 08313 08314 08315 08316 08317 08318 08319
+0000100 32962 49696 08321 33474 49696 08323 33986 49696
+0000110 08325 34498 49696 08327 35010 49696 08329 35522
+0000120 49696 08331 36034 49696 08333 36546 49696 08335
+0000130 37058 49696 08337 37570 49696 08339 38082 49696
+0000140 08341 38594 49696 08343 39106 49696 08345 39618
+0000150 49696 08347 40130 49696 08349 40642 49696 08351
+0000160 41154 49696 08353 41666 49696 08355 42178 49696
+0000170 08357 42690 49696 08359 43202 49696 08361 43714
+0000180 49696 08363 44226 49696 08365 44738 49696 08367
+0000190 45250 49696 08369 45762 49696 08371 46274 49696
+00001a0 08373 46786 49696 08375 47298 49696 08377 47810
+00001b0 49696 08379 48322 49696 08381 48834 49696 08383
+00001c0 32963 49952 08321 33475 49952 08323 33987 49952
+00001d0 08325 34499 49952 08327 35011 49952 08329 35523
+00001e0 49952 08331 36035 49952 08333 36547 49952 08335
+00001f0 37059 49952 08337 37571 49952 08339 38083 49952
+0000200 08341 38595 49952 08343 39107 49952 08345 39619
+0000210 49952 08347 40131 49952 08349 40643 49952 08351
+0000220 41155 49952 08353 41667 49952 08355 42179 49952
+0000230 08357 42691 49952 08359 43203 49952 08361 43715
+0000240 49952 08363 44227 49952 08365 44739 49952 08367
+0000250 45251 49952 08369 45763 49952 08371 46275 49952
+0000260 08373 46787 49952 08375 47299 49952 08377 47811
+0000270 49952 08379 48323 49952 08381 48835 49952 08383
+0000280
diff --git a/tests/expected/hexdump/format-strings-2b_dec.BE b/tests/expected/hexdump/format-strings-2b_dec.BE
new file mode 100644
index 0000000..f54a0a0
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-2b_dec.BE
@@ -0,0 +1,41 @@
+0000000 00032 00288 00544 00800 01056 01312 01568 01824
+0000010 02080 02336 02592 02848 03104 03360 03616 03872
+0000020 04128 04384 04640 04896 05152 05408 05664 05920
+0000030 06176 06432 06688 06944 07200 07456 07712 07968
+0000040 08224 08480 08736 08992 09248 09504 09760 10016
+0000050 10272 10528 10784 11040 11296 11552 11808 12064
+0000060 12320 12576 12832 13088 13344 13600 13856 14112
+0000070 14368 14624 14880 15136 15392 15648 15904 16160
+0000080 16416 16672 16928 17184 17440 17696 17952 18208
+0000090 18464 18720 18976 19232 19488 19744 20000 20256
+00000a0 20512 20768 21024 21280 21536 21792 22048 22304
+00000b0 22560 22816 23072 23328 23584 23840 24096 24352
+00000c0 24608 24864 25120 25376 25632 25888 26144 26400
+00000d0 26656 26912 27168 27424 27680 27936 28192 28448
+00000e0 28704 28960 29216 29472 29728 29984 30240 30496
+00000f0 30752 31008 31264 31520 31776 32032 32288 32544
+0000100 49792 08386 33056 49794 08386 33568 49796 08386
+0000110 34080 49798 08386 34592 49800 08386 35104 49802
+0000120 08386 35616 49804 08386 36128 49806 08386 36640
+0000130 49808 08386 37152 49810 08386 37664 49812 08386
+0000140 38176 49814 08386 38688 49816 08386 39200 49818
+0000150 08386 39712 49820 08386 40224 49822 08386 40736
+0000160 49824 08386 41248 49826 08386 41760 49828 08386
+0000170 42272 49830 08386 42784 49832 08386 43296 49834
+0000180 08386 43808 49836 08386 44320 49838 08386 44832
+0000190 49840 08386 45344 49842 08386 45856 49844 08386
+00001a0 46368 49846 08386 46880 49848 08386 47392 49850
+00001b0 08386 47904 49852 08386 48416 49854 08386 48928
+00001c0 50048 08387 33056 50050 08387 33568 50052 08387
+00001d0 34080 50054 08387 34592 50056 08387 35104 50058
+00001e0 08387 35616 50060 08387 36128 50062 08387 36640
+00001f0 50064 08387 37152 50066 08387 37664 50068 08387
+0000200 38176 50070 08387 38688 50072 08387 39200 50074
+0000210 08387 39712 50076 08387 40224 50078 08387 40736
+0000220 50080 08387 41248 50082 08387 41760 50084 08387
+0000230 42272 50086 08387 42784 50088 08387 43296 50090
+0000240 08387 43808 50092 08387 44320 50094 08387 44832
+0000250 50096 08387 45344 50098 08387 45856 50100 08387
+0000260 46368 50102 08387 46880 50104 08387 47392 50106
+0000270 08387 47904 50108 08387 48416 50110 08387 48928
+0000280
diff --git a/tests/expected/hexdump/format-strings-2b_hex b/tests/expected/hexdump/format-strings-2b_hex
new file mode 100644
index 0000000..5cd11d4
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-2b_hex
@@ -0,0 +1,41 @@
+0000000 2000 2001 2002 2003 2004 2005 2006 2007
+0000010 2008 2009 200a 200b 200c 200d 200e 200f
+0000020 2010 2011 2012 2013 2014 2015 2016 2017
+0000030 2018 2019 201a 201b 201c 201d 201e 201f
+0000040 2020 2021 2022 2023 2024 2025 2026 2027
+0000050 2028 2029 202a 202b 202c 202d 202e 202f
+0000060 2030 2031 2032 2033 2034 2035 2036 2037
+0000070 2038 2039 203a 203b 203c 203d 203e 203f
+0000080 2040 2041 2042 2043 2044 2045 2046 2047
+0000090 2048 2049 204a 204b 204c 204d 204e 204f
+00000a0 2050 2051 2052 2053 2054 2055 2056 2057
+00000b0 2058 2059 205a 205b 205c 205d 205e 205f
+00000c0 2060 2061 2062 2063 2064 2065 2066 2067
+00000d0 2068 2069 206a 206b 206c 206d 206e 206f
+00000e0 2070 2071 2072 2073 2074 2075 2076 2077
+00000f0 2078 2079 207a 207b 207c 207d 207e 207f
+0000100 80c2 c220 2081 82c2 c220 2083 84c2 c220
+0000110 2085 86c2 c220 2087 88c2 c220 2089 8ac2
+0000120 c220 208b 8cc2 c220 208d 8ec2 c220 208f
+0000130 90c2 c220 2091 92c2 c220 2093 94c2 c220
+0000140 2095 96c2 c220 2097 98c2 c220 2099 9ac2
+0000150 c220 209b 9cc2 c220 209d 9ec2 c220 209f
+0000160 a0c2 c220 20a1 a2c2 c220 20a3 a4c2 c220
+0000170 20a5 a6c2 c220 20a7 a8c2 c220 20a9 aac2
+0000180 c220 20ab acc2 c220 20ad aec2 c220 20af
+0000190 b0c2 c220 20b1 b2c2 c220 20b3 b4c2 c220
+00001a0 20b5 b6c2 c220 20b7 b8c2 c220 20b9 bac2
+00001b0 c220 20bb bcc2 c220 20bd bec2 c220 20bf
+00001c0 80c3 c320 2081 82c3 c320 2083 84c3 c320
+00001d0 2085 86c3 c320 2087 88c3 c320 2089 8ac3
+00001e0 c320 208b 8cc3 c320 208d 8ec3 c320 208f
+00001f0 90c3 c320 2091 92c3 c320 2093 94c3 c320
+0000200 2095 96c3 c320 2097 98c3 c320 2099 9ac3
+0000210 c320 209b 9cc3 c320 209d 9ec3 c320 209f
+0000220 a0c3 c320 20a1 a2c3 c320 20a3 a4c3 c320
+0000230 20a5 a6c3 c320 20a7 a8c3 c320 20a9 aac3
+0000240 c320 20ab acc3 c320 20ad aec3 c320 20af
+0000250 b0c3 c320 20b1 b2c3 c320 20b3 b4c3 c320
+0000260 20b5 b6c3 c320 20b7 b8c3 c320 20b9 bac3
+0000270 c320 20bb bcc3 c320 20bd bec3 c320 20bf
+0000280
diff --git a/tests/expected/hexdump/format-strings-2b_hex.BE b/tests/expected/hexdump/format-strings-2b_hex.BE
new file mode 100644
index 0000000..f657084
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-2b_hex.BE
@@ -0,0 +1,41 @@
+0000000 0020 0120 0220 0320 0420 0520 0620 0720
+0000010 0820 0920 0a20 0b20 0c20 0d20 0e20 0f20
+0000020 1020 1120 1220 1320 1420 1520 1620 1720
+0000030 1820 1920 1a20 1b20 1c20 1d20 1e20 1f20
+0000040 2020 2120 2220 2320 2420 2520 2620 2720
+0000050 2820 2920 2a20 2b20 2c20 2d20 2e20 2f20
+0000060 3020 3120 3220 3320 3420 3520 3620 3720
+0000070 3820 3920 3a20 3b20 3c20 3d20 3e20 3f20
+0000080 4020 4120 4220 4320 4420 4520 4620 4720
+0000090 4820 4920 4a20 4b20 4c20 4d20 4e20 4f20
+00000a0 5020 5120 5220 5320 5420 5520 5620 5720
+00000b0 5820 5920 5a20 5b20 5c20 5d20 5e20 5f20
+00000c0 6020 6120 6220 6320 6420 6520 6620 6720
+00000d0 6820 6920 6a20 6b20 6c20 6d20 6e20 6f20
+00000e0 7020 7120 7220 7320 7420 7520 7620 7720
+00000f0 7820 7920 7a20 7b20 7c20 7d20 7e20 7f20
+0000100 c280 20c2 8120 c282 20c2 8320 c284 20c2
+0000110 8520 c286 20c2 8720 c288 20c2 8920 c28a
+0000120 20c2 8b20 c28c 20c2 8d20 c28e 20c2 8f20
+0000130 c290 20c2 9120 c292 20c2 9320 c294 20c2
+0000140 9520 c296 20c2 9720 c298 20c2 9920 c29a
+0000150 20c2 9b20 c29c 20c2 9d20 c29e 20c2 9f20
+0000160 c2a0 20c2 a120 c2a2 20c2 a320 c2a4 20c2
+0000170 a520 c2a6 20c2 a720 c2a8 20c2 a920 c2aa
+0000180 20c2 ab20 c2ac 20c2 ad20 c2ae 20c2 af20
+0000190 c2b0 20c2 b120 c2b2 20c2 b320 c2b4 20c2
+00001a0 b520 c2b6 20c2 b720 c2b8 20c2 b920 c2ba
+00001b0 20c2 bb20 c2bc 20c2 bd20 c2be 20c2 bf20
+00001c0 c380 20c3 8120 c382 20c3 8320 c384 20c3
+00001d0 8520 c386 20c3 8720 c388 20c3 8920 c38a
+00001e0 20c3 8b20 c38c 20c3 8d20 c38e 20c3 8f20
+00001f0 c390 20c3 9120 c392 20c3 9320 c394 20c3
+0000200 9520 c396 20c3 9720 c398 20c3 9920 c39a
+0000210 20c3 9b20 c39c 20c3 9d20 c39e 20c3 9f20
+0000220 c3a0 20c3 a120 c3a2 20c3 a320 c3a4 20c3
+0000230 a520 c3a6 20c3 a720 c3a8 20c3 a920 c3aa
+0000240 20c3 ab20 c3ac 20c3 ad20 c3ae 20c3 af20
+0000250 c3b0 20c3 b120 c3b2 20c3 b320 c3b4 20c3
+0000260 b520 c3b6 20c3 b720 c3b8 20c3 b920 c3ba
+0000270 20c3 bb20 c3bc 20c3 bd20 c3be 20c3 bf20
+0000280
diff --git a/tests/expected/hexdump/format-strings-2b_octal b/tests/expected/hexdump/format-strings-2b_octal
new file mode 100644
index 0000000..e862131
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-2b_octal
@@ -0,0 +1,41 @@
+0000000 020000 020001 020002 020003 020004 020005 020006 020007
+0000010 020010 020011 020012 020013 020014 020015 020016 020017
+0000020 020020 020021 020022 020023 020024 020025 020026 020027
+0000030 020030 020031 020032 020033 020034 020035 020036 020037
+0000040 020040 020041 020042 020043 020044 020045 020046 020047
+0000050 020050 020051 020052 020053 020054 020055 020056 020057
+0000060 020060 020061 020062 020063 020064 020065 020066 020067
+0000070 020070 020071 020072 020073 020074 020075 020076 020077
+0000080 020100 020101 020102 020103 020104 020105 020106 020107
+0000090 020110 020111 020112 020113 020114 020115 020116 020117
+00000a0 020120 020121 020122 020123 020124 020125 020126 020127
+00000b0 020130 020131 020132 020133 020134 020135 020136 020137
+00000c0 020140 020141 020142 020143 020144 020145 020146 020147
+00000d0 020150 020151 020152 020153 020154 020155 020156 020157
+00000e0 020160 020161 020162 020163 020164 020165 020166 020167
+00000f0 020170 020171 020172 020173 020174 020175 020176 020177
+0000100 100302 141040 020201 101302 141040 020203 102302 141040
+0000110 020205 103302 141040 020207 104302 141040 020211 105302
+0000120 141040 020213 106302 141040 020215 107302 141040 020217
+0000130 110302 141040 020221 111302 141040 020223 112302 141040
+0000140 020225 113302 141040 020227 114302 141040 020231 115302
+0000150 141040 020233 116302 141040 020235 117302 141040 020237
+0000160 120302 141040 020241 121302 141040 020243 122302 141040
+0000170 020245 123302 141040 020247 124302 141040 020251 125302
+0000180 141040 020253 126302 141040 020255 127302 141040 020257
+0000190 130302 141040 020261 131302 141040 020263 132302 141040
+00001a0 020265 133302 141040 020267 134302 141040 020271 135302
+00001b0 141040 020273 136302 141040 020275 137302 141040 020277
+00001c0 100303 141440 020201 101303 141440 020203 102303 141440
+00001d0 020205 103303 141440 020207 104303 141440 020211 105303
+00001e0 141440 020213 106303 141440 020215 107303 141440 020217
+00001f0 110303 141440 020221 111303 141440 020223 112303 141440
+0000200 020225 113303 141440 020227 114303 141440 020231 115303
+0000210 141440 020233 116303 141440 020235 117303 141440 020237
+0000220 120303 141440 020241 121303 141440 020243 122303 141440
+0000230 020245 123303 141440 020247 124303 141440 020251 125303
+0000240 141440 020253 126303 141440 020255 127303 141440 020257
+0000250 130303 141440 020261 131303 141440 020263 132303 141440
+0000260 020265 133303 141440 020267 134303 141440 020271 135303
+0000270 141440 020273 136303 141440 020275 137303 141440 020277
+0000280
diff --git a/tests/expected/hexdump/format-strings-2b_octal.BE b/tests/expected/hexdump/format-strings-2b_octal.BE
new file mode 100644
index 0000000..d5ee118
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-2b_octal.BE
@@ -0,0 +1,41 @@
+0000000 000040 000440 001040 001440 002040 002440 003040 003440
+0000010 004040 004440 005040 005440 006040 006440 007040 007440
+0000020 010040 010440 011040 011440 012040 012440 013040 013440
+0000030 014040 014440 015040 015440 016040 016440 017040 017440
+0000040 020040 020440 021040 021440 022040 022440 023040 023440
+0000050 024040 024440 025040 025440 026040 026440 027040 027440
+0000060 030040 030440 031040 031440 032040 032440 033040 033440
+0000070 034040 034440 035040 035440 036040 036440 037040 037440
+0000080 040040 040440 041040 041440 042040 042440 043040 043440
+0000090 044040 044440 045040 045440 046040 046440 047040 047440
+00000a0 050040 050440 051040 051440 052040 052440 053040 053440
+00000b0 054040 054440 055040 055440 056040 056440 057040 057440
+00000c0 060040 060440 061040 061440 062040 062440 063040 063440
+00000d0 064040 064440 065040 065440 066040 066440 067040 067440
+00000e0 070040 070440 071040 071440 072040 072440 073040 073440
+00000f0 074040 074440 075040 075440 076040 076440 077040 077440
+0000100 141200 020302 100440 141202 020302 101440 141204 020302
+0000110 102440 141206 020302 103440 141210 020302 104440 141212
+0000120 020302 105440 141214 020302 106440 141216 020302 107440
+0000130 141220 020302 110440 141222 020302 111440 141224 020302
+0000140 112440 141226 020302 113440 141230 020302 114440 141232
+0000150 020302 115440 141234 020302 116440 141236 020302 117440
+0000160 141240 020302 120440 141242 020302 121440 141244 020302
+0000170 122440 141246 020302 123440 141250 020302 124440 141252
+0000180 020302 125440 141254 020302 126440 141256 020302 127440
+0000190 141260 020302 130440 141262 020302 131440 141264 020302
+00001a0 132440 141266 020302 133440 141270 020302 134440 141272
+00001b0 020302 135440 141274 020302 136440 141276 020302 137440
+00001c0 141600 020303 100440 141602 020303 101440 141604 020303
+00001d0 102440 141606 020303 103440 141610 020303 104440 141612
+00001e0 020303 105440 141614 020303 106440 141616 020303 107440
+00001f0 141620 020303 110440 141622 020303 111440 141624 020303
+0000200 112440 141626 020303 113440 141630 020303 114440 141632
+0000210 020303 115440 141634 020303 116440 141636 020303 117440
+0000220 141640 020303 120440 141642 020303 121440 141644 020303
+0000230 122440 141646 020303 123440 141650 020303 124440 141652
+0000240 020303 125440 141654 020303 126440 141656 020303 127440
+0000250 141660 020303 130440 141662 020303 131440 141664 020303
+0000260 132440 141666 020303 133440 141670 020303 134440 141672
+0000270 020303 135440 141674 020303 136440 141676 020303 137440
+0000280
diff --git a/tests/expected/hexdump/format-strings-canon b/tests/expected/hexdump/format-strings-canon
new file mode 100644
index 0000000..94fe5ad
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-canon
@@ -0,0 +1,41 @@
+00000000 00 20 01 20 02 20 03 20 04 20 05 20 06 20 07 20 |. . . . . . . . |
+00000010 08 20 09 20 0a 20 0b 20 0c 20 0d 20 0e 20 0f 20 |. . . . . . . . |
+00000020 10 20 11 20 12 20 13 20 14 20 15 20 16 20 17 20 |. . . . . . . . |
+00000030 18 20 19 20 1a 20 1b 20 1c 20 1d 20 1e 20 1f 20 |. . . . . . . . |
+00000040 20 20 21 20 22 20 23 20 24 20 25 20 26 20 27 20 | ! " # $ % & ' |
+00000050 28 20 29 20 2a 20 2b 20 2c 20 2d 20 2e 20 2f 20 |( ) * + , - . / |
+00000060 30 20 31 20 32 20 33 20 34 20 35 20 36 20 37 20 |0 1 2 3 4 5 6 7 |
+00000070 38 20 39 20 3a 20 3b 20 3c 20 3d 20 3e 20 3f 20 |8 9 : ; < = > ? |
+00000080 40 20 41 20 42 20 43 20 44 20 45 20 46 20 47 20 |@ A B C D E F G |
+00000090 48 20 49 20 4a 20 4b 20 4c 20 4d 20 4e 20 4f 20 |H I J K L M N O |
+000000a0 50 20 51 20 52 20 53 20 54 20 55 20 56 20 57 20 |P Q R S T U V W |
+000000b0 58 20 59 20 5a 20 5b 20 5c 20 5d 20 5e 20 5f 20 |X Y Z [ \ ] ^ _ |
+000000c0 60 20 61 20 62 20 63 20 64 20 65 20 66 20 67 20 |` a b c d e f g |
+000000d0 68 20 69 20 6a 20 6b 20 6c 20 6d 20 6e 20 6f 20 |h i j k l m n o |
+000000e0 70 20 71 20 72 20 73 20 74 20 75 20 76 20 77 20 |p q r s t u v w |
+000000f0 78 20 79 20 7a 20 7b 20 7c 20 7d 20 7e 20 7f 20 |x y z { | } ~ . |
+00000100 c2 80 20 c2 81 20 c2 82 20 c2 83 20 c2 84 20 c2 |.. .. .. .. .. .|
+00000110 85 20 c2 86 20 c2 87 20 c2 88 20 c2 89 20 c2 8a |. .. .. .. .. ..|
+00000120 20 c2 8b 20 c2 8c 20 c2 8d 20 c2 8e 20 c2 8f 20 | .. .. .. .. .. |
+00000130 c2 90 20 c2 91 20 c2 92 20 c2 93 20 c2 94 20 c2 |.. .. .. .. .. .|
+00000140 95 20 c2 96 20 c2 97 20 c2 98 20 c2 99 20 c2 9a |. .. .. .. .. ..|
+00000150 20 c2 9b 20 c2 9c 20 c2 9d 20 c2 9e 20 c2 9f 20 | .. .. .. .. .. |
+00000160 c2 a0 20 c2 a1 20 c2 a2 20 c2 a3 20 c2 a4 20 c2 |.. .. .. .. .. .|
+00000170 a5 20 c2 a6 20 c2 a7 20 c2 a8 20 c2 a9 20 c2 aa |. .. .. .. .. ..|
+00000180 20 c2 ab 20 c2 ac 20 c2 ad 20 c2 ae 20 c2 af 20 | .. .. .. .. .. |
+00000190 c2 b0 20 c2 b1 20 c2 b2 20 c2 b3 20 c2 b4 20 c2 |.. .. .. .. .. .|
+000001a0 b5 20 c2 b6 20 c2 b7 20 c2 b8 20 c2 b9 20 c2 ba |. .. .. .. .. ..|
+000001b0 20 c2 bb 20 c2 bc 20 c2 bd 20 c2 be 20 c2 bf 20 | .. .. .. .. .. |
+000001c0 c3 80 20 c3 81 20 c3 82 20 c3 83 20 c3 84 20 c3 |.. .. .. .. .. .|
+000001d0 85 20 c3 86 20 c3 87 20 c3 88 20 c3 89 20 c3 8a |. .. .. .. .. ..|
+000001e0 20 c3 8b 20 c3 8c 20 c3 8d 20 c3 8e 20 c3 8f 20 | .. .. .. .. .. |
+000001f0 c3 90 20 c3 91 20 c3 92 20 c3 93 20 c3 94 20 c3 |.. .. .. .. .. .|
+00000200 95 20 c3 96 20 c3 97 20 c3 98 20 c3 99 20 c3 9a |. .. .. .. .. ..|
+00000210 20 c3 9b 20 c3 9c 20 c3 9d 20 c3 9e 20 c3 9f 20 | .. .. .. .. .. |
+00000220 c3 a0 20 c3 a1 20 c3 a2 20 c3 a3 20 c3 a4 20 c3 |.. .. .. .. .. .|
+00000230 a5 20 c3 a6 20 c3 a7 20 c3 a8 20 c3 a9 20 c3 aa |. .. .. .. .. ..|
+00000240 20 c3 ab 20 c3 ac 20 c3 ad 20 c3 ae 20 c3 af 20 | .. .. .. .. .. |
+00000250 c3 b0 20 c3 b1 20 c3 b2 20 c3 b3 20 c3 b4 20 c3 |.. .. .. .. .. .|
+00000260 b5 20 c3 b6 20 c3 b7 20 c3 b8 20 c3 b9 20 c3 ba |. .. .. .. .. ..|
+00000270 20 c3 bb 20 c3 bc 20 c3 bd 20 c3 be 20 c3 bf 20 | .. .. .. .. .. |
+00000280
diff --git a/tests/expected/hexdump/format-strings-empty-format b/tests/expected/hexdump/format-strings-empty-format
new file mode 100644
index 0000000..9d60796
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-empty-format
@@ -0,0 +1 @@
+11 \ No newline at end of file
diff --git a/tests/expected/hexdump/format-strings-empty-format.BE b/tests/expected/hexdump/format-strings-empty-format.BE
new file mode 100644
index 0000000..be66217
--- /dev/null
+++ b/tests/expected/hexdump/format-strings-empty-format.BE
@@ -0,0 +1 @@
+10000001000000 \ No newline at end of file
diff --git a/tests/expected/hexdump/highlighting-1b_char-1 b/tests/expected/hexdump/highlighting-1b_char-1
new file mode 100644
index 0000000..7587664
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_char-1
@@ -0,0 +1,41 @@
+0000000 \0 001 002 003 004 005 006 \a
+0000010 \b \t \n \v \f \r 016 017
+0000020 020 021 022 023 024 025 026 027
+0000030 030 031 032 033 034 035 036 037
+0000040 ! " # $ % & '
+0000050 ( ) * + ,  - . /
+0000060 0 1 2 3 4 5 6 7
+0000070 8 9 : ; < = > ?
+0000080 @ A B C D E F G
+0000090 H  I J K  L M  N O
+00000a0 P Q R S  T  U V W
+00000b0  X Y Z [ \ ] ^ _
+00000c0 ` a b c d e f g
+00000d0 h i j k l m n o
+00000e0 p q r s t u v w
+00000f0 x y z { | } ~ 177
+0000100 302 200 302 201 302 202 302 203 302 204 302
+0000110 205 302 206 302 207 302 210 302 211 302 212
+0000120 302 213 302 214 302 215 302 216 302 217
+0000130 302 220 302 221 302 222 302 223 302 224 302
+0000140 225 302 226 302 227 302 230 302 231 302 232
+0000150 302 233 302 234 302 235 302 236 302 237
+0000160 302 240 302 241 302 242 302 243 302 244 302
+0000170 245 302 246 302 247 302 250 302 251 302 252
+0000180 302 253 302 254 302 255 302 256 302 257
+0000190 302 260 302 261 302 262 302 263 302 264 302
+00001a0 265 302 266 302 267 302 270 302 271 302 272
+00001b0 302 273 302 274 302 275 302 276 302 277
+00001c0 303 200 303 201 303 202 303 203 303 204 303
+00001d0 205 303 206 303 207 303 210 303 211 303 212
+00001e0 303 213 303 214 303 215 303 216 303 217
+00001f0 303 220 303 221 303 222 303 223 303 224 303
+0000200 225 303 226 303 227 303 230 303 231 303 232
+0000210 303 233 303 234 303 235 303 236 303 237
+0000220 303 240 303 241 303 242 303 243 303 244 303
+0000230 245 303 246 303 247 303 250 303 251 303 252
+0000240 303 253 303 254 303 255 303 256 303 257
+0000250 303 260 303 261 303 262 303 263 303 264 303
+0000260 265 303 266 303 267 303 270 303 271 303 272
+0000270 303 273 303 274 303 275 303 276 303 277
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_char-2 b/tests/expected/hexdump/highlighting-1b_char-2
new file mode 100644
index 0000000..762ad35
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_char-2
@@ -0,0 +1,41 @@
+0000000 \0 001 002 003 004 005 006 \a
+0000010 \b \t \n \v \f \r 016 017
+0000020 020 021 022 023 024 025 026 027
+0000030 030 031 032 033 034 035 036 037
+0000040 ! " # $ % & '
+0000050 ( ) * + , - . /
+0000060 0 1 2 3 4 5 6 7
+0000070 8 9 : ; < = > ?
+0000080 @ A B C D E F G
+0000090 H I J K L M N O
+00000a0 P Q R S T U V W
+00000b0 X Y Z [ \ ] ^ _
+00000c0 ` a b c d e f g
+00000d0 h i j k l m n o
+00000e0 p q r s t u v w
+00000f0 x y z { | } ~ 177
+0000100 302 200 302 201 302 202 302 203 302 204 302
+0000110 205 302 206 302 207 302 210 302 211 302 212
+0000120 302 213 302 214 302 215 302 216 302 217
+0000130 302 220 302 221 302 222 302 223 302 224 302
+0000140 225 302 226 302 227 302 230 302 231 302 232
+0000150 302 233 302 234 302 235 302 236 302 237
+0000160 302 240 302 241 302 242 302 243 302 244 302
+0000170 245 302 246 302 247 302 250 302 251 302 252
+0000180 302 253 302 254 302 255 302 256 302 257
+0000190 302 260 302 261 302 262 302 263 302 264 302
+00001a0 265 302 266 302 267 302 270 302 271 302 272
+00001b0 302 273 302 274 302 275 302 276 302 277
+00001c0 303 200 303 201 303 202 303 203 303 204 303
+00001d0 205 303 206 303 207 303 210 303 211 303 212
+00001e0 303 213 303 214 303 215 303 216 303 217
+00001f0 303 220 303 221 303 222 303 223 303 224 303
+0000200 225 303 226 303 227 303 230 303 231 303 232
+0000210 303 233 303 234 303 235 303 236 303 237
+0000220 303 240 303 241 303 242 303 243 303 244 303
+0000230 245 303 246 303 247 303 250 303 251 303 252
+0000240 303 253 303 254 303 255 303 256 303 257
+0000250 303 260 303 261 303 262 303 263 303 264 303
+0000260 265 303 266 303 267 303 270 303 271 303 272
+0000270 303 273 303 274 303 275 303 276 303 277
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_char-3 b/tests/expected/hexdump/highlighting-1b_char-3
new file mode 100644
index 0000000..1595cef
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_char-3
@@ -0,0 +1,41 @@
+0000000 \0 001 002 003 004 005 006 \a
+0000010 \b \t \n \v \f \r 016 017
+0000020 020 021 022 023 024 025 026 027
+0000030 030 031 032 033 034 035 036 037
+0000040 ! " # $ % & '
+0000050 ( ) * + , - . /
+0000060 0 1 2 3 4 5 6 7
+0000070 8 9  : ; < = > ?
+0000080  @ A B C D E F G
+0000090 H I J K L M N O
+00000a0 P Q R S T U V W
+00000b0 X Y Z [ \ ] ^ _
+00000c0 ` a b c d e f g
+00000d0 h i j k l m n o
+00000e0 p q r s t u v w
+00000f0 x y z { | } ~ 177
+0000100 302 200 302 201 302 202 302 203 302 204 302
+0000110 205 302 206 302 207 302 210 302 211 302 212
+0000120 302 213 302 214 302 215 302 216 302 217
+0000130 302 220 302 221 302 222 302 223 302 224 302
+0000140 225 302 226 302 227 302 230 302 231 302 232
+0000150 302 233 302 234 302 235 302 236 302 237
+0000160 302 240 302 241 302 242 302 243 302 244 302
+0000170 245 302 246 302 247 302 250 302 251 302 252
+0000180 302 253 302 254 302 255 302 256 302 257
+0000190 302 260 302 261 302 262 302 263 302 264 302
+00001a0 265 302 266 302 267 302 270 302 271 302 272
+00001b0 302 273 302 274 302 275 302 276 302 277
+00001c0 303 200 303 201 303 202 303 203 303 204 303
+00001d0 205 303 206 303 207 303 210 303 211 303 212
+00001e0 303 213 303 214 303 215 303 216 303 217
+00001f0 303 220 303 221 303 222 303 223 303 224 303
+0000200 225 303 226 303 227 303 230 303 231 303 232
+0000210 303 233 303 234 303 235 303 236 303 237
+0000220 303 240 303 241 303 242 303 243 303 244 303
+0000230 245 303 246 303 247 303 250 303 251 303 252
+0000240 303 253 303 254 303 255 303 256 303 257
+0000250 303 260 303 261 303 262 303 263 303 264 303
+0000260 265 303 266 303 267 303 270 303 271 303 272
+0000270 303 273 303 274 303 275 303 276 303 277
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-1 b/tests/expected/hexdump/highlighting-1b_octal-1
new file mode 100644
index 0000000..1f8ca68
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-1
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-2 b/tests/expected/hexdump/highlighting-1b_octal-2
new file mode 100644
index 0000000..1f8ca68
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-2
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-2.BE b/tests/expected/hexdump/highlighting-1b_octal-2.BE
new file mode 100644
index 0000000..519d07f
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-2.BE
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-3 b/tests/expected/hexdump/highlighting-1b_octal-3
new file mode 100644
index 0000000..1f8ca68
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-3
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-4 b/tests/expected/hexdump/highlighting-1b_octal-4
new file mode 100644
index 0000000..1f8ca68
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-4
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-4.BE b/tests/expected/hexdump/highlighting-1b_octal-4.BE
new file mode 100644
index 0000000..d579dfc
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-4.BE
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-5 b/tests/expected/hexdump/highlighting-1b_octal-5
new file mode 100644
index 0000000..0eb6def
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-5
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-5.BE b/tests/expected/hexdump/highlighting-1b_octal-5.BE
new file mode 100644
index 0000000..519d07f
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-5.BE
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-6 b/tests/expected/hexdump/highlighting-1b_octal-6
new file mode 100644
index 0000000..8dca57f
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-6
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-7 b/tests/expected/hexdump/highlighting-1b_octal-7
new file mode 100644
index 0000000..1f8ca68
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-7
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-7.BE b/tests/expected/hexdump/highlighting-1b_octal-7.BE
new file mode 100644
index 0000000..519d07f
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-7.BE
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-8 b/tests/expected/hexdump/highlighting-1b_octal-8
new file mode 100644
index 0000000..53a8318
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-8
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-8.BE b/tests/expected/hexdump/highlighting-1b_octal-8.BE
new file mode 100644
index 0000000..9ffd3cf
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-8.BE
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-9 b/tests/expected/hexdump/highlighting-1b_octal-9
new file mode 100644
index 0000000..7446bd7
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-9
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-1b_octal-9.BE b/tests/expected/hexdump/highlighting-1b_octal-9.BE
new file mode 100644
index 0000000..aeedce2
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-1b_octal-9.BE
@@ -0,0 +1,41 @@
+0000000 000 040 001 040 002 040 003 040 004 040 005 040 006 040 007 040
+0000010 010 040 011 040 012 040 013 040 014 040 015 040 016 040 017 040
+0000020 020 040 021 040 022 040 023 040 024 040 025 040 026 040 027 040
+0000030 030 040 031 040 032 040 033 040 034 040 035 040 036 040 037 040
+0000040 040 040 041 040 042 040 043 040 044 040 045 040 046 040 047 040
+0000050 050 040 051 040 052 040 053 040 054 040 055 040 056 040 057 040
+0000060 060 040 061 040 062 040 063 040 064 040 065 040 066 040 067 040
+0000070 070 040 071 040 072 040 073 040 074 040 075 040 076 040 077 040
+0000080 100 040 101 040 102 040 103 040 104 040 105 040 106 040 107 040
+0000090 110 040 111 040 112 040 113 040 114 040 115 040 116 040 117 040
+00000a0 120 040 121 040 122 040 123 040 124 040 125 040 126 040 127 040
+00000b0 130 040 131 040 132 040 133 040 134 040 135 040 136 040 137 040
+00000c0 140 040 141 040 142 040 143 040 144 040 145 040 146 040 147 040
+00000d0 150 040 151 040 152 040 153 040 154 040 155 040 156 040 157 040
+00000e0 160 040 161 040 162 040 163 040 164 040 165 040 166 040 167 040
+00000f0 170 040 171 040 172 040 173 040 174 040 175 040 176 040 177 040
+0000100 302 200 040 302 201 040 302 202 040 302 203 040 302 204 040 302
+0000110 205 040 302 206 040 302 207 040 302 210 040 302 211 040 302 212
+0000120 040 302 213 040 302 214 040 302 215 040 302 216 040 302 217 040
+0000130 302 220 040 302 221 040 302 222 040 302 223 040 302 224 040 302
+0000140 225 040 302 226 040 302 227 040 302 230 040 302 231 040 302 232
+0000150 040 302 233 040 302 234 040 302 235 040 302 236 040 302 237 040
+0000160 302 240 040 302 241 040 302 242 040 302 243 040 302 244 040 302
+0000170 245 040 302 246 040 302 247 040 302 250 040 302 251 040 302 252
+0000180 040 302 253 040 302 254 040 302 255 040 302 256 040 302 257 040
+0000190 302 260 040 302 261 040 302 262 040 302 263 040 302 264 040 302
+00001a0 265 040 302 266 040 302 267 040 302 270 040 302 271 040 302 272
+00001b0 040 302 273 040 302 274 040 302 275 040 302 276 040 302 277 040
+00001c0 303 200 040 303 201 040 303 202 040 303 203 040 303 204 040 303
+00001d0 205 040 303 206 040 303 207 040 303 210 040 303 211 040 303 212
+00001e0 040 303 213 040 303 214 040 303 215 040 303 216 040 303 217 040
+00001f0 303 220 040 303 221 040 303 222 040 303 223 040 303 224 040 303
+0000200 225 040 303 226 040 303 227 040 303 230 040 303 231 040 303 232
+0000210 040 303 233 040 303 234 040 303 235 040 303 236 040 303 237 040
+0000220 303 240 040 303 241 040 303 242 040 303 243 040 303 244 040 303
+0000230 245 040 303 246 040 303 247 040 303 250 040 303 251 040 303 252
+0000240 040 303 253 040 303 254 040 303 255 040 303 256 040 303 257 040
+0000250 303 260 040 303 261 040 303 262 040 303 263 040 303 264 040 303
+0000260 265 040 303 266 040 303 267 040 303 270 040 303 271 040 303 272
+0000270 040 303 273 040 303 274 040 303 275 040 303 276 040 303 277 040
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-1 b/tests/expected/hexdump/highlighting-2b_dec-1
new file mode 100644
index 0000000..cfb2c5a
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-1
@@ -0,0 +1,41 @@
+0000000 08192 08193 08194 08195 08196 08197 08198 08199
+0000010 08200 08201 08202 08203 08204 08205 08206 08207
+0000020 08208 08209 08210 08211 08212 08213 08214 08215
+0000030 08216 08217 08218 08219 08220 08221 08222 08223
+0000040 08224 08225 08226 08227 08228 08229 08230 08231
+0000050 08232 08233 08234 08235 08236 08237 08238 08239
+0000060 08240 08241  08242 08243 08244 08245 08246 08247
+0000070 08248 08249 08250 08251 08252 08253 08254 08255
+0000080 08256 08257 08258 08259 08260 08261 08262 08263
+0000090 08264 08265 08266 08267 08268 08269 08270 08271
+00000a0 08272 08273 08274 08275 08276 08277 08278 08279
+00000b0 08280 08281 08282 08283 08284 08285 08286 08287
+00000c0 08288 08289 08290 08291 08292 08293 08294 08295
+00000d0 08296 08297 08298 08299 08300 08301 08302 08303
+00000e0 08304 08305 08306 08307 08308 08309 08310 08311
+00000f0 08312 08313 08314 08315 08316 08317 08318 08319
+0000100 32962 49696 08321 33474 49696 08323 33986 49696
+0000110 08325 34498 49696 08327 35010 49696 08329 35522
+0000120 49696 08331 36034 49696 08333 36546 49696 08335
+0000130 37058 49696 08337 37570 49696 08339 38082 49696
+0000140 08341 38594 49696 08343 39106 49696 08345 39618
+0000150 49696 08347 40130 49696 08349 40642 49696 08351
+0000160 41154 49696 08353 41666 49696 08355 42178 49696
+0000170 08357 42690 49696 08359 43202 49696 08361 43714
+0000180 49696 08363 44226 49696 08365 44738 49696 08367
+0000190 45250 49696 08369 45762 49696 08371 46274 49696
+00001a0 08373 46786 49696 08375 47298 49696 08377 47810
+00001b0 49696 08379 48322 49696 08381 48834 49696 08383
+00001c0 32963 49952 08321 33475 49952 08323 33987 49952
+00001d0 08325 34499 49952 08327 35011 49952 08329 35523
+00001e0 49952 08331 36035 49952 08333 36547 49952 08335
+00001f0 37059 49952 08337 37571 49952 08339 38083 49952
+0000200 08341 38595 49952 08343 39107 49952 08345 39619
+0000210 49952 08347 40131 49952 08349 40643 49952 08351
+0000220 41155 49952 08353 41667 49952 08355 42179 49952
+0000230 08357 42691 49952 08359 43203 49952 08361 43715
+0000240 49952 08363 44227 49952 08365 44739 49952 08367
+0000250 45251 49952 08369 45763 49952 08371 46275 49952
+0000260 08373 46787 49952 08375 47299 49952 08377 47811
+0000270 49952 08379 48323 49952 08381 48835 49952 08383
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-1.BE b/tests/expected/hexdump/highlighting-2b_dec-1.BE
new file mode 100644
index 0000000..c350e6c
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-1.BE
@@ -0,0 +1,41 @@
+0000000 00032 00288 00544 00800 01056 01312 01568 01824
+0000010 02080 02336 02592 02848 03104 03360 03616 03872
+0000020 04128 04384 04640 04896 05152 05408 05664 05920
+0000030 06176 06432 06688 06944 07200 07456 07712 07968
+0000040 08224 08480 08736 08992 09248 09504 09760 10016
+0000050 10272 10528 10784 11040 11296 11552 11808 12064
+0000060 12320 12576  12832 13088 13344 13600 13856 14112
+0000070 14368 14624 14880 15136 15392 15648 15904 16160
+0000080 16416 16672 16928 17184 17440 17696 17952 18208
+0000090 18464 18720 18976 19232 19488 19744 20000 20256
+00000a0 20512 20768 21024 21280 21536 21792 22048 22304
+00000b0 22560 22816 23072 23328 23584 23840 24096 24352
+00000c0 24608 24864 25120 25376 25632 25888 26144 26400
+00000d0 26656 26912 27168 27424 27680 27936 28192 28448
+00000e0 28704 28960 29216 29472 29728 29984 30240 30496
+00000f0 30752 31008 31264 31520 31776 32032 32288 32544
+0000100 49792 08386 33056 49794 08386 33568 49796 08386
+0000110 34080 49798 08386 34592 49800 08386 35104 49802
+0000120 08386 35616 49804 08386 36128 49806 08386 36640
+0000130 49808 08386 37152 49810 08386 37664 49812 08386
+0000140 38176 49814 08386 38688 49816 08386 39200 49818
+0000150 08386 39712 49820 08386 40224 49822 08386 40736
+0000160 49824 08386 41248 49826 08386 41760 49828 08386
+0000170 42272 49830 08386 42784 49832 08386 43296 49834
+0000180 08386 43808 49836 08386 44320 49838 08386 44832
+0000190 49840 08386 45344 49842 08386 45856 49844 08386
+00001a0 46368 49846 08386 46880 49848 08386 47392 49850
+00001b0 08386 47904 49852 08386 48416 49854 08386 48928
+00001c0 50048 08387 33056 50050 08387 33568 50052 08387
+00001d0 34080 50054 08387 34592 50056 08387 35104 50058
+00001e0 08387 35616 50060 08387 36128 50062 08387 36640
+00001f0 50064 08387 37152 50066 08387 37664 50068 08387
+0000200 38176 50070 08387 38688 50072 08387 39200 50074
+0000210 08387 39712 50076 08387 40224 50078 08387 40736
+0000220 50080 08387 41248 50082 08387 41760 50084 08387
+0000230 42272 50086 08387 42784 50088 08387 43296 50090
+0000240 08387 43808 50092 08387 44320 50094 08387 44832
+0000250 50096 08387 45344 50098 08387 45856 50100 08387
+0000260 46368 50102 08387 46880 50104 08387 47392 50106
+0000270 08387 47904 50108 08387 48416 50110 08387 48928
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-2 b/tests/expected/hexdump/highlighting-2b_dec-2
new file mode 100644
index 0000000..1872323
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-2
@@ -0,0 +1,41 @@
+0000000 08192 08193 08194 08195 08196 08197 08198 08199
+0000010 08200 08201 08202 08203 08204 08205 08206 08207
+0000020 08208 08209 08210 08211 08212 08213 08214 08215
+0000030 08216 08217 08218 08219 08220 08221 08222 08223
+0000040 08224 08225 08226 08227 08228 08229 08230 08231
+0000050 08232 08233 08234 08235 08236 08237 08238 08239
+0000060 08240  08241 08242 08243 08244 08245 08246 08247
+0000070 08248 08249 08250 08251 08252 08253 08254 08255
+0000080 08256 08257 08258 08259 08260 08261 08262 08263
+0000090 08264 08265 08266 08267 08268 08269 08270 08271
+00000a0 08272 08273 08274 08275 08276 08277 08278 08279
+00000b0 08280 08281 08282 08283 08284 08285 08286 08287
+00000c0 08288 08289 08290 08291 08292 08293 08294 08295
+00000d0 08296 08297 08298 08299 08300 08301 08302 08303
+00000e0 08304 08305 08306 08307 08308 08309 08310 08311
+00000f0 08312 08313 08314 08315 08316 08317 08318 08319
+0000100 32962 49696 08321 33474 49696 08323 33986 49696
+0000110 08325 34498 49696 08327 35010 49696 08329 35522
+0000120 49696 08331 36034 49696 08333 36546 49696 08335
+0000130 37058 49696 08337 37570 49696 08339 38082 49696
+0000140 08341 38594 49696 08343 39106 49696 08345 39618
+0000150 49696 08347 40130 49696 08349 40642 49696 08351
+0000160 41154 49696 08353 41666 49696 08355 42178 49696
+0000170 08357 42690 49696 08359 43202 49696 08361 43714
+0000180 49696 08363 44226 49696 08365 44738 49696 08367
+0000190 45250 49696 08369 45762 49696 08371 46274 49696
+00001a0 08373 46786 49696 08375 47298 49696 08377 47810
+00001b0 49696 08379 48322 49696 08381 48834 49696 08383
+00001c0 32963 49952 08321 33475 49952 08323 33987 49952
+00001d0 08325 34499 49952 08327 35011 49952 08329 35523
+00001e0 49952 08331 36035 49952 08333 36547 49952 08335
+00001f0 37059 49952 08337 37571 49952 08339 38083 49952
+0000200 08341 38595 49952 08343 39107 49952 08345 39619
+0000210 49952 08347 40131 49952 08349 40643 49952 08351
+0000220 41155 49952 08353 41667 49952 08355 42179 49952
+0000230 08357 42691 49952 08359 43203 49952 08361 43715
+0000240 49952 08363 44227 49952 08365 44739 49952 08367
+0000250 45251 49952 08369 45763 49952 08371 46275 49952
+0000260 08373 46787 49952 08375 47299 49952 08377 47811
+0000270 49952 08379 48323 49952 08381 48835 49952 08383
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-2.BE b/tests/expected/hexdump/highlighting-2b_dec-2.BE
new file mode 100644
index 0000000..46b4fab
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-2.BE
@@ -0,0 +1,41 @@
+0000000 00032 00288 00544 00800 01056 01312 01568 01824
+0000010 02080 02336 02592 02848 03104 03360 03616 03872
+0000020 04128 04384 04640 04896 05152 05408 05664 05920
+0000030 06176 06432 06688 06944 07200 07456 07712 07968
+0000040 08224 08480 08736 08992 09248 09504 09760 10016
+0000050 10272 10528 10784 11040 11296 11552 11808 12064
+0000060 12320  12576 12832 13088 13344 13600 13856 14112
+0000070 14368 14624 14880 15136 15392 15648 15904 16160
+0000080 16416 16672 16928 17184 17440 17696 17952 18208
+0000090 18464 18720 18976 19232 19488 19744 20000 20256
+00000a0 20512 20768 21024 21280 21536 21792 22048 22304
+00000b0 22560 22816 23072 23328 23584 23840 24096 24352
+00000c0 24608 24864 25120 25376 25632 25888 26144 26400
+00000d0 26656 26912 27168 27424 27680 27936 28192 28448
+00000e0 28704 28960 29216 29472 29728 29984 30240 30496
+00000f0 30752 31008 31264 31520 31776 32032 32288 32544
+0000100 49792 08386 33056 49794 08386 33568 49796 08386
+0000110 34080 49798 08386 34592 49800 08386 35104 49802
+0000120 08386 35616 49804 08386 36128 49806 08386 36640
+0000130 49808 08386 37152 49810 08386 37664 49812 08386
+0000140 38176 49814 08386 38688 49816 08386 39200 49818
+0000150 08386 39712 49820 08386 40224 49822 08386 40736
+0000160 49824 08386 41248 49826 08386 41760 49828 08386
+0000170 42272 49830 08386 42784 49832 08386 43296 49834
+0000180 08386 43808 49836 08386 44320 49838 08386 44832
+0000190 49840 08386 45344 49842 08386 45856 49844 08386
+00001a0 46368 49846 08386 46880 49848 08386 47392 49850
+00001b0 08386 47904 49852 08386 48416 49854 08386 48928
+00001c0 50048 08387 33056 50050 08387 33568 50052 08387
+00001d0 34080 50054 08387 34592 50056 08387 35104 50058
+00001e0 08387 35616 50060 08387 36128 50062 08387 36640
+00001f0 50064 08387 37152 50066 08387 37664 50068 08387
+0000200 38176 50070 08387 38688 50072 08387 39200 50074
+0000210 08387 39712 50076 08387 40224 50078 08387 40736
+0000220 50080 08387 41248 50082 08387 41760 50084 08387
+0000230 42272 50086 08387 42784 50088 08387 43296 50090
+0000240 08387 43808 50092 08387 44320 50094 08387 44832
+0000250 50096 08387 45344 50098 08387 45856 50100 08387
+0000260 46368 50102 08387 46880 50104 08387 47392 50106
+0000270 08387 47904 50108 08387 48416 50110 08387 48928
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-3 b/tests/expected/hexdump/highlighting-2b_dec-3
new file mode 100644
index 0000000..1872323
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-3
@@ -0,0 +1,41 @@
+0000000 08192 08193 08194 08195 08196 08197 08198 08199
+0000010 08200 08201 08202 08203 08204 08205 08206 08207
+0000020 08208 08209 08210 08211 08212 08213 08214 08215
+0000030 08216 08217 08218 08219 08220 08221 08222 08223
+0000040 08224 08225 08226 08227 08228 08229 08230 08231
+0000050 08232 08233 08234 08235 08236 08237 08238 08239
+0000060 08240  08241 08242 08243 08244 08245 08246 08247
+0000070 08248 08249 08250 08251 08252 08253 08254 08255
+0000080 08256 08257 08258 08259 08260 08261 08262 08263
+0000090 08264 08265 08266 08267 08268 08269 08270 08271
+00000a0 08272 08273 08274 08275 08276 08277 08278 08279
+00000b0 08280 08281 08282 08283 08284 08285 08286 08287
+00000c0 08288 08289 08290 08291 08292 08293 08294 08295
+00000d0 08296 08297 08298 08299 08300 08301 08302 08303
+00000e0 08304 08305 08306 08307 08308 08309 08310 08311
+00000f0 08312 08313 08314 08315 08316 08317 08318 08319
+0000100 32962 49696 08321 33474 49696 08323 33986 49696
+0000110 08325 34498 49696 08327 35010 49696 08329 35522
+0000120 49696 08331 36034 49696 08333 36546 49696 08335
+0000130 37058 49696 08337 37570 49696 08339 38082 49696
+0000140 08341 38594 49696 08343 39106 49696 08345 39618
+0000150 49696 08347 40130 49696 08349 40642 49696 08351
+0000160 41154 49696 08353 41666 49696 08355 42178 49696
+0000170 08357 42690 49696 08359 43202 49696 08361 43714
+0000180 49696 08363 44226 49696 08365 44738 49696 08367
+0000190 45250 49696 08369 45762 49696 08371 46274 49696
+00001a0 08373 46786 49696 08375 47298 49696 08377 47810
+00001b0 49696 08379 48322 49696 08381 48834 49696 08383
+00001c0 32963 49952 08321 33475 49952 08323 33987 49952
+00001d0 08325 34499 49952 08327 35011 49952 08329 35523
+00001e0 49952 08331 36035 49952 08333 36547 49952 08335
+00001f0 37059 49952 08337 37571 49952 08339 38083 49952
+0000200 08341 38595 49952 08343 39107 49952 08345 39619
+0000210 49952 08347 40131 49952 08349 40643 49952 08351
+0000220 41155 49952 08353 41667 49952 08355 42179 49952
+0000230 08357 42691 49952 08359 43203 49952 08361 43715
+0000240 49952 08363 44227 49952 08365 44739 49952 08367
+0000250 45251 49952 08369 45763 49952 08371 46275 49952
+0000260 08373 46787 49952 08375 47299 49952 08377 47811
+0000270 49952 08379 48323 49952 08381 48835 49952 08383
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-3.BE b/tests/expected/hexdump/highlighting-2b_dec-3.BE
new file mode 100644
index 0000000..46b4fab
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-3.BE
@@ -0,0 +1,41 @@
+0000000 00032 00288 00544 00800 01056 01312 01568 01824
+0000010 02080 02336 02592 02848 03104 03360 03616 03872
+0000020 04128 04384 04640 04896 05152 05408 05664 05920
+0000030 06176 06432 06688 06944 07200 07456 07712 07968
+0000040 08224 08480 08736 08992 09248 09504 09760 10016
+0000050 10272 10528 10784 11040 11296 11552 11808 12064
+0000060 12320  12576 12832 13088 13344 13600 13856 14112
+0000070 14368 14624 14880 15136 15392 15648 15904 16160
+0000080 16416 16672 16928 17184 17440 17696 17952 18208
+0000090 18464 18720 18976 19232 19488 19744 20000 20256
+00000a0 20512 20768 21024 21280 21536 21792 22048 22304
+00000b0 22560 22816 23072 23328 23584 23840 24096 24352
+00000c0 24608 24864 25120 25376 25632 25888 26144 26400
+00000d0 26656 26912 27168 27424 27680 27936 28192 28448
+00000e0 28704 28960 29216 29472 29728 29984 30240 30496
+00000f0 30752 31008 31264 31520 31776 32032 32288 32544
+0000100 49792 08386 33056 49794 08386 33568 49796 08386
+0000110 34080 49798 08386 34592 49800 08386 35104 49802
+0000120 08386 35616 49804 08386 36128 49806 08386 36640
+0000130 49808 08386 37152 49810 08386 37664 49812 08386
+0000140 38176 49814 08386 38688 49816 08386 39200 49818
+0000150 08386 39712 49820 08386 40224 49822 08386 40736
+0000160 49824 08386 41248 49826 08386 41760 49828 08386
+0000170 42272 49830 08386 42784 49832 08386 43296 49834
+0000180 08386 43808 49836 08386 44320 49838 08386 44832
+0000190 49840 08386 45344 49842 08386 45856 49844 08386
+00001a0 46368 49846 08386 46880 49848 08386 47392 49850
+00001b0 08386 47904 49852 08386 48416 49854 08386 48928
+00001c0 50048 08387 33056 50050 08387 33568 50052 08387
+00001d0 34080 50054 08387 34592 50056 08387 35104 50058
+00001e0 08387 35616 50060 08387 36128 50062 08387 36640
+00001f0 50064 08387 37152 50066 08387 37664 50068 08387
+0000200 38176 50070 08387 38688 50072 08387 39200 50074
+0000210 08387 39712 50076 08387 40224 50078 08387 40736
+0000220 50080 08387 41248 50082 08387 41760 50084 08387
+0000230 42272 50086 08387 42784 50088 08387 43296 50090
+0000240 08387 43808 50092 08387 44320 50094 08387 44832
+0000250 50096 08387 45344 50098 08387 45856 50100 08387
+0000260 46368 50102 08387 46880 50104 08387 47392 50106
+0000270 08387 47904 50108 08387 48416 50110 08387 48928
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-4 b/tests/expected/hexdump/highlighting-2b_dec-4
new file mode 100644
index 0000000..d2111c2
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-4
@@ -0,0 +1,41 @@
+0000000 08192 08193 08194 08195 08196 08197 08198 08199
+0000010 08200 08201 08202 08203 08204 08205 08206 08207
+0000020 08208 08209 08210 08211 08212 08213 08214 08215
+0000030 08216 08217 08218 08219 08220 08221 08222 08223
+0000040 08224 08225 08226 08227 08228 08229 08230 08231
+0000050 08232 08233 08234 08235 08236 08237 08238 08239
+0000060 08240 08241 08242 08243 08244 08245 08246 08247
+0000070 08248 08249 08250 08251 08252 08253 08254 08255
+0000080 08256  08257 08258 08259 08260 08261 08262 08263
+0000090 08264 08265 08266 08267 08268 08269 08270 08271
+00000a0 08272 08273 08274 08275 08276 08277 08278 08279
+00000b0 08280 08281 08282 08283 08284 08285 08286 08287
+00000c0 08288 08289 08290 08291 08292 08293 08294 08295
+00000d0 08296 08297 08298 08299 08300 08301 08302 08303
+00000e0 08304 08305 08306 08307 08308 08309 08310 08311
+00000f0 08312 08313 08314 08315 08316 08317 08318 08319
+0000100 32962 49696 08321 33474 49696 08323 33986 49696
+0000110 08325 34498 49696 08327 35010 49696 08329 35522
+0000120 49696 08331 36034 49696 08333 36546 49696 08335
+0000130 37058 49696 08337 37570 49696 08339 38082 49696
+0000140 08341 38594 49696 08343 39106 49696 08345 39618
+0000150 49696 08347 40130 49696 08349 40642 49696 08351
+0000160 41154 49696 08353 41666 49696 08355 42178 49696
+0000170 08357 42690 49696 08359 43202 49696 08361 43714
+0000180 49696 08363 44226 49696 08365 44738 49696 08367
+0000190 45250 49696 08369 45762 49696 08371 46274 49696
+00001a0 08373 46786 49696 08375 47298 49696 08377 47810
+00001b0 49696 08379 48322 49696 08381 48834 49696 08383
+00001c0 32963 49952 08321 33475 49952 08323 33987 49952
+00001d0 08325 34499 49952 08327 35011 49952 08329 35523
+00001e0 49952 08331 36035 49952 08333 36547 49952 08335
+00001f0 37059 49952 08337 37571 49952 08339 38083 49952
+0000200 08341 38595 49952 08343 39107 49952 08345 39619
+0000210 49952 08347 40131 49952 08349 40643 49952 08351
+0000220 41155 49952 08353 41667 49952 08355 42179 49952
+0000230 08357 42691 49952 08359 43203 49952 08361 43715
+0000240 49952 08363 44227 49952 08365 44739 49952 08367
+0000250 45251 49952 08369 45763 49952 08371 46275 49952
+0000260 08373 46787 49952 08375 47299 49952 08377 47811
+0000270 49952 08379 48323 49952 08381 48835 49952 08383
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-4.BE b/tests/expected/hexdump/highlighting-2b_dec-4.BE
new file mode 100644
index 0000000..dcb2124
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-4.BE
@@ -0,0 +1,41 @@
+0000000 00032 00288 00544 00800 01056 01312 01568 01824
+0000010 02080 02336 02592 02848 03104 03360 03616 03872
+0000020 04128 04384 04640 04896 05152 05408 05664 05920
+0000030 06176 06432 06688 06944 07200 07456 07712 07968
+0000040 08224 08480 08736 08992 09248 09504 09760 10016
+0000050 10272 10528 10784 11040 11296 11552 11808 12064
+0000060 12320 12576 12832 13088 13344 13600 13856 14112
+0000070 14368 14624 14880 15136 15392 15648 15904 16160
+0000080 16416  16672 16928 17184 17440 17696 17952 18208
+0000090 18464 18720 18976 19232 19488 19744 20000 20256
+00000a0 20512 20768 21024 21280 21536 21792 22048 22304
+00000b0 22560 22816 23072 23328 23584 23840 24096 24352
+00000c0 24608 24864 25120 25376 25632 25888 26144 26400
+00000d0 26656 26912 27168 27424 27680 27936 28192 28448
+00000e0 28704 28960 29216 29472 29728 29984 30240 30496
+00000f0 30752 31008 31264 31520 31776 32032 32288 32544
+0000100 49792 08386 33056 49794 08386 33568 49796 08386
+0000110 34080 49798 08386 34592 49800 08386 35104 49802
+0000120 08386 35616 49804 08386 36128 49806 08386 36640
+0000130 49808 08386 37152 49810 08386 37664 49812 08386
+0000140 38176 49814 08386 38688 49816 08386 39200 49818
+0000150 08386 39712 49820 08386 40224 49822 08386 40736
+0000160 49824 08386 41248 49826 08386 41760 49828 08386
+0000170 42272 49830 08386 42784 49832 08386 43296 49834
+0000180 08386 43808 49836 08386 44320 49838 08386 44832
+0000190 49840 08386 45344 49842 08386 45856 49844 08386
+00001a0 46368 49846 08386 46880 49848 08386 47392 49850
+00001b0 08386 47904 49852 08386 48416 49854 08386 48928
+00001c0 50048 08387 33056 50050 08387 33568 50052 08387
+00001d0 34080 50054 08387 34592 50056 08387 35104 50058
+00001e0 08387 35616 50060 08387 36128 50062 08387 36640
+00001f0 50064 08387 37152 50066 08387 37664 50068 08387
+0000200 38176 50070 08387 38688 50072 08387 39200 50074
+0000210 08387 39712 50076 08387 40224 50078 08387 40736
+0000220 50080 08387 41248 50082 08387 41760 50084 08387
+0000230 42272 50086 08387 42784 50088 08387 43296 50090
+0000240 08387 43808 50092 08387 44320 50094 08387 44832
+0000250 50096 08387 45344 50098 08387 45856 50100 08387
+0000260 46368 50102 08387 46880 50104 08387 47392 50106
+0000270 08387 47904 50108 08387 48416 50110 08387 48928
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-5 b/tests/expected/hexdump/highlighting-2b_dec-5
new file mode 100644
index 0000000..d2111c2
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-5
@@ -0,0 +1,41 @@
+0000000 08192 08193 08194 08195 08196 08197 08198 08199
+0000010 08200 08201 08202 08203 08204 08205 08206 08207
+0000020 08208 08209 08210 08211 08212 08213 08214 08215
+0000030 08216 08217 08218 08219 08220 08221 08222 08223
+0000040 08224 08225 08226 08227 08228 08229 08230 08231
+0000050 08232 08233 08234 08235 08236 08237 08238 08239
+0000060 08240 08241 08242 08243 08244 08245 08246 08247
+0000070 08248 08249 08250 08251 08252 08253 08254 08255
+0000080 08256  08257 08258 08259 08260 08261 08262 08263
+0000090 08264 08265 08266 08267 08268 08269 08270 08271
+00000a0 08272 08273 08274 08275 08276 08277 08278 08279
+00000b0 08280 08281 08282 08283 08284 08285 08286 08287
+00000c0 08288 08289 08290 08291 08292 08293 08294 08295
+00000d0 08296 08297 08298 08299 08300 08301 08302 08303
+00000e0 08304 08305 08306 08307 08308 08309 08310 08311
+00000f0 08312 08313 08314 08315 08316 08317 08318 08319
+0000100 32962 49696 08321 33474 49696 08323 33986 49696
+0000110 08325 34498 49696 08327 35010 49696 08329 35522
+0000120 49696 08331 36034 49696 08333 36546 49696 08335
+0000130 37058 49696 08337 37570 49696 08339 38082 49696
+0000140 08341 38594 49696 08343 39106 49696 08345 39618
+0000150 49696 08347 40130 49696 08349 40642 49696 08351
+0000160 41154 49696 08353 41666 49696 08355 42178 49696
+0000170 08357 42690 49696 08359 43202 49696 08361 43714
+0000180 49696 08363 44226 49696 08365 44738 49696 08367
+0000190 45250 49696 08369 45762 49696 08371 46274 49696
+00001a0 08373 46786 49696 08375 47298 49696 08377 47810
+00001b0 49696 08379 48322 49696 08381 48834 49696 08383
+00001c0 32963 49952 08321 33475 49952 08323 33987 49952
+00001d0 08325 34499 49952 08327 35011 49952 08329 35523
+00001e0 49952 08331 36035 49952 08333 36547 49952 08335
+00001f0 37059 49952 08337 37571 49952 08339 38083 49952
+0000200 08341 38595 49952 08343 39107 49952 08345 39619
+0000210 49952 08347 40131 49952 08349 40643 49952 08351
+0000220 41155 49952 08353 41667 49952 08355 42179 49952
+0000230 08357 42691 49952 08359 43203 49952 08361 43715
+0000240 49952 08363 44227 49952 08365 44739 49952 08367
+0000250 45251 49952 08369 45763 49952 08371 46275 49952
+0000260 08373 46787 49952 08375 47299 49952 08377 47811
+0000270 49952 08379 48323 49952 08381 48835 49952 08383
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-5.BE b/tests/expected/hexdump/highlighting-2b_dec-5.BE
new file mode 100644
index 0000000..dcb2124
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-5.BE
@@ -0,0 +1,41 @@
+0000000 00032 00288 00544 00800 01056 01312 01568 01824
+0000010 02080 02336 02592 02848 03104 03360 03616 03872
+0000020 04128 04384 04640 04896 05152 05408 05664 05920
+0000030 06176 06432 06688 06944 07200 07456 07712 07968
+0000040 08224 08480 08736 08992 09248 09504 09760 10016
+0000050 10272 10528 10784 11040 11296 11552 11808 12064
+0000060 12320 12576 12832 13088 13344 13600 13856 14112
+0000070 14368 14624 14880 15136 15392 15648 15904 16160
+0000080 16416  16672 16928 17184 17440 17696 17952 18208
+0000090 18464 18720 18976 19232 19488 19744 20000 20256
+00000a0 20512 20768 21024 21280 21536 21792 22048 22304
+00000b0 22560 22816 23072 23328 23584 23840 24096 24352
+00000c0 24608 24864 25120 25376 25632 25888 26144 26400
+00000d0 26656 26912 27168 27424 27680 27936 28192 28448
+00000e0 28704 28960 29216 29472 29728 29984 30240 30496
+00000f0 30752 31008 31264 31520 31776 32032 32288 32544
+0000100 49792 08386 33056 49794 08386 33568 49796 08386
+0000110 34080 49798 08386 34592 49800 08386 35104 49802
+0000120 08386 35616 49804 08386 36128 49806 08386 36640
+0000130 49808 08386 37152 49810 08386 37664 49812 08386
+0000140 38176 49814 08386 38688 49816 08386 39200 49818
+0000150 08386 39712 49820 08386 40224 49822 08386 40736
+0000160 49824 08386 41248 49826 08386 41760 49828 08386
+0000170 42272 49830 08386 42784 49832 08386 43296 49834
+0000180 08386 43808 49836 08386 44320 49838 08386 44832
+0000190 49840 08386 45344 49842 08386 45856 49844 08386
+00001a0 46368 49846 08386 46880 49848 08386 47392 49850
+00001b0 08386 47904 49852 08386 48416 49854 08386 48928
+00001c0 50048 08387 33056 50050 08387 33568 50052 08387
+00001d0 34080 50054 08387 34592 50056 08387 35104 50058
+00001e0 08387 35616 50060 08387 36128 50062 08387 36640
+00001f0 50064 08387 37152 50066 08387 37664 50068 08387
+0000200 38176 50070 08387 38688 50072 08387 39200 50074
+0000210 08387 39712 50076 08387 40224 50078 08387 40736
+0000220 50080 08387 41248 50082 08387 41760 50084 08387
+0000230 42272 50086 08387 42784 50088 08387 43296 50090
+0000240 08387 43808 50092 08387 44320 50094 08387 44832
+0000250 50096 08387 45344 50098 08387 45856 50100 08387
+0000260 46368 50102 08387 46880 50104 08387 47392 50106
+0000270 08387 47904 50108 08387 48416 50110 08387 48928
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-6 b/tests/expected/hexdump/highlighting-2b_dec-6
new file mode 100644
index 0000000..a5cc10b
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-6
@@ -0,0 +1 @@
+hexdump: bad byte count for conversion character _L
diff --git a/tests/expected/hexdump/highlighting-2b_dec-7 b/tests/expected/hexdump/highlighting-2b_dec-7
new file mode 100644
index 0000000..a5cc10b
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-7
@@ -0,0 +1 @@
+hexdump: bad byte count for conversion character _L
diff --git a/tests/expected/hexdump/highlighting-2b_dec-8 b/tests/expected/hexdump/highlighting-2b_dec-8
new file mode 100644
index 0000000..c62a559
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-8
@@ -0,0 +1,41 @@
+0000000 08192 08193 08194 08195 08196 08197 08198 08199
+0000010 08200 08201 08202 08203 08204 08205 08206 08207
+0000020 08208 08209 08210 08211 08212 08213 08214 08215
+0000030 08216 08217 08218 08219 08220 08221 08222 08223
+0000040 08224 08225 08226 08227 08228 08229 08230 08231
+0000050 08232 08233 08234 08235 08236 08237 08238 08239
+0000060 08240  08241  08242  08243 08244 08245 08246 08247
+0000070 08248 08249 08250 08251 08252 08253 08254 08255
+0000080 08256 08257 08258 08259 08260 08261 08262 08263
+0000090 08264 08265 08266 08267 08268 08269 08270 08271
+00000a0 08272 08273 08274 08275 08276 08277 08278 08279
+00000b0 08280 08281 08282 08283 08284 08285 08286 08287
+00000c0 08288 08289 08290 08291 08292 08293 08294 08295
+00000d0 08296 08297 08298 08299 08300 08301 08302 08303
+00000e0 08304 08305 08306 08307 08308 08309 08310 08311
+00000f0 08312 08313 08314 08315 08316 08317 08318 08319
+0000100 32962 49696 08321 33474 49696 08323 33986 49696
+0000110 08325 34498 49696 08327 35010 49696 08329 35522
+0000120 49696 08331 36034 49696 08333 36546 49696 08335
+0000130 37058 49696 08337 37570 49696 08339 38082 49696
+0000140 08341 38594 49696 08343 39106 49696 08345 39618
+0000150 49696 08347 40130 49696 08349 40642 49696 08351
+0000160 41154 49696 08353 41666 49696 08355 42178 49696
+0000170 08357 42690 49696 08359 43202 49696 08361 43714
+0000180 49696 08363 44226 49696 08365 44738 49696 08367
+0000190 45250 49696 08369 45762 49696 08371 46274 49696
+00001a0 08373 46786 49696 08375 47298 49696 08377 47810
+00001b0 49696 08379 48322 49696 08381 48834 49696 08383
+00001c0 32963 49952 08321 33475 49952 08323 33987 49952
+00001d0 08325 34499 49952 08327 35011 49952 08329 35523
+00001e0 49952 08331 36035 49952 08333 36547 49952 08335
+00001f0 37059 49952 08337 37571 49952 08339 38083 49952
+0000200 08341 38595 49952 08343 39107 49952 08345 39619
+0000210 49952 08347 40131 49952 08349 40643 49952 08351
+0000220 41155 49952 08353 41667 49952 08355 42179 49952
+0000230 08357 42691 49952 08359 43203 49952 08361 43715
+0000240 49952 08363 44227 49952 08365 44739 49952 08367
+0000250 45251 49952 08369 45763 49952 08371 46275 49952
+0000260 08373 46787 49952 08375 47299 49952 08377 47811
+0000270 49952 08379 48323 49952 08381 48835 49952 08383
+0000280
diff --git a/tests/expected/hexdump/highlighting-2b_dec-8.BE b/tests/expected/hexdump/highlighting-2b_dec-8.BE
new file mode 100644
index 0000000..2ae1028
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-2b_dec-8.BE
@@ -0,0 +1,41 @@
+0000000 00032 00288 00544 00800 01056 01312 01568 01824
+0000010 02080 02336 02592 02848 03104 03360 03616 03872
+0000020 04128 04384 04640 04896 05152 05408 05664 05920
+0000030 06176 06432 06688 06944 07200 07456 07712 07968
+0000040 08224 08480 08736 08992 09248 09504 09760 10016
+0000050 10272 10528 10784 11040 11296 11552 11808 12064
+0000060 12320  12576  12832  13088 13344 13600 13856 14112
+0000070 14368 14624 14880 15136 15392 15648 15904 16160
+0000080 16416 16672 16928 17184 17440 17696 17952 18208
+0000090 18464 18720 18976 19232 19488 19744 20000 20256
+00000a0 20512 20768 21024 21280 21536 21792 22048 22304
+00000b0 22560 22816 23072 23328 23584 23840 24096 24352
+00000c0 24608 24864 25120 25376 25632 25888 26144 26400
+00000d0 26656 26912 27168 27424 27680 27936 28192 28448
+00000e0 28704 28960 29216 29472 29728 29984 30240 30496
+00000f0 30752 31008 31264 31520 31776 32032 32288 32544
+0000100 49792 08386 33056 49794 08386 33568 49796 08386
+0000110 34080 49798 08386 34592 49800 08386 35104 49802
+0000120 08386 35616 49804 08386 36128 49806 08386 36640
+0000130 49808 08386 37152 49810 08386 37664 49812 08386
+0000140 38176 49814 08386 38688 49816 08386 39200 49818
+0000150 08386 39712 49820 08386 40224 49822 08386 40736
+0000160 49824 08386 41248 49826 08386 41760 49828 08386
+0000170 42272 49830 08386 42784 49832 08386 43296 49834
+0000180 08386 43808 49836 08386 44320 49838 08386 44832
+0000190 49840 08386 45344 49842 08386 45856 49844 08386
+00001a0 46368 49846 08386 46880 49848 08386 47392 49850
+00001b0 08386 47904 49852 08386 48416 49854 08386 48928
+00001c0 50048 08387 33056 50050 08387 33568 50052 08387
+00001d0 34080 50054 08387 34592 50056 08387 35104 50058
+00001e0 08387 35616 50060 08387 36128 50062 08387 36640
+00001f0 50064 08387 37152 50066 08387 37664 50068 08387
+0000200 38176 50070 08387 38688 50072 08387 39200 50074
+0000210 08387 39712 50076 08387 40224 50078 08387 40736
+0000220 50080 08387 41248 50082 08387 41760 50084 08387
+0000230 42272 50086 08387 42784 50088 08387 43296 50090
+0000240 08387 43808 50092 08387 44320 50094 08387 44832
+0000250 50096 08387 45344 50098 08387 45856 50100 08387
+0000260 46368 50102 08387 46880 50104 08387 47392 50106
+0000270 08387 47904 50108 08387 48416 50110 08387 48928
+0000280
diff --git a/tests/expected/hexdump/highlighting-4b_dec-1 b/tests/expected/hexdump/highlighting-4b_dec-1
new file mode 100644
index 0000000..157a7da
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-1
@@ -0,0 +1,21 @@
+0000000 536944640 537075714 537206788 537337862 537468936 537600010 537731084 537862158
+0000020 537993232 538124306 538255380 538386454 538517528 538648602 538779676 538910750
+0000040 539041824 539172898 539303972 539435046 539566120 539697194 539828268 539959342
+0000060  540090416 540221490 540352564 540483638 540614712 540745786 540876860 541007934
+0000080 541139008 541270082 541401156 541532230 541663304 541794378 541925452 542056526
+00000a0 542187600 542318674 542449748 542580822 542711896 542842970 542974044 543105118
+00000c0 543236192 543367266 543498340 543629414 543760488 543891562 544022636 544153710
+00000e0 544284784 544415858 544546932 544678006 544809080 544940154 545071228 545202302
+0000100 3256910018 2193760385 545505824 3256911042 2260869253 545767968 3256912066 2327978121
+0000120 546030112 3256913090 2395086989 546292256 3256914114 2462195857 546554400 3256915138
+0000140 2529304725 546816544 3256916162 2596413593 547078688 3256917186 2663522461 547340832
+0000160 3256918210 2730631329 547602976 3256919234 2797740197 547865120 3256920258 2864849065
+0000180 548127264 3256921282 2931957933 548389408 3256922306 2999066801 548651552 3256923330
+00001a0 3066175669 548913696 3256924354 3133284537 549175840 3256925378 3200393405 549437984
+00001c0 3273687235 2193825921 545506080 3273688259 2260934789 545768224 3273689283 2328043657
+00001e0 546030368 3273690307 2395152525 546292512 3273691331 2462261393 546554656 3273692355
+0000200 2529370261 546816800 3273693379 2596479129 547078944 3273694403 2663587997 547341088
+0000220 3273695427 2730696865 547603232 3273696451 2797805733 547865376 3273697475 2864914601
+0000240 548127520 3273698499 2932023469 548389664 3273699523 2999132337 548651808 3273700547
+0000260 3066241205 548913952 3273701571 3133350073 549176096 3273702595 3200458941 549438240
+0000280
diff --git a/tests/expected/hexdump/highlighting-4b_dec-1.BE b/tests/expected/hexdump/highlighting-4b_dec-1.BE
new file mode 100644
index 0000000..2a9a271
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-1.BE
@@ -0,0 +1,21 @@
+0000000 2097440 35652384 69207328 102762272 136317216 169872160 203427104 236982048
+0000020 270536992 304091936 337646880 371201824 404756768 438311712 471866656 505421600
+0000040 538976544 572531488 606086432 639641376 673196320 706751264 740306208 773861152
+0000060  807416096 840971040 874525984 908080928 941635872 975190816 1008745760 1042300704
+0000080 1075855648 1109410592 1142965536 1176520480 1210075424 1243630368 1277185312 1310740256
+00000a0 1344295200 1377850144 1411405088 1444960032 1478514976 1512069920 1545624864 1579179808
+00000c0 1612734752 1646289696 1679844640 1713399584 1746954528 1780509472 1814064416 1847619360
+00000e0 1881174304 1914729248 1948284192 1981839136 2015394080 2048949024 2082503968 2116058912
+0000100 3263176898 2166407810 549618464 3263439042 2233516678 549619488 3263701186 2300625546
+0000120 549620512 3263963330 2367734414 549621536 3264225474 2434843282 549622560 3264487618
+0000140 2501952150 549623584 3264749762 2569061018 549624608 3265011906 2636169886 549625632
+0000160 3265274050 2703278754 549626656 3265536194 2770387622 549627680 3265798338 2837496490
+0000180 549628704 3266060482 2904605358 549629728 3266322626 2971714226 549630752 3266584770
+00001a0 3038823094 549631776 3266846914 3105931962 549632800 3267109058 3173040830 549633824
+00001c0 3279954115 2166408066 549684000 3280216259 2233516934 549685024 3280478403 2300625802
+00001e0 549686048 3280740547 2367734670 549687072 3281002691 2434843538 549688096 3281264835
+0000200 2501952406 549689120 3281526979 2569061274 549690144 3281789123 2636170142 549691168
+0000220 3282051267 2703279010 549692192 3282313411 2770387878 549693216 3282575555 2837496746
+0000240 549694240 3282837699 2904605614 549695264 3283099843 2971714482 549696288 3283361987
+0000260 3038823350 549697312 3283624131 3105932218 549698336 3283886275 3173041086 549699360
+0000280
diff --git a/tests/expected/hexdump/highlighting-4b_dec-2 b/tests/expected/hexdump/highlighting-4b_dec-2
new file mode 100644
index 0000000..157a7da
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-2
@@ -0,0 +1,21 @@
+0000000 536944640 537075714 537206788 537337862 537468936 537600010 537731084 537862158
+0000020 537993232 538124306 538255380 538386454 538517528 538648602 538779676 538910750
+0000040 539041824 539172898 539303972 539435046 539566120 539697194 539828268 539959342
+0000060  540090416 540221490 540352564 540483638 540614712 540745786 540876860 541007934
+0000080 541139008 541270082 541401156 541532230 541663304 541794378 541925452 542056526
+00000a0 542187600 542318674 542449748 542580822 542711896 542842970 542974044 543105118
+00000c0 543236192 543367266 543498340 543629414 543760488 543891562 544022636 544153710
+00000e0 544284784 544415858 544546932 544678006 544809080 544940154 545071228 545202302
+0000100 3256910018 2193760385 545505824 3256911042 2260869253 545767968 3256912066 2327978121
+0000120 546030112 3256913090 2395086989 546292256 3256914114 2462195857 546554400 3256915138
+0000140 2529304725 546816544 3256916162 2596413593 547078688 3256917186 2663522461 547340832
+0000160 3256918210 2730631329 547602976 3256919234 2797740197 547865120 3256920258 2864849065
+0000180 548127264 3256921282 2931957933 548389408 3256922306 2999066801 548651552 3256923330
+00001a0 3066175669 548913696 3256924354 3133284537 549175840 3256925378 3200393405 549437984
+00001c0 3273687235 2193825921 545506080 3273688259 2260934789 545768224 3273689283 2328043657
+00001e0 546030368 3273690307 2395152525 546292512 3273691331 2462261393 546554656 3273692355
+0000200 2529370261 546816800 3273693379 2596479129 547078944 3273694403 2663587997 547341088
+0000220 3273695427 2730696865 547603232 3273696451 2797805733 547865376 3273697475 2864914601
+0000240 548127520 3273698499 2932023469 548389664 3273699523 2999132337 548651808 3273700547
+0000260 3066241205 548913952 3273701571 3133350073 549176096 3273702595 3200458941 549438240
+0000280
diff --git a/tests/expected/hexdump/highlighting-4b_dec-2.BE b/tests/expected/hexdump/highlighting-4b_dec-2.BE
new file mode 100644
index 0000000..2a9a271
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-2.BE
@@ -0,0 +1,21 @@
+0000000 2097440 35652384 69207328 102762272 136317216 169872160 203427104 236982048
+0000020 270536992 304091936 337646880 371201824 404756768 438311712 471866656 505421600
+0000040 538976544 572531488 606086432 639641376 673196320 706751264 740306208 773861152
+0000060  807416096 840971040 874525984 908080928 941635872 975190816 1008745760 1042300704
+0000080 1075855648 1109410592 1142965536 1176520480 1210075424 1243630368 1277185312 1310740256
+00000a0 1344295200 1377850144 1411405088 1444960032 1478514976 1512069920 1545624864 1579179808
+00000c0 1612734752 1646289696 1679844640 1713399584 1746954528 1780509472 1814064416 1847619360
+00000e0 1881174304 1914729248 1948284192 1981839136 2015394080 2048949024 2082503968 2116058912
+0000100 3263176898 2166407810 549618464 3263439042 2233516678 549619488 3263701186 2300625546
+0000120 549620512 3263963330 2367734414 549621536 3264225474 2434843282 549622560 3264487618
+0000140 2501952150 549623584 3264749762 2569061018 549624608 3265011906 2636169886 549625632
+0000160 3265274050 2703278754 549626656 3265536194 2770387622 549627680 3265798338 2837496490
+0000180 549628704 3266060482 2904605358 549629728 3266322626 2971714226 549630752 3266584770
+00001a0 3038823094 549631776 3266846914 3105931962 549632800 3267109058 3173040830 549633824
+00001c0 3279954115 2166408066 549684000 3280216259 2233516934 549685024 3280478403 2300625802
+00001e0 549686048 3280740547 2367734670 549687072 3281002691 2434843538 549688096 3281264835
+0000200 2501952406 549689120 3281526979 2569061274 549690144 3281789123 2636170142 549691168
+0000220 3282051267 2703279010 549692192 3282313411 2770387878 549693216 3282575555 2837496746
+0000240 549694240 3282837699 2904605614 549695264 3283099843 2971714482 549696288 3283361987
+0000260 3038823350 549697312 3283624131 3105932218 549698336 3283886275 3173041086 549699360
+0000280
diff --git a/tests/expected/hexdump/highlighting-4b_dec-3 b/tests/expected/hexdump/highlighting-4b_dec-3
new file mode 100644
index 0000000..8d18fc8
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-3
@@ -0,0 +1,2 @@
+0000000  1077952576 00010
+0000005
diff --git a/tests/expected/hexdump/highlighting-4b_dec-3.BE b/tests/expected/hexdump/highlighting-4b_dec-3.BE
new file mode 100644
index 0000000..d9407ca
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-3.BE
@@ -0,0 +1,2 @@
+0000000  1077952576 167772160
+0000005
diff --git a/tests/expected/hexdump/highlighting-4b_dec-4 b/tests/expected/hexdump/highlighting-4b_dec-4
new file mode 100644
index 0000000..8d18fc8
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-4
@@ -0,0 +1,2 @@
+0000000  1077952576 00010
+0000005
diff --git a/tests/expected/hexdump/highlighting-4b_dec-4.BE b/tests/expected/hexdump/highlighting-4b_dec-4.BE
new file mode 100644
index 0000000..d9407ca
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-4.BE
@@ -0,0 +1,2 @@
+0000000  1077952576 167772160
+0000005
diff --git a/tests/expected/hexdump/highlighting-4b_dec-5 b/tests/expected/hexdump/highlighting-4b_dec-5
new file mode 100644
index 0000000..a5cc10b
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-5
@@ -0,0 +1 @@
+hexdump: bad byte count for conversion character _L
diff --git a/tests/expected/hexdump/highlighting-4b_dec-6 b/tests/expected/hexdump/highlighting-4b_dec-6
new file mode 100644
index 0000000..8d18fc8
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-6
@@ -0,0 +1,2 @@
+0000000  1077952576 00010
+0000005
diff --git a/tests/expected/hexdump/highlighting-4b_dec-6.BE b/tests/expected/hexdump/highlighting-4b_dec-6.BE
new file mode 100644
index 0000000..d9407ca
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-6.BE
@@ -0,0 +1,2 @@
+0000000  1077952576 167772160
+0000005
diff --git a/tests/expected/hexdump/highlighting-4b_dec-7 b/tests/expected/hexdump/highlighting-4b_dec-7
new file mode 100644
index 0000000..e0e4389
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-7
@@ -0,0 +1,2 @@
+0000000 1077952576 00010
+0000005
diff --git a/tests/expected/hexdump/highlighting-4b_dec-7.BE b/tests/expected/hexdump/highlighting-4b_dec-7.BE
new file mode 100644
index 0000000..8b87811
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-4b_dec-7.BE
@@ -0,0 +1,2 @@
+0000000 1077952576 167772160
+0000005
diff --git a/tests/expected/hexdump/highlighting-canon-1 b/tests/expected/hexdump/highlighting-canon-1
new file mode 100644
index 0000000..9ecc353
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-canon-1
@@ -0,0 +1,41 @@
+00000000 00 20 01 20 02 20 03 20 04 20 05 20 06 20 07 20 |. . . . . . . . |
+00000010 08 20 09 20 0a 20 0b 20 0c 20 0d 20 0e 20 0f 20 |. . . . . . . . |
+00000020 10 20 11 20 12 20 13 20 14 20 15 20 16 20 17 20 |. . . . . . . . |
+00000030 18 20 19 20 1a 20 1b 20 1c 20 1d 20 1e 20 1f 20 |. . . . . . . . |
+00000040 20 20 21 20 22 20 23 20 24 20 25 20 26 20 27 20 |  ! " # $ % & ' |
+00000050 28 20 29 20 2a 20 2b 20 2c 20 2d 20 2e 20 2f 20 |( ) * + , - . / |
+00000060 30 20 31 20 32 20 33 20 34 20 35 20 36 20 37 20 |0 1 2 3 4 5 6 7 |
+00000070 38 20 39 20 3a 20 3b 20 3c 20 3d 20 3e 20 3f 20 |8 9 : ; < = > ? |
+00000080 40 20 41 20 42 20 43 20 44 20 45 20 46 20 47 20 |@ A B C D E F G |
+00000090 48 20 49 20 4a 20 4b 20 4c 20 4d 20 4e 20 4f 20 |H I J K L M N O |
+000000a0 50 20 51 20 52 20 53 20 54 20 55 20 56 20 57 20 |P Q R S T U V W |
+000000b0 58 20 59 20 5a 20 5b 20 5c 20 5d 20 5e 20 5f 20 |X Y Z [ \ ] ^ _ |
+000000c0 60 20 61 20 62 20 63 20 64 20 65 20 66 20 67 20 |` a b c d e f g |
+000000d0 68 20 69 20 6a 20 6b 20 6c 20 6d 20 6e 20 6f 20 |h i j k l m n o |
+000000e0 70 20 71 20 72 20 73 20 74 20 75 20 76 20 77 20 |p q r s t u v w |
+000000f0 78 20 79 20 7a 20 7b 20 7c 20 7d 20 7e 20 7f 20 |x y z { | } ~ . |
+00000100 c2 80 20 c2 81 20 c2 82 20 c2 83 20 c2 84 20 c2 |.. .. .. .. .. .|
+00000110 85 20 c2 86 20 c2 87 20 c2 88 20 c2 89 20 c2 8a |. .. .. .. .. ..|
+00000120 20 c2 8b 20 c2 8c 20 c2 8d 20 c2 8e 20 c2 8f 20 | .. .. .. .. .. |
+00000130 c2 90 20 c2 91 20 c2 92 20 c2 93 20 c2 94 20 c2 |.. .. .. .. .. .|
+00000140 95 20 c2 96 20 c2 97 20 c2 98 20 c2 99 20 c2 9a |. .. .. .. .. ..|
+00000150 20 c2 9b 20 c2 9c 20 c2 9d 20 c2 9e 20 c2 9f 20 | .. .. .. .. .. |
+00000160 c2 a0 20 c2 a1 20 c2 a2 20 c2 a3 20 c2 a4 20 c2 |.. .. .. .. .. .|
+00000170 a5 20 c2 a6 20 c2 a7 20 c2 a8 20 c2 a9 20 c2 aa |. .. .. .. .. ..|
+00000180 20 c2 ab 20 c2 ac 20 c2 ad 20 c2 ae 20 c2 af 20 | .. .. .. .. .. |
+00000190 c2 b0 20 c2 b1 20 c2 b2 20 c2 b3 20 c2 b4 20 c2 |.. .. .. .. .. .|
+000001a0 b5 20 c2 b6 20 c2 b7 20 c2 b8 20 c2 b9 20 c2 ba |. .. .. .. .. ..|
+000001b0 20 c2 bb 20 c2 bc 20 c2 bd 20 c2 be 20 c2 bf 20 | .. .. .. .. .. |
+000001c0 c3 80 20 c3 81 20 c3 82 20 c3 83 20 c3 84 20 c3 |.. .. .. .. .. .|
+000001d0 85 20 c3 86 20 c3 87 20 c3 88 20 c3 89 20 c3 8a |. .. .. .. .. ..|
+000001e0 20 c3 8b 20 c3 8c 20 c3 8d 20 c3 8e 20 c3 8f 20 | .. .. .. .. .. |
+000001f0 c3 90 20 c3 91 20 c3 92 20 c3 93 20 c3 94 20 c3 |.. .. .. .. .. .|
+00000200 95 20 c3 96 20 c3 97 20 c3 98 20 c3 99 20 c3 9a |. .. .. .. .. ..|
+00000210 20 c3 9b 20 c3 9c 20 c3 9d 20 c3 9e 20 c3 9f 20 | .. .. .. .. .. |
+00000220 c3 a0 20 c3 a1 20 c3 a2 20 c3 a3 20 c3 a4 20 c3 |.. .. .. .. .. .|
+00000230 a5 20 c3 a6 20 c3 a7 20 c3 a8 20 c3 a9 20 c3 aa |. .. .. .. .. ..|
+00000240 20 c3 ab 20 c3 ac 20 c3 ad 20 c3 ae 20 c3 af 20 | .. .. .. .. .. |
+00000250 c3 b0 20 c3 b1 20 c3 b2 20 c3 b3 20 c3 b4 20 c3 |.. .. .. .. .. .|
+00000260 b5 20 c3 b6 20 c3 b7 20 c3 b8 20 c3 b9 20 c3 ba |. .. .. .. .. ..|
+00000270 20 c3 bb 20 c3 bc 20 c3 bd 20 c3 be 20 c3 bf 20 | .. .. .. .. .. |
+00000280
diff --git a/tests/expected/hexdump/highlighting-canon-1.BE b/tests/expected/hexdump/highlighting-canon-1.BE
new file mode 100644
index 0000000..6c49f65
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-canon-1.BE
@@ -0,0 +1,41 @@
+00000000 00 20 01 20 02 20 03 20 04 20 05 20 06 20 07 20 |. . . . . . . . |
+00000010 08 20 09 20 0a 20 0b 20 0c 20 0d 20 0e 20 0f 20 |. . . . . . . . |
+00000020 10 20 11 20 12 20 13 20 14 20 15 20 16 20 17 20 |. . . . . . . . |
+00000030 18 20 19 20 1a 20 1b 20 1c 20 1d 20 1e 20 1f 20 |. . . . . . . . |
+00000040 20 20 21 20 22 20 23 20 24 20 25 20 26 20 27 20 |  ! " # $ % & ' |
+00000050 28 20 29 20 2a 20 2b 20 2c 20 2d 20 2e 20 2f 20 |( ) * + , - . / |
+00000060 30 20 31 20 32 20 33 20 34 20 35 20 36 20 37 20 |0 1 2 3 4 5 6 7 |
+00000070 38 20 39 20 3a 20 3b 20 3c 20 3d 20 3e 20 3f 20 |8 9 : ; < = > ? |
+00000080 40 20 41 20 42 20 43 20 44 20 45 20 46 20 47 20 |@ A B C D E F G |
+00000090 48 20 49 20 4a 20 4b 20 4c 20 4d 20 4e 20 4f 20 |H I J K L M N O |
+000000a0 50 20 51 20 52 20 53 20 54 20 55 20 56 20 57 20 |P Q R S T U V W |
+000000b0 58 20 59 20 5a 20 5b 20 5c 20 5d 20 5e 20 5f 20 |X Y Z [ \ ] ^ _ |
+000000c0 60 20 61 20 62 20 63 20 64 20 65 20 66 20 67 20 |` a b c d e f g |
+000000d0 68 20 69 20 6a 20 6b 20 6c 20 6d 20 6e 20 6f 20 |h i j k l m n o |
+000000e0 70 20 71 20 72 20 73 20 74 20 75 20 76 20 77 20 |p q r s t u v w |
+000000f0 78 20 79 20 7a 20 7b 20 7c 20 7d 20 7e 20 7f 20 |x y z { | } ~ . |
+00000100 c2 80 20 c2 81 20 c2 82 20 c2 83 20 c2 84 20 c2 |.. .. .. .. .. .|
+00000110 85 20 c2 86 20 c2 87 20 c2 88 20 c2 89 20 c2 8a |. .. .. .. .. ..|
+00000120 20 c2 8b 20 c2 8c 20 c2 8d 20 c2 8e 20 c2 8f 20 | .. .. .. .. .. |
+00000130 c2 90 20 c2 91 20 c2 92 20 c2 93 20 c2 94 20 c2 |.. .. .. .. .. .|
+00000140 95 20 c2 96 20 c2 97 20 c2 98 20 c2 99 20 c2 9a |. .. .. .. .. ..|
+00000150 20 c2 9b 20 c2 9c 20 c2 9d 20 c2 9e 20 c2 9f 20 | .. .. .. .. .. |
+00000160 c2 a0 20 c2 a1 20 c2 a2 20 c2 a3 20 c2 a4 20 c2 |.. .. .. .. .. .|
+00000170 a5 20 c2 a6 20 c2 a7 20 c2 a8 20 c2 a9 20 c2 aa |. .. .. .. .. ..|
+00000180 20 c2 ab 20 c2 ac 20 c2 ad 20 c2 ae 20 c2 af 20 | .. .. .. .. .. |
+00000190 c2 b0 20 c2 b1 20 c2 b2 20 c2 b3 20 c2 b4 20 c2 |.. .. .. .. .. .|
+000001a0 b5 20 c2 b6 20 c2 b7 20 c2 b8 20 c2 b9 20 c2 ba |. .. .. .. .. ..|
+000001b0 20 c2 bb 20 c2 bc 20 c2 bd 20 c2 be 20 c2 bf 20 | .. .. .. .. .. |
+000001c0 c3 80 20 c3 81 20 c3 82 20 c3 83 20 c3 84 20 c3 |.. .. .. .. .. .|
+000001d0 85 20 c3 86 20 c3 87 20 c3 88 20 c3 89 20 c3 8a |. .. .. .. .. ..|
+000001e0 20 c3 8b 20 c3 8c 20 c3 8d 20 c3 8e 20 c3 8f 20 | .. .. .. .. .. |
+000001f0 c3 90 20 c3 91 20 c3 92 20 c3 93 20 c3 94 20 c3 |.. .. .. .. .. .|
+00000200 95 20 c3 96 20 c3 97 20 c3 98 20 c3 99 20 c3 9a |. .. .. .. .. ..|
+00000210 20 c3 9b 20 c3 9c 20 c3 9d 20 c3 9e 20 c3 9f 20 | .. .. .. .. .. |
+00000220 c3 a0 20 c3 a1 20 c3 a2 20 c3 a3 20 c3 a4 20 c3 |.. .. .. .. .. .|
+00000230 a5 20 c3 a6 20 c3 a7 20 c3 a8 20 c3 a9 20 c3 aa |. .. .. .. .. ..|
+00000240 20 c3 ab 20 c3 ac 20 c3 ad 20 c3 ae 20 c3 af 20 | .. .. .. .. .. |
+00000250 c3 b0 20 c3 b1 20 c3 b2 20 c3 b3 20 c3 b4 20 c3 |.. .. .. .. .. .|
+00000260 b5 20 c3 b6 20 c3 b7 20 c3 b8 20 c3 b9 20 c3 ba |. .. .. .. .. ..|
+00000270 20 c3 bb 20 c3 bc 20 c3 bd 20 c3 be 20 c3 bf 20 | .. .. .. .. .. |
+00000280
diff --git a/tests/expected/hexdump/highlighting-canon-2 b/tests/expected/hexdump/highlighting-canon-2
new file mode 100644
index 0000000..2436706
--- /dev/null
+++ b/tests/expected/hexdump/highlighting-canon-2
@@ -0,0 +1,41 @@
+00000000 00 20 01 20 02 20 03 20 04 20 05 20 06 20 07 20 |. . . . . . . . |
+00000010 08 20 09 20 0a 20 0b 20 0c 20 0d 20 0e 20 0f 20 |. . . . . . . . |
+00000020 10 20 11 20 12 20 13 20 14 20 15 20 16 20 17 20 |. . . . . . . . |
+00000030 18 20 19 20 1a 20 1b 20 1c 20 1d 20 1e 20 1f 20 |. . . . . . . . |
+00000040 20 20 21 20 22 20 23 20 24 20 25 20 26 20 27 20 | ! " # $ % & ' |
+00000050 28 20 29 20 2a 20 2b 20 2c 20 2d 20 2e 20 2f 20 |( ) * + , - . / |
+00000060 30 20 31 20 32 20 33 20 34 20 35 20 36 20 37 20 |0 1 2 3 4 5 6 7 |
+00000070 38 20 39 20 3a 20 3b 20 3c 20 3d 20 3e 20 3f 20 |8 9 : ; < = > ? |
+00000080 40 20 41 20 42 20 43 20 44 20 45 20 46 20 47 20 |@ A B C D E F G |
+00000090 48 20 49 20 4a 20 4b 20 4c 20 4d 20 4e 20 4f 20 |H I J K L M N O |
+000000a0 50 20 51 20 52 20 53 20 54 20 55 20 56 20 57 20 |P Q R S T U V W |
+000000b0 58 20 59 20 5a 20 5b 20 5c 20 5d 20 5e 20 5f 20 |X Y Z [ \ ] ^ _ |
+000000c0 60 20 61 20 62 20 63 20 64 20 65 20 66 20 67 20 |` a b c d e f g |
+000000d0 68 20 69 20 6a 20 6b 20 6c 20 6d 20 6e 20 6f 20 |h i j k l m n o |
+000000e0 70 20 71 20 72 20 73 20 74 20 75 20 76 20 77 20 |p q r s t u v w |
+000000f0 78 20 79 20 7a 20 7b 20 7c 20 7d 20 7e 20 7f 20 |x y z { | } ~ . |
+00000100 c2 80 20 c2 81 20 c2 82 20 c2 83 20 c2 84 20 c2 |.. .. .. .. .. .|
+00000110 85 20 c2 86 20 c2 87 20 c2 88 20 c2 89 20 c2 8a |. .. .. .. .. ..|
+00000120 20 c2 8b 20 c2 8c 20 c2 8d 20 c2 8e 20 c2 8f 20 | .. .. .. .. .. |
+00000130 c2 90 20 c2 91 20 c2 92 20 c2 93 20 c2 94 20 c2 |.. .. .. .. .. .|
+00000140 95 20 c2 96 20 c2 97 20 c2 98 20 c2 99 20 c2 9a |. .. .. .. .. ..|
+00000150 20 c2 9b 20 c2 9c 20 c2 9d 20 c2 9e 20 c2 9f 20 | .. .. .. .. .. |
+00000160 c2 a0 20 c2 a1 20 c2 a2 20 c2 a3 20 c2 a4 20 c2 |.. .. .. .. .. .|
+00000170 a5 20 c2 a6 20 c2 a7 20 c2 a8 20 c2 a9 20 c2 aa |. .. .. .. .. ..|
+00000180 20 c2 ab 20 c2 ac 20 c2 ad 20 c2 ae 20 c2 af 20 | .. .. .. .. .. |
+00000190 c2 b0 20 c2 b1 20 c2 b2 20 c2 b3 20 c2 b4 20 c2 |.. .. .. .. .. .|
+000001a0 b5 20 c2 b6 20 c2 b7 20 c2 b8 20 c2 b9 20 c2 ba |. .. .. .. .. ..|
+000001b0 20 c2 bb 20 c2 bc 20 c2 bd 20 c2 be 20 c2 bf 20 | .. .. .. .. .. |
+000001c0 c3 80 20 c3 81 20 c3 82 20 c3 83 20 c3 84 20 c3 |.. .. .. .. .. .|
+000001d0 85 20 c3 86 20 c3 87 20 c3 88 20 c3 89 20 c3 8a |. .. .. .. .. ..|
+000001e0 20 c3 8b 20 c3 8c 20 c3 8d 20 c3 8e 20 c3 8f 20 | .. .. .. .. .. |
+000001f0 c3 90 20 c3 91 20 c3 92 20 c3 93 20 c3 94 20 c3 |.. .. .. .. .. .|
+00000200 95 20 c3 96 20 c3 97 20 c3 98 20 c3 99 20 c3 9a |. .. .. .. .. ..|
+00000210 20 c3 9b 20 c3 9c 20 c3 9d 20 c3 9e 20 c3 9f 20 | .. .. .. .. .. |
+00000220 c3 a0 20 c3 a1 20 c3 a2 20 c3 a3 20 c3 a4 20 c3 |.. .. .. .. .. .|
+00000230 a5 20 c3 a6 20 c3 a7 20 c3 a8 20 c3 a9 20 c3 aa |. .. .. .. .. ..|
+00000240 20 c3 ab 20 c3 ac 20 c3 ad 20 c3 ae 20 c3 af 20 | .. .. .. .. .. |
+00000250 c3 b0 20 c3 b1 20 c3 b2 20 c3 b3 20 c3 b4 20 c3 |.. .. .. .. .. .|
+00000260 b5 20 c3 b6 20 c3 b7 20 c3 b8 20 c3 b9 20 c3 ba |. .. .. .. .. ..|
+00000270 20 c3 bb 20 c3 bc 20 c3 bd 20 c3 be 20 c3 bf 20 | .. .. .. .. .. |
+00000280
diff --git a/tests/expected/ipcs/headers b/tests/expected/ipcs/headers
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/ipcs/headers
diff --git a/tests/expected/ipcs/headers-all-headers b/tests/expected/ipcs/headers-all-headers
new file mode 100644
index 0000000..328a5e7
--- /dev/null
+++ b/tests/expected/ipcs/headers-all-headers
@@ -0,0 +1,35 @@
+------ Message Queues --------
+key msqid owner perms used-bytes messages
+--
+------ Shared Memory Segments --------
+key shmid owner perms bytes nattch status
+--
+------ Semaphore Arrays --------
+key semid owner perms nsems
+------ Message Queues Send/Recv/Change Times --------
+msqid owner send recv change
+--
+------ Shared Memory Attach/Detach/Change Times --------
+shmid owner attached detached changed
+--
+------ Semaphore Operation/Change Times --------
+semid owner last-op last-changed
+------ Message Queues PIDs --------
+msqid owner lspid lrpid
+--
+------ Shared Memory Creator/Last-op PIDs --------
+shmid owner cpid lpid
+------ Message Queues Creators/Owners --------
+msqid perms cuid cgid uid gid
+--
+------ Shared Memory Segment Creators/Owners --------
+shmid perms cuid cgid uid gid
+--
+------ Semaphore Arrays Creators/Owners --------
+semid perms cuid cgid uid gid
+------ Messages Limits --------
+------ Shared Memory Limits --------
+------ Semaphore Limits --------
+------ Messages Status --------
+------ Shared Memory Status --------
+------ Semaphore Status --------
diff --git a/tests/expected/ipcs/headers-mesg-headers b/tests/expected/ipcs/headers-mesg-headers
new file mode 100644
index 0000000..613c40a
--- /dev/null
+++ b/tests/expected/ipcs/headers-mesg-headers
@@ -0,0 +1,8 @@
+------ Message Queues Send/Recv/Change Times --------
+msqid owner send recv change
+------ Message Queues PIDs --------
+msqid owner lspid lrpid
+------ Message Queues Creators/Owners --------
+msqid perms cuid cgid uid gid
+------ Messages Limits --------
+------ Messages Status --------
diff --git a/tests/expected/ipcs/headers-sem-headers b/tests/expected/ipcs/headers-sem-headers
new file mode 100644
index 0000000..460586b
--- /dev/null
+++ b/tests/expected/ipcs/headers-sem-headers
@@ -0,0 +1,6 @@
+------ Semaphore Operation/Change Times --------
+semid owner last-op last-changed
+------ Semaphore Arrays Creators/Owners --------
+semid perms cuid cgid uid gid
+------ Semaphore Limits --------
+------ Semaphore Status --------
diff --git a/tests/expected/ipcs/headers-shm-headers b/tests/expected/ipcs/headers-shm-headers
new file mode 100644
index 0000000..84aeff6
--- /dev/null
+++ b/tests/expected/ipcs/headers-shm-headers
@@ -0,0 +1,8 @@
+------ Shared Memory Attach/Detach/Change Times --------
+shmid owner attached detached changed
+------ Shared Memory Creator/Last-op PIDs --------
+shmid owner cpid lpid
+------ Shared Memory Segment Creators/Owners --------
+shmid perms cuid cgid uid gid
+------ Shared Memory Limits --------
+------ Shared Memory Status --------
diff --git a/tests/expected/ipcs/limits b/tests/expected/ipcs/limits
new file mode 100644
index 0000000..a0ff457
--- /dev/null
+++ b/tests/expected/ipcs/limits
@@ -0,0 +1,7 @@
+load original values
+maximize kernel setting
+check for difference between kernel and IPC
+/proc/sys/kernel/shmmni OK
+/proc/sys/kernel/shmall OK
+/proc/sys/kernel/shmmax OK
+write original values to kernel
diff --git a/tests/expected/ipcs/limits2 b/tests/expected/ipcs/limits2
new file mode 100644
index 0000000..28454e3
--- /dev/null
+++ b/tests/expected/ipcs/limits2
@@ -0,0 +1,4 @@
+check for difference between kernel and IPC
+/proc/sys/kernel/shmmni OK
+/proc/sys/kernel/shmall OK
+/proc/sys/kernel/shmmax OK
diff --git a/tests/expected/ipcs/mk-rm-msg b/tests/expected/ipcs/mk-rm-msg
new file mode 100644
index 0000000..a913bc3
--- /dev/null
+++ b/tests/expected/ipcs/mk-rm-msg
@@ -0,0 +1,3 @@
+Message queue id: <was_number>
+1
+Message queue id: <was_number>
diff --git a/tests/expected/ipcs/mk-rm-sem b/tests/expected/ipcs/mk-rm-sem
new file mode 100644
index 0000000..da2c7cd
--- /dev/null
+++ b/tests/expected/ipcs/mk-rm-sem
@@ -0,0 +1,4 @@
+Semaphore id: <was_number>
+nsems = 1
+Semaphore id: <was_number>
+nsems = 2
diff --git a/tests/expected/ipcs/mk-rm-shm b/tests/expected/ipcs/mk-rm-shm
new file mode 100644
index 0000000..c63ab46
--- /dev/null
+++ b/tests/expected/ipcs/mk-rm-shm
@@ -0,0 +1,4 @@
+Shared memory id: <was_number>
+bytes=1
+Shared memory id: <was_number>
+bytes=12
diff --git a/tests/expected/isosize/print-size-default_output b/tests/expected/isosize/print-size-default_output
new file mode 100644
index 0000000..3def437
--- /dev/null
+++ b/tests/expected/isosize/print-size-default_output
@@ -0,0 +1 @@
+515899392
diff --git a/tests/expected/isosize/print-size-divisor_output b/tests/expected/isosize/print-size-divisor_output
new file mode 100644
index 0000000..ee214a6
--- /dev/null
+++ b/tests/expected/isosize/print-size-divisor_output
@@ -0,0 +1 @@
+57322154
diff --git a/tests/expected/isosize/print-size-sector_output b/tests/expected/isosize/print-size-sector_output
new file mode 100644
index 0000000..dff3634
--- /dev/null
+++ b/tests/expected/isosize/print-size-sector_output
@@ -0,0 +1 @@
+sector count: 251904, sector size: 2048
diff --git a/tests/expected/kill/all_processes b/tests/expected/kill/all_processes
new file mode 100644
index 0000000..241483b
--- /dev/null
+++ b/tests/expected/kill/all_processes
@@ -0,0 +1,3 @@
+test 1
+test 2
+test 3
diff --git a/tests/expected/kill/all_processes.err b/tests/expected/kill/all_processes.err
new file mode 100644
index 0000000..f14549f
--- /dev/null
+++ b/tests/expected/kill/all_processes.err
@@ -0,0 +1,5 @@
+test 1
+kill: cannot find process "test_sigreceive"
+test 2
+test 3
+kill: cannot find process "test_sigreceive"
diff --git a/tests/expected/kill/name_to_number b/tests/expected/kill/name_to_number
new file mode 100644
index 0000000..d48ce72
--- /dev/null
+++ b/tests/expected/kill/name_to_number
@@ -0,0 +1 @@
+all ok
diff --git a/tests/expected/kill/options b/tests/expected/kill/options
new file mode 100644
index 0000000..d48ce72
--- /dev/null
+++ b/tests/expected/kill/options
@@ -0,0 +1 @@
+all ok
diff --git a/tests/expected/kill/print_pid b/tests/expected/kill/print_pid
new file mode 100644
index 0000000..d48ce72
--- /dev/null
+++ b/tests/expected/kill/print_pid
@@ -0,0 +1 @@
+all ok
diff --git a/tests/expected/kill/queue b/tests/expected/kill/queue
new file mode 100644
index 0000000..d48ce72
--- /dev/null
+++ b/tests/expected/kill/queue
@@ -0,0 +1 @@
+all ok
diff --git a/tests/expected/lib/procfs-one-process b/tests/expected/lib/procfs-one-process
new file mode 100644
index 0000000..db953c0
--- /dev/null
+++ b/tests/expected/lib/procfs-one-process
@@ -0,0 +1,14 @@
+1
+ UID: [redacted]
+ CMDLINE: './test'
+ COMM: 'test'
+2
+ UID: [redacted]
+ CMDLINE: './foo
+bar'
+ COMM: 'foo
+bar'
+3
+ UID: [redacted]
+ CMDLINE: './foo )bar'
+ COMM: 'foo )bar'
diff --git a/tests/expected/lib/procfs-stat-nth b/tests/expected/lib/procfs-stat-nth
new file mode 100644
index 0000000..7ed534a
--- /dev/null
+++ b/tests/expected/lib/procfs-stat-nth
@@ -0,0 +1,6 @@
+1: 1th 373850
+1: 4th 373752
+2: 1th 1583
+2: 4th 1165
+3: 1th 4102
+3: 4th 1165
diff --git a/tests/expected/lib/procfs-stat-nth.err b/tests/expected/lib/procfs-stat-nth.err
new file mode 100644
index 0000000..aff7b24
--- /dev/null
+++ b/tests/expected/lib/procfs-stat-nth.err
@@ -0,0 +1,2 @@
+test_procfs: read 2th number failed: Invalid argument
+test_procfs: read 3th number failed: Invalid argument
diff --git a/tests/expected/libfdisk/gpt-all-defaults b/tests/expected/libfdisk/gpt-all-defaults
new file mode 100644
index 0000000..218338a
--- /dev/null
+++ b/tests/expected/libfdisk/gpt-all-defaults
@@ -0,0 +1,24 @@
+Checking that no-one is using this disk right now ... OK
+
+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 / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 12287 10240 5M Linux filesystem
+<removed>2 12288 18431 6144 3M Linux filesystem
+
+The partition table has been altered.
+Syncing disks.
diff --git a/tests/expected/libfdisk/gpt-all-defaults-with-typo b/tests/expected/libfdisk/gpt-all-defaults-with-typo
new file mode 100644
index 0000000..218338a
--- /dev/null
+++ b/tests/expected/libfdisk/gpt-all-defaults-with-typo
@@ -0,0 +1,24 @@
+Checking that no-one is using this disk right now ... OK
+
+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 / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 12287 10240 5M Linux filesystem
+<removed>2 12288 18431 6144 3M Linux filesystem
+
+The partition table has been altered.
+Syncing disks.
diff --git a/tests/expected/libfdisk/gpt-getattr b/tests/expected/libfdisk/gpt-getattr
new file mode 100644
index 0000000..559a9ae
--- /dev/null
+++ b/tests/expected/libfdisk/gpt-getattr
@@ -0,0 +1,2 @@
+1: 0x0001000000000001
+2: 0x4030000000000000
diff --git a/tests/expected/libfdisk/gpt-setattr b/tests/expected/libfdisk/gpt-setattr
new file mode 100644
index 0000000..41af260
--- /dev/null
+++ b/tests/expected/libfdisk/gpt-setattr
@@ -0,0 +1,2 @@
+GUID:56,57,58,59,60,61,62,63
+LegacyBIOSBootable
diff --git a/tests/expected/libfdisk/mkpart b/tests/expected/libfdisk/mkpart
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart
diff --git a/tests/expected/libfdisk/mkpart-full b/tests/expected/libfdisk/mkpart-full
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full
diff --git a/tests/expected/libfdisk/mkpart-full-gpt b/tests/expected/libfdisk/mkpart-full-gpt
new file mode 100644
index 0000000..8e78a27
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-gpt
@@ -0,0 +1,30 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=2,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=3,start=8192,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=4,start=10240,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=5,start=12288,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=6,start=14336,size=2048>
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M Linux filesystem
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux filesystem
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
diff --git a/tests/expected/libfdisk/mkpart-full-gpt-err-overlap b/tests/expected/libfdisk/mkpart-full-gpt-err-overlap
new file mode 100644
index 0000000..531606e
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-gpt-err-overlap
@@ -0,0 +1,12 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=2,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=3,start=5000,size=2048>
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
diff --git a/tests/expected/libfdisk/mkpart-full-gpt-err-overlap.err b/tests/expected/libfdisk/mkpart-full-gpt-err-overlap.err
new file mode 100644
index 0000000..bd62a9b
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-gpt-err-overlap.err
@@ -0,0 +1,2 @@
+Sector 5000 already used.
+sample-fdisk-mkpart-fullspec: failed to add #4 partition
diff --git a/tests/expected/libfdisk/mkpart-full-gpt-nopartno b/tests/expected/libfdisk/mkpart-full-gpt-nopartno
new file mode 100644
index 0000000..c038c37
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-gpt-nopartno
@@ -0,0 +1,30 @@
+Created a new disklabel.
+Requested partition: <partno=<default>,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=8192,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=10240,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=12288,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=14336,size=2048>
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M Linux filesystem
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux filesystem
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 16383 2048 1M Linux filesystem
diff --git a/tests/expected/libfdisk/mkpart-full-gpt-partno-gap b/tests/expected/libfdisk/mkpart-full-gpt-partno-gap
new file mode 100644
index 0000000..a636e28
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-gpt-partno-gap
@@ -0,0 +1,30 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=3,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=4,start=8192,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=6,start=10240,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=7,start=12288,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=8,start=14336,size=2048>
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M Linux filesystem
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>4 6144 8191 2048 1M Linux filesystem
+<removed>5 8192 10239 2048 1M Linux filesystem
+<removed>7 10240 12287 2048 1M Linux filesystem
+<removed>8 12288 14335 2048 1M Linux filesystem
+<removed>9 14336 16383 2048 1M Linux filesystem
diff --git a/tests/expected/libfdisk/mkpart-full-gpt-space-gap b/tests/expected/libfdisk/mkpart-full-gpt-space-gap
new file mode 100644
index 0000000..5dcdb77
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-gpt-space-gap
@@ -0,0 +1,24 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=2,start=8192,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=3,start=12288,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=4,start=14336,size=2048>
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M Linux filesystem
+<removed>2 6144 8191 2048 1M Linux filesystem
+<removed>3 8192 10239 2048 1M Linux filesystem
+<removed>4 12288 14335 2048 1M Linux filesystem
+<removed>5 14336 16383 2048 1M Linux filesystem
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-logical b/tests/expected/libfdisk/mkpart-full-mbr-err-logical
new file mode 100644
index 0000000..f8e9b7d
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-err-logical
@@ -0,0 +1,17 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=2,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=3,start=8192,size=22528>
+Created a new partition <removed>.
+Requested partition: <partno=4,start=10240,size=2048>
+Adding logical partition 5
+Created a new partition <removed>.
+Requested partition: <partno=5,start=4096,size=2048>
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-logical.err b/tests/expected/libfdisk/mkpart-full-mbr-err-logical.err
new file mode 100644
index 0000000..014b316
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-err-logical.err
@@ -0,0 +1 @@
+sample-fdisk-mkpart-fullspec: failed to add #6 partition
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-nospace b/tests/expected/libfdisk/mkpart-full-mbr-err-nospace
new file mode 100644
index 0000000..e8aff29
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-err-nospace
@@ -0,0 +1,10 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=2,start=4096,size=2048>
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-nospace.err b/tests/expected/libfdisk/mkpart-full-mbr-err-nospace.err
new file mode 100644
index 0000000..7e44232
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-err-nospace.err
@@ -0,0 +1,2 @@
+Start sector 4096 out of range.
+sample-fdisk-mkpart-fullspec: failed to add #3 partition
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-primary b/tests/expected/libfdisk/mkpart-full-mbr-err-primary
new file mode 100644
index 0000000..3200751
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-err-primary
@@ -0,0 +1,10 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=6,start=6144,size=2048>
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-primary.err b/tests/expected/libfdisk/mkpart-full-mbr-err-primary.err
new file mode 100644
index 0000000..59e42e1
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-err-primary.err
@@ -0,0 +1,2 @@
+Extended partition does not exists. Failed to add logical partition.
+sample-fdisk-mkpart-fullspec: failed to add #7 partition
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-logical b/tests/expected/libfdisk/mkpart-full-mbr-logical
new file mode 100644
index 0000000..d3d27cb
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-logical
@@ -0,0 +1,33 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=2,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=3,start=8192,size=22528>
+Created a new partition <removed>.
+Requested partition: <partno=4,start=10240,size=2048>
+Adding logical partition 5
+Created a new partition <removed>.
+Requested partition: <partno=5,start=14336,size=2048>
+Adding logical partition 6
+Created a new partition <removed>.
+Requested partition: <partno=6,start=18432,size=12288>
+Adding logical partition 7
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 30719 22528 11M 5 Extended
+<removed>5 10240 12287 2048 1M 83 Linux
+<removed>6 14336 16383 2048 1M 83 Linux
+<removed>7 18432 30719 12288 6M 83 Linux
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-nopartno b/tests/expected/libfdisk/mkpart-full-mbr-nopartno
new file mode 100644
index 0000000..51aa5a7
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-nopartno
@@ -0,0 +1,33 @@
+Created a new disklabel.
+Requested partition: <partno=<default>,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=8192,size=22528>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=10240,size=2048>
+Adding logical partition 5
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=14336,size=2048>
+Adding logical partition 6
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=18432,size=12288>
+Adding logical partition 7
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 30719 22528 11M 5 Extended
+<removed>5 10240 12287 2048 1M 83 Linux
+<removed>6 14336 16383 2048 1M 83 Linux
+<removed>7 18432 30719 12288 6M 83 Linux
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-partno-gap b/tests/expected/libfdisk/mkpart-full-mbr-partno-gap
new file mode 100644
index 0000000..7f5fab5
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-partno-gap
@@ -0,0 +1,26 @@
+Requested partition: <partno=0,start=2048,size=2048>
+Requested partition: <partno=2,start=4096,size=2048>
+Requested partition: <partno=3,start=6144,size=24576>
+Requested partition: <partno=4,start=10240,size=2048>
+Requested partition: <partno=5,start=14336,size=2048>
+Created a new <removed>.
+Created a new <removed>.
+Created a new <removed>.
+Created a new <removed>.
+Adding logical partition 5
+Created a new <removed>.
+Adding logical partition 6
+Created a new <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>3 4096 6143 2048 1M 83 Linux
+<removed>4 6144 30719 24576 12M 5 Extended
+<removed>5 10240 12287 2048 1M 83 Linux
+<removed>6 14336 16383 2048 1M 83 Linux
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-primary b/tests/expected/libfdisk/mkpart-full-mbr-primary
new file mode 100644
index 0000000..cd3604f
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-primary
@@ -0,0 +1,21 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=2,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=3,start=8192,size=22528>
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 30719 22528 11M 83 Linux
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-primary-nopartno b/tests/expected/libfdisk/mkpart-full-mbr-primary-nopartno
new file mode 100644
index 0000000..a8b5819
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-primary-nopartno
@@ -0,0 +1,21 @@
+Created a new disklabel.
+Requested partition: <partno=<default>,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=4096,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=<default>,start=8192,size=22528>
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 30719 22528 11M 83 Linux
diff --git a/tests/expected/libfdisk/mkpart-full-mbr-space-gap b/tests/expected/libfdisk/mkpart-full-mbr-space-gap
new file mode 100644
index 0000000..1fe0061
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-full-mbr-space-gap
@@ -0,0 +1,18 @@
+Created a new disklabel.
+Requested partition: <partno=0,start=2048,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=1,start=6144,size=2048>
+Created a new partition <removed>.
+Requested partition: <partno=2,start=8192,size=2048>
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 6144 8191 2048 1M 83 Linux
+<removed>3 8192 10239 2048 1M 83 Linux
diff --git a/tests/expected/libfdisk/mkpart-gpt b/tests/expected/libfdisk/mkpart-gpt
new file mode 100644
index 0000000..1c39f6a
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-gpt
@@ -0,0 +1,23 @@
+Created a new disklabel.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 4095 2048 1M Linux filesystem
+<removed>2 4096 6143 2048 1M Linux filesystem
+<removed>3 6144 8191 2048 1M Linux filesystem
+<removed>4 8192 10239 2048 1M Linux filesystem
+<removed>5 10240 12287 2048 1M Linux filesystem
+<removed>6 12288 14335 2048 1M Linux filesystem
+<removed>7 14336 28671 14336 7M Linux filesystem
diff --git a/tests/expected/libfdisk/mkpart-mbr b/tests/expected/libfdisk/mkpart-mbr
new file mode 100644
index 0000000..883efd7
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-mbr
@@ -0,0 +1,17 @@
+Created a new disklabel.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 30719 22528 11M 83 Linux
diff --git a/tests/expected/libfdisk/mkpart-mbr-logic b/tests/expected/libfdisk/mkpart-mbr-logic
new file mode 100644
index 0000000..eddaef0
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-mbr-logic
@@ -0,0 +1,26 @@
+Created a new disklabel.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Adding logical partition 5
+Created a new partition <removed>.
+Adding logical partition 6
+Created a new partition <removed>.
+Adding logical partition 7
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 30719 22528 11M 5 Extended
+<removed>5 10240 12287 2048 1M 83 Linux
+<removed>6 14336 16383 2048 1M 83 Linux
+<removed>7 18432 30719 12288 6M 83 Linux
diff --git a/tests/expected/libfdisk/mkpart-mbr-nopartno b/tests/expected/libfdisk/mkpart-mbr-nopartno
new file mode 100644
index 0000000..eddaef0
--- /dev/null
+++ b/tests/expected/libfdisk/mkpart-mbr-nopartno
@@ -0,0 +1,26 @@
+Created a new disklabel.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Created a new partition <removed>.
+Adding logical partition 5
+Created a new partition <removed>.
+Adding logical partition 6
+Created a new partition <removed>.
+Adding logical partition 7
+Created a new partition <removed>.
+Disk <removed>: 15 MiB, 15728640 bytes, 30720 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 30719 22528 11M 5 Extended
+<removed>5 10240 12287 2048 1M 83 Linux
+<removed>6 14336 16383 2048 1M 83 Linux
+<removed>7 18432 30719 12288 6M 83 Linux
diff --git a/tests/expected/libmount/context b/tests/expected/libmount/context
new file mode 100644
index 0000000..5e268a3
--- /dev/null
+++ b/tests/expected/libmount/context
@@ -0,0 +1,5 @@
+Init device
+Create partitions
+Create filesystem
+Do tests...
+...done.
diff --git a/tests/expected/libmount/context-X-comment b/tests/expected/libmount/context-X-comment
new file mode 100644
index 0000000..7504a7e
--- /dev/null
+++ b/tests/expected/libmount/context-X-comment
@@ -0,0 +1 @@
+successfully mounted
diff --git a/tests/expected/libmount/context-mount-by-devname b/tests/expected/libmount/context-mount-by-devname
new file mode 100644
index 0000000..7504a7e
--- /dev/null
+++ b/tests/expected/libmount/context-mount-by-devname
@@ -0,0 +1 @@
+successfully mounted
diff --git a/tests/expected/libmount/context-mount-by-label b/tests/expected/libmount/context-mount-by-label
new file mode 100644
index 0000000..7504a7e
--- /dev/null
+++ b/tests/expected/libmount/context-mount-by-label
@@ -0,0 +1 @@
+successfully mounted
diff --git a/tests/expected/libmount/context-mount-by-uuid b/tests/expected/libmount/context-mount-by-uuid
new file mode 100644
index 0000000..2f44fc4
--- /dev/null
+++ b/tests/expected/libmount/context-mount-by-uuid
@@ -0,0 +1,2 @@
+successfully mounted
+successfully umounted
diff --git a/tests/expected/libmount/context-mount-flags b/tests/expected/libmount/context-mount-flags
new file mode 100644
index 0000000..eb71323
--- /dev/null
+++ b/tests/expected/libmount/context-mount-flags
@@ -0,0 +1,8 @@
+successfully mounted
+ro,nosuid,noexec
+successfully mounted
+rw,nosuid,noexec
+successfully umounted
+successfully mounted
+rw,relatime
+successfully umounted
diff --git a/tests/expected/libmount/context-mount-loopdev b/tests/expected/libmount/context-mount-loopdev
new file mode 100644
index 0000000..2f44fc4
--- /dev/null
+++ b/tests/expected/libmount/context-mount-loopdev
@@ -0,0 +1,2 @@
+successfully mounted
+successfully umounted
diff --git a/tests/expected/libmount/context-py b/tests/expected/libmount/context-py
new file mode 100644
index 0000000..5e268a3
--- /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 0000000..7504a7e
--- /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 0000000..7504a7e
--- /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 0000000..2f44fc4
--- /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 0000000..9606418
--- /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 0000000..2f44fc4
--- /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 0000000..319236f
--- /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 0000000..319236f
--- /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 0000000..7504a7e
--- /dev/null
+++ b/tests/expected/libmount/context-py-x-mount.mkdir
@@ -0,0 +1 @@
+successfully mounted
diff --git a/tests/expected/libmount/context-umount-by-devname b/tests/expected/libmount/context-umount-by-devname
new file mode 100644
index 0000000..319236f
--- /dev/null
+++ b/tests/expected/libmount/context-umount-by-devname
@@ -0,0 +1 @@
+successfully umounted
diff --git a/tests/expected/libmount/context-umount-by-mountpoint b/tests/expected/libmount/context-umount-by-mountpoint
new file mode 100644
index 0000000..319236f
--- /dev/null
+++ b/tests/expected/libmount/context-umount-by-mountpoint
@@ -0,0 +1 @@
+successfully umounted
diff --git a/tests/expected/libmount/context-utab b/tests/expected/libmount/context-utab
new file mode 100644
index 0000000..7b403e5
--- /dev/null
+++ b/tests/expected/libmount/context-utab
@@ -0,0 +1,4 @@
+Create partitions
+Create filesystem
+Do tests...
+...done.
diff --git a/tests/expected/libmount/context-utab-mount-by-devname b/tests/expected/libmount/context-utab-mount-by-devname
new file mode 100644
index 0000000..7504a7e
--- /dev/null
+++ b/tests/expected/libmount/context-utab-mount-by-devname
@@ -0,0 +1 @@
+successfully mounted
diff --git a/tests/expected/libmount/context-utab-mount-uhelper b/tests/expected/libmount/context-utab-mount-uhelper
new file mode 100644
index 0000000..7504a7e
--- /dev/null
+++ b/tests/expected/libmount/context-utab-mount-uhelper
@@ -0,0 +1 @@
+successfully mounted
diff --git a/tests/expected/libmount/context-utab-mount-uhelper-subvol b/tests/expected/libmount/context-utab-mount-uhelper-subvol
new file mode 100644
index 0000000..7504a7e
--- /dev/null
+++ b/tests/expected/libmount/context-utab-mount-uhelper-subvol
@@ -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 0000000..7b403e5
--- /dev/null
+++ b/tests/expected/libmount/context-utab-py
@@ -0,0 +1,4 @@
+Create partitions
+Create filesystem
+Do tests...
+...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 0000000..7504a7e
--- /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 0000000..7504a7e
--- /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 0000000..7504a7e
--- /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 0000000..319236f
--- /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 0000000..319236f
--- /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 0000000..319236f
--- /dev/null
+++ b/tests/expected/libmount/context-utab-py-umount-subvol
@@ -0,0 +1 @@
+successfully umounted
diff --git a/tests/expected/libmount/context-utab-umount b/tests/expected/libmount/context-utab-umount
new file mode 100644
index 0000000..319236f
--- /dev/null
+++ b/tests/expected/libmount/context-utab-umount
@@ -0,0 +1 @@
+successfully umounted
diff --git a/tests/expected/libmount/context-utab-umount-by-devname b/tests/expected/libmount/context-utab-umount-by-devname
new file mode 100644
index 0000000..319236f
--- /dev/null
+++ b/tests/expected/libmount/context-utab-umount-by-devname
@@ -0,0 +1 @@
+successfully umounted
diff --git a/tests/expected/libmount/context-utab-umount-subvol b/tests/expected/libmount/context-utab-umount-subvol
new file mode 100644
index 0000000..319236f
--- /dev/null
+++ b/tests/expected/libmount/context-utab-umount-subvol
@@ -0,0 +1 @@
+successfully umounted
diff --git a/tests/expected/libmount/context-x-permanent b/tests/expected/libmount/context-x-permanent
new file mode 100644
index 0000000..7504a7e
--- /dev/null
+++ b/tests/expected/libmount/context-x-permanent
@@ -0,0 +1 @@
+successfully mounted
diff --git a/tests/expected/libmount/debug-set-from-code b/tests/expected/libmount/debug-set-from-code
new file mode 100644
index 0000000..9066621
--- /dev/null
+++ b/tests/expected/libmount/debug-set-from-code
@@ -0,0 +1 @@
+0x000016
diff --git a/tests/expected/libmount/debug-set-from-env-int b/tests/expected/libmount/debug-set-from-env-int
new file mode 100644
index 0000000..9066621
--- /dev/null
+++ b/tests/expected/libmount/debug-set-from-env-int
@@ -0,0 +1 @@
+0x000016
diff --git a/tests/expected/libmount/debug-set-from-env-str b/tests/expected/libmount/debug-set-from-env-str
new file mode 100644
index 0000000..9066621
--- /dev/null
+++ b/tests/expected/libmount/debug-set-from-env-str
@@ -0,0 +1 @@
+0x000016
diff --git a/tests/expected/libmount/lock b/tests/expected/libmount/lock
new file mode 100644
index 0000000..d7e318d
--- /dev/null
+++ b/tests/expected/libmount/lock
@@ -0,0 +1 @@
+50000 \ No newline at end of file
diff --git a/tests/expected/libmount/loop b/tests/expected/libmount/loop
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/libmount/loop
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/libmount/loop-conflict b/tests/expected/libmount/loop-conflict
new file mode 100644
index 0000000..1686021
--- /dev/null
+++ b/tests/expected/libmount/loop-conflict
@@ -0,0 +1,2 @@
+mount: <target> overlapping loop device exists for <source>
+Success
diff --git a/tests/expected/libmount/loop-dev-loop b/tests/expected/libmount/loop-dev-loop
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/libmount/loop-dev-loop
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/libmount/loop-explicit-rw b/tests/expected/libmount/loop-explicit-rw
new file mode 100644
index 0000000..e7787c0
--- /dev/null
+++ b/tests/expected/libmount/loop-explicit-rw
@@ -0,0 +1,2 @@
+rw
+Success
diff --git a/tests/expected/libmount/loop-file b/tests/expected/libmount/loop-file
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/libmount/loop-file
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/libmount/loop-file-o-loop b/tests/expected/libmount/loop-file-o-loop
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/libmount/loop-file-o-loop
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/libmount/loop-o-loop-val b/tests/expected/libmount/loop-o-loop-val
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/libmount/loop-o-loop-val
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/libmount/loop-o-loop-val-conflict b/tests/expected/libmount/loop-o-loop-val-conflict
new file mode 100644
index 0000000..0eb7322
--- /dev/null
+++ b/tests/expected/libmount/loop-o-loop-val-conflict
@@ -0,0 +1,2 @@
+mount: <target> failed to setup loop device for <source>
+Success
diff --git a/tests/expected/libmount/loop-o-loop-val-initialized b/tests/expected/libmount/loop-o-loop-val-initialized
new file mode 100644
index 0000000..1686021
--- /dev/null
+++ b/tests/expected/libmount/loop-o-loop-val-initialized
@@ -0,0 +1,2 @@
+mount: <target> overlapping loop device exists for <source>
+Success
diff --git a/tests/expected/libmount/loop-overlay b/tests/expected/libmount/loop-overlay
new file mode 100644
index 0000000..3990244
--- /dev/null
+++ b/tests/expected/libmount/loop-overlay
@@ -0,0 +1,7 @@
+second should fail
+mount: <target> overlapping loop device exists for <source>
+should succeed
+both should fail
+mount: <target> overlapping loop device exists for <source>
+mount: <target> overlapping loop device exists for <source>
+Success
diff --git a/tests/expected/libmount/loop-reuse b/tests/expected/libmount/loop-reuse
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/libmount/loop-reuse
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/libmount/optstr-append b/tests/expected/libmount/optstr-append
new file mode 100644
index 0000000..68e5845
--- /dev/null
+++ b/tests/expected/libmount/optstr-append
@@ -0,0 +1 @@
+result: >aaa,bbb=BBB,context="foo,bar,gogo",ccc,ddd<
diff --git a/tests/expected/libmount/optstr-append-empty-value b/tests/expected/libmount/optstr-append-empty-value
new file mode 100644
index 0000000..35adf5c
--- /dev/null
+++ b/tests/expected/libmount/optstr-append-empty-value
@@ -0,0 +1 @@
+result: >aaa,bbb=BBB,ccc,ddd=<
diff --git a/tests/expected/libmount/optstr-append-value b/tests/expected/libmount/optstr-append-value
new file mode 100644
index 0000000..e0116f6
--- /dev/null
+++ b/tests/expected/libmount/optstr-append-value
@@ -0,0 +1 @@
+result: >aaa,bbb=BBB,ccc,ddd=DDD<
diff --git a/tests/expected/libmount/optstr-apply-linux b/tests/expected/libmount/optstr-apply-linux
new file mode 100644
index 0000000..50a52a7
--- /dev/null
+++ b/tests/expected/libmount/optstr-apply-linux
@@ -0,0 +1,2 @@
+flags: 0x00000400
+optstr: rw,user=kzak,noatime
diff --git a/tests/expected/libmount/optstr-apply-user b/tests/expected/libmount/optstr-apply-user
new file mode 100644
index 0000000..2f34732
--- /dev/null
+++ b/tests/expected/libmount/optstr-apply-user
@@ -0,0 +1,2 @@
+flags: 0x00000408
+optstr: noexec,nosuid,user,nofail
diff --git a/tests/expected/libmount/optstr-apply-user-Xx b/tests/expected/libmount/optstr-apply-user-Xx
new file mode 100644
index 0000000..d340ed7
--- /dev/null
+++ b/tests/expected/libmount/optstr-apply-user-Xx
@@ -0,0 +1,2 @@
+flags: 0x00022400
+optstr: something,x-gvfs-hide,x-gdu.hide,x-canary,X-foo,X-bar,nofail
diff --git a/tests/expected/libmount/optstr-apply-user-large-X b/tests/expected/libmount/optstr-apply-user-large-X
new file mode 100644
index 0000000..5cdc2c0
--- /dev/null
+++ b/tests/expected/libmount/optstr-apply-user-large-X
@@ -0,0 +1,2 @@
+flags: 0x00020000
+optstr: something,X-foo,X-bar
diff --git a/tests/expected/libmount/optstr-apply-user-small-x b/tests/expected/libmount/optstr-apply-user-small-x
new file mode 100644
index 0000000..8f5d5fc
--- /dev/null
+++ b/tests/expected/libmount/optstr-apply-user-small-x
@@ -0,0 +1,2 @@
+flags: 0x00002000
+optstr: something,x-gvfs-hide,x-gdu.hide,x-canary
diff --git a/tests/expected/libmount/optstr-deduplicate b/tests/expected/libmount/optstr-deduplicate
new file mode 100644
index 0000000..e2b669a
--- /dev/null
+++ b/tests/expected/libmount/optstr-deduplicate
@@ -0,0 +1 @@
+result: >bbb,ccc,xxx,ddd,AAA=ccc,fff=eee<
diff --git a/tests/expected/libmount/optstr-deduplicate-empty b/tests/expected/libmount/optstr-deduplicate-empty
new file mode 100644
index 0000000..63b74f6
--- /dev/null
+++ b/tests/expected/libmount/optstr-deduplicate-empty
@@ -0,0 +1 @@
+result: >bbb,ccc,xxx,ddd,AAA=,fff=eee<
diff --git a/tests/expected/libmount/optstr-flags b/tests/expected/libmount/optstr-flags
new file mode 100644
index 0000000..17b4727
--- /dev/null
+++ b/tests/expected/libmount/optstr-flags
@@ -0,0 +1,2 @@
+mountflags: 0x0000000e
+userspace-mountflags: 0x00002208
diff --git a/tests/expected/libmount/optstr-get b/tests/expected/libmount/optstr-get
new file mode 100644
index 0000000..7eafc65
--- /dev/null
+++ b/tests/expected/libmount/optstr-get
@@ -0,0 +1 @@
+found; name: aaa
diff --git a/tests/expected/libmount/optstr-get-value b/tests/expected/libmount/optstr-get-value
new file mode 100644
index 0000000..509843f
--- /dev/null
+++ b/tests/expected/libmount/optstr-get-value
@@ -0,0 +1 @@
+found; name: bbb, argument: size=3 data=BBB
diff --git a/tests/expected/libmount/optstr-match b/tests/expected/libmount/optstr-match
new file mode 100644
index 0000000..1fc862f
--- /dev/null
+++ b/tests/expected/libmount/optstr-match
@@ -0,0 +1,13 @@
+false : "xxx,yyy,zzz" : "nozzz"
+true : "xxx,yyy,zzz" : "xxx,noeee"
+true : "bar,zzz" : "nofoo"
+true : "nofoo,bar" : "nofoo"
+true : "nofoo,bar" : "+nofoo"
+false : "bar,zzz" : "+nofoo"
+true : "bar,zzz" : ""
+true : "bar,zzz" : "+"
+true : "" : ""
+false : "" : "foo"
+true : "" : "nofoo"
+false : "" : "no,foo"
+true : "no" : "+no"
diff --git a/tests/expected/libmount/optstr-prepend b/tests/expected/libmount/optstr-prepend
new file mode 100644
index 0000000..cdcf751
--- /dev/null
+++ b/tests/expected/libmount/optstr-prepend
@@ -0,0 +1 @@
+result: >ddd,aaa,bbb=BBB,ccc<
diff --git a/tests/expected/libmount/optstr-prepend-empty-value b/tests/expected/libmount/optstr-prepend-empty-value
new file mode 100644
index 0000000..4cea635
--- /dev/null
+++ b/tests/expected/libmount/optstr-prepend-empty-value
@@ -0,0 +1 @@
+result: >ddd=,aaa,bbb=BBB,ccc<
diff --git a/tests/expected/libmount/optstr-prepend-value b/tests/expected/libmount/optstr-prepend-value
new file mode 100644
index 0000000..debc7ee
--- /dev/null
+++ b/tests/expected/libmount/optstr-prepend-value
@@ -0,0 +1 @@
+result: >ddd=DDD,aaa,bbb=BBB,ccc<
diff --git a/tests/expected/libmount/optstr-remove b/tests/expected/libmount/optstr-remove
new file mode 100644
index 0000000..4c28ed2
--- /dev/null
+++ b/tests/expected/libmount/optstr-remove
@@ -0,0 +1 @@
+result: >bbb=BBB,ccc<
diff --git a/tests/expected/libmount/optstr-remove-empty-value b/tests/expected/libmount/optstr-remove-empty-value
new file mode 100644
index 0000000..eee5c95
--- /dev/null
+++ b/tests/expected/libmount/optstr-remove-empty-value
@@ -0,0 +1 @@
+result: >aaa,ccc<
diff --git a/tests/expected/libmount/optstr-remove-quoted b/tests/expected/libmount/optstr-remove-quoted
new file mode 100644
index 0000000..92fc5e3
--- /dev/null
+++ b/tests/expected/libmount/optstr-remove-quoted
@@ -0,0 +1 @@
+result: >aaa,bbb=BBB,ccc<
diff --git a/tests/expected/libmount/optstr-remove-value b/tests/expected/libmount/optstr-remove-value
new file mode 100644
index 0000000..eee5c95
--- /dev/null
+++ b/tests/expected/libmount/optstr-remove-value
@@ -0,0 +1 @@
+result: >aaa,ccc<
diff --git a/tests/expected/libmount/optstr-set-empty b/tests/expected/libmount/optstr-set-empty
new file mode 100644
index 0000000..e0a3300
--- /dev/null
+++ b/tests/expected/libmount/optstr-set-empty
@@ -0,0 +1 @@
+result: >aaa,bbb=,ccc<
diff --git a/tests/expected/libmount/optstr-set-large b/tests/expected/libmount/optstr-set-large
new file mode 100644
index 0000000..b518c26
--- /dev/null
+++ b/tests/expected/libmount/optstr-set-large
@@ -0,0 +1 @@
+result: >aaa,bbb=XXX-YYY-ZZZ,ccc<
diff --git a/tests/expected/libmount/optstr-set-new b/tests/expected/libmount/optstr-set-new
new file mode 100644
index 0000000..5d45b4f
--- /dev/null
+++ b/tests/expected/libmount/optstr-set-new
@@ -0,0 +1 @@
+result: >aaa=XXX,bbb=BBB,ccc<
diff --git a/tests/expected/libmount/optstr-set-new-empty b/tests/expected/libmount/optstr-set-new-empty
new file mode 100644
index 0000000..a1cfb37
--- /dev/null
+++ b/tests/expected/libmount/optstr-set-new-empty
@@ -0,0 +1 @@
+result: >aaa=,bbb=BBB,ccc<
diff --git a/tests/expected/libmount/optstr-set-new-end b/tests/expected/libmount/optstr-set-new-end
new file mode 100644
index 0000000..39675a4
--- /dev/null
+++ b/tests/expected/libmount/optstr-set-new-end
@@ -0,0 +1 @@
+result: >aaa,bbb=BBB,ccc=XXX<
diff --git a/tests/expected/libmount/optstr-set-new-end-empty b/tests/expected/libmount/optstr-set-new-end-empty
new file mode 100644
index 0000000..d0e9880
--- /dev/null
+++ b/tests/expected/libmount/optstr-set-new-end-empty
@@ -0,0 +1 @@
+result: >aaa,bbb=BBB,ccc=<
diff --git a/tests/expected/libmount/optstr-set-remove b/tests/expected/libmount/optstr-set-remove
new file mode 100644
index 0000000..0505bed
--- /dev/null
+++ b/tests/expected/libmount/optstr-set-remove
@@ -0,0 +1 @@
+result: >aaa,bbb,ccc<
diff --git a/tests/expected/libmount/optstr-set-small b/tests/expected/libmount/optstr-set-small
new file mode 100644
index 0000000..6c358b3
--- /dev/null
+++ b/tests/expected/libmount/optstr-set-small
@@ -0,0 +1 @@
+result: >aaa,bbb=X,ccc<
diff --git a/tests/expected/libmount/optstr-split b/tests/expected/libmount/optstr-split
new file mode 100644
index 0000000..341a640
--- /dev/null
+++ b/tests/expected/libmount/optstr-split
@@ -0,0 +1,3 @@
+user : x-bar,x-foo=foodata,user=kzak,loop=/dev/loop0
+vfs : noexec,nosuid
+fs : aaa,bbb=BBB,ccc
diff --git a/tests/expected/libmount/tabdiff-mount b/tests/expected/libmount/tabdiff-mount
new file mode 100644
index 0000000..3c18f8d
--- /dev/null
+++ b/tests/expected/libmount/tabdiff-mount
@@ -0,0 +1,2 @@
+/dev/mapper/kzak-home on /home/kzak: MOUNTED
+tmpfs on /mnt/test/foo bar: MOUNTED
diff --git a/tests/expected/libmount/tabdiff-move b/tests/expected/libmount/tabdiff-move
new file mode 100644
index 0000000..95820d9
--- /dev/null
+++ b/tests/expected/libmount/tabdiff-move
@@ -0,0 +1,2 @@
+//foo.home/bar/ on /mnt/music: MOVED to /mnt/music
+tmpfs on /mnt/test/foo bar: UMOUNTED
diff --git a/tests/expected/libmount/tabdiff-remount b/tests/expected/libmount/tabdiff-remount
new file mode 100644
index 0000000..876bfd9
--- /dev/null
+++ b/tests/expected/libmount/tabdiff-remount
@@ -0,0 +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'
+tmpfs on /mnt/test/foo bar: UMOUNTED
diff --git a/tests/expected/libmount/tabdiff-umount b/tests/expected/libmount/tabdiff-umount
new file mode 100644
index 0000000..c7be725
--- /dev/null
+++ b/tests/expected/libmount/tabdiff-umount
@@ -0,0 +1,2 @@
+/dev/mapper/kzak-home on /home/kzak: UMOUNTED
+tmpfs on /mnt/test/foo bar: UMOUNTED
diff --git a/tests/expected/libmount/tabfiles-copy b/tests/expected/libmount/tabfiles-copy
new file mode 100644
index 0000000..0054586
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-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-find-fs b/tests/expected/libmount/tabfiles-find-fs
new file mode 100644
index 0000000..0c67fb8
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-find-fs
@@ -0,0 +1 @@
+/home/kzak index is 27
diff --git a/tests/expected/libmount/tabfiles-find-pair b/tests/expected/libmount/tabfiles-find-pair
new file mode 100644
index 0000000..fbd730a
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-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-find-source b/tests/expected/libmount/tabfiles-find-source
new file mode 100644
index 0000000..474652c
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-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-find-target b/tests/expected/libmount/tabfiles-find-target
new file mode 100644
index 0000000..1a51bd5
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-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-find-target2 b/tests/expected/libmount/tabfiles-find-target2
new file mode 100644
index 0000000..8a6c57b
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-find-target2
@@ -0,0 +1,5 @@
+------ fs:
+source: /dev/foo
+target: /any/foo/
+fstype: auto
+optstr: defaults
diff --git a/tests/expected/libmount/tabfiles-find-target3 b/tests/expected/libmount/tabfiles-find-target3
new file mode 100644
index 0000000..8a6c57b
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-find-target3
@@ -0,0 +1,5 @@
+------ fs:
+source: /dev/foo
+target: /any/foo/
+fstype: auto
+optstr: defaults
diff --git a/tests/expected/libmount/tabfiles-parse-fstab b/tests/expected/libmount/tabfiles-parse-fstab
new file mode 100644
index 0000000..d661526
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-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-parse-fstab-broken b/tests/expected/libmount/tabfiles-parse-fstab-broken
new file mode 100644
index 0000000..b838fbc
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-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-parse-fstab-full b/tests/expected/libmount/tabfiles-parse-fstab-full
new file mode 100644
index 0000000..f1caff6
--- /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
new file mode 100644
index 0000000..d5ba524
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-parse-mountinfo
@@ -0,0 +1,364 @@
+------ 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: tmpfs
+target: /mnt/test/foo bar
+fstype: tmpfs
+optstr: rw,relatime
+VFS-optstr: rw,relatime
+FS-opstr: rw
+optional-fields: 'shared:323'
+root: /
+id: 49
+parent: 20
+devno: 0:56
diff --git a/tests/expected/libmount/tabfiles-parse-mountinfo-nosrc b/tests/expected/libmount/tabfiles-parse-mountinfo-nosrc
new file mode 100644
index 0000000..3d44ef6
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-parse-mountinfo-nosrc
@@ -0,0 +1,78 @@
+------ 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:
+target: /mnt/test
+fstype: tmpfs
+optstr: rw,relatime
+VFS-optstr: rw,relatime
+FS-opstr: rw
+optional-fields: 'shared:212'
+root: /
+id: 21
+parent: 20
+devno: 0:53
diff --git a/tests/expected/libmount/tabfiles-parse-mtab b/tests/expected/libmount/tabfiles-parse-mtab
new file mode 100644
index 0000000..93f4849
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-parse-mtab
@@ -0,0 +1,75 @@
+------ 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
+------ fs:
+source: none
+target: /var/tmp/ / / / / / / / / / / / / / /
+fstype: overlay
+optstr: rw,relatime,lowerdir=lower,upperdir=upper,workdir=work
+VFS-optstr: rw,relatime
+FS-opstr: lowerdir=lower,upperdir=upper,workdir=work
diff --git a/tests/expected/libmount/tabfiles-parse-swaps b/tests/expected/libmount/tabfiles-parse-swaps
new file mode 100644
index 0000000..bd781d4
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-parse-swaps
@@ -0,0 +1,22 @@
+------ fs:
+source: /dev/dm-2
+target: (null)
+fstype: swap
+swaptype: partition
+size: 8151036
+usedsize: 2283436
+priority: -2
+------ fs:
+source: /some/swapfile
+target: (null)
+fstype: swap
+swaptype: file
+size: 111
+usedsize: 111
+------ fs:
+source: /some/swapfile2
+target: (null)
+fstype: swap
+swaptype: file
+size: 111
+usedsize: 111
diff --git a/tests/expected/libmount/tabfiles-py-copy b/tests/expected/libmount/tabfiles-py-copy
new file mode 100644
index 0000000..0054586
--- /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 0000000..fbd730a
--- /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 0000000..474652c
--- /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 0000000..1a51bd5
--- /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 0000000..8a6c57b
--- /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 0000000..8a6c57b
--- /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 0000000..d661526
--- /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 0000000..b838fbc
--- /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 0000000..f1caff6
--- /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 0000000..d5ba524
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-py-parse-mountinfo
@@ -0,0 +1,364 @@
+------ 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: tmpfs
+target: /mnt/test/foo bar
+fstype: tmpfs
+optstr: rw,relatime
+VFS-optstr: rw,relatime
+FS-opstr: rw
+optional-fields: 'shared:323'
+root: /
+id: 49
+parent: 20
+devno: 0:56
diff --git a/tests/expected/libmount/tabfiles-py-parse-mtab b/tests/expected/libmount/tabfiles-py-parse-mtab
new file mode 100644
index 0000000..93f4849
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-py-parse-mtab
@@ -0,0 +1,75 @@
+------ 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
+------ fs:
+source: none
+target: /var/tmp/ / / / / / / / / / / / / / /
+fstype: overlay
+optstr: rw,relatime,lowerdir=lower,upperdir=upper,workdir=work
+VFS-optstr: rw,relatime
+FS-opstr: lowerdir=lower,upperdir=upper,workdir=work
diff --git a/tests/expected/libmount/tabfiles-tags-fstab-dev b/tests/expected/libmount/tabfiles-tags-fstab-dev
new file mode 100644
index 0000000..823a19c
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-tags-fstab-dev
@@ -0,0 +1,5 @@
+------ fs:
+
+target: /mnt/mountpoint3
+fstype: auto
+optstr: defaults
diff --git a/tests/expected/libmount/tabfiles-tags-fstab-dev2label b/tests/expected/libmount/tabfiles-tags-fstab-dev2label
new file mode 100644
index 0000000..78d04a4
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-tags-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-fstab-label b/tests/expected/libmount/tabfiles-tags-fstab-label
new file mode 100644
index 0000000..78d04a4
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-tags-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-fstab-label2dev b/tests/expected/libmount/tabfiles-tags-fstab-label2dev
new file mode 100644
index 0000000..78d04a4
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-tags-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-fstab-label2uuid b/tests/expected/libmount/tabfiles-tags-fstab-label2uuid
new file mode 100644
index 0000000..78d04a4
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-tags-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-fstab-uuid b/tests/expected/libmount/tabfiles-tags-fstab-uuid
new file mode 100644
index 0000000..67d4e7b
--- /dev/null
+++ b/tests/expected/libmount/tabfiles-tags-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/tabfiles-tags-py-fstab-dev b/tests/expected/libmount/tabfiles-tags-py-fstab-dev
new file mode 100644
index 0000000..823a19c
--- /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 0000000..78d04a4
--- /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 0000000..78d04a4
--- /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 0000000..78d04a4
--- /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 0000000..78d04a4
--- /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 0000000..67d4e7b
--- /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-add b/tests/expected/libmount/update-fstab-add
new file mode 100644
index 0000000..2b36d58
--- /dev/null
+++ b/tests/expected/libmount/update-fstab-add
@@ -0,0 +1,3 @@
+/dev/sda1 /mnt/foo ext3 rw,bbb,ccc,fff=FFF,ddd,noexec 1 2
+/dev/sda2 /mnt/bar auto defaults 1 2
+/dev/sda3 /mnt/bar auto rw,context="some,selinux,junk",noatime 1 2
diff --git a/tests/expected/libmount/update-fstab-replace b/tests/expected/libmount/update-fstab-replace
new file mode 100644
index 0000000..dc8d1df
--- /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-mtab-mount b/tests/expected/libmount/update-mtab-mount
new file mode 100644
index 0000000..6fdf7c1
--- /dev/null
+++ b/tests/expected/libmount/update-mtab-mount
@@ -0,0 +1,5 @@
+/dev/sda1 /mnt/foo ext3 rw,noexec,bbb,ccc,fff=FFF,ddd 0 0
+/dev/sdb1 /mnt/bar ext3 ro,noatime,gg=G,ffff=f 0 0
+/dev/sda2 /mnt/bar ext3 rw,noatime 0 0
+/dev/sda1 /mnt/gogo ext3 rw,noatime,nosuid 0 0
+none /proc proc rw 0 0
diff --git a/tests/expected/libmount/update-mtab-move b/tests/expected/libmount/update-mtab-move
new file mode 100644
index 0000000..6185b6b
--- /dev/null
+++ b/tests/expected/libmount/update-mtab-move
@@ -0,0 +1,5 @@
+/dev/sda1 /mnt/newfoo ext3 rw,noexec,bbb,ccc,fff=FFF,ddd 0 0
+/dev/sdb1 /mnt/bar ext3 ro,noatime,gg=G,ffff=f 0 0
+/dev/sda2 /mnt/newbar ext3 rw,noatime 0 0
+/dev/sda1 /mnt/gogo ext3 rw,noatime,nosuid 0 0
+none /proc proc rw 0 0
diff --git a/tests/expected/libmount/update-mtab-remount b/tests/expected/libmount/update-mtab-remount
new file mode 100644
index 0000000..c397b23
--- /dev/null
+++ b/tests/expected/libmount/update-mtab-remount
@@ -0,0 +1,5 @@
+/dev/sda1 /mnt/newfoo ext3 ro,noatime 0 0
+/dev/sdb1 /mnt/bar ext3 rw,atime,nosuid 0 0
+/dev/sda2 /mnt/newbar ext3 rw,noatime 0 0
+/dev/sda1 /mnt/gogo ext3 rw,noatime,nosuid 0 0
+none /proc proc rw 0 0
diff --git a/tests/expected/libmount/update-mtab-umount b/tests/expected/libmount/update-mtab-umount
new file mode 100644
index 0000000..be02573
--- /dev/null
+++ b/tests/expected/libmount/update-mtab-umount
@@ -0,0 +1,2 @@
+/dev/sda1 /mnt/newfoo ext3 ro,noatime 0 0
+/dev/sda2 /mnt/newbar ext3 rw,noatime 0 0
diff --git a/tests/expected/libmount/update-py-fstab-replace b/tests/expected/libmount/update-py-fstab-replace
new file mode 100644
index 0000000..dc8d1df
--- /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/libmount/update-utab-mount b/tests/expected/libmount/update-utab-mount
new file mode 100644
index 0000000..58a0179
--- /dev/null
+++ b/tests/expected/libmount/update-utab-mount
@@ -0,0 +1,3 @@
+SRC=/dev/sdb1 TARGET=/mnt/bar ROOT=/ OPTS=user
+SRC=/dev/sda2 TARGET=/mnt/xyz ROOT=/ OPTS=loop=/dev/loop0,uhelper=hal
+SRC=none TARGET=/proc ROOT=/ OPTS=user
diff --git a/tests/expected/libmount/update-utab-move b/tests/expected/libmount/update-utab-move
new file mode 100644
index 0000000..6008140
--- /dev/null
+++ b/tests/expected/libmount/update-utab-move
@@ -0,0 +1,3 @@
+SRC=/dev/sdb1 TARGET=/mnt/newbar ROOT=/ OPTS=user
+SRC=/dev/sda2 TARGET=/mnt/newxyz ROOT=/ OPTS=loop=/dev/loop0,uhelper=hal
+SRC=none TARGET=/proc ROOT=/ OPTS=user
diff --git a/tests/expected/libmount/update-utab-remount b/tests/expected/libmount/update-utab-remount
new file mode 100644
index 0000000..8e344b3
--- /dev/null
+++ b/tests/expected/libmount/update-utab-remount
@@ -0,0 +1,3 @@
+SRC=/dev/sdb1 TARGET=/mnt/newbar ROOT=/ OPTS=user
+SRC=/dev/sda2 TARGET=/mnt/newxyz ROOT=/ OPTS=user
+SRC=none TARGET=/proc ROOT=/ OPTS=user
diff --git a/tests/expected/libmount/update-utab-umount b/tests/expected/libmount/update-utab-umount
new file mode 100644
index 0000000..4c07d74
--- /dev/null
+++ b/tests/expected/libmount/update-utab-umount
@@ -0,0 +1 @@
+SRC=/dev/sda2 TARGET=/mnt/newxyz ROOT=/ OPTS=user
diff --git a/tests/expected/libmount/utils-ends-with b/tests/expected/libmount/utils-ends-with
new file mode 100644
index 0000000..f033a50
--- /dev/null
+++ b/tests/expected/libmount/utils-ends-with
@@ -0,0 +1 @@
+YES
diff --git a/tests/expected/libmount/utils-kernel-cmdline b/tests/expected/libmount/utils-kernel-cmdline
new file mode 100644
index 0000000..2a63165
--- /dev/null
+++ b/tests/expected/libmount/utils-kernel-cmdline
@@ -0,0 +1,5 @@
+'selinux=' found, argument: '0'
+'selinux' not found
+'ro' found
+'ro=' not found
+'root=' found, argument: 'UUID=33230ae2-1093-4353-824c-f7ca09a2a882'
diff --git a/tests/expected/libmount/utils-match-fstype b/tests/expected/libmount/utils-match-fstype
new file mode 100644
index 0000000..4736e08
--- /dev/null
+++ b/tests/expected/libmount/utils-match-fstype
@@ -0,0 +1 @@
+MATCH
diff --git a/tests/expected/libmount/utils-match-fstype-neg b/tests/expected/libmount/utils-match-fstype-neg
new file mode 100644
index 0000000..8262239
--- /dev/null
+++ b/tests/expected/libmount/utils-match-fstype-neg
@@ -0,0 +1 @@
+NOT-MATCH
diff --git a/tests/expected/libmount/utils-match-fstype-neg2 b/tests/expected/libmount/utils-match-fstype-neg2
new file mode 100644
index 0000000..8262239
--- /dev/null
+++ b/tests/expected/libmount/utils-match-fstype-neg2
@@ -0,0 +1 @@
+NOT-MATCH
diff --git a/tests/expected/libmount/utils-match-options b/tests/expected/libmount/utils-match-options
new file mode 100644
index 0000000..4736e08
--- /dev/null
+++ b/tests/expected/libmount/utils-match-options
@@ -0,0 +1 @@
+MATCH
diff --git a/tests/expected/libmount/utils-match-options-list b/tests/expected/libmount/utils-match-options-list
new file mode 100644
index 0000000..4736e08
--- /dev/null
+++ b/tests/expected/libmount/utils-match-options-list
@@ -0,0 +1 @@
+MATCH
diff --git a/tests/expected/libmount/utils-match-options-neg b/tests/expected/libmount/utils-match-options-neg
new file mode 100644
index 0000000..4736e08
--- /dev/null
+++ b/tests/expected/libmount/utils-match-options-neg
@@ -0,0 +1 @@
+MATCH
diff --git a/tests/expected/libmount/utils-match-options-neg-list b/tests/expected/libmount/utils-match-options-neg-list
new file mode 100644
index 0000000..8262239
--- /dev/null
+++ b/tests/expected/libmount/utils-match-options-neg-list
@@ -0,0 +1 @@
+NOT-MATCH
diff --git a/tests/expected/libmount/utils-match-options-neg-list2 b/tests/expected/libmount/utils-match-options-neg-list2
new file mode 100644
index 0000000..4736e08
--- /dev/null
+++ b/tests/expected/libmount/utils-match-options-neg-list2
@@ -0,0 +1 @@
+MATCH
diff --git a/tests/expected/libmount/utils-mountpoint b/tests/expected/libmount/utils-mountpoint
new file mode 100644
index 0000000..47fb251
--- /dev/null
+++ b/tests/expected/libmount/utils-mountpoint
@@ -0,0 +1 @@
+/proc: /proc
diff --git a/tests/expected/libmount/utils-mountpoint-root b/tests/expected/libmount/utils-mountpoint-root
new file mode 100644
index 0000000..c86cf0d
--- /dev/null
+++ b/tests/expected/libmount/utils-mountpoint-root
@@ -0,0 +1 @@
+/: /
diff --git a/tests/expected/libmount/utils-mountpoint-subdir b/tests/expected/libmount/utils-mountpoint-subdir
new file mode 100644
index 0000000..f21d31b
--- /dev/null
+++ b/tests/expected/libmount/utils-mountpoint-subdir
@@ -0,0 +1 @@
+/proc/sys/kernel: /proc
diff --git a/tests/expected/libmount/utils-starts-with b/tests/expected/libmount/utils-starts-with
new file mode 100644
index 0000000..f033a50
--- /dev/null
+++ b/tests/expected/libmount/utils-starts-with
@@ -0,0 +1 @@
+YES
diff --git a/tests/expected/libsmartcols/fromfile b/tests/expected/libsmartcols/fromfile
new file mode 100644
index 0000000..4155aa3
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile
@@ -0,0 +1 @@
+...done.
diff --git a/tests/expected/libsmartcols/fromfile-column-separator b/tests/expected/libsmartcols/fromfile-column-separator
new file mode 100644
index 0000000..8c5aa2a
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-column-separator
@@ -0,0 +1,11 @@
+NAME | NUM|TRUNC
+aaaa | 0|qqqqqqqqqqqqqqqqqX
+bbb | 100|dddddddddddddX
+ccccc | 21|ffffffffffffffffffffffffffffffffffffffffX
+dddddd| 3|ssssssssssX
+ee | 411|ddddddddddddddddddddddddddX
+ffff | 5111|jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjX
+gggggg|678993321|mmmmmmmmmmmmmmmmmmmX
+hhh | 7666666|lllllllllllllllllllllllllllllllllllllX
+iiiiii| 8765|yyyyyyyyyyyyyyyyyyyyyyyyyyyyX
+jj | 987456|pppppppppX
diff --git a/tests/expected/libsmartcols/fromfile-export b/tests/expected/libsmartcols/fromfile-export
new file mode 100644
index 0000000..f63afd8
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-export
@@ -0,0 +1,10 @@
+NAME="aaaa" NUM="0" TRUNC="qqqqqqqqqqqqqqqqqX"
+NAME="bbb" NUM="100" TRUNC="dddddddddddddX"
+NAME="ccccc" NUM="21" TRUNC="ffffffffffffffffffffffffffffffffffffffffX"
+NAME="dddddd" NUM="3" TRUNC="ssssssssssX"
+NAME="ee" NUM="411" TRUNC="ddddddddddddddddddddddddddX"
+NAME="ffff" NUM="5111" TRUNC="jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjX"
+NAME="gggggg" NUM="678993321" TRUNC="mmmmmmmmmmmmmmmmmmmX"
+NAME="hhh" NUM="7666666" TRUNC="lllllllllllllllllllllllllllllllllllllX"
+NAME="iiiiii" NUM="8765" TRUNC="yyyyyyyyyyyyyyyyyyyyyyyyyyyyX"
+NAME="jj" NUM="987456" TRUNC="pppppppppX"
diff --git a/tests/expected/libsmartcols/fromfile-hidden b/tests/expected/libsmartcols/fromfile-hidden
new file mode 100644
index 0000000..cf50bcb
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-hidden
@@ -0,0 +1,11 @@
+NAME NUM
+aaaa 0
+bbb 100
+ccccc 21
+dddddd 3
+ee 411
+ffff 5111
+gggggg 678993321
+hhh 7666666
+iiiiii 8765
+jj 987456
diff --git a/tests/expected/libsmartcols/fromfile-noextremes b/tests/expected/libsmartcols/fromfile-noextremes
new file mode 100644
index 0000000..4bac080
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-noextremes
@@ -0,0 +1,12 @@
+NAME NOEXTREME NUM NAME NUM
+aaaa qqqqqqX 0 aaaa 0
+bbb ddddddddX 100 bbb 100
+ccccc ffffffffffffffffffffffffffffffffffX
+ 21 ccccc 21
+dddddd sssX 3 dddddd 3
+ee ddX 411 ee 411
+ffff jjjjjX 5111 ffff 5111
+gggggg mmmmmmmX 678993321 gggggg 678993321
+hhh llllllllllX 7666666 hhh 7666666
+iiiiii yyyyyyX 8765 iiiiii 8765
+jj pppppX 987456 jj 987456
diff --git a/tests/expected/libsmartcols/fromfile-padding-default b/tests/expected/libsmartcols/fromfile-padding-default
new file mode 100644
index 0000000..f935be2
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-padding-default
@@ -0,0 +1,11 @@
+NAME.. ......NUM STRINGS STRINGS
+aaaa.. ........0 aaaa... aaaa
+bbb... ......100 bbb.... bbb
+ccccc. .......21 ccccc.. ccccc
+dddddd ........3 dddddd. dddddd
+ee.... ......411 ee..... ee
+ffff.. .....5111 .......
+gggggg 678993321 gggggg. gggggg
+hhh... ..7666666 hhh.... hhh
+iiiiii .....8765 iiiiii. iiiiii
+jj.... ...987456 jj..... jj
diff --git a/tests/expected/libsmartcols/fromfile-padding-maxout b/tests/expected/libsmartcols/fromfile-padding-maxout
new file mode 100644
index 0000000..3f73ce3
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-padding-maxout
@@ -0,0 +1,11 @@
+NAME.............. ..................NUM STRINGS............ STRINGS............
+aaaa.............. ....................0 aaaa............... aaaa...............
+bbb............... ..................100 bbb................ bbb................
+ccccc............. ...................21 ccccc.............. ccccc..............
+dddddd............ ....................3 dddddd............. dddddd.............
+ee................ ..................411 ee................. ee.................
+ffff.............. .................5111 ................... ...................
+gggggg............ ............678993321 gggggg............. gggggg.............
+hhh............... ..............7666666 hhh................ hhh................
+iiiiii............ .................8765 iiiiii............. iiiiii.............
+jj................ ...............987456 jj................. jj.................
diff --git a/tests/expected/libsmartcols/fromfile-padding-minout b/tests/expected/libsmartcols/fromfile-padding-minout
new file mode 100644
index 0000000..ac8eabc
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-padding-minout
@@ -0,0 +1,11 @@
+NAME.. ......NUM STRINGS STRINGS
+aaaa.. ........0 aaaa... aaaa
+bbb... ......100 bbb.... bbb
+ccccc. .......21 ccccc.. ccccc
+dddddd ........3 dddddd. dddddd
+ee.... ......411 ee..... ee
+ffff.. .....5111
+gggggg 678993321 gggggg. gggggg
+hhh... ..7666666 hhh.... hhh
+iiiiii .....8765 iiiiii. iiiiii
+jj.... ...987456 jj..... jj
diff --git a/tests/expected/libsmartcols/fromfile-raw b/tests/expected/libsmartcols/fromfile-raw
new file mode 100644
index 0000000..cc188aa
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-raw
@@ -0,0 +1,11 @@
+NAME NUM TRUNC
+aaaa 0 qqqqqqqqqqqqqqqqqX
+bbb 100 dddddddddddddX
+ccccc 21 ffffffffffffffffffffffffffffffffffffffffX
+dddddd 3 ssssssssssX
+ee 411 ddddddddddddddddddddddddddX
+ffff 5111 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjX
+gggggg 678993321 mmmmmmmmmmmmmmmmmmmX
+hhh 7666666 lllllllllllllllllllllllllllllllllllllX
+iiiiii 8765 yyyyyyyyyyyyyyyyyyyyyyyyyyyyX
+jj 987456 pppppppppX
diff --git a/tests/expected/libsmartcols/fromfile-right b/tests/expected/libsmartcols/fromfile-right
new file mode 100644
index 0000000..d78285a
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-right
@@ -0,0 +1,11 @@
+NAME NUM STRINGS
+aaaa 0 qqqqqqqqqqqqqqqqqX
+bbb 100 dddddddddddddX
+ccccc 21 ffffffffffffffffffffffffffffffffffffffffX
+dddddd 3 ssssssssssX
+ee 411 ddddddddddddddddddddddddddX
+ffff 5111 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjX
+gggggg 678993321 mmmmmmmmmmmmmmmmmmmX
+hhh 7666666 lllllllllllllllllllllllllllllllllllllX
+iiiiii 8765 yyyyyyyyyyyyyyyyyyyyyyyyyyyyX
+jj 987456 pppppppppX
diff --git a/tests/expected/libsmartcols/fromfile-right-maxout b/tests/expected/libsmartcols/fromfile-right-maxout
new file mode 100644
index 0000000..3bcb65a
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-right-maxout
@@ -0,0 +1,11 @@
+NAME NUM
+aaaa 0
+bbb 100
+ccccc 21
+dddddd 3
+ee 411
+ffff 5111
+gggggg 678993321
+hhh 7666666
+iiiiii 8765
+jj 987456
diff --git a/tests/expected/libsmartcols/fromfile-strictwidth b/tests/expected/libsmartcols/fromfile-strictwidth
new file mode 100644
index 0000000..41054b2
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-strictwidth
@@ -0,0 +1,11 @@
+NAME STRICT NUM
+aaaa 0 0
+bbb 1 100
+ccccc 2 21
+dddddd 3 3
+ee 4 411
+ffff 5 5111
+gggggg 6 678993321
+hhh 7 7666666
+iiiiii 8 8765
+jj 9 987456
diff --git a/tests/expected/libsmartcols/fromfile-tree b/tests/expected/libsmartcols/fromfile-tree
new file mode 100644
index 0000000..9d345f8
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-tree
@@ -0,0 +1,11 @@
+TREE ID PARENT STRINGS
+aaaa 1 0 qqqqqqqqqqqqqqqqqX
+|-bbb 2 1 dddddddddddddX
+| |-ee 5 2 ddddddddddddddddddddddddddX
+| `-ffff 6 2 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjX
+|-ccccc 3 1 ffffffffffffffffffffffffffffffffffffffffX
+| `-gggggg 7 3 mmmmmmmmmmmmmmmmmmmX
+| |-hhh 8 7 lllllllllllllllllllllllllllllllllllllX
+| | `-iiiiii 9 8 yyyyyyyyyyyyyyyyyyyyyyyyyyyyX
+| `-jj 10 7 pppppppppX
+`-dddddd 4 1 ssssssssssX
diff --git a/tests/expected/libsmartcols/fromfile-tree-end b/tests/expected/libsmartcols/fromfile-tree-end
new file mode 100644
index 0000000..41aebff
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-tree-end
@@ -0,0 +1,11 @@
+ID PARENT STRINGS TREE
+ 1 0 qqqqqqqqqqqqqqqqqX aaaa
+ 2 1 dddddddddddddX |-bbb
+ 5 2 ddddddddddddddddddddddddddX | |-ee
+ 6 2 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjX | `-ffff
+ 3 1 ffffffffffffffffffffffffffffffffffffffffX |-ccccc
+ 7 3 mmmmmmmmmmmmmmmmmmmX | `-gggggg
+ 8 7 lllllllllllllllllllllllllllllllllllllX | |-hhh
+ 9 8 yyyyyyyyyyyyyyyyyyyyyyyyyyyyX | | `-iiiiii
+10 7 pppppppppX | `-jj
+ 4 1 ssssssssssX `-dddddd
diff --git a/tests/expected/libsmartcols/fromfile-tree-json b/tests/expected/libsmartcols/fromfile-tree-json
new file mode 100644
index 0000000..3d65183
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-tree-json
@@ -0,0 +1,70 @@
+{
+ "testtable": [
+ {
+ "tree": "aaaa",
+ "id": "1",
+ "parent": "0",
+ "strings": "qqqqqqqqqqqqqqqqqX",
+ "children": [
+ {
+ "tree": "bbb",
+ "id": "2",
+ "parent": "1",
+ "strings": "dddddddddddddX",
+ "children": [
+ {
+ "tree": "ee",
+ "id": "5",
+ "parent": "2",
+ "strings": "ddddddddddddddddddddddddddX"
+ },{
+ "tree": "ffff",
+ "id": "6",
+ "parent": "2",
+ "strings": "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjX"
+ }
+ ]
+ },{
+ "tree": "ccccc",
+ "id": "3",
+ "parent": "1",
+ "strings": "ffffffffffffffffffffffffffffffffffffffffX",
+ "children": [
+ {
+ "tree": "gggggg",
+ "id": "7",
+ "parent": "3",
+ "strings": "mmmmmmmmmmmmmmmmmmmX",
+ "children": [
+ {
+ "tree": "hhh",
+ "id": "8",
+ "parent": "7",
+ "strings": "lllllllllllllllllllllllllllllllllllllX",
+ "children": [
+ {
+ "tree": "iiiiii",
+ "id": "9",
+ "parent": "8",
+ "strings": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyX"
+ }
+ ]
+ },{
+ "tree": "jj",
+ "id": "10",
+ "parent": "7",
+ "strings": "pppppppppX"
+ }
+ ]
+ }
+ ]
+ },{
+ "tree": "dddddd",
+ "id": "4",
+ "parent": "1",
+ "strings": "ssssssssssX"
+ }
+ ]
+ }
+ ]
+}
diff --git a/tests/expected/libsmartcols/fromfile-tree-middle b/tests/expected/libsmartcols/fromfile-tree-middle
new file mode 100644
index 0000000..b218331
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-tree-middle
@@ -0,0 +1,11 @@
+ID PARENT TREE STRINGS
+ 1 0 aaaa qqqqqqqqqqqqqqqqqX
+ 2 1 |-bbb dddddddddddddX
+ 5 2 | |-ee ddddddddddddddddddddddddddX
+ 6 2 | `-ffff jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjX
+ 3 1 |-ccccc ffffffffffffffffffffffffffffffffffffffffX
+ 7 3 | `-gggggg mmmmmmmmmmmmmmmmmmmX
+ 8 7 | |-hhh lllllllllllllllllllllllllllllllllllllX
+ 9 8 | | `-iiiiii yyyyyyyyyyyyyyyyyyyyyyyyyyyyX
+10 7 | `-jj pppppppppX
+ 4 1 `-dddddd ssssssssssX
diff --git a/tests/expected/libsmartcols/fromfile-trunc b/tests/expected/libsmartcols/fromfile-trunc
new file mode 100644
index 0000000..6a095dc
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-trunc
@@ -0,0 +1,11 @@
+NAME NUM TRUNC
+aaaa 0 qqqqqqqqqqqqqqqqqX
+bbb 100 dddddddddddddX
+ccccc 21 fffffffffffffffffffffff
+dddddd 3 ssssssssssX
+ee 411 ddddddddddddddddddddddd
+ffff 5111 jjjjjjjjjjjjjjjjjjjjjjj
+gggggg 678993321 mmmmmmmmmmmmmmmmmmmX
+hhh 7666666 lllllllllllllllllllllll
+iiiiii 8765 yyyyyyyyyyyyyyyyyyyyyyy
+jj 987456 pppppppppX
diff --git a/tests/expected/libsmartcols/fromfile-wrap b/tests/expected/libsmartcols/fromfile-wrap
new file mode 100644
index 0000000..bb94f49
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-wrap
@@ -0,0 +1,17 @@
+NAME NUM WRAP
+aaaa 0 qqqqqqqqqqqqqqqqqX
+bbb 100 dddddddddddddX
+ccccc 21 fffffffffffffffffffffff
+ fffffffffffffffffX
+dddddd 3 ssssssssssX
+ee 411 ddddddddddddddddddddddd
+ dddX
+ffff 5111 jjjjjjjjjjjjjjjjjjjjjjj
+ jjjjjjjjjjjjjjjjjjjjjjj
+ jjjX
+gggggg 678993321 mmmmmmmmmmmmmmmmmmmX
+hhh 7666666 lllllllllllllllllllllll
+ llllllllllllllX
+iiiiii 8765 yyyyyyyyyyyyyyyyyyyyyyy
+ yyyyyX
+jj 987456 pppppppppX
diff --git a/tests/expected/libsmartcols/fromfile-wrap-tree b/tests/expected/libsmartcols/fromfile-wrap-tree
new file mode 100644
index 0000000..a2db7a4
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-wrap-tree
@@ -0,0 +1,18 @@
+TREE ID PARENT WRAP
+aaaa 1 0 qqqqqqqqqqqqqqqqqX
+|-bbb 2 1 dddddddddddddX
+| |-ee 5 2 dddddddddddddddddddd
+| | ddddddX
+| `-ffff 6 2 jjjjjjjjjjjjjjjjjjjj
+| jjjjjjjjjjjjjjjjjjjj
+| jjjjjjjjjX
+|-ccccc 3 1 ffffffffffffffffffff
+| | ffffffffffffffffffff
+| | X
+| `-gggggg 7 3 mmmmmmmmmmmmmmmmmmmX
+| |-hhh 8 7 llllllllllllllllllll
+| | | lllllllllllllllllX
+| | `-iiiiii 9 8 yyyyyyyyyyyyyyyyyyyy
+| | yyyyyyyyX
+| `-jj 10 7 pppppppppX
+`-dddddd 4 1 ssssssssssX
diff --git a/tests/expected/libsmartcols/fromfile-wrapnl b/tests/expected/libsmartcols/fromfile-wrapnl
new file mode 100644
index 0000000..c747ebb
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-wrapnl
@@ -0,0 +1,19 @@
+NAME NUM WRAPNL
+aaaa 0 aaa
+bbb 100 bbbbb
+ccccc 21 cccc
+ CCCC
+dddddd 3 dddddddd
+ DDDD
+ DD
+ee 411 hello
+ baby
+ffff 5111 aaa
+ bbb
+ ccc
+ ddd
+gggggg 678993321 eee
+hhh 7666666 fffff
+iiiiii 8765 g
+ hhhhh
+jj 987456 ppppppppp
diff --git a/tests/expected/libsmartcols/fromfile-wrapnl-tree b/tests/expected/libsmartcols/fromfile-wrapnl-tree
new file mode 100644
index 0000000..3862cf1
--- /dev/null
+++ b/tests/expected/libsmartcols/fromfile-wrapnl-tree
@@ -0,0 +1,19 @@
+TREE ID PARENT WRAPNL
+aaaa 1 0 aaa
+|-bbb 2 1 bbbbb
+| |-ee 5 2 hello
+| | baby
+| `-ffff 6 2 aaa
+| bbb
+| ccc
+| ddd
+|-ccccc 3 1 cccc
+| | CCCC
+| `-gggggg 7 3 eee
+| |-hhh 8 7 fffff
+| | `-iiiiii 9 8 g
+| | hhhhh
+| `-jj 10 7 ppppppppp
+`-dddddd 4 1 dddddddd
+ DDDD
+ DD
diff --git a/tests/expected/libsmartcols/title b/tests/expected/libsmartcols/title
new file mode 100644
index 0000000..bb5d722
--- /dev/null
+++ b/tests/expected/libsmartcols/title
@@ -0,0 +1,16 @@
+ This is right title
+NAME DATA
+foo bla bla bla
+bar alb alb alb
+This is left title (without padding)
+NAME DATA
+foo bla bla bla
+bar alb alb alb
+=======================This is center title (with padding)======================
+NAME DATA
+foo bla bla bla
+bar alb alb alb
+This is left title (with padding)-----------------------------------------------
+NAME DATA
+foo bla bla bla
+bar alb alb alb
diff --git a/tests/expected/logger/errors-check_socket b/tests/expected/logger/errors-check_socket
new file mode 100644
index 0000000..bf02837
--- /dev/null
+++ b/tests/expected/logger/errors-check_socket
@@ -0,0 +1,41 @@
+Check written socket data of all subtests.
+socket data, kern_priority:
+<8>Feb 13 23:31:30 prio: message
+
+socket data, kern_priority_numeric:
+<8>Feb 13 23:31:30 prio: message
+
+socket data, invalid_prio:
+
+socket data, rfc5424_exceed_size:
+<13>1 2009-02-13T23:31:30.123456+00:00 test-hostname rfc5424_exceed_size - - [timeQuality tzKnown="1" isSynced="0"] abc
+
+socket data, id_with_space:
+
+socket data, id_with_space:
+
+socket data, id_with_space:
+
+socket data, id_with_space:
+<13>Feb 13 23:31:30 id_with_leading space[123]: message
+
+socket data, id_with_space:
+
+socket data, tag_with_space:
+<13>Feb 13 23:31:30 A B: tag_with_space
+
+socket data, tag_with_space:
+<13>1 2009-02-13T23:31:30.123456+00:00 test-hostname A B - - [timeQuality tzKnown="1" isSynced="0"] tag_with_space_rfc5424
+
+socket data, tcp:
+<13>Feb 13 23:31:30 tcp: message
+
+socket data, multi-line:
+<13>Feb 13 23:31:30 multi: AAA
+<13>Feb 13 23:31:30 multi: BBB
+<13>Feb 13 23:31:30 multi: CCC
+
+socket data, rfc5424_msgid_with_space:
+
+socket data, invalid_socket:
+
diff --git a/tests/expected/logger/errors-check_socket.err b/tests/expected/logger/errors-check_socket.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/errors-check_socket.err
diff --git a/tests/expected/logger/errors-id_with_space b/tests/expected/logger/errors-id_with_space
new file mode 100644
index 0000000..3a5a574
--- /dev/null
+++ b/tests/expected/logger/errors-id_with_space
@@ -0,0 +1,5 @@
+ret: 1
+ret: 1
+ret: 1
+ret: 0
+ret: 1
diff --git a/tests/expected/logger/errors-id_with_space.err b/tests/expected/logger/errors-id_with_space.err
new file mode 100644
index 0000000..23a3cbc
--- /dev/null
+++ b/tests/expected/logger/errors-id_with_space.err
@@ -0,0 +1,5 @@
+test_logger: failed to parse id: 'A B'
+test_logger: failed to parse id: 'A B'
+test_logger: failed to parse id: '1 23'
+<13>Feb 13 23:31:30 id_with_leading space[123]: message
+test_logger: failed to parse id: '123 '
diff --git a/tests/expected/logger/errors-invalid_prio b/tests/expected/logger/errors-invalid_prio
new file mode 100644
index 0000000..596150b
--- /dev/null
+++ b/tests/expected/logger/errors-invalid_prio
@@ -0,0 +1 @@
+ret: 1
diff --git a/tests/expected/logger/errors-invalid_prio.err b/tests/expected/logger/errors-invalid_prio.err
new file mode 100644
index 0000000..cf79cf3
--- /dev/null
+++ b/tests/expected/logger/errors-invalid_prio.err
@@ -0,0 +1 @@
+test_logger: unknown priority name: 8
diff --git a/tests/expected/logger/errors-invalid_socket b/tests/expected/logger/errors-invalid_socket
new file mode 100644
index 0000000..596150b
--- /dev/null
+++ b/tests/expected/logger/errors-invalid_socket
@@ -0,0 +1 @@
+ret: 1
diff --git a/tests/expected/logger/errors-invalid_socket.err b/tests/expected/logger/errors-invalid_socket.err
new file mode 100644
index 0000000..4a0421a
--- /dev/null
+++ b/tests/expected/logger/errors-invalid_socket.err
@@ -0,0 +1 @@
+test_logger: socket /bad/boy: No such file or directory
diff --git a/tests/expected/logger/errors-kern_priority b/tests/expected/logger/errors-kern_priority
new file mode 100644
index 0000000..0f2938d
--- /dev/null
+++ b/tests/expected/logger/errors-kern_priority
@@ -0,0 +1 @@
+ret: 0
diff --git a/tests/expected/logger/errors-kern_priority.err b/tests/expected/logger/errors-kern_priority.err
new file mode 100644
index 0000000..6656db0
--- /dev/null
+++ b/tests/expected/logger/errors-kern_priority.err
@@ -0,0 +1 @@
+<8>Feb 13 23:31:30 prio: message
diff --git a/tests/expected/logger/errors-kern_priority_numeric b/tests/expected/logger/errors-kern_priority_numeric
new file mode 100644
index 0000000..0f2938d
--- /dev/null
+++ b/tests/expected/logger/errors-kern_priority_numeric
@@ -0,0 +1 @@
+ret: 0
diff --git a/tests/expected/logger/errors-kern_priority_numeric.err b/tests/expected/logger/errors-kern_priority_numeric.err
new file mode 100644
index 0000000..6656db0
--- /dev/null
+++ b/tests/expected/logger/errors-kern_priority_numeric.err
@@ -0,0 +1 @@
+<8>Feb 13 23:31:30 prio: message
diff --git a/tests/expected/logger/errors-multi-line b/tests/expected/logger/errors-multi-line
new file mode 100644
index 0000000..0f2938d
--- /dev/null
+++ b/tests/expected/logger/errors-multi-line
@@ -0,0 +1 @@
+ret: 0
diff --git a/tests/expected/logger/errors-multi-line.err b/tests/expected/logger/errors-multi-line.err
new file mode 100644
index 0000000..d015bad
--- /dev/null
+++ b/tests/expected/logger/errors-multi-line.err
@@ -0,0 +1,3 @@
+<13>Feb 13 23:31:30 multi: AAA
+<13>Feb 13 23:31:30 multi: BBB
+<13>Feb 13 23:31:30 multi: CCC
diff --git a/tests/expected/logger/errors-rfc5424_exceed_size b/tests/expected/logger/errors-rfc5424_exceed_size
new file mode 100644
index 0000000..0f2938d
--- /dev/null
+++ b/tests/expected/logger/errors-rfc5424_exceed_size
@@ -0,0 +1 @@
+ret: 0
diff --git a/tests/expected/logger/errors-rfc5424_exceed_size.err b/tests/expected/logger/errors-rfc5424_exceed_size.err
new file mode 100644
index 0000000..91f69b6
--- /dev/null
+++ b/tests/expected/logger/errors-rfc5424_exceed_size.err
@@ -0,0 +1 @@
+<13>1 2009-02-13T23:31:30.123456+00:00 test-hostname rfc5424_exceed_size - - [timeQuality tzKnown="1" isSynced="0"] abc
diff --git a/tests/expected/logger/errors-rfc5424_msgid_with_space b/tests/expected/logger/errors-rfc5424_msgid_with_space
new file mode 100644
index 0000000..596150b
--- /dev/null
+++ b/tests/expected/logger/errors-rfc5424_msgid_with_space
@@ -0,0 +1 @@
+ret: 1
diff --git a/tests/expected/logger/errors-rfc5424_msgid_with_space.err b/tests/expected/logger/errors-rfc5424_msgid_with_space.err
new file mode 100644
index 0000000..273bc9b
--- /dev/null
+++ b/tests/expected/logger/errors-rfc5424_msgid_with_space.err
@@ -0,0 +1 @@
+test_logger: --msgid cannot contain space
diff --git a/tests/expected/logger/errors-tag_with_space b/tests/expected/logger/errors-tag_with_space
new file mode 100644
index 0000000..794fe34
--- /dev/null
+++ b/tests/expected/logger/errors-tag_with_space
@@ -0,0 +1,2 @@
+ret: 0
+ret: 0
diff --git a/tests/expected/logger/errors-tag_with_space.err b/tests/expected/logger/errors-tag_with_space.err
new file mode 100644
index 0000000..9821d82
--- /dev/null
+++ b/tests/expected/logger/errors-tag_with_space.err
@@ -0,0 +1,2 @@
+<13>Feb 13 23:31:30 A B: tag_with_space
+<13>1 2009-02-13T23:31:30.123456+00:00 test-hostname A B - - [timeQuality tzKnown="1" isSynced="0"] tag_with_space_rfc5424
diff --git a/tests/expected/logger/errors-tcp b/tests/expected/logger/errors-tcp
new file mode 100644
index 0000000..0f2938d
--- /dev/null
+++ b/tests/expected/logger/errors-tcp
@@ -0,0 +1 @@
+ret: 0
diff --git a/tests/expected/logger/errors-tcp.err b/tests/expected/logger/errors-tcp.err
new file mode 100644
index 0000000..4f77de3
--- /dev/null
+++ b/tests/expected/logger/errors-tcp.err
@@ -0,0 +1 @@
+<13>Feb 13 23:31:30 tcp: message
diff --git a/tests/expected/logger/formats-check_socket b/tests/expected/logger/formats-check_socket
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/formats-check_socket
diff --git a/tests/expected/logger/formats-check_socket.err b/tests/expected/logger/formats-check_socket.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/formats-check_socket.err
diff --git a/tests/expected/logger/formats-octet_counting b/tests/expected/logger/formats-octet_counting
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/formats-octet_counting
diff --git a/tests/expected/logger/formats-octet_counting.err b/tests/expected/logger/formats-octet_counting.err
new file mode 100644
index 0000000..6b18824
--- /dev/null
+++ b/tests/expected/logger/formats-octet_counting.err
@@ -0,0 +1,2 @@
+34 <13>Feb 13 23:31:30 octen: message
+ret: 0
diff --git a/tests/expected/logger/formats-priorities b/tests/expected/logger/formats-priorities
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/formats-priorities
diff --git a/tests/expected/logger/formats-priorities.err b/tests/expected/logger/formats-priorities.err
new file mode 100644
index 0000000..462e90f
--- /dev/null
+++ b/tests/expected/logger/formats-priorities.err
@@ -0,0 +1,304 @@
+<32>Feb 13 23:31:30 prio: auth.emerg
+ret: 0
+<33>Feb 13 23:31:30 prio: auth.alert
+ret: 0
+<34>Feb 13 23:31:30 prio: auth.crit
+ret: 0
+<35>Feb 13 23:31:30 prio: auth.err
+ret: 0
+<36>Feb 13 23:31:30 prio: auth.warning
+ret: 0
+<37>Feb 13 23:31:30 prio: auth.notice
+ret: 0
+<38>Feb 13 23:31:30 prio: auth.info
+ret: 0
+<39>Feb 13 23:31:30 prio: auth.debug
+ret: 0
+<80>Feb 13 23:31:30 prio: authpriv.emerg
+ret: 0
+<81>Feb 13 23:31:30 prio: authpriv.alert
+ret: 0
+<82>Feb 13 23:31:30 prio: authpriv.crit
+ret: 0
+<83>Feb 13 23:31:30 prio: authpriv.err
+ret: 0
+<84>Feb 13 23:31:30 prio: authpriv.warning
+ret: 0
+<85>Feb 13 23:31:30 prio: authpriv.notice
+ret: 0
+<86>Feb 13 23:31:30 prio: authpriv.info
+ret: 0
+<87>Feb 13 23:31:30 prio: authpriv.debug
+ret: 0
+<72>Feb 13 23:31:30 prio: cron.emerg
+ret: 0
+<73>Feb 13 23:31:30 prio: cron.alert
+ret: 0
+<74>Feb 13 23:31:30 prio: cron.crit
+ret: 0
+<75>Feb 13 23:31:30 prio: cron.err
+ret: 0
+<76>Feb 13 23:31:30 prio: cron.warning
+ret: 0
+<77>Feb 13 23:31:30 prio: cron.notice
+ret: 0
+<78>Feb 13 23:31:30 prio: cron.info
+ret: 0
+<79>Feb 13 23:31:30 prio: cron.debug
+ret: 0
+<24>Feb 13 23:31:30 prio: daemon.emerg
+ret: 0
+<25>Feb 13 23:31:30 prio: daemon.alert
+ret: 0
+<26>Feb 13 23:31:30 prio: daemon.crit
+ret: 0
+<27>Feb 13 23:31:30 prio: daemon.err
+ret: 0
+<28>Feb 13 23:31:30 prio: daemon.warning
+ret: 0
+<29>Feb 13 23:31:30 prio: daemon.notice
+ret: 0
+<30>Feb 13 23:31:30 prio: daemon.info
+ret: 0
+<31>Feb 13 23:31:30 prio: daemon.debug
+ret: 0
+<88>Feb 13 23:31:30 prio: ftp.emerg
+ret: 0
+<89>Feb 13 23:31:30 prio: ftp.alert
+ret: 0
+<90>Feb 13 23:31:30 prio: ftp.crit
+ret: 0
+<91>Feb 13 23:31:30 prio: ftp.err
+ret: 0
+<92>Feb 13 23:31:30 prio: ftp.warning
+ret: 0
+<93>Feb 13 23:31:30 prio: ftp.notice
+ret: 0
+<94>Feb 13 23:31:30 prio: ftp.info
+ret: 0
+<95>Feb 13 23:31:30 prio: ftp.debug
+ret: 0
+<48>Feb 13 23:31:30 prio: lpr.emerg
+ret: 0
+<49>Feb 13 23:31:30 prio: lpr.alert
+ret: 0
+<50>Feb 13 23:31:30 prio: lpr.crit
+ret: 0
+<51>Feb 13 23:31:30 prio: lpr.err
+ret: 0
+<52>Feb 13 23:31:30 prio: lpr.warning
+ret: 0
+<53>Feb 13 23:31:30 prio: lpr.notice
+ret: 0
+<54>Feb 13 23:31:30 prio: lpr.info
+ret: 0
+<55>Feb 13 23:31:30 prio: lpr.debug
+ret: 0
+<16>Feb 13 23:31:30 prio: mail.emerg
+ret: 0
+<17>Feb 13 23:31:30 prio: mail.alert
+ret: 0
+<18>Feb 13 23:31:30 prio: mail.crit
+ret: 0
+<19>Feb 13 23:31:30 prio: mail.err
+ret: 0
+<20>Feb 13 23:31:30 prio: mail.warning
+ret: 0
+<21>Feb 13 23:31:30 prio: mail.notice
+ret: 0
+<22>Feb 13 23:31:30 prio: mail.info
+ret: 0
+<23>Feb 13 23:31:30 prio: mail.debug
+ret: 0
+<56>Feb 13 23:31:30 prio: news.emerg
+ret: 0
+<57>Feb 13 23:31:30 prio: news.alert
+ret: 0
+<58>Feb 13 23:31:30 prio: news.crit
+ret: 0
+<59>Feb 13 23:31:30 prio: news.err
+ret: 0
+<60>Feb 13 23:31:30 prio: news.warning
+ret: 0
+<61>Feb 13 23:31:30 prio: news.notice
+ret: 0
+<62>Feb 13 23:31:30 prio: news.info
+ret: 0
+<63>Feb 13 23:31:30 prio: news.debug
+ret: 0
+<40>Feb 13 23:31:30 prio: syslog.emerg
+ret: 0
+<41>Feb 13 23:31:30 prio: syslog.alert
+ret: 0
+<42>Feb 13 23:31:30 prio: syslog.crit
+ret: 0
+<43>Feb 13 23:31:30 prio: syslog.err
+ret: 0
+<44>Feb 13 23:31:30 prio: syslog.warning
+ret: 0
+<45>Feb 13 23:31:30 prio: syslog.notice
+ret: 0
+<46>Feb 13 23:31:30 prio: syslog.info
+ret: 0
+<47>Feb 13 23:31:30 prio: syslog.debug
+ret: 0
+<8>Feb 13 23:31:30 prio: user.emerg
+ret: 0
+<9>Feb 13 23:31:30 prio: user.alert
+ret: 0
+<10>Feb 13 23:31:30 prio: user.crit
+ret: 0
+<11>Feb 13 23:31:30 prio: user.err
+ret: 0
+<12>Feb 13 23:31:30 prio: user.warning
+ret: 0
+<13>Feb 13 23:31:30 prio: user.notice
+ret: 0
+<14>Feb 13 23:31:30 prio: user.info
+ret: 0
+<15>Feb 13 23:31:30 prio: user.debug
+ret: 0
+<64>Feb 13 23:31:30 prio: uucp.emerg
+ret: 0
+<65>Feb 13 23:31:30 prio: uucp.alert
+ret: 0
+<66>Feb 13 23:31:30 prio: uucp.crit
+ret: 0
+<67>Feb 13 23:31:30 prio: uucp.err
+ret: 0
+<68>Feb 13 23:31:30 prio: uucp.warning
+ret: 0
+<69>Feb 13 23:31:30 prio: uucp.notice
+ret: 0
+<70>Feb 13 23:31:30 prio: uucp.info
+ret: 0
+<71>Feb 13 23:31:30 prio: uucp.debug
+ret: 0
+<128>Feb 13 23:31:30 prio: local0.emerg
+ret: 0
+<129>Feb 13 23:31:30 prio: local0.alert
+ret: 0
+<130>Feb 13 23:31:30 prio: local0.crit
+ret: 0
+<131>Feb 13 23:31:30 prio: local0.err
+ret: 0
+<132>Feb 13 23:31:30 prio: local0.warning
+ret: 0
+<133>Feb 13 23:31:30 prio: local0.notice
+ret: 0
+<134>Feb 13 23:31:30 prio: local0.info
+ret: 0
+<135>Feb 13 23:31:30 prio: local0.debug
+ret: 0
+<136>Feb 13 23:31:30 prio: local1.emerg
+ret: 0
+<137>Feb 13 23:31:30 prio: local1.alert
+ret: 0
+<138>Feb 13 23:31:30 prio: local1.crit
+ret: 0
+<139>Feb 13 23:31:30 prio: local1.err
+ret: 0
+<140>Feb 13 23:31:30 prio: local1.warning
+ret: 0
+<141>Feb 13 23:31:30 prio: local1.notice
+ret: 0
+<142>Feb 13 23:31:30 prio: local1.info
+ret: 0
+<143>Feb 13 23:31:30 prio: local1.debug
+ret: 0
+<144>Feb 13 23:31:30 prio: local2.emerg
+ret: 0
+<145>Feb 13 23:31:30 prio: local2.alert
+ret: 0
+<146>Feb 13 23:31:30 prio: local2.crit
+ret: 0
+<147>Feb 13 23:31:30 prio: local2.err
+ret: 0
+<148>Feb 13 23:31:30 prio: local2.warning
+ret: 0
+<149>Feb 13 23:31:30 prio: local2.notice
+ret: 0
+<150>Feb 13 23:31:30 prio: local2.info
+ret: 0
+<151>Feb 13 23:31:30 prio: local2.debug
+ret: 0
+<152>Feb 13 23:31:30 prio: local3.emerg
+ret: 0
+<153>Feb 13 23:31:30 prio: local3.alert
+ret: 0
+<154>Feb 13 23:31:30 prio: local3.crit
+ret: 0
+<155>Feb 13 23:31:30 prio: local3.err
+ret: 0
+<156>Feb 13 23:31:30 prio: local3.warning
+ret: 0
+<157>Feb 13 23:31:30 prio: local3.notice
+ret: 0
+<158>Feb 13 23:31:30 prio: local3.info
+ret: 0
+<159>Feb 13 23:31:30 prio: local3.debug
+ret: 0
+<160>Feb 13 23:31:30 prio: local4.emerg
+ret: 0
+<161>Feb 13 23:31:30 prio: local4.alert
+ret: 0
+<162>Feb 13 23:31:30 prio: local4.crit
+ret: 0
+<163>Feb 13 23:31:30 prio: local4.err
+ret: 0
+<164>Feb 13 23:31:30 prio: local4.warning
+ret: 0
+<165>Feb 13 23:31:30 prio: local4.notice
+ret: 0
+<166>Feb 13 23:31:30 prio: local4.info
+ret: 0
+<167>Feb 13 23:31:30 prio: local4.debug
+ret: 0
+<168>Feb 13 23:31:30 prio: local5.emerg
+ret: 0
+<169>Feb 13 23:31:30 prio: local5.alert
+ret: 0
+<170>Feb 13 23:31:30 prio: local5.crit
+ret: 0
+<171>Feb 13 23:31:30 prio: local5.err
+ret: 0
+<172>Feb 13 23:31:30 prio: local5.warning
+ret: 0
+<173>Feb 13 23:31:30 prio: local5.notice
+ret: 0
+<174>Feb 13 23:31:30 prio: local5.info
+ret: 0
+<175>Feb 13 23:31:30 prio: local5.debug
+ret: 0
+<176>Feb 13 23:31:30 prio: local6.emerg
+ret: 0
+<177>Feb 13 23:31:30 prio: local6.alert
+ret: 0
+<178>Feb 13 23:31:30 prio: local6.crit
+ret: 0
+<179>Feb 13 23:31:30 prio: local6.err
+ret: 0
+<180>Feb 13 23:31:30 prio: local6.warning
+ret: 0
+<181>Feb 13 23:31:30 prio: local6.notice
+ret: 0
+<182>Feb 13 23:31:30 prio: local6.info
+ret: 0
+<183>Feb 13 23:31:30 prio: local6.debug
+ret: 0
+<184>Feb 13 23:31:30 prio: local7.emerg
+ret: 0
+<185>Feb 13 23:31:30 prio: local7.alert
+ret: 0
+<186>Feb 13 23:31:30 prio: local7.crit
+ret: 0
+<187>Feb 13 23:31:30 prio: local7.err
+ret: 0
+<188>Feb 13 23:31:30 prio: local7.warning
+ret: 0
+<189>Feb 13 23:31:30 prio: local7.notice
+ret: 0
+<190>Feb 13 23:31:30 prio: local7.info
+ret: 0
+<191>Feb 13 23:31:30 prio: local7.debug
+ret: 0
diff --git a/tests/expected/logger/formats-rfc3164 b/tests/expected/logger/formats-rfc3164
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/formats-rfc3164
diff --git a/tests/expected/logger/formats-rfc3164.err b/tests/expected/logger/formats-rfc3164.err
new file mode 100644
index 0000000..2ab9fd5
--- /dev/null
+++ b/tests/expected/logger/formats-rfc3164.err
@@ -0,0 +1,2 @@
+<13>Feb 13 23:31:30 test-hostname rfc3164: message
+ret: 0
diff --git a/tests/expected/logger/formats-rfc5424_msgid b/tests/expected/logger/formats-rfc5424_msgid
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/formats-rfc5424_msgid
diff --git a/tests/expected/logger/formats-rfc5424_msgid.err b/tests/expected/logger/formats-rfc5424_msgid.err
new file mode 100644
index 0000000..755e97b
--- /dev/null
+++ b/tests/expected/logger/formats-rfc5424_msgid.err
@@ -0,0 +1,2 @@
+<13>1 2009-02-13T23:31:30.123456+00:00 test-hostname rfc5424 - MSGID [timeQuality tzKnown="1" isSynced="0"] message
+ret: 0
diff --git a/tests/expected/logger/formats-rfc5424_nohost b/tests/expected/logger/formats-rfc5424_nohost
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/formats-rfc5424_nohost
diff --git a/tests/expected/logger/formats-rfc5424_nohost.err b/tests/expected/logger/formats-rfc5424_nohost.err
new file mode 100644
index 0000000..30ed025
--- /dev/null
+++ b/tests/expected/logger/formats-rfc5424_nohost.err
@@ -0,0 +1,2 @@
+<13>1 2009-02-13T23:31:30.123456+00:00 - rfc5424 - - [timeQuality tzKnown="1" isSynced="0"] message
+ret: 0
diff --git a/tests/expected/logger/formats-rfc5424_notime b/tests/expected/logger/formats-rfc5424_notime
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/formats-rfc5424_notime
diff --git a/tests/expected/logger/formats-rfc5424_notime.err b/tests/expected/logger/formats-rfc5424_notime.err
new file mode 100644
index 0000000..d9c96f3
--- /dev/null
+++ b/tests/expected/logger/formats-rfc5424_notime.err
@@ -0,0 +1,2 @@
+<13>1 - test-hostname rfc5424 - - - message
+ret: 0
diff --git a/tests/expected/logger/formats-rfc5424_simple b/tests/expected/logger/formats-rfc5424_simple
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/formats-rfc5424_simple
diff --git a/tests/expected/logger/formats-rfc5424_simple.err b/tests/expected/logger/formats-rfc5424_simple.err
new file mode 100644
index 0000000..90e5a34
--- /dev/null
+++ b/tests/expected/logger/formats-rfc5424_simple.err
@@ -0,0 +1,2 @@
+<13>1 2009-02-13T23:31:30.123456+00:00 test-hostname rfc5424 - - [timeQuality tzKnown="1" isSynced="0"] message
+ret: 0
diff --git a/tests/expected/logger/input_empty_line b/tests/expected/logger/input_empty_line
new file mode 100644
index 0000000..78578ae
--- /dev/null
+++ b/tests/expected/logger/input_empty_line
@@ -0,0 +1,3 @@
+a1 a2 a3 a4 a5 b1 b2 b3 b4 b5 c1 c2 c3 c4 c5
+
+5{c..1} 4{c..1} 3{c..1} 2{c..1} 1{c..1}
diff --git a/tests/expected/logger/input_prio_prefix b/tests/expected/logger/input_prio_prefix
new file mode 100644
index 0000000..25a5f54
--- /dev/null
+++ b/tests/expected/logger/input_prio_prefix
@@ -0,0 +1 @@
+<66> prio_prefix
diff --git a/tests/expected/logger/input_simple b/tests/expected/logger/input_simple
new file mode 100644
index 0000000..9e5c66d
--- /dev/null
+++ b/tests/expected/logger/input_simple
@@ -0,0 +1 @@
+a1 a2 a3 a4 a5 b1 b2 b3 b4 b5 c1 c2 c3 c4 c5
diff --git a/tests/expected/logger/journald b/tests/expected/logger/journald
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/journald
diff --git a/tests/expected/logger/journald.err b/tests/expected/logger/journald.err
new file mode 100644
index 0000000..354628d
--- /dev/null
+++ b/tests/expected/logger/journald.err
@@ -0,0 +1,3 @@
+MESSAGE_ID=b8f74e14bc714bfc8040a5106dc9376a
+MESSAGE=a b c 1 2 3
+ret: 0
diff --git a/tests/expected/logger/options-check_socket b/tests/expected/logger/options-check_socket
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-check_socket
diff --git a/tests/expected/logger/options-check_socket.err b/tests/expected/logger/options-check_socket.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-check_socket.err
diff --git a/tests/expected/logger/options-input_file_empty_line b/tests/expected/logger/options-input_file_empty_line
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-input_file_empty_line
diff --git a/tests/expected/logger/options-input_file_empty_line.err b/tests/expected/logger/options-input_file_empty_line.err
new file mode 100644
index 0000000..d276e3c
--- /dev/null
+++ b/tests/expected/logger/options-input_file_empty_line.err
@@ -0,0 +1,4 @@
+<13>Feb 13 23:31:30 test_tag: a1 a2 a3 a4 a5 b1 b2 b3 b4 b5 c1 c2 c3 c4 c5
+<13>Feb 13 23:31:30 test_tag:
+<13>Feb 13 23:31:30 test_tag: 5{c..1} 4{c..1} 3{c..1} 2{c..1} 1{c..1}
+ret: 0
diff --git a/tests/expected/logger/options-input_file_prio_prefix b/tests/expected/logger/options-input_file_prio_prefix
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-input_file_prio_prefix
diff --git a/tests/expected/logger/options-input_file_prio_prefix.err b/tests/expected/logger/options-input_file_prio_prefix.err
new file mode 100644
index 0000000..df69bb9
--- /dev/null
+++ b/tests/expected/logger/options-input_file_prio_prefix.err
@@ -0,0 +1,2 @@
+<66>Feb 13 23:31:30 test_tag: prio_prefix
+ret: 0
diff --git a/tests/expected/logger/options-input_file_simple b/tests/expected/logger/options-input_file_simple
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-input_file_simple
diff --git a/tests/expected/logger/options-input_file_simple.err b/tests/expected/logger/options-input_file_simple.err
new file mode 100644
index 0000000..d855247
--- /dev/null
+++ b/tests/expected/logger/options-input_file_simple.err
@@ -0,0 +1,2 @@
+<13>Feb 13 23:31:30 test_tag: a1 a2 a3 a4 a5 b1 b2 b3 b4 b5 c1 c2 c3 c4 c5
+ret: 0
diff --git a/tests/expected/logger/options-input_file_skip_empty b/tests/expected/logger/options-input_file_skip_empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-input_file_skip_empty
diff --git a/tests/expected/logger/options-input_file_skip_empty.err b/tests/expected/logger/options-input_file_skip_empty.err
new file mode 100644
index 0000000..277c186
--- /dev/null
+++ b/tests/expected/logger/options-input_file_skip_empty.err
@@ -0,0 +1,3 @@
+<13>Feb 13 23:31:30 test_tag: a1 a2 a3 a4 a5 b1 b2 b3 b4 b5 c1 c2 c3 c4 c5
+<13>Feb 13 23:31:30 test_tag: 5{c..1} 4{c..1} 3{c..1} 2{c..1} 1{c..1}
+ret: 0
diff --git a/tests/expected/logger/options-log_pid b/tests/expected/logger/options-log_pid
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-log_pid
diff --git a/tests/expected/logger/options-log_pid.err b/tests/expected/logger/options-log_pid.err
new file mode 100644
index 0000000..47a0147
--- /dev/null
+++ b/tests/expected/logger/options-log_pid.err
@@ -0,0 +1,2 @@
+<13>Feb 13 23:31:30 test_tag[98765]: test
+ret: 0
diff --git a/tests/expected/logger/options-log_pid_define b/tests/expected/logger/options-log_pid_define
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-log_pid_define
diff --git a/tests/expected/logger/options-log_pid_define.err b/tests/expected/logger/options-log_pid_define.err
new file mode 100644
index 0000000..e47b875
--- /dev/null
+++ b/tests/expected/logger/options-log_pid_define.err
@@ -0,0 +1,2 @@
+<13>Feb 13 23:31:30 test_tag[12345]: test
+ret: 0
diff --git a/tests/expected/logger/options-log_pid_long b/tests/expected/logger/options-log_pid_long
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-log_pid_long
diff --git a/tests/expected/logger/options-log_pid_long.err b/tests/expected/logger/options-log_pid_long.err
new file mode 100644
index 0000000..47a0147
--- /dev/null
+++ b/tests/expected/logger/options-log_pid_long.err
@@ -0,0 +1,2 @@
+<13>Feb 13 23:31:30 test_tag[98765]: test
+ret: 0
diff --git a/tests/expected/logger/options-log_pid_no_arg b/tests/expected/logger/options-log_pid_no_arg
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-log_pid_no_arg
diff --git a/tests/expected/logger/options-log_pid_no_arg.err b/tests/expected/logger/options-log_pid_no_arg.err
new file mode 100644
index 0000000..47a0147
--- /dev/null
+++ b/tests/expected/logger/options-log_pid_no_arg.err
@@ -0,0 +1,2 @@
+<13>Feb 13 23:31:30 test_tag[98765]: test
+ret: 0
diff --git a/tests/expected/logger/options-simple b/tests/expected/logger/options-simple
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options-simple
diff --git a/tests/expected/logger/options-simple.err b/tests/expected/logger/options-simple.err
new file mode 100644
index 0000000..2fa18e0
--- /dev/null
+++ b/tests/expected/logger/options-simple.err
@@ -0,0 +1,2 @@
+<13>Feb 13 23:31:30 test_tag: test
+ret: 0
diff --git a/tests/expected/logger/options.err b/tests/expected/logger/options.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/logger/options.err
diff --git a/tests/expected/login/islocal b/tests/expected/login/islocal
new file mode 100644
index 0000000..c5d43ff
--- /dev/null
+++ b/tests/expected/login/islocal
@@ -0,0 +1,13 @@
+1:root
+1:nobody
+0:
+0:youngman
+0:youngman2
+0:abcdefghx
+0:nobo
+1:long
+0:rot
+1:al
+0:malformed
+1:nonl
+0:znobody
diff --git a/tests/expected/login/logindefs b/tests/expected/login/logindefs
new file mode 100644
index 0000000..aca2a1f
--- /dev/null
+++ b/tests/expected/login/logindefs
@@ -0,0 +1,14 @@
+logindefs.data: $END: 'the is end'
+logindefs.data: $EMPTY: '(null)'
+logindefs.data: $CRAZY3: 'FoooBaaar'
+logindefs.data: $CRAZY2: 'fooBar'
+logindefs.data: $CRAZY1: 'this is crazy format'
+logindefs.data: $BOOLEAN: 'yEs'
+logindefs.data: $NUMBER: '123456'
+logindefs.data: $STRING: 'this_is_string'
+logindefs.data: $HELLO_WORLD: 'hello world!'
+$STRING: 'this_is_string'
+$NUMBER: '123456'
+$BOOLEAN: 'Y'
+$EMPTY: ''
+$UNKNOWN: 'DEFAULT'
diff --git a/tests/expected/look/separator b/tests/expected/look/separator
new file mode 100644
index 0000000..8c19d03
--- /dev/null
+++ b/tests/expected/look/separator
@@ -0,0 +1 @@
+apple-pie
diff --git a/tests/expected/losetup/losetup-blkdev-offset b/tests/expected/losetup/losetup-blkdev-offset
new file mode 100644
index 0000000..7b37b6f
--- /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 0000000..b480d66
--- /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-show b/tests/expected/losetup/losetup-blkdev-show
new file mode 100644
index 0000000..2afc151
--- /dev/null
+++ b/tests/expected/losetup/losetup-blkdev-show
@@ -0,0 +1,3 @@
+offset: 0
+sizelimit: 0
+size: 11534336
diff --git a/tests/expected/losetup/losetup-blkdev-sizelimit b/tests/expected/losetup/losetup-blkdev-sizelimit
new file mode 100644
index 0000000..d220d48
--- /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-offset b/tests/expected/losetup/losetup-file-offset
new file mode 100644
index 0000000..b416f8e
--- /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 0000000..b480d66
--- /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 0000000..b480d66
--- /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-show b/tests/expected/losetup/losetup-file-show
new file mode 100644
index 0000000..09d1147
--- /dev/null
+++ b/tests/expected/losetup/losetup-file-show
@@ -0,0 +1,3 @@
+offset: 0
+sizelimit: 0
+size: 10485760
diff --git a/tests/expected/losetup/losetup-file-sizelimit b/tests/expected/losetup/losetup-file-sizelimit
new file mode 100644
index 0000000..d220d48
--- /dev/null
+++ b/tests/expected/losetup/losetup-file-sizelimit
@@ -0,0 +1,3 @@
+offset: 0
+sizelimit: 3145728
+size: 3145728
diff --git a/tests/expected/losetup/losetup-loop b/tests/expected/losetup/losetup-loop
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/losetup/losetup-loop-find-conflict b/tests/expected/losetup/losetup-loop-find-conflict
new file mode 100644
index 0000000..6fd668b
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-find-conflict
@@ -0,0 +1,3 @@
+Failed to create loop device
+different
+Success
diff --git a/tests/expected/losetup/losetup-loop-find-conflict-no-sizelimit b/tests/expected/losetup/losetup-loop-find-conflict-no-sizelimit
new file mode 100644
index 0000000..6fd668b
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-find-conflict-no-sizelimit
@@ -0,0 +1,3 @@
+Failed to create loop device
+different
+Success
diff --git a/tests/expected/losetup/losetup-loop-find-conflict-readonly b/tests/expected/losetup/losetup-loop-find-conflict-readonly
new file mode 100644
index 0000000..6fd668b
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-find-conflict-readonly
@@ -0,0 +1,3 @@
+Failed to create loop device
+different
+Success
diff --git a/tests/expected/losetup/losetup-loop-find-no-re-use b/tests/expected/losetup/losetup-loop-find-no-re-use
new file mode 100644
index 0000000..3acb7f8
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-find-no-re-use
@@ -0,0 +1,2 @@
+different
+Success
diff --git a/tests/expected/losetup/losetup-loop-find-ok-no-sizelimit b/tests/expected/losetup/losetup-loop-find-ok-no-sizelimit
new file mode 100644
index 0000000..3acb7f8
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-find-ok-no-sizelimit
@@ -0,0 +1,2 @@
+different
+Success
diff --git a/tests/expected/losetup/losetup-loop-find-race-condition b/tests/expected/losetup/losetup-loop-find-race-condition
new file mode 100644
index 0000000..6533079
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-find-race-condition
@@ -0,0 +1,2 @@
+0
+Success
diff --git a/tests/expected/losetup/losetup-loop-find-re-use b/tests/expected/losetup/losetup-loop-find-re-use
new file mode 100644
index 0000000..f58a43c
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-find-re-use
@@ -0,0 +1,2 @@
+equal
+Success
diff --git a/tests/expected/losetup/losetup-loop-plain-conflict b/tests/expected/losetup/losetup-loop-plain-conflict
new file mode 100644
index 0000000..3c8cd8f
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-plain-conflict
@@ -0,0 +1,2 @@
+1
+Success
diff --git a/tests/expected/losetup/losetup-loop-plain-re-use b/tests/expected/losetup/losetup-loop-plain-re-use
new file mode 100644
index 0000000..6533079
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-plain-re-use
@@ -0,0 +1,2 @@
+0
+Success
diff --git a/tests/expected/losetup/losetup-loop-plain-readonly b/tests/expected/losetup/losetup-loop-plain-readonly
new file mode 100644
index 0000000..3c8cd8f
--- /dev/null
+++ b/tests/expected/losetup/losetup-loop-plain-readonly
@@ -0,0 +1,2 @@
+1
+Success
diff --git a/tests/expected/lsblk/lsblk-simple-lvm-basic b/tests/expected/lsblk/lsblk-simple-lvm-basic
new file mode 100644
index 0000000..0413be7
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-lvm-basic
@@ -0,0 +1,22 @@
+NAME KNAME MAJ:MIN RM SIZE TYPE MOUNTPOINT
+loop0 loop0 7:0 0 10M loop
+`-vg_foo.4059-lv_foo.4059 dm-0 253:0 0 32M lvm
+loop1 loop1 7:1 0 10M loop
+`-vg_foo.4059-lv_foo.4059 dm-0 253:0 0 32M lvm
+loop2 loop2 7:2 0 10M loop
+`-vg_foo.4059-lv_foo.4059 dm-0 253:0 0 32M lvm
+loop3 loop3 7:3 0 10M loop
+`-vg_foo.4059-lv_foo.4059 dm-0 253:0 0 32M lvm
+sda sda 8:0 0 223.6G disk
+|-sda1 sda1 8:1 0 200M part /boot/efi
+|-sda2 sda2 8:2 0 200M part /boot
+|-sda3 sda3 8:3 0 130.3G part
+|-sda4 sda4 8:4 0 50G part /
+|-sda5 sda5 8:5 0 35.1G part
+`-sda6 sda6 8:6 0 7.8G part
+sdb sdb 8:16 0 74.5G disk
+`-sdb1 sdb1 8:17 0 74.5G part /home/archive
+nvme0n1 nvme0n1 259:0 0 223.6G disk
+|-nvme0n1p1 nvme0n1p1 259:1 0 7.8G part
+|-nvme0n1p2 nvme0n1p2 259:2 0 200G part /home
+`-nvme0n1p3 nvme0n1p3 259:3 0 15.8G part /home/test
diff --git a/tests/expected/lsblk/lsblk-simple-lvm-discard b/tests/expected/lsblk/lsblk-simple-lvm-discard
new file mode 100644
index 0000000..4eb6763
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-lvm-discard
@@ -0,0 +1,22 @@
+NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
+loop0 0 4K 4G 0
+`-vg_foo.4059-lv_foo.4059 0 4K 4G 0
+loop1 0 4K 4G 0
+`-vg_foo.4059-lv_foo.4059 0 4K 4G 0
+loop2 0 4K 4G 0
+`-vg_foo.4059-lv_foo.4059 0 4K 4G 0
+loop3 0 4K 4G 0
+`-vg_foo.4059-lv_foo.4059 0 4K 4G 0
+sda 0 512B 2G 0
+|-sda1 0 512B 2G 0
+|-sda2 0 512B 2G 0
+|-sda3 0 512B 2G 0
+|-sda4 0 512B 2G 0
+|-sda5 0 512B 2G 0
+`-sda6 0 512B 2G 0
+sdb 0 0B 0B 0
+`-sdb1 0 0B 0B 0
+nvme0n1 0 512B 2T 0
+|-nvme0n1p1 0 512B 2T 0
+|-nvme0n1p2 0 512B 2T 0
+`-nvme0n1p3 0 512B 2T 0
diff --git a/tests/expected/lsblk/lsblk-simple-lvm-rw b/tests/expected/lsblk/lsblk-simple-lvm-rw
new file mode 100644
index 0000000..8dcf580
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-lvm-rw
@@ -0,0 +1,22 @@
+NAME RA WSAME
+loop0 128 0B
+`-vg_foo.4059-lv_foo.4059 128 0B
+loop1 128 0B
+`-vg_foo.4059-lv_foo.4059 128 0B
+loop2 128 0B
+`-vg_foo.4059-lv_foo.4059 128 0B
+loop3 128 0B
+`-vg_foo.4059-lv_foo.4059 128 0B
+sda 128 0B
+|-sda1 128 0B
+|-sda2 128 0B
+|-sda3 128 0B
+|-sda4 128 0B
+|-sda5 128 0B
+`-sda6 128 0B
+sdb 128 0B
+`-sdb1 128 0B
+nvme0n1 128 0B
+|-nvme0n1p1 128 0B
+|-nvme0n1p2 128 0B
+`-nvme0n1p3 128 0B
diff --git a/tests/expected/lsblk/lsblk-simple-lvm-state b/tests/expected/lsblk/lsblk-simple-lvm-state
new file mode 100644
index 0000000..000ed44
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-lvm-state
@@ -0,0 +1,22 @@
+NAME RO RM HOTPLUG RAND STATE ROTA TYPE PKNAME SCHED
+loop0 0 0 0 0 1 loop mq-deadline
+`-vg_foo.4059-lv_foo.4059 0 0 0 0 running 1 lvm loop0
+loop1 0 0 0 0 1 loop mq-deadline
+`-vg_foo.4059-lv_foo.4059 0 0 0 0 running 1 lvm loop1
+loop2 0 0 0 0 1 loop mq-deadline
+`-vg_foo.4059-lv_foo.4059 0 0 0 0 running 1 lvm loop2
+loop3 0 0 0 0 1 loop mq-deadline
+`-vg_foo.4059-lv_foo.4059 0 0 0 0 running 1 lvm loop3
+sda 0 0 0 0 running 0 disk cfq
+|-sda1 0 0 0 0 0 part sda cfq
+|-sda2 0 0 0 0 0 part sda cfq
+|-sda3 0 0 0 0 0 part sda cfq
+|-sda4 0 0 0 0 0 part sda cfq
+|-sda5 0 0 0 0 0 part sda cfq
+`-sda6 0 0 0 0 0 part sda cfq
+sdb 0 0 0 1 running 1 disk cfq
+`-sdb1 0 0 0 1 1 part sdb cfq
+nvme0n1 0 0 0 0 live 0 disk none
+|-nvme0n1p1 0 0 0 0 0 part nvme0n1 none
+|-nvme0n1p2 0 0 0 0 0 part nvme0n1 none
+`-nvme0n1p3 0 0 0 0 0 part nvme0n1 none
diff --git a/tests/expected/lsblk/lsblk-simple-lvm-topo b/tests/expected/lsblk/lsblk-simple-lvm-topo
new file mode 100644
index 0000000..3937da3
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-lvm-topo
@@ -0,0 +1,22 @@
+NAME SIZE ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC RQ-SIZE
+loop0 10M 0 512 0 512 512 256
+`-vg_foo.4059-lv_foo.4059 32M 0 512 0 512 512 128
+loop1 10M 0 512 0 512 512 256
+`-vg_foo.4059-lv_foo.4059 32M 0 512 0 512 512 128
+loop2 10M 0 512 0 512 512 256
+`-vg_foo.4059-lv_foo.4059 32M 0 512 0 512 512 128
+loop3 10M 0 512 0 512 512 256
+`-vg_foo.4059-lv_foo.4059 32M 0 512 0 512 512 128
+sda 223.6G 0 512 0 512 512 128
+|-sda1 200M 0 512 0 512 512 128
+|-sda2 200M 0 512 0 512 512 128
+|-sda3 130.3G 0 512 0 512 512 128
+|-sda4 50G 0 512 0 512 512 128
+|-sda5 35.1G 0 512 0 512 512 128
+`-sda6 7.8G 0 512 0 512 512 128
+sdb 74.5G 0 512 0 512 512 128
+`-sdb1 74.5G 0 512 0 512 512 128
+nvme0n1 223.6G 0 512 0 512 512 1023
+|-nvme0n1p1 7.8G 0 512 0 512 512 1023
+|-nvme0n1p2 200G 0 512 0 512 512 1023
+`-nvme0n1p3 15.8G 0 512 0 512 512 1023
diff --git a/tests/expected/lsblk/lsblk-simple-lvm-vendor b/tests/expected/lsblk/lsblk-simple-lvm-vendor
new file mode 100644
index 0000000..24ee97d
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-lvm-vendor
@@ -0,0 +1,22 @@
+NAME MODEL VENDOR REV
+loop0
+`-vg_foo.4059-lv_foo.4059
+loop1
+`-vg_foo.4059-lv_foo.4059
+loop2
+`-vg_foo.4059-lv_foo.4059
+loop3
+`-vg_foo.4059-lv_foo.4059
+sda KINGSTON SH103S3 ATA BBF0
+|-sda1
+|-sda2
+|-sda3
+|-sda4
+|-sda5
+`-sda6
+sdb WDC WD800JD-00MS ATA 1E01
+`-sdb1
+nvme0n1 KINGSTON SKC1000240G
+|-nvme0n1p1
+|-nvme0n1p2
+`-nvme0n1p3
diff --git a/tests/expected/lsblk/lsblk-simple-lvm-zone b/tests/expected/lsblk/lsblk-simple-lvm-zone
new file mode 100644
index 0000000..256a208
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-lvm-zone
@@ -0,0 +1,22 @@
+NAME ZONED
+loop0 none
+`-vg_foo.4059-lv_foo.4059 none
+loop1 none
+`-vg_foo.4059-lv_foo.4059 none
+loop2 none
+`-vg_foo.4059-lv_foo.4059 none
+loop3 none
+`-vg_foo.4059-lv_foo.4059 none
+sda none
+|-sda1 none
+|-sda2 none
+|-sda3 none
+|-sda4 none
+|-sda5 none
+`-sda6 none
+sdb none
+`-sdb1 none
+nvme0n1 none
+|-nvme0n1p1 none
+|-nvme0n1p2 none
+`-nvme0n1p3 none
diff --git a/tests/expected/lsblk/lsblk-simple-nvme-basic b/tests/expected/lsblk/lsblk-simple-nvme-basic
new file mode 100644
index 0000000..c3f4835
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-nvme-basic
@@ -0,0 +1,14 @@
+NAME KNAME MAJ:MIN RM SIZE TYPE MOUNTPOINT
+sda sda 8:0 0 223.6G disk
+|-sda1 sda1 8:1 0 200M part /boot/efi
+|-sda2 sda2 8:2 0 200M part /boot
+|-sda3 sda3 8:3 0 130.3G part
+|-sda4 sda4 8:4 0 50G part /
+|-sda5 sda5 8:5 0 35.1G part
+`-sda6 sda6 8:6 0 7.8G part
+sdb sdb 8:16 0 74.5G disk
+`-sdb1 sdb1 8:17 0 74.5G part /home/archive
+nvme0n1 nvme0n1 259:0 0 223.6G disk
+|-nvme0n1p1 nvme0n1p1 259:1 0 7.8G part
+|-nvme0n1p2 nvme0n1p2 259:2 0 200G part /home
+`-nvme0n1p3 nvme0n1p3 259:3 0 15.8G part /home/test
diff --git a/tests/expected/lsblk/lsblk-simple-nvme-discard b/tests/expected/lsblk/lsblk-simple-nvme-discard
new file mode 100644
index 0000000..4e03c7c
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-nvme-discard
@@ -0,0 +1,14 @@
+NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
+sda 0 512B 2G 0
+|-sda1 0 512B 2G 0
+|-sda2 0 512B 2G 0
+|-sda3 0 512B 2G 0
+|-sda4 0 512B 2G 0
+|-sda5 0 512B 2G 0
+`-sda6 0 512B 2G 0
+sdb 0 0B 0B 0
+`-sdb1 0 0B 0B 0
+nvme0n1 0 512B 2T 0
+|-nvme0n1p1 0 512B 2T 0
+|-nvme0n1p2 0 512B 2T 0
+`-nvme0n1p3 0 512B 2T 0
diff --git a/tests/expected/lsblk/lsblk-simple-nvme-rw b/tests/expected/lsblk/lsblk-simple-nvme-rw
new file mode 100644
index 0000000..a5eb877
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-nvme-rw
@@ -0,0 +1,14 @@
+NAME RA WSAME
+sda 128 0B
+|-sda1 128 0B
+|-sda2 128 0B
+|-sda3 128 0B
+|-sda4 128 0B
+|-sda5 128 0B
+`-sda6 128 0B
+sdb 128 0B
+`-sdb1 128 0B
+nvme0n1 128 0B
+|-nvme0n1p1 128 0B
+|-nvme0n1p2 128 0B
+`-nvme0n1p3 128 0B
diff --git a/tests/expected/lsblk/lsblk-simple-nvme-state b/tests/expected/lsblk/lsblk-simple-nvme-state
new file mode 100644
index 0000000..1efdf14
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-nvme-state
@@ -0,0 +1,14 @@
+NAME RO RM HOTPLUG RAND STATE ROTA TYPE PKNAME SCHED
+sda 0 0 0 0 running 0 disk cfq
+|-sda1 0 0 0 0 0 part sda cfq
+|-sda2 0 0 0 0 0 part sda cfq
+|-sda3 0 0 0 0 0 part sda cfq
+|-sda4 0 0 0 0 0 part sda cfq
+|-sda5 0 0 0 0 0 part sda cfq
+`-sda6 0 0 0 0 0 part sda cfq
+sdb 0 0 0 1 running 1 disk cfq
+`-sdb1 0 0 0 1 1 part sdb cfq
+nvme0n1 0 0 0 0 live 0 disk none
+|-nvme0n1p1 0 0 0 0 0 part nvme0n1 none
+|-nvme0n1p2 0 0 0 0 0 part nvme0n1 none
+`-nvme0n1p3 0 0 0 0 0 part nvme0n1 none
diff --git a/tests/expected/lsblk/lsblk-simple-nvme-topo b/tests/expected/lsblk/lsblk-simple-nvme-topo
new file mode 100644
index 0000000..87b0fa5
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-nvme-topo
@@ -0,0 +1,14 @@
+NAME SIZE ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC RQ-SIZE
+sda 223.6G 0 512 0 512 512 128
+|-sda1 200M 0 512 0 512 512 128
+|-sda2 200M 0 512 0 512 512 128
+|-sda3 130.3G 0 512 0 512 512 128
+|-sda4 50G 0 512 0 512 512 128
+|-sda5 35.1G 0 512 0 512 512 128
+`-sda6 7.8G 0 512 0 512 512 128
+sdb 74.5G 0 512 0 512 512 128
+`-sdb1 74.5G 0 512 0 512 512 128
+nvme0n1 223.6G 0 512 0 512 512 1023
+|-nvme0n1p1 7.8G 0 512 0 512 512 1023
+|-nvme0n1p2 200G 0 512 0 512 512 1023
+`-nvme0n1p3 15.8G 0 512 0 512 512 1023
diff --git a/tests/expected/lsblk/lsblk-simple-nvme-vendor b/tests/expected/lsblk/lsblk-simple-nvme-vendor
new file mode 100644
index 0000000..2a0a905
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-nvme-vendor
@@ -0,0 +1,14 @@
+NAME MODEL VENDOR REV
+sda KINGSTON SH103S3 ATA BBF0
+|-sda1
+|-sda2
+|-sda3
+|-sda4
+|-sda5
+`-sda6
+sdb WDC WD800JD-00MS ATA 1E01
+`-sdb1
+nvme0n1 KINGSTON SKC1000240G
+|-nvme0n1p1
+|-nvme0n1p2
+`-nvme0n1p3
diff --git a/tests/expected/lsblk/lsblk-simple-nvme-zone b/tests/expected/lsblk/lsblk-simple-nvme-zone
new file mode 100644
index 0000000..bba9ba9
--- /dev/null
+++ b/tests/expected/lsblk/lsblk-simple-nvme-zone
@@ -0,0 +1,14 @@
+NAME ZONED
+sda none
+|-sda1 none
+|-sda2 none
+|-sda3 none
+|-sda4 none
+|-sda5 none
+`-sda6 none
+sdb none
+`-sdb1 none
+nvme0n1 none
+|-nvme0n1p1 none
+|-nvme0n1p2 none
+`-nvme0n1p3 none
diff --git a/tests/expected/lscpu/lscpu-armv7 b/tests/expected/lscpu/lscpu-armv7
new file mode 100644
index 0000000..27deb80
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-armv7
@@ -0,0 +1,28 @@
+CPU(s): 2
+On-line CPU(s) list: 0,1
+Vendor ID: ARM
+Model name: Cortex-A15
+Model: 4
+Thread(s) per core: 1
+Core(s) per socket: 2
+Socket(s): 1
+Stepping: r0p4
+CPU(s) scaling MHz: 12%
+CPU max MHz: 1700.0000
+CPU min MHz: 200.0000
+BogoMIPS: 1694.10
+Flags: swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node
+0,0,0,
+1,1,0,
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node
+0,0,0,
+1,1,0,
diff --git a/tests/expected/lscpu/lscpu-loongarch-loongson_3a5000_hv b/tests/expected/lscpu/lscpu-loongarch-loongson_3a5000_hv
new file mode 100644
index 0000000..825de7a
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-loongarch-loongson_3a5000_hv
@@ -0,0 +1,37 @@
+CPU op-mode(s): 32-bit, 64-bit
+Address sizes: 48 bits physical, 48 bits virtual
+Byte Order: Little Endian
+CPU(s): 4
+On-line CPU(s) list: 0-3
+Model name: Loongson-3A5000-HV
+CPU family: Loongson-64bit
+Model: 0x11
+Thread(s) per core: 1
+Core(s) per socket: 4
+Socket(s): 1
+BogoMIPS: 5000.00
+Flags: cpucfg lam ual fpu lsx lasx complex crypto lvz
+L1d cache: 256 KiB (4 instances)
+L1i cache: 256 KiB (4 instances)
+L2 cache: 1 MiB (4 instances)
+L3 cache: 16 MiB (1 instance)
+NUMA node(s): 1
+NUMA node0 CPU(s): 0-3
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,1,0,0,,1,1,1,0
+2,2,0,0,,2,2,2,0
+3,3,0,0,,3,3,3,0
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,1,0,0,,1,1,1,0
+2,2,0,0,,2,2,2,0
+3,3,0,0,,3,3,3,0
diff --git a/tests/expected/lscpu/lscpu-ppc-qemu b/tests/expected/lscpu/lscpu-ppc-qemu
new file mode 100644
index 0000000..b22ec25
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-ppc-qemu
@@ -0,0 +1,20 @@
+CPU(s): 1
+On-line CPU(s) list: 0
+Model name: 740/750
+Model: 3.1 (pvr 0008 0301)
+Thread(s) per core: 1
+Core(s) per socket: 1
+Socket(s): 1
+BogoMIPS: 33.25
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i
+0,0,0,,,0,0
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i
+0,0,-,,,0,0
diff --git a/tests/expected/lscpu/lscpu-ppc64-POWER7 b/tests/expected/lscpu/lscpu-ppc64-POWER7
new file mode 100644
index 0000000..49b575e
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-ppc64-POWER7
@@ -0,0 +1,53 @@
+CPU(s): 16
+On-line CPU(s) list: 0-15
+Model name: POWER7 (architected), altivec supported
+Model: 2.1 (pvr 003f 0201)
+Thread(s) per core: 4
+Core(s) per socket: 1
+Socket(s): 4
+L1d cache: 128 KiB (4 instances)
+L1i cache: 128 KiB (4 instances)
+NUMA node(s): 1
+NUMA node0 CPU(s): 0-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 usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i
+0,0,0,0,,0,0
+1,0,0,0,,0,0
+2,0,0,0,,0,0
+3,0,0,0,,0,0
+4,1,1,0,,1,1
+5,1,1,0,,1,1
+6,1,1,0,,1,1
+7,1,1,0,,1,1
+8,2,2,0,,2,2
+9,2,2,0,,2,2
+10,2,2,0,,2,2
+11,2,2,0,,2,2
+12,3,3,0,,3,3
+13,3,3,0,,3,3
+14,3,3,0,,3,3
+15,3,3,0,,3,3
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i
+0,0,-,0,,0,0
+1,0,-,0,,0,0
+2,0,-,0,,0,0
+3,0,-,0,,0,0
+4,4,-,0,,1,1
+5,4,-,0,,1,1
+6,4,-,0,,1,1
+7,4,-,0,,1,1
+8,8,-,0,,2,2
+9,8,-,0,,2,2
+10,8,-,0,,2,2
+11,8,-,0,,2,2
+12,12,-,0,,3,3
+13,12,-,0,,3,3
+14,12,-,0,,3,3
+15,12,-,0,,3,3
diff --git a/tests/expected/lscpu/lscpu-ppc64-POWER7-64cpu b/tests/expected/lscpu/lscpu-ppc64-POWER7-64cpu
new file mode 100644
index 0000000..fcb024a
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-ppc64-POWER7-64cpu
@@ -0,0 +1,152 @@
+CPU(s): 64
+On-line CPU(s) list: 0-63
+Model name: POWER7 (architected), altivec supported
+Model: 2.1 (pvr 003f 0201)
+Thread(s) per core: 4
+Core(s) per socket: 1
+Socket(s): 16
+Hypervisor vendor: pHyp
+Virtualization type: para
+L1d cache: 512 KiB (16 instances)
+L1i cache: 512 KiB (16 instances)
+NUMA node(s): 2
+NUMA node0 CPU(s): 0-63
+NUMA node1 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 usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i
+0,0,0,0,,0,0
+1,0,0,0,,0,0
+2,0,0,0,,0,0
+3,0,0,0,,0,0
+4,1,1,0,,1,1
+5,1,1,0,,1,1
+6,1,1,0,,1,1
+7,1,1,0,,1,1
+8,2,2,0,,2,2
+9,2,2,0,,2,2
+10,2,2,0,,2,2
+11,2,2,0,,2,2
+12,3,3,0,,3,3
+13,3,3,0,,3,3
+14,3,3,0,,3,3
+15,3,3,0,,3,3
+16,4,4,0,,4,4
+17,4,4,0,,4,4
+18,4,4,0,,4,4
+19,4,4,0,,4,4
+20,5,5,0,,5,5
+21,5,5,0,,5,5
+22,5,5,0,,5,5
+23,5,5,0,,5,5
+24,6,6,0,,6,6
+25,6,6,0,,6,6
+26,6,6,0,,6,6
+27,6,6,0,,6,6
+28,7,7,0,,7,7
+29,7,7,0,,7,7
+30,7,7,0,,7,7
+31,7,7,0,,7,7
+32,8,8,0,,8,8
+33,8,8,0,,8,8
+34,8,8,0,,8,8
+35,8,8,0,,8,8
+36,9,9,0,,9,9
+37,9,9,0,,9,9
+38,9,9,0,,9,9
+39,9,9,0,,9,9
+40,10,10,0,,10,10
+41,10,10,0,,10,10
+42,10,10,0,,10,10
+43,10,10,0,,10,10
+44,11,11,0,,11,11
+45,11,11,0,,11,11
+46,11,11,0,,11,11
+47,11,11,0,,11,11
+48,12,12,0,,12,12
+49,12,12,0,,12,12
+50,12,12,0,,12,12
+51,12,12,0,,12,12
+52,13,13,0,,13,13
+53,13,13,0,,13,13
+54,13,13,0,,13,13
+55,13,13,0,,13,13
+56,14,14,0,,14,14
+57,14,14,0,,14,14
+58,14,14,0,,14,14
+59,14,14,0,,14,14
+60,15,15,0,,15,15
+61,15,15,0,,15,15
+62,15,15,0,,15,15
+63,15,15,0,,15,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 usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i
+0,0,-,0,,0,0
+1,0,-,0,,0,0
+2,0,-,0,,0,0
+3,0,-,0,,0,0
+4,4,-,0,,1,1
+5,4,-,0,,1,1
+6,4,-,0,,1,1
+7,4,-,0,,1,1
+8,8,-,0,,2,2
+9,8,-,0,,2,2
+10,8,-,0,,2,2
+11,8,-,0,,2,2
+12,12,-,0,,3,3
+13,12,-,0,,3,3
+14,12,-,0,,3,3
+15,12,-,0,,3,3
+16,16,-,0,,4,4
+17,16,-,0,,4,4
+18,16,-,0,,4,4
+19,16,-,0,,4,4
+20,20,-,0,,5,5
+21,20,-,0,,5,5
+22,20,-,0,,5,5
+23,20,-,0,,5,5
+24,24,-,0,,6,6
+25,24,-,0,,6,6
+26,24,-,0,,6,6
+27,24,-,0,,6,6
+28,28,-,0,,7,7
+29,28,-,0,,7,7
+30,28,-,0,,7,7
+31,28,-,0,,7,7
+32,32,-,0,,8,8
+33,32,-,0,,8,8
+34,32,-,0,,8,8
+35,32,-,0,,8,8
+36,36,-,0,,9,9
+37,36,-,0,,9,9
+38,36,-,0,,9,9
+39,36,-,0,,9,9
+40,40,-,0,,10,10
+41,40,-,0,,10,10
+42,40,-,0,,10,10
+43,40,-,0,,10,10
+44,44,-,0,,11,11
+45,44,-,0,,11,11
+46,44,-,0,,11,11
+47,44,-,0,,11,11
+48,48,-,0,,12,12
+49,48,-,0,,12,12
+50,48,-,0,,12,12
+51,48,-,0,,12,12
+52,52,-,0,,13,13
+53,52,-,0,,13,13
+54,52,-,0,,13,13
+55,52,-,0,,13,13
+56,56,-,0,,14,14
+57,56,-,0,,14,14
+58,56,-,0,,14,14
+59,56,-,0,,14,14
+60,60,-,0,,15,15
+61,60,-,0,,15,15
+62,60,-,0,,15,15
+63,60,-,0,,15,15
diff --git a/tests/expected/lscpu/lscpu-rv64-linux b/tests/expected/lscpu/lscpu-rv64-linux
new file mode 100644
index 0000000..22767db
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-rv64-linux
@@ -0,0 +1,16 @@
+CPU(s): 2
+On-line CPU(s) list: 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 usually from zero.
+# CPU,Core,Socket,Node
+,,,
+,,,
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node
+,,,
+,,,
diff --git a/tests/expected/lscpu/lscpu-s390-kvm b/tests/expected/lscpu/lscpu-s390-kvm
new file mode 100644
index 0000000..51e276c
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-s390-kvm
@@ -0,0 +1,32 @@
+CPU op-mode(s): 32-bit, 64-bit
+CPU(s): 3
+On-line CPU(s) list: 0-2
+Vendor ID: IBM/S390
+Model name: -
+Machine type: 2817
+Thread(s) per core: 1
+Core(s) per socket: 1
+Socket(s) per book: 1
+Book(s): 3
+BogoMIPS: 14367.00
+Dispatching mode: horizontal
+Flags: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs
+Hypervisor: KVM/Linux
+Hypervisor vendor: KVM
+Virtualization type: full
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node
+0,0,0,
+1,1,1,
+2,2,2,
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node
+0,0,-,
+1,0,-,
+2,0,-,
diff --git a/tests/expected/lscpu/lscpu-s390-lpar b/tests/expected/lscpu/lscpu-s390-lpar
new file mode 100644
index 0000000..25a1918
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-s390-lpar
@@ -0,0 +1,61 @@
+CPU op-mode(s): 32-bit, 64-bit
+CPU(s): 20
+On-line CPU(s) list: 1-5,8-19
+Off-line CPU(s) list: 0,6,7
+Vendor ID: IBM/S390
+Model name: -
+Machine type: 2817
+Thread(s) per core: 1
+Core(s) per socket: 4
+Socket(s) per book: 6
+Book(s): 4
+BogoMIPS: 14367.00
+Dispatching mode: vertical
+Flags: esan3 zarch stfle msa ldisp eimm dfp etf3eh highgprs
+Hypervisor: PR/SM
+Hypervisor vendor: IBM
+Virtualization type: full
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node
+1,0,0,
+2,1,0,
+3,2,1,
+4,3,1,
+5,4,1,
+8,5,2,
+9,6,2,
+10,7,2,
+11,8,3,
+12,9,3,
+13,10,3,
+14,11,3,
+15,12,4,
+16,13,5,
+17,14,5,
+18,15,5,
+19,16,6,
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node
+1,1,-,
+2,1,-,
+3,2,-,
+4,2,-,
+5,2,-,
+8,1,-,
+9,1,-,
+10,1,-,
+11,2,-,
+12,2,-,
+13,2,-,
+14,2,-,
+15,3,-,
+16,4,-,
+17,4,-,
+18,4,-,
+19,6,-,
diff --git a/tests/expected/lscpu/lscpu-s390-lpar-drawer b/tests/expected/lscpu/lscpu-s390-lpar-drawer
new file mode 100644
index 0000000..467a76d
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-s390-lpar-drawer
@@ -0,0 +1,53 @@
+CPU op-mode(s): 32-bit, 64-bit
+CPU(s): 8
+On-line CPU(s) list: 0-7
+Vendor ID: IBM/S390
+Model name: -
+Machine type: 2964
+Thread(s) per core: 1
+Core(s) per socket: 8
+Socket(s) per book: 3
+Book(s) per drawer: 2
+Drawer(s): 4
+CPU dynamic MHz: 5000
+CPU static MHz: 5000
+BogoMIPS: 20325.00
+Dispatching mode: horizontal
+Flags: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx sie
+Hypervisor: PR/SM
+Hypervisor vendor: IBM
+Virtualization type: full
+L1d cache: 1 MiB (8 instances)
+L1i cache: 768 KiB (8 instances)
+L2d cache: 16 MiB (8 instances)
+L2i cache: 16 MiB (8 instances)
+L3 cache: 64 MiB
+L4 cache: 480 MiB
+NUMA node(s): 1
+NUMA node0 CPU(s): 0-140
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2d,L2i
+0,0,0,0,,0,0,0,0
+1,1,0,0,,1,1,1,1
+2,2,1,0,,2,2,2,2
+3,3,1,0,,3,3,3,3
+4,4,1,0,,4,4,4,4
+5,5,1,0,,5,5,5,5
+6,6,1,0,,6,6,6,6
+7,7,1,0,,7,7,7,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 usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2d,L2i
+0,0,2,0,,0,0,0,0
+1,1,2,0,,1,1,1,1
+2,2,3,0,,2,2,2,2
+3,3,3,0,,3,3,3,3
+4,4,3,0,,4,4,4,4
+5,5,3,0,,5,5,5,5
+6,6,3,0,,6,6,6,6
+7,7,3,0,,7,7,7,7
diff --git a/tests/expected/lscpu/lscpu-s390-nested-virt b/tests/expected/lscpu/lscpu-s390-nested-virt
new file mode 100644
index 0000000..7e56793
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-s390-nested-virt
@@ -0,0 +1,46 @@
+CPU op-mode(s): 32-bit, 64-bit
+CPU(s): 2
+On-line CPU(s) list: 0,1
+Vendor ID: IBM/S390
+Model name: -
+Machine type: 2964
+Thread(s) per core: 1
+Core(s) per socket: 1
+Socket(s) per book: 1
+Book(s) per drawer: 1
+Drawer(s): 2
+CPU dynamic MHz: 5000
+CPU static MHz: 5000
+BogoMIPS: 3033.00
+Dispatching mode: horizontal
+Flags: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx
+Hypervisor: KVM/Linux
+Hypervisor vendor: KVM
+Virtualization type: full
+L1d cache: 256 KiB (2 instances)
+L1i cache: 192 KiB (2 instances)
+L2d cache: 4 MiB (2 instances)
+L2i cache: 4 MiB (2 instances)
+L3 cache: 64 MiB
+L4 cache: 480 MiB
+NUMA node(s): 1
+NUMA node0 CPU(s): 0,1
+Vulnerability L1tf: Not affected
+Vulnerability Meltdown: Not affected
+Vulnerability Spec store bypass: Not affected
+Vulnerability Spectre v1: Mitigation; __user pointer sanitization
+Vulnerability Spectre v2: Mitigation; execute trampolines
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2d,L2i
+0,0,0,0,,0,0,0,0
+1,1,1,0,,1,1,1,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 usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2d,L2i
+0,0,0,0,,0,0,0,0
+1,1,1,0,,1,1,1,1
diff --git a/tests/expected/lscpu/lscpu-s390-zvm b/tests/expected/lscpu/lscpu-s390-zvm
new file mode 100644
index 0000000..c7e7499
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-s390-zvm
@@ -0,0 +1,34 @@
+CPU op-mode(s): 32-bit, 64-bit
+CPU(s): 4
+On-line CPU(s) list: 0-3
+Vendor ID: IBM/S390
+Model name: -
+Machine type: 2817
+Thread(s) per core: 1
+Core(s) per socket: 1
+Socket(s) per book: 1
+Book(s): 4
+BogoMIPS: 14367.00
+Dispatching mode: horizontal
+Flags: esan3 zarch stfle msa ldisp eimm dfp etf3eh highgprs
+Hypervisor: z/VM 6.1.0
+Hypervisor vendor: IBM
+Virtualization type: full
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node
+0,0,0,
+1,1,1,
+2,2,2,
+3,3,3,
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node
+0,0,-,
+1,0,-,
+2,0,-,
+3,0,-,
diff --git a/tests/expected/lscpu/lscpu-sparc64 b/tests/expected/lscpu/lscpu-sparc64
new file mode 100644
index 0000000..5a3460f
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-sparc64
@@ -0,0 +1,33 @@
+CPU op-mode(s): 32-bit, 64-bit
+CPU(s): 6
+On-line CPU(s) list: 6,7,10,11,14,15
+Model name: TI UltraSparc II (BlackBird)
+Thread(s) per core: 1
+Core(s) per socket: 1
+Socket(s): 6
+Flags: sun4u
+L1d cache: 96 KiB (6 instances)
+L1i cache: 96 KiB (6 instances)
+L2 cache: 6 MiB (6 instances)
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2
+6,0,0,,,0,0,0
+7,1,1,,,1,1,1
+10,2,2,,,2,2,2
+11,3,3,,,3,3,3
+14,4,4,,,4,4,4
+15,5,5,,,5,5,5
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2
+6,0,-,,,0,0,0
+7,0,-,,,1,1,1
+10,0,-,,,2,2,2
+11,0,-,,,3,3,3
+14,0,-,,,4,4,4
+15,0,-,,,5,5,5
diff --git a/tests/expected/lscpu/lscpu-vbox-win b/tests/expected/lscpu/lscpu-vbox-win
new file mode 100644
index 0000000..bc0ed4c
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-vbox-win
@@ -0,0 +1,37 @@
+CPU op-mode(s): 32-bit, 64-bit
+Address sizes: 36 bits physical, 48 bits virtual
+CPU(s): 2
+On-line CPU(s) list: 0,1
+Vendor ID: GenuineIntel
+Model name: Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz
+CPU family: 6
+Model: 58
+Thread(s) per core: 1
+Core(s) per socket: 2
+Socket(s): 1
+Stepping: 9
+CPU(s) scaling MHz: 42%
+CPU max MHz: 3800.0000
+CPU min MHz: 1600.0000
+BogoMIPS: 3355.62
+Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl pni ssse3 lahf_lm
+Hypervisor vendor: Oracle
+Virtualization type: full
+L1d cache: 64 KiB (2 instances)
+L2d cache: 6 MiB (1 instance)
+NUMA node(s): 1
+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 usually from zero.
+# CPU,Core,Socket,Node,,L1d,L2d
+0,0,0,0,,0,0
+1,1,0,0,,1,0
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L2d
+0,0,0,0,,0,0
+1,1,0,0,,1,0
diff --git a/tests/expected/lscpu/lscpu-vmware_fpe b/tests/expected/lscpu/lscpu-vmware_fpe
new file mode 100644
index 0000000..80a51b1
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-vmware_fpe
@@ -0,0 +1,76 @@
+CPU op-mode(s): 32-bit, 64-bit
+Address sizes: 48 bits physical, 48 bits virtual
+CPU(s): 16
+On-line CPU(s) list: 0-15
+Vendor ID: AuthenticAMD
+Model name: AMD Opteron(tm) Processor 6328
+CPU family: 21
+Model: 2
+Thread(s) per core: 2
+Core(s) per socket: 4
+Socket(s): 2
+Stepping: 0
+Frequency boost: enabled
+CPU(s) scaling MHz: 52%
+CPU max MHz: 3200.0000
+CPU min MHz: 1400.0000
+BogoMIPS: 6399.69
+Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate ssbd ibpb vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
+Virtualization: AMD-V
+L1d cache: 256 KiB (16 instances)
+L1i cache: 512 KiB (8 instances)
+L2 cache: 16 MiB (8 instances)
+L3 cache: 24 MiB (4 instances)
+NUMA node(s): 4
+NUMA node0 CPU(s): 0-3
+NUMA node1 CPU(s): 4-7
+NUMA node2 CPU(s): 8-11
+NUMA node3 CPU(s): 12-15
+Vulnerability L1tf: Not affected
+Vulnerability Mds: Not affected
+Vulnerability Meltdown: Not affected
+Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
+Vulnerability Spectre v1: Mitigation; __user pointer sanitization
+Vulnerability Spectre v2: Mitigation; Full AMD retpoline, IBPB conditional, STIBP disabled, RSB filling
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,32,16,16,8
+1,0,0,0,,33,16,16,8
+2,1,0,0,,34,17,17,8
+3,1,0,0,,35,17,17,8
+4,2,0,1,,36,18,18,9
+5,2,0,1,,37,18,18,9
+6,3,0,1,,38,19,19,9
+7,3,0,1,,39,19,19,9
+8,4,1,2,,64,32,32,16
+9,4,1,2,,65,32,32,16
+10,5,1,2,,66,33,33,16
+11,5,1,2,,67,33,33,16
+12,6,1,3,,68,34,34,17
+13,6,1,3,,69,34,34,17
+14,7,1,3,,70,35,35,17
+15,7,1,3,,71,35,35,17
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,32,16,16,8
+1,1,0,0,,33,16,16,8
+2,2,0,0,,34,17,17,8
+3,3,0,0,,35,17,17,8
+4,0,0,1,,36,18,18,9
+5,1,0,1,,37,18,18,9
+6,2,0,1,,38,19,19,9
+7,3,0,1,,39,19,19,9
+8,0,1,2,,64,32,32,16
+9,1,1,2,,65,32,32,16
+10,2,1,2,,66,33,33,16
+11,3,1,2,,67,33,33,16
+12,0,1,3,,68,34,34,17
+13,1,1,3,,69,34,34,17
+14,2,1,3,,70,35,35,17
+15,3,1,3,,71,35,35,17
diff --git a/tests/expected/lscpu/lscpu-x86_64-64cpu b/tests/expected/lscpu/lscpu-x86_64-64cpu
new file mode 100644
index 0000000..b5b6c85
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-x86_64-64cpu
@@ -0,0 +1,164 @@
+CPU op-mode(s): 32-bit, 64-bit
+Address sizes: 44 bits physical, 48 bits virtual
+CPU(s): 64
+On-line CPU(s) list: 0-63
+Vendor ID: GenuineIntel
+Model name: Intel(R) Xeon(R) CPU X7550 @ 2.00GHz
+CPU family: 6
+Model: 46
+Thread(s) per core: 2
+Core(s) per socket: 8
+Socket(s): 4
+Stepping: 6
+CPU(s) scaling MHz: 54%
+CPU max MHz: 1996.0000
+CPU min MHz: 1064.0000
+BogoMIPS: 3990.31
+Flags: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic popcnt lahf_lm ida epb dts tpr_shadow vnmi flexpriority ept vpid
+Virtualization: VT-x
+L1d cache: 1 MiB (32 instances)
+L1i cache: 1 MiB (32 instances)
+L2 cache: 8 MiB (32 instances)
+L3 cache: 72 MiB (4 instances)
+NUMA node(s): 3
+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 usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,1,1,2,,1,1,1,1
+2,2,2,0,,2,2,2,2
+3,3,3,3,,3,3,3,3
+4,4,0,0,,4,4,4,0
+5,5,1,2,,5,5,5,1
+6,6,2,0,,6,6,6,2
+7,7,3,3,,7,7,7,3
+8,8,0,0,,8,8,8,0
+9,9,1,2,,9,9,9,1
+10,10,2,0,,10,10,10,2
+11,11,3,3,,11,11,11,3
+12,12,0,0,,12,12,12,0
+13,13,1,2,,13,13,13,1
+14,14,2,0,,14,14,14,2
+15,15,3,3,,15,15,15,3
+16,16,0,0,,16,16,16,0
+17,17,1,2,,17,17,17,1
+18,18,2,0,,18,18,18,2
+19,19,3,3,,19,19,19,3
+20,20,0,0,,20,20,20,0
+21,21,1,2,,21,21,21,1
+22,22,2,0,,22,22,22,2
+23,23,3,3,,23,23,23,3
+24,24,0,0,,24,24,24,0
+25,25,1,2,,25,25,25,1
+26,26,2,0,,26,26,26,2
+27,27,3,3,,27,27,27,3
+28,28,0,0,,28,28,28,0
+29,29,1,2,,29,29,29,1
+30,30,2,0,,30,30,30,2
+31,31,3,3,,31,31,31,3
+32,0,0,0,,0,0,0,0
+33,1,1,2,,1,1,1,1
+34,2,2,0,,2,2,2,2
+35,3,3,3,,3,3,3,3
+36,4,0,0,,4,4,4,0
+37,5,1,2,,5,5,5,1
+38,6,2,0,,6,6,6,2
+39,7,3,3,,7,7,7,3
+40,8,0,0,,8,8,8,0
+41,9,1,2,,9,9,9,1
+42,10,2,0,,10,10,10,2
+43,11,3,3,,11,11,11,3
+44,12,0,0,,12,12,12,0
+45,13,1,2,,13,13,13,1
+46,14,2,0,,14,14,14,2
+47,15,3,3,,15,15,15,3
+48,16,0,0,,16,16,16,0
+49,17,1,2,,17,17,17,1
+50,18,2,0,,18,18,18,2
+51,19,3,3,,19,19,19,3
+52,20,0,0,,20,20,20,0
+53,21,1,2,,21,21,21,1
+54,22,2,0,,22,22,22,2
+55,23,3,3,,23,23,23,3
+56,24,0,0,,24,24,24,0
+57,25,1,2,,25,25,25,1
+58,26,2,0,,26,26,26,2
+59,27,3,3,,27,27,27,3
+60,28,0,0,,28,28,28,0
+61,29,1,2,,29,29,29,1
+62,30,2,0,,30,30,30,2
+63,31,3,3,,31,31,31,3
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,0,2,2,,1,1,1,1
+2,0,1,0,,2,2,2,2
+3,0,3,3,,3,3,3,3
+4,8,0,0,,4,4,4,0
+5,8,2,2,,5,5,5,1
+6,8,1,0,,6,6,6,2
+7,8,3,3,,7,7,7,3
+8,2,0,0,,8,8,8,0
+9,2,2,2,,9,9,9,1
+10,2,1,0,,10,10,10,2
+11,2,3,3,,11,11,11,3
+12,10,0,0,,12,12,12,0
+13,10,2,2,,13,13,13,1
+14,10,1,0,,14,14,14,2
+15,10,3,3,,15,15,15,3
+16,1,0,0,,16,16,16,0
+17,1,2,2,,17,17,17,1
+18,1,1,0,,18,18,18,2
+19,1,3,3,,19,19,19,3
+20,9,0,0,,20,20,20,0
+21,9,2,2,,21,21,21,1
+22,9,1,0,,22,22,22,2
+23,9,3,3,,23,23,23,3
+24,3,0,0,,24,24,24,0
+25,3,2,2,,25,25,25,1
+26,3,1,0,,26,26,26,2
+27,3,3,3,,27,27,27,3
+28,11,0,0,,28,28,28,0
+29,11,2,2,,29,29,29,1
+30,11,1,0,,30,30,30,2
+31,11,3,3,,31,31,31,3
+32,0,0,0,,0,0,0,0
+33,0,2,2,,1,1,1,1
+34,0,1,0,,2,2,2,2
+35,0,3,3,,3,3,3,3
+36,8,0,0,,4,4,4,0
+37,8,2,2,,5,5,5,1
+38,8,1,0,,6,6,6,2
+39,8,3,3,,7,7,7,3
+40,2,0,0,,8,8,8,0
+41,2,2,2,,9,9,9,1
+42,2,1,0,,10,10,10,2
+43,2,3,3,,11,11,11,3
+44,10,0,0,,12,12,12,0
+45,10,2,2,,13,13,13,1
+46,10,1,0,,14,14,14,2
+47,10,3,3,,15,15,15,3
+48,1,0,0,,16,16,16,0
+49,1,2,2,,17,17,17,1
+50,1,1,0,,18,18,18,2
+51,1,3,3,,19,19,19,3
+52,9,0,0,,20,20,20,0
+53,9,2,2,,21,21,21,1
+54,9,1,0,,22,22,22,2
+55,9,3,3,,23,23,23,3
+56,3,0,0,,24,24,24,0
+57,3,2,2,,25,25,25,1
+58,3,1,0,,26,26,26,2
+59,3,3,3,,27,27,27,3
+60,11,0,0,,28,28,28,0
+61,11,2,2,,29,29,29,1
+62,11,1,0,,30,30,30,2
+63,11,3,3,,31,31,31,3
diff --git a/tests/expected/lscpu/lscpu-x86_64-64cpu-linux6.2 b/tests/expected/lscpu/lscpu-x86_64-64cpu-linux6.2
new file mode 100644
index 0000000..58ea109
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-x86_64-64cpu-linux6.2
@@ -0,0 +1,62 @@
+CPU op-mode(s): 32-bit, 64-bit
+Address sizes: 39 bits physical, 48 bits virtual
+Byte Order: Little Endian
+CPU(s): 8
+On-line CPU(s) list: 0-7
+Vendor ID: GenuineIntel
+Model name: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
+CPU family: 6
+Model: 140
+Thread(s) per core: 2
+Core(s) per socket: 4
+Socket(s): 1
+Stepping: 1
+CPU(s) scaling MHz: 45%
+CPU max MHz: 4700.0000
+CPU min MHz: 400.0000
+BogoMIPS: 5608.00
+Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 invpcid_single cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear ibt flush_l1d arch_capabilities
+Virtualization: VT-x
+L1d cache: 192 KiB (4 instances)
+L1i cache: 128 KiB (4 instances)
+L2 cache: 5 MiB (4 instances)
+L3 cache: 12 MiB (1 instance)
+NUMA node(s): 1
+NUMA node0 CPU(s): 0-7
+Vulnerability Itlb multihit: Not affected
+Vulnerability L1tf: Not affected
+Vulnerability Mds: Not affected
+Vulnerability Meltdown: Not affected
+Vulnerability Mmio stale data: Not affected
+Vulnerability Retbleed: Not affected
+Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
+Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
+Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
+Vulnerability Srbds: Not affected
+Vulnerability Tsx async abort: Not affected
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,1,0,0,,1,1,1,0
+2,2,0,0,,2,2,2,0
+3,3,0,0,,3,3,3,0
+4,0,0,0,,0,0,0,0
+5,1,0,0,,1,1,1,0
+6,2,0,0,,2,2,2,0
+7,3,0,0,,3,3,3,0
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,1,0,0,,1,1,1,0
+2,2,0,0,,2,2,2,0
+3,3,0,0,,3,3,3,0
+4,0,0,0,,0,0,0,0
+5,1,0,0,,1,1,1,0
+6,2,0,0,,2,2,2,0
+7,3,0,0,,3,3,3,0
diff --git a/tests/expected/lscpu/lscpu-x86_64-dell_e4310 b/tests/expected/lscpu/lscpu-x86_64-dell_e4310
new file mode 100644
index 0000000..f7f0291
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-x86_64-dell_e4310
@@ -0,0 +1,42 @@
+CPU op-mode(s): 32-bit, 64-bit
+Address sizes: 36 bits physical, 48 bits virtual
+CPU(s): 4
+On-line CPU(s) list: 0-3
+Vendor ID: GenuineIntel
+Model name: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz
+CPU family: 6
+Model: 37
+Thread(s) per core: 2
+Core(s) per socket: 2
+Socket(s): 1
+Stepping: 5
+CPU(s) scaling MHz: 59%
+CPU max MHz: 2667.0000
+CPU min MHz: 1199.0000
+BogoMIPS: 5319.92
+Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt aes lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
+Virtualization: VT-x
+L1d cache: 64 KiB (2 instances)
+L1i cache: 64 KiB (2 instances)
+L2 cache: 512 KiB (2 instances)
+L3 cache: 3 MiB (1 instance)
+NUMA node(s): 1
+NUMA node0 CPU(s): 0-3
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,1,0,0,,1,1,1,0
+2,0,0,0,,0,0,0,0
+3,1,0,0,,1,1,1,0
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,2,0,0,,1,1,1,0
+2,0,0,0,,0,0,0,0
+3,2,0,0,,1,1,1,0
diff --git a/tests/expected/lscpu/lscpu-x86_64-epyc_7451 b/tests/expected/lscpu/lscpu-x86_64-epyc_7451
new file mode 100644
index 0000000..c0548f9
--- /dev/null
+++ b/tests/expected/lscpu/lscpu-x86_64-epyc_7451
@@ -0,0 +1,239 @@
+CPU op-mode(s): 32-bit, 64-bit
+Address sizes: 48 bits physical, 48 bits virtual
+CPU(s): 96
+On-line CPU(s) list: 0-95
+Vendor ID: AuthenticAMD
+Model name: AMD EPYC 7451 24-Core Processor
+CPU family: 23
+Model: 1
+Thread(s) per core: 2
+Core(s) per socket: 24
+Socket(s): 2
+Stepping: 2
+Frequency boost: enabled
+CPU(s) scaling MHz: 126%
+CPU max MHz: 2300.0000
+CPU min MHz: 1200.0000
+BogoMIPS: 4590.83
+Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca
+Virtualization: AMD-V
+L1d cache: 1.5 MiB (48 instances)
+L1i cache: 3 MiB (48 instances)
+L2 cache: 24 MiB (48 instances)
+L3 cache: 128 MiB (16 instances)
+NUMA node(s): 8
+NUMA node0 CPU(s): 0-5,48-53
+NUMA node1 CPU(s): 6-11,54-59
+NUMA node2 CPU(s): 12-17,60-65
+NUMA node3 CPU(s): 18-23,66-71
+NUMA node4 CPU(s): 24-29,72-77
+NUMA node5 CPU(s): 30-35,78-83
+NUMA node6 CPU(s): 36-41,84-89
+NUMA node7 CPU(s): 42-47,90-95
+Vulnerability L1tf: Not affected
+Vulnerability Meltdown: Not affected
+Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
+Vulnerability Spectre v1: Mitigation; __user pointer sanitization
+Vulnerability Spectre v2: Mitigation; Full AMD retpoline, IBPB conditional, STIBP disabled, RSB filling
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,1,0,0,,1,1,1,0
+2,2,0,0,,2,2,2,0
+3,3,0,0,,4,4,4,1
+4,4,0,0,,5,5,5,1
+5,5,0,0,,6,6,6,1
+6,6,0,1,,8,8,8,2
+7,7,0,1,,9,9,9,2
+8,8,0,1,,10,10,10,2
+9,9,0,1,,12,12,12,3
+10,10,0,1,,13,13,13,3
+11,11,0,1,,14,14,14,3
+12,12,0,2,,16,16,16,4
+13,13,0,2,,17,17,17,4
+14,14,0,2,,18,18,18,4
+15,15,0,2,,20,20,20,5
+16,16,0,2,,21,21,21,5
+17,17,0,2,,22,22,22,5
+18,18,0,3,,24,24,24,6
+19,19,0,3,,25,25,25,6
+20,20,0,3,,26,26,26,6
+21,21,0,3,,28,28,28,7
+22,22,0,3,,29,29,29,7
+23,23,0,3,,30,30,30,7
+24,24,1,4,,32,32,32,8
+25,25,1,4,,33,33,33,8
+26,26,1,4,,34,34,34,8
+27,27,1,4,,36,36,36,9
+28,28,1,4,,37,37,37,9
+29,29,1,4,,38,38,38,9
+30,30,1,5,,40,40,40,10
+31,31,1,5,,41,41,41,10
+32,32,1,5,,42,42,42,10
+33,33,1,5,,44,44,44,11
+34,34,1,5,,45,45,45,11
+35,35,1,5,,46,46,46,11
+36,36,1,6,,48,48,48,12
+37,37,1,6,,49,49,49,12
+38,38,1,6,,50,50,50,12
+39,39,1,6,,52,52,52,13
+40,40,1,6,,53,53,53,13
+41,41,1,6,,54,54,54,13
+42,42,1,7,,56,56,56,14
+43,43,1,7,,57,57,57,14
+44,44,1,7,,58,58,58,14
+45,45,1,7,,60,60,60,15
+46,46,1,7,,61,61,61,15
+47,47,1,7,,62,62,62,15
+48,0,0,0,,0,0,0,0
+49,1,0,0,,1,1,1,0
+50,2,0,0,,2,2,2,0
+51,3,0,0,,4,4,4,1
+52,4,0,0,,5,5,5,1
+53,5,0,0,,6,6,6,1
+54,6,0,1,,8,8,8,2
+55,7,0,1,,9,9,9,2
+56,8,0,1,,10,10,10,2
+57,9,0,1,,12,12,12,3
+58,10,0,1,,13,13,13,3
+59,11,0,1,,14,14,14,3
+60,12,0,2,,16,16,16,4
+61,13,0,2,,17,17,17,4
+62,14,0,2,,18,18,18,4
+63,15,0,2,,20,20,20,5
+64,16,0,2,,21,21,21,5
+65,17,0,2,,22,22,22,5
+66,18,0,3,,24,24,24,6
+67,19,0,3,,25,25,25,6
+68,20,0,3,,26,26,26,6
+69,21,0,3,,28,28,28,7
+70,22,0,3,,29,29,29,7
+71,23,0,3,,30,30,30,7
+72,24,1,4,,32,32,32,8
+73,25,1,4,,33,33,33,8
+74,26,1,4,,34,34,34,8
+75,27,1,4,,36,36,36,9
+76,28,1,4,,37,37,37,9
+77,29,1,4,,38,38,38,9
+78,30,1,5,,40,40,40,10
+79,31,1,5,,41,41,41,10
+80,32,1,5,,42,42,42,10
+81,33,1,5,,44,44,44,11
+82,34,1,5,,45,45,45,11
+83,35,1,5,,46,46,46,11
+84,36,1,6,,48,48,48,12
+85,37,1,6,,49,49,49,12
+86,38,1,6,,50,50,50,12
+87,39,1,6,,52,52,52,13
+88,40,1,6,,53,53,53,13
+89,41,1,6,,54,54,54,13
+90,42,1,7,,56,56,56,14
+91,43,1,7,,57,57,57,14
+92,44,1,7,,58,58,58,14
+93,45,1,7,,60,60,60,15
+94,46,1,7,,61,61,61,15
+95,47,1,7,,62,62,62,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 usually from zero.
+# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
+0,0,0,0,,0,0,0,0
+1,1,0,0,,1,1,1,0
+2,2,0,0,,2,2,2,0
+3,4,0,0,,4,4,4,1
+4,5,0,0,,5,5,5,1
+5,6,0,0,,6,6,6,1
+6,8,0,1,,8,8,8,2
+7,9,0,1,,9,9,9,2
+8,10,0,1,,10,10,10,2
+9,12,0,1,,12,12,12,3
+10,13,0,1,,13,13,13,3
+11,14,0,1,,14,14,14,3
+12,16,0,2,,16,16,16,4
+13,17,0,2,,17,17,17,4
+14,18,0,2,,18,18,18,4
+15,20,0,2,,20,20,20,5
+16,21,0,2,,21,21,21,5
+17,22,0,2,,22,22,22,5
+18,24,0,3,,24,24,24,6
+19,25,0,3,,25,25,25,6
+20,26,0,3,,26,26,26,6
+21,28,0,3,,28,28,28,7
+22,29,0,3,,29,29,29,7
+23,30,0,3,,30,30,30,7
+24,0,1,4,,32,32,32,8
+25,1,1,4,,33,33,33,8
+26,2,1,4,,34,34,34,8
+27,4,1,4,,36,36,36,9
+28,5,1,4,,37,37,37,9
+29,6,1,4,,38,38,38,9
+30,8,1,5,,40,40,40,10
+31,9,1,5,,41,41,41,10
+32,10,1,5,,42,42,42,10
+33,12,1,5,,44,44,44,11
+34,13,1,5,,45,45,45,11
+35,14,1,5,,46,46,46,11
+36,16,1,6,,48,48,48,12
+37,17,1,6,,49,49,49,12
+38,18,1,6,,50,50,50,12
+39,20,1,6,,52,52,52,13
+40,21,1,6,,53,53,53,13
+41,22,1,6,,54,54,54,13
+42,24,1,7,,56,56,56,14
+43,25,1,7,,57,57,57,14
+44,26,1,7,,58,58,58,14
+45,28,1,7,,60,60,60,15
+46,29,1,7,,61,61,61,15
+47,30,1,7,,62,62,62,15
+48,0,0,0,,0,0,0,0
+49,1,0,0,,1,1,1,0
+50,2,0,0,,2,2,2,0
+51,4,0,0,,4,4,4,1
+52,5,0,0,,5,5,5,1
+53,6,0,0,,6,6,6,1
+54,8,0,1,,8,8,8,2
+55,9,0,1,,9,9,9,2
+56,10,0,1,,10,10,10,2
+57,12,0,1,,12,12,12,3
+58,13,0,1,,13,13,13,3
+59,14,0,1,,14,14,14,3
+60,16,0,2,,16,16,16,4
+61,17,0,2,,17,17,17,4
+62,18,0,2,,18,18,18,4
+63,20,0,2,,20,20,20,5
+64,21,0,2,,21,21,21,5
+65,22,0,2,,22,22,22,5
+66,24,0,3,,24,24,24,6
+67,25,0,3,,25,25,25,6
+68,26,0,3,,26,26,26,6
+69,28,0,3,,28,28,28,7
+70,29,0,3,,29,29,29,7
+71,30,0,3,,30,30,30,7
+72,0,1,4,,32,32,32,8
+73,1,1,4,,33,33,33,8
+74,2,1,4,,34,34,34,8
+75,4,1,4,,36,36,36,9
+76,5,1,4,,37,37,37,9
+77,6,1,4,,38,38,38,9
+78,8,1,5,,40,40,40,10
+79,9,1,5,,41,41,41,10
+80,10,1,5,,42,42,42,10
+81,12,1,5,,44,44,44,11
+82,13,1,5,,45,45,45,11
+83,14,1,5,,46,46,46,11
+84,16,1,6,,48,48,48,12
+85,17,1,6,,49,49,49,12
+86,18,1,6,,50,50,50,12
+87,20,1,6,,52,52,52,13
+88,21,1,6,,53,53,53,13
+89,22,1,6,,54,54,54,13
+90,24,1,7,,56,56,56,14
+91,25,1,7,,57,57,57,14
+92,26,1,7,,58,58,58,14
+93,28,1,7,,60,60,60,15
+94,29,1,7,,61,61,61,15
+95,30,1,7,,62,62,62,15
diff --git a/tests/expected/lsfd/column-ainodeclass-inotify b/tests/expected/lsfd/column-ainodeclass-inotify
new file mode 100644
index 0000000..f93e19e
--- /dev/null
+++ b/tests/expected/lsfd/column-ainodeclass-inotify
@@ -0,0 +1,2 @@
+ 3 UNKN inotify
+inotify:ASSOC,STTYPE,AINODECLASS: 0
diff --git a/tests/expected/lsfd/column-ainodeclass-pidfd b/tests/expected/lsfd/column-ainodeclass-pidfd
new file mode 100644
index 0000000..269cea5
--- /dev/null
+++ b/tests/expected/lsfd/column-ainodeclass-pidfd
@@ -0,0 +1,2 @@
+ 3 UNKN pidfd
+pidfd:ASSOC,STTYPE,AINODECLASS: 0
diff --git a/tests/expected/lsfd/column-kthread b/tests/expected/lsfd/column-kthread
new file mode 100644
index 0000000..db81a93
--- /dev/null
+++ b/tests/expected/lsfd/column-kthread
@@ -0,0 +1,6 @@
+COMMAND PID USER MODE TYPE NAME KTHREAD
+systemd 1 root --- DIR / 0
+systemd 1 root --- DIR / 0
+kthreadd 2 root --- DIR / 1
+kthreadd 2 root --- DIR / 1
+0
diff --git a/tests/expected/lsfd/column-name-pidfd b/tests/expected/lsfd/column-name-pidfd
new file mode 100644
index 0000000..49abe81
--- /dev/null
+++ b/tests/expected/lsfd/column-name-pidfd
@@ -0,0 +1,2 @@
+ 3 anon_inode:[pidfd] pid=1 comm= nspid=1
+pidfd:ASSOC,KNAME,NAME: 0
diff --git a/tests/expected/lsfd/column-name-ro-regular-file b/tests/expected/lsfd/column-name-ro-regular-file
new file mode 100644
index 0000000..446a916
--- /dev/null
+++ b/tests/expected/lsfd/column-name-ro-regular-file
@@ -0,0 +1,2 @@
+ 3 /etc/passwd /etc/passwd
+ro-regular-file:ASSOC,KNAME,NAME: 0
diff --git a/tests/expected/lsfd/column-name-socketpair b/tests/expected/lsfd/column-name-socketpair
new file mode 100644
index 0000000..bd94e56
--- /dev/null
+++ b/tests/expected/lsfd/column-name-socketpair
@@ -0,0 +1,2 @@
+ 3 socket:[INODENUM] state=connected type=dgram
+socketpair:ASSOC,KNAME,NAME: 0
diff --git a/tests/expected/lsfd/column-type-inotify b/tests/expected/lsfd/column-type-inotify
new file mode 100644
index 0000000..69588d9
--- /dev/null
+++ b/tests/expected/lsfd/column-type-inotify
@@ -0,0 +1,2 @@
+ 3 UNKN inotify
+inotify:ASSOC,STTYPE,TYPE: 0
diff --git a/tests/expected/lsfd/column-type-pidfd b/tests/expected/lsfd/column-type-pidfd
new file mode 100644
index 0000000..a3278d2
--- /dev/null
+++ b/tests/expected/lsfd/column-type-pidfd
@@ -0,0 +1,2 @@
+ 3 UNKN pidfd
+pidfd:ASSOC,STTYPE,TYPE: 0
diff --git a/tests/expected/lsfd/column-type-ro-regular-file b/tests/expected/lsfd/column-type-ro-regular-file
new file mode 100644
index 0000000..63b4356
--- /dev/null
+++ b/tests/expected/lsfd/column-type-ro-regular-file
@@ -0,0 +1,2 @@
+ 3 REG REG
+ro-regular-file:ASSOC,STTYPE,TYPE: 0
diff --git a/tests/expected/lsfd/column-type-socketpair b/tests/expected/lsfd/column-type-socketpair
new file mode 100644
index 0000000..22a61b7
--- /dev/null
+++ b/tests/expected/lsfd/column-type-socketpair
@@ -0,0 +1,2 @@
+ 3 SOCK UNIX
+socketpair:ASSOC,STTYPE,TYPE: 0
diff --git a/tests/expected/lsfd/mkfds-directory b/tests/expected/lsfd/mkfds-directory
new file mode 100644
index 0000000..fd7f293
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-directory
@@ -0,0 +1,12 @@
+ 3 r-- DIR directory /
+ASSOC,MODE,TYPE,FLAGS,NAME: 0
+PID[RUN]: 0
+PID[STR]: 0
+INODE[RUN]: 0
+INODE[STR]: 0
+UID[RUN]: 0
+UID[STR]: 0
+USER[RUN]: 0
+USER[STR]: 0
+NLINK[RUN]: 0
+NLINK[STR]: 0
diff --git a/tests/expected/lsfd/mkfds-mapped-packet-socket b/tests/expected/lsfd/mkfds-mapped-packet-socket
new file mode 100644
index 0000000..7c1b503
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-mapped-packet-socket
@@ -0,0 +1,8 @@
+ PACKET
+SOCK.PROTONAME: 0
+type=raw protocol=all iface=lo raw PACKET lo all
+NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL: 0
+ PACKET
+SOCK.PROTONAME: 0
+type=dgram protocol=all iface=lo dgram PACKET lo all
+NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL: 0
diff --git a/tests/expected/lsfd/mkfds-netlink-groups b/tests/expected/lsfd/mkfds-netlink-groups
new file mode 100644
index 0000000..ad50da1
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-netlink-groups
@@ -0,0 +1,3 @@
+ 3 NETLINK protocol=sock_diag lport= groups=5 raw sock_diag 5
+ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,NETLINK.PROTOCOL,NETLINK.GROUPS: 0
+LPORT: OK
diff --git a/tests/expected/lsfd/mkfds-netlink-protocol b/tests/expected/lsfd/mkfds-netlink-protocol
new file mode 100644
index 0000000..df3dce7
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-netlink-protocol
@@ -0,0 +1,3 @@
+ 3 NETLINK protocol=sock_diag lport= raw sock_diag 0
+ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,NETLINK.PROTOCOL: 0
+LPORT: OK
diff --git a/tests/expected/lsfd/mkfds-netns b/tests/expected/lsfd/mkfds-netns
new file mode 100644
index 0000000..4b4c0ac
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-netns
@@ -0,0 +1,4 @@
+ net
+NAME_FD == NAME_NS: 0
+NAME_FD == net:[INO_FD]: 0
+NAME_FD == net:[INO_NS]: 0
diff --git a/tests/expected/lsfd/mkfds-pidfd b/tests/expected/lsfd/mkfds-pidfd
new file mode 100644
index 0000000..3f7edbb
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-pidfd
@@ -0,0 +1,2 @@
+ 3 UNKN anon_inodefs pid=1 comm=systemd nspid=1 systemd 1
+ASSOC,STTYPE,SOURCE,NAME,PIDFD.COMM,PIDFD.PID: 0
diff --git a/tests/expected/lsfd/mkfds-ping-ping b/tests/expected/lsfd/mkfds-ping-ping
new file mode 100644
index 0000000..cad42b1
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-ping-ping
@@ -0,0 +1,4 @@
+ 3 PING state=established id=9999 laddr=127.0.0.1 raddr=127.0.0.1 established dgram 127.0.0.1 127.0.0.1 9999
+ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET.LADDR,INET.RADDR,PING.ID: 0
+ 3 PING state=close id=9999 laddr=127.0.0.1 close dgram 127.0.0.1 0.0.0.0 9999
+ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET.LADDR,INET.RADDR,PING.ID: 0
diff --git a/tests/expected/lsfd/mkfds-ping-ping6 b/tests/expected/lsfd/mkfds-ping-ping6
new file mode 100644
index 0000000..3ef9730
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-ping-ping6
@@ -0,0 +1,4 @@
+ 3 PINGv6 state=established id=9999 laddr=::1 raddr=::1 established dgram ::1 ::1 9999
+ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET6.LADDR,INET6.RADDR,PING.ID: 0
+ 3 PINGv6 state=close id=9999 laddr=::1 close dgram ::1 :: 9999
+ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET6.LADDR,INET6.RADDR,PING.ID: 0
diff --git a/tests/expected/lsfd/mkfds-pipe-no-fork b/tests/expected/lsfd/mkfds-pipe-no-fork
new file mode 100644
index 0000000..390b8a3
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-pipe-no-fork
@@ -0,0 +1,13 @@
+ 3 r-- FIFO pipefs
+ 4 -w- FIFO pipefs wronly,nonblock
+ASSOC,MODE,TYPE,SOURCE,FLAGS: 0
+PID[RUN]: 0
+PID[STR]: 0
+NAMES[RUN]: 0
+NAMES[STR]: 0
+INODES[RUN]: 0
+INODES[STR]: 0
+ENDPOINTS[RUN]: 0
+ENDPOINTS[STR]: 0
+ASSOC,ENDPOINTS (JSON): 0
+EXPECTED_LSFD_ENDPOINTS_JSON == LSFD_ENDPOINTS_JSON
diff --git a/tests/expected/lsfd/mkfds-raw b/tests/expected/lsfd/mkfds-raw
new file mode 100644
index 0000000..e8bc41a
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-raw
@@ -0,0 +1,2 @@
+ 3 RAW state=established protocol=5 laddr=127.0.0.1 raddr=127.0.0.2 established raw 127.0.0.1 127.0.0.2 5
+ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET.LADDR,INET.RADDR,RAW.PROTOCOL: 0
diff --git a/tests/expected/lsfd/mkfds-raw6 b/tests/expected/lsfd/mkfds-raw6
new file mode 100644
index 0000000..a813a37
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-raw6
@@ -0,0 +1,2 @@
+ 3 RAWv6 state=established protocol=5 laddr=::1 raddr=::ffff:127.0.0.1 established raw ::1 ::ffff:127.0.0.1 5
+ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET6.LADDR,INET6.RADDR,RAW.PROTOCOL: 0
diff --git a/tests/expected/lsfd/mkfds-ro-block-device b/tests/expected/lsfd/mkfds-ro-block-device
new file mode 100644
index 0000000..3b2fe07
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-ro-block-device
@@ -0,0 +1,13 @@
+ 3 r-- BLK 0 loop blk
+ASSOC,MODE,TYPE,,POS,,BLKDRV,DEVTYPE: 0
+NAME[RUN]: 0
+NAME[STR]: 0
+SOURCE[RUN]: 0
+SOURCE[STR]: 0
+MAJ_MIN[RUN]: 0
+MAJ_MIN[STR]: 0
+RDEV[RUN]: 0
+RDEV[STR]: 0
+DEV[RUN]: 0
+STAT[RUN]: 0
+DEVNUM[STR]: 0
diff --git a/tests/expected/lsfd/mkfds-ro-regular-file b/tests/expected/lsfd/mkfds-ro-regular-file
new file mode 100644
index 0000000..092f40b
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-ro-regular-file
@@ -0,0 +1,15 @@
+ABC 3 r-- REG /etc/passwd 1
+COMMAND,ASSOC,MODE,TYPE,NAME,POS: 0
+PID[RUN]: 0
+PID[STR]: 0
+INODE[RUN]: 0
+INODE[STR]: 0
+UID[RUN]: 0
+UID[STR]: 0
+USER[RUN]: 0
+USER[STR]: 0
+SIZE[RUN]: 0
+SIZE[STR]: 0
+DEV[RUN]: 0
+STAT[RUN]: 0
+DEVNUM[STR]: 0
diff --git a/tests/expected/lsfd/mkfds-rw-character-device b/tests/expected/lsfd/mkfds-rw-character-device
new file mode 100644
index 0000000..00423f4
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-rw-character-device
@@ -0,0 +1,5 @@
+ 3 rw- CHR /dev/zero mem:5 0 1:5 mem char 1:5
+ASSOC,MODE,TYPE,NAME,SOURCE,POS,MAJ:MIN,CHRDRV,DEVTYPE,RDEV: 0
+DEV[RUN]: 0
+STAT[RUN]: 0
+DEVNUM[STR]: 0
diff --git a/tests/expected/lsfd/mkfds-socketpair b/tests/expected/lsfd/mkfds-socketpair
new file mode 100644
index 0000000..a015353
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-socketpair
@@ -0,0 +1,3 @@
+ 3 rw- SOCK sockfs UNIX
+ 4 rw- SOCK sockfs UNIX
+ASSOC,MODE,STTYPE,SOURCE,SOCK.PROTONAME: 0
diff --git a/tests/expected/lsfd/mkfds-symlink b/tests/expected/lsfd/mkfds-symlink
new file mode 100644
index 0000000..ab10159
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-symlink
@@ -0,0 +1,2 @@
+ 3 --- LINK /dev/stdin nofollow,path
+ASSOC,MODE,TYPE,NAME,FLAGS: 0
diff --git a/tests/expected/lsfd/mkfds-tcp b/tests/expected/lsfd/mkfds-tcp
new file mode 100644
index 0000000..dfec0ae
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-tcp
@@ -0,0 +1,4 @@
+ 3 TCP SOCK state=listen laddr=127.0.0.1:34567 listen stream 1 127.0.0.1 0.0.0.0 127.0.0.1:34567 34567 0.0.0.0:0 0
+ 4 TCP SOCK state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 established stream 0 127.0.0.1 127.0.0.1 127.0.0.1:23456 23456 127.0.0.1:34567 34567
+ 5 TCP SOCK state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456 established stream 0 127.0.0.1 127.0.0.1 127.0.0.1:34567 34567 127.0.0.1:23456 23456
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,TCP.LADDR,TCP.LPORT,TCP.RADDR,TCP.RPORT: 0
diff --git a/tests/expected/lsfd/mkfds-tcp6 b/tests/expected/lsfd/mkfds-tcp6
new file mode 100644
index 0000000..26b6039
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-tcp6
@@ -0,0 +1,4 @@
+ 3 TCPv6 SOCK state=listen laddr=[::1]:34567 listen stream 1 ::1 :: [::1]:34567 34567 [::]:0 0
+ 4 TCPv6 SOCK state=established laddr=[::1]:23456 raddr=[::1]:34567 established stream 0 ::1 ::1 [::1]:23456 23456 [::1]:34567 34567
+ 5 TCPv6 SOCK state=established laddr=[::1]:34567 raddr=[::1]:23456 established stream 0 ::1 ::1 [::1]:34567 34567 [::1]:23456 23456
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,TCP.LADDR,TCP.LPORT,TCP.RADDR,TCP.RPORT: 0
diff --git a/tests/expected/lsfd/mkfds-udp b/tests/expected/lsfd/mkfds-udp
new file mode 100644
index 0000000..58ce260
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-udp
@@ -0,0 +1,24 @@
+ 3 UDP SOCK state=close laddr=127.0.0.1:34567 close dgram 0 127.0.0.1 0.0.0.0 127.0.0.1:34567 34567 0.0.0.0:0 0
+ 4 UDP SOCK state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 established dgram 0 127.0.0.1 127.0.0.1 127.0.0.1:23456 23456 127.0.0.1:34567 34567
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0
+ 3 UDP SOCK 0
+ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0
+NAME pattern match: OK
+ 4 UDP SOCK established dgram 0 127.0.0.1 127.0.0.1 127.0.0.1:34567 34567
+ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.RADDR,UDP.RPORT: 0
+LADDR/LPORT pattern match: OK
+ 3 UDP SOCK state=close laddr=127.0.0.1:34567 close dgram 0 127.0.0.1 0.0.0.0 127.0.0.1:34567 34567 0.0.0.0:0 0
+ 4 UDP SOCK state=close laddr=127.0.0.1:23456 close dgram 0 127.0.0.1 0.0.0.0 127.0.0.1:23456 23456 0.0.0.0:0 0
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0
+ 3 UDP-Lite SOCK state=close laddr=127.0.0.1:34567 close dgram 0 127.0.0.1 0.0.0.0 127.0.0.1:34567 34567 0.0.0.0:0 0
+ 4 UDP-Lite SOCK state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567 established dgram 0 127.0.0.1 127.0.0.1 127.0.0.1:23456 23456 127.0.0.1:34567 34567
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0
+ 3 UDP-Lite SOCK 0
+ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0
+NAME pattern match: OK
+ 4 UDP-Lite SOCK established dgram 0 127.0.0.1 127.0.0.1 127.0.0.1:34567 34567
+ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDPLite.RADDR,UDPLite.RPORT: 0
+LADDR/LPORT pattern match: OK
+ 3 UDP-Lite SOCK state=close laddr=127.0.0.1:34567 close dgram 0 127.0.0.1 0.0.0.0
+ 4 UDP-Lite SOCK state=close laddr=127.0.0.1:23456 close dgram 0 127.0.0.1 0.0.0.0
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0
diff --git a/tests/expected/lsfd/mkfds-udp6 b/tests/expected/lsfd/mkfds-udp6
new file mode 100644
index 0000000..e29797b
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-udp6
@@ -0,0 +1,24 @@
+ 3 UDPv6 SOCK state=close laddr=[::1]:34567 close dgram 0 ::1 :: [::1]:34567 34567 [::]:0 0
+ 4 UDPv6 SOCK state=established laddr=[::1]:23456 raddr=[::1]:34567 established dgram 0 ::1 ::1 [::1]:23456 23456 [::1]:34567 34567
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0
+ 3 UDPv6 SOCK 0
+ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0
+NAME pattern match: OK
+ 4 UDPv6 SOCK established dgram 0 ::1 ::1 [::1]:34567 34567
+ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDP.RADDR,UDP.RPORT: 0
+LADDR/LPORT pattern match: OK
+ 3 UDPv6 SOCK state=close laddr=[::1]:34567 close dgram 0 ::1 :: [::1]:34567 34567 [::]:0 0
+ 4 UDPv6 SOCK state=close laddr=[::1]:23456 close dgram 0 ::1 :: [::1]:23456 23456 [::]:0 0
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT: 0
+ 3 UDPLITEv6 SOCK state=close laddr=[::1]:34567 close dgram 0 ::1 :: [::1]:34567 34567 [::]:0 0
+ 4 UDPLITEv6 SOCK state=established laddr=[::1]:23456 raddr=[::1]:34567 established dgram 0 ::1 ::1 [::1]:23456 23456 [::1]:34567 34567
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0
+ 3 UDPLITEv6 SOCK 0
+ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0
+NAME pattern match: OK
+ 4 UDPLITEv6 SOCK established dgram 0 ::1 ::1 [::1]:34567 34567
+ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDPLite.RADDR,UDPLite.RPORT: 0
+LADDR/LPORT pattern match: OK
+ 3 UDPLITEv6 SOCK state=close laddr=[::1]:34567 close dgram 0 ::1 :: [::1]:34567 34567 [::]:0 0
+ 4 UDPLITEv6 SOCK state=close laddr=[::1]:23456 close dgram 0 ::1 :: [::1]:23456 23456 [::]:0 0
+ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,UDPLite.LADDR,UDPLite.LPORT,UDPLite.RADDR,UDPLite.RPORT: 0
diff --git a/tests/expected/lsfd/mkfds-unix-dgram b/tests/expected/lsfd/mkfds-unix-dgram
new file mode 100644
index 0000000..b8fd9d4
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-unix-dgram
@@ -0,0 +1,6 @@
+ 3 SOCK state=connected path=test_mkfds-unix-dgram type=dgram connected dgram 0 test_mkfds-unix-dgram
+ 4 SOCK state=connected type=dgram connected dgram 0
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+ 3 SOCK state=connected path=@test_mkfds-unix-dgram type=dgram connected dgram 0 @test_mkfds-unix-dgram
+ 4 SOCK state=connected type=dgram connected dgram 0
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
diff --git a/tests/expected/lsfd/mkfds-unix-in-netns-dgram b/tests/expected/lsfd/mkfds-unix-in-netns-dgram
new file mode 100644
index 0000000..c33dd9a
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-unix-in-netns-dgram
@@ -0,0 +1,6 @@
+ 5 SOCK state=unconnected path=test_mkfds-unix-dgram-ns type=dgram unconnected dgram 0 test_mkfds-unix-dgram-ns
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+the netns for the dgram socket is extracted as expectedly
+ 5 SOCK state=unconnected path=@test_mkfds-unix-dgram-ns type=dgram unconnected dgram 0 @test_mkfds-unix-dgram-ns
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+the netns for the abstract dgram socket is extracted as expectedly
diff --git a/tests/expected/lsfd/mkfds-unix-in-netns-seqpacket b/tests/expected/lsfd/mkfds-unix-in-netns-seqpacket
new file mode 100644
index 0000000..1f70061
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-unix-in-netns-seqpacket
@@ -0,0 +1,6 @@
+ 5 SOCK state=listen path=test_mkfds-unix-seqpacket-ns type=seqpacket listen seqpacket 1 test_mkfds-unix-seqpacket-ns
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+the netns for the seqpacket socket is extracted as expectedly
+ 5 SOCK state=listen path=@test_mkfds-unix-seqpacket-ns type=seqpacket listen seqpacket 1 @test_mkfds-unix-seqpacket-ns
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+the netns for the abstract seqpacket socket is extracted as expectedly
diff --git a/tests/expected/lsfd/mkfds-unix-in-netns-stream b/tests/expected/lsfd/mkfds-unix-in-netns-stream
new file mode 100644
index 0000000..fd09105
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-unix-in-netns-stream
@@ -0,0 +1,6 @@
+ 5 SOCK state=listen path=test_mkfds-unix-stream-ns listen stream 1 test_mkfds-unix-stream-ns
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+the netns for the stream socket is extracted as expectedly
+ 5 SOCK state=listen path=@test_mkfds-unix-stream-ns listen stream 1 @test_mkfds-unix-stream-ns
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+the netns for the abstract stream socket is extracted as expectedly
diff --git a/tests/expected/lsfd/mkfds-unix-stream b/tests/expected/lsfd/mkfds-unix-stream
new file mode 100644
index 0000000..c2e64a7
--- /dev/null
+++ b/tests/expected/lsfd/mkfds-unix-stream
@@ -0,0 +1,32 @@
+ 3 SOCK state=listen path=test_mkfds-unix-stream listen stream 1 test_mkfds-unix-stream
+ 4 SOCK state=connected connected stream 0
+ 5 SOCK state=connected path=test_mkfds-unix-stream connected stream 0 test_mkfds-unix-stream
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+ 3 SOCK state=listen path=@test_mkfds-unix-stream-abs listen stream 1 @test_mkfds-unix-stream-abs
+ 4 SOCK state=connected connected stream 0
+ 5 SOCK state=connected path=@test_mkfds-unix-stream-abs connected stream 0 @test_mkfds-unix-stream-abs
+(abs) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+ 3 SOCK state=listen path=test_mkfds-unix-stream-shutdown listen stream 1 test_mkfds-unix-stream-shutdown
+ 4 SOCK state=connected connected stream 0
+ 5 SOCK state=connected path=test_mkfds-unix-stream-shutdown connected stream 0 test_mkfds-unix-stream-shutdown
+(shutdown) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+ 3 SOCK state=listen path=test_mkfds-unix with spaces stream listen stream 1 test_mkfds-unix with spaces stream
+ 4 SOCK state=connected connected stream 0
+ 5 SOCK state=connected path=test_mkfds-unix with spaces stream connected stream 0 test_mkfds-unix with spaces stream
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+ 3 SOCK state=listen path=test_mkfds-unix-seqpacket type=seqpacket listen seqpacket 1 test_mkfds-unix-seqpacket
+ 4 SOCK state=connected type=seqpacket connected seqpacket 0
+ 5 SOCK state=connected path=test_mkfds-unix-seqpacket type=seqpacket connected seqpacket 0 test_mkfds-unix-seqpacket
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+ 3 SOCK state=listen path=@test_mkfds-unix-seqpacket-abs listen stream 1 @test_mkfds-unix-seqpacket-abs
+ 4 SOCK state=connected connected stream 0
+ 5 SOCK state=connected path=@test_mkfds-unix-seqpacket-abs connected stream 0 @test_mkfds-unix-seqpacket-abs
+(abs) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+ 3 SOCK state=listen path=test_mkfds-unix-seqpacket-shutdown type=seqpacket listen seqpacket 1 test_mkfds-unix-seqpacket-shutdown
+ 4 SOCK state=connected type=seqpacket connected seqpacket 0
+ 5 SOCK state=connected path=test_mkfds-unix-seqpacket-shutdown type=seqpacket connected seqpacket 0 test_mkfds-unix-seqpacket-shutdown
+(shutdown) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
+ 3 SOCK state=listen path=test_mkfds-unix with spaces seqpacket type=seqpacket listen seqpacket 1 test_mkfds-unix with spaces seqpacket
+ 4 SOCK state=connected type=seqpacket connected seqpacket 0
+ 5 SOCK state=connected path=test_mkfds-unix with spaces seqpacket type=seqpacket connected seqpacket 0 test_mkfds-unix with spaces seqpacket
+ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH: 0
diff --git a/tests/expected/lsfd/option-filter-broken-exp b/tests/expected/lsfd/option-filter-broken-exp
new file mode 100644
index 0000000..8c14f22
--- /dev/null
+++ b/tests/expected/lsfd/option-filter-broken-exp
@@ -0,0 +1,7 @@
+lsfd: error: empty filter expression
+lsfd: error: empty filter expression
+lsfd: error: unbalanced parenthesis: )
+lsfd: error: unexpected token: garbage after OP2
+lsfd: error: bool expression is expected: FD
+lsfd: unknown column: NOSUCHCOLUMN
+lsfd: error: no such column: NOSUCHCOLUMN
diff --git a/tests/expected/lsfd/option-inet b/tests/expected/lsfd/option-inet
new file mode 100644
index 0000000..cebfded
--- /dev/null
+++ b/tests/expected/lsfd/option-inet
@@ -0,0 +1,46 @@
+# --inet
+ 3 TCP state=listen laddr=127.0.0.1:34567
+ 4 TCP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567
+ 5 TCP state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456
+ 3 TCPv6 state=listen laddr=[::1]:34567
+ 4 TCPv6 state=established laddr=[::1]:23456 raddr=[::1]:34567
+ 5 TCPv6 state=established laddr=[::1]:34567 raddr=[::1]:23456
+ 3 UDP state=close laddr=127.0.0.1:34567
+ 4 UDP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567
+ 3 UDPLITEv6 state=close laddr=[::1]:34567
+ 4 UDPLITEv6 state=established laddr=[::1]:23456 raddr=[::1]:34567
+# --inet=4
+ 3 TCP state=listen laddr=127.0.0.1:34567
+ 4 TCP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567
+ 5 TCP state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456
+ 3 UDP state=close laddr=127.0.0.1:34567
+ 4 UDP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567
+# --inet=6
+ 3 TCPv6 state=listen laddr=[::1]:34567
+ 4 TCPv6 state=established laddr=[::1]:23456 raddr=[::1]:34567
+ 5 TCPv6 state=established laddr=[::1]:34567 raddr=[::1]:23456
+ 3 UDPLITEv6 state=close laddr=[::1]:34567
+ 4 UDPLITEv6 state=established laddr=[::1]:23456 raddr=[::1]:34567
+# -i
+ 3 TCP state=listen laddr=127.0.0.1:34567
+ 4 TCP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567
+ 5 TCP state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456
+ 3 TCPv6 state=listen laddr=[::1]:34567
+ 4 TCPv6 state=established laddr=[::1]:23456 raddr=[::1]:34567
+ 5 TCPv6 state=established laddr=[::1]:34567 raddr=[::1]:23456
+ 3 UDP state=close laddr=127.0.0.1:34567
+ 4 UDP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567
+ 3 UDPLITEv6 state=close laddr=[::1]:34567
+ 4 UDPLITEv6 state=established laddr=[::1]:23456 raddr=[::1]:34567
+# -i4
+ 3 TCP state=listen laddr=127.0.0.1:34567
+ 4 TCP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567
+ 5 TCP state=established laddr=127.0.0.1:34567 raddr=127.0.0.1:23456
+ 3 UDP state=close laddr=127.0.0.1:34567
+ 4 UDP state=established laddr=127.0.0.1:23456 raddr=127.0.0.1:34567
+# -i6
+ 3 TCPv6 state=listen laddr=[::1]:34567
+ 4 TCPv6 state=established laddr=[::1]:23456 raddr=[::1]:34567
+ 5 TCPv6 state=established laddr=[::1]:34567 raddr=[::1]:23456
+ 3 UDPLITEv6 state=close laddr=[::1]:34567
+ 4 UDPLITEv6 state=established laddr=[::1]:23456 raddr=[::1]:34567
diff --git a/tests/expected/lsfd/option-pid b/tests/expected/lsfd/option-pid
new file mode 100644
index 0000000..f05aa57
--- /dev/null
+++ b/tests/expected/lsfd/option-pid
@@ -0,0 +1,13 @@
+QOUT: 0
+POUT[--pid=1 PID]: 0
+EQ[--pid=1 PID]: 0
+POUT[--pid=PID 1]: 0
+EQ[--pid=PID 1]: 0
+POUT[--pid=1,PID]: 0
+EQ[--pid=1,PID]: 0
+POUT[--pid=PID,1]: 0
+EQ[--pid=PID,1]: 0
+POUT[-p 1 --pid=PID]: 0
+EQ[-p 1 --pid=PID]: 0
+POUT[-p PID --pid=1]: 0
+EQ[-p PID --pid=1]: 0
diff --git a/tests/expected/lsfd/option-summary b/tests/expected/lsfd/option-summary
new file mode 100644
index 0000000..4e96f55
--- /dev/null
+++ b/tests/expected/lsfd/option-summary
@@ -0,0 +1,3 @@
+ 10 GROUP
+ 3 PASSWD
+ 13 PROC
diff --git a/tests/expected/lsmem/lsmem-s390-zvm-6g b/tests/expected/lsmem/lsmem-s390-zvm-6g
new file mode 100644
index 0000000..f5f1259
--- /dev/null
+++ b/tests/expected/lsmem/lsmem-s390-zvm-6g
@@ -0,0 +1,209 @@
+
+---
+
+$ lsmem --split=STATE,REMOVABLE
+RANGE SIZE STATE REMOVABLE BLOCK
+0x0000000000000000-0x000000006fffffff 1.8G online yes 0-6
+0x0000000070000000-0x000000007fffffff 256M online no 7
+0x0000000080000000-0x000000009fffffff 512M online yes 8-9
+0x00000000a0000000-0x00000000bfffffff 512M online no 10-11
+0x00000000c0000000-0x00000000dfffffff 512M online yes 12-13
+0x00000000e0000000-0x00000000efffffff 256M offline 14
+0x00000000f0000000-0x00000000ffffffff 256M online yes 15
+0x0000000100000000-0x000000011fffffff 512M online no 16-17
+0x0000000120000000-0x000000013fffffff 512M online yes 18-19
+0x0000000140000000-0x000000017fffffff 1G offline 20-23
+
+Memory block size: 256M
+Total online memory: 4.8G
+Total offline memory: 1.3G
+
+---
+
+$ lsmem --output RANGE,SIZE --split none
+RANGE SIZE
+0x0000000000000000-0x000000017fffffff 6G
+
+Memory block size: 256M
+Total online memory: 4.8G
+Total offline memory: 1.3G
+
+---
+
+$ lsmem --output RANGE,SIZE,STATE --split STATE
+RANGE SIZE STATE
+0x0000000000000000-0x00000000dfffffff 3.5G online
+0x00000000e0000000-0x00000000efffffff 256M offline
+0x00000000f0000000-0x000000013fffffff 1.3G online
+0x0000000140000000-0x000000017fffffff 1G offline
+
+Memory block size: 256M
+Total online memory: 4.8G
+Total offline memory: 1.3G
+
+---
+
+$ lsmem --all --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE
+RANGE SIZE STATE REMOVABLE BLOCK NODE
+0x0000000000000000-0x000000000fffffff 256M online yes 0 0
+0x0000000010000000-0x000000001fffffff 256M online yes 1 0
+0x0000000020000000-0x000000002fffffff 256M online yes 2 0
+0x0000000030000000-0x000000003fffffff 256M online yes 3 0
+0x0000000040000000-0x000000004fffffff 256M online yes 4 0
+0x0000000050000000-0x000000005fffffff 256M online yes 5 0
+0x0000000060000000-0x000000006fffffff 256M online yes 6 0
+0x0000000070000000-0x000000007fffffff 256M online no 7 0
+0x0000000080000000-0x000000008fffffff 256M online yes 8 0
+0x0000000090000000-0x000000009fffffff 256M online yes 9 0
+0x00000000a0000000-0x00000000afffffff 256M online no 10 0
+0x00000000b0000000-0x00000000bfffffff 256M online no 11 0
+0x00000000c0000000-0x00000000cfffffff 256M online yes 12 0
+0x00000000d0000000-0x00000000dfffffff 256M online yes 13 0
+0x00000000e0000000-0x00000000efffffff 256M offline 14 0
+0x00000000f0000000-0x00000000ffffffff 256M online yes 15 0
+0x0000000100000000-0x000000010fffffff 256M online no 16 0
+0x0000000110000000-0x000000011fffffff 256M online no 17 0
+0x0000000120000000-0x000000012fffffff 256M online yes 18 0
+0x0000000130000000-0x000000013fffffff 256M online yes 19 0
+0x0000000140000000-0x000000014fffffff 256M offline 20 0
+0x0000000150000000-0x000000015fffffff 256M offline 21 0
+0x0000000160000000-0x000000016fffffff 256M offline 22 0
+0x0000000170000000-0x000000017fffffff 256M offline 23 0
+
+Memory block size: 256M
+Total online memory: 4.8G
+Total offline memory: 1.3G
+
+---
+
+$ lsmem --raw --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE --split RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE
+RANGE SIZE STATE REMOVABLE BLOCK NODE
+0x0000000000000000-0x000000006fffffff 1.8G online yes 0-6 0
+0x0000000070000000-0x000000007fffffff 256M online no 7 0
+0x0000000080000000-0x000000009fffffff 512M online yes 8-9 0
+0x00000000a0000000-0x00000000bfffffff 512M online no 10-11 0
+0x00000000c0000000-0x00000000dfffffff 512M online yes 12-13 0
+0x00000000e0000000-0x00000000efffffff 256M offline 14 0
+0x00000000f0000000-0x00000000ffffffff 256M online yes 15 0
+0x0000000100000000-0x000000011fffffff 512M online no 16-17 0
+0x0000000120000000-0x000000013fffffff 512M online yes 18-19 0
+0x0000000140000000-0x000000017fffffff 1G offline 20-23 0
+
+---
+
+$ lsmem --json --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE --split RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE
+{
+ "memory": [
+ {
+ "range": "0x0000000000000000-0x000000006fffffff",
+ "size": "1.8G",
+ "state": "online",
+ "removable": true,
+ "block": "0-6",
+ "node": 0
+ },{
+ "range": "0x0000000070000000-0x000000007fffffff",
+ "size": "256M",
+ "state": "online",
+ "removable": false,
+ "block": "7",
+ "node": 0
+ },{
+ "range": "0x0000000080000000-0x000000009fffffff",
+ "size": "512M",
+ "state": "online",
+ "removable": true,
+ "block": "8-9",
+ "node": 0
+ },{
+ "range": "0x00000000a0000000-0x00000000bfffffff",
+ "size": "512M",
+ "state": "online",
+ "removable": false,
+ "block": "10-11",
+ "node": 0
+ },{
+ "range": "0x00000000c0000000-0x00000000dfffffff",
+ "size": "512M",
+ "state": "online",
+ "removable": true,
+ "block": "12-13",
+ "node": 0
+ },{
+ "range": "0x00000000e0000000-0x00000000efffffff",
+ "size": "256M",
+ "state": "offline",
+ "removable": false,
+ "block": "14",
+ "node": 0
+ },{
+ "range": "0x00000000f0000000-0x00000000ffffffff",
+ "size": "256M",
+ "state": "online",
+ "removable": true,
+ "block": "15",
+ "node": 0
+ },{
+ "range": "0x0000000100000000-0x000000011fffffff",
+ "size": "512M",
+ "state": "online",
+ "removable": false,
+ "block": "16-17",
+ "node": 0
+ },{
+ "range": "0x0000000120000000-0x000000013fffffff",
+ "size": "512M",
+ "state": "online",
+ "removable": true,
+ "block": "18-19",
+ "node": 0
+ },{
+ "range": "0x0000000140000000-0x000000017fffffff",
+ "size": "1G",
+ "state": "offline",
+ "removable": false,
+ "block": "20-23",
+ "node": 0
+ }
+ ]
+}
+
+---
+
+$ lsmem -o +ZONES
+RANGE SIZE STATE REMOVABLE BLOCK ZONES
+0x0000000000000000-0x000000006fffffff 1.8G online yes 0-6 DMA
+0x0000000070000000-0x000000007fffffff 256M online no 7 DMA/Normal
+0x0000000080000000-0x000000009fffffff 512M online yes 8-9 Normal
+0x00000000a0000000-0x00000000bfffffff 512M online no 10-11 Normal
+0x00000000c0000000-0x00000000dfffffff 512M online yes 12-13 Normal
+0x00000000e0000000-0x00000000efffffff 256M offline 14 Normal
+0x00000000f0000000-0x00000000ffffffff 256M online yes 15 Normal
+0x0000000100000000-0x000000010fffffff 256M online no 16 Normal
+0x0000000110000000-0x000000011fffffff 256M online no 17 Normal/Movable
+0x0000000120000000-0x000000012fffffff 256M online yes 18 Movable/Normal
+0x0000000130000000-0x000000013fffffff 256M online yes 19 Movable
+0x0000000140000000-0x000000017fffffff 1G offline 20-23 Movable
+
+Memory block size: 256M
+Total online memory: 4.8G
+Total offline memory: 1.3G
+
+---
+
+$ lsmem
+RANGE SIZE STATE REMOVABLE BLOCK
+0x0000000000000000-0x000000006fffffff 1.8G online yes 0-6
+0x0000000070000000-0x000000007fffffff 256M online no 7
+0x0000000080000000-0x000000009fffffff 512M online yes 8-9
+0x00000000a0000000-0x00000000bfffffff 512M online no 10-11
+0x00000000c0000000-0x00000000dfffffff 512M online yes 12-13
+0x00000000e0000000-0x00000000efffffff 256M offline 14
+0x00000000f0000000-0x00000000ffffffff 256M online yes 15
+0x0000000100000000-0x000000011fffffff 512M online no 16-17
+0x0000000120000000-0x000000013fffffff 512M online yes 18-19
+0x0000000140000000-0x000000017fffffff 1G offline 20-23
+
+Memory block size: 256M
+Total online memory: 4.8G
+Total offline memory: 1.3G
diff --git a/tests/expected/lsmem/lsmem-x86_64-16g b/tests/expected/lsmem/lsmem-x86_64-16g
new file mode 100644
index 0000000..801b9f6
--- /dev/null
+++ b/tests/expected/lsmem/lsmem-x86_64-16g
@@ -0,0 +1,530 @@
+
+---
+
+$ lsmem --split=STATE,REMOVABLE
+RANGE SIZE STATE REMOVABLE BLOCK
+0x0000000000000000-0x0000000007ffffff 128M online no 0
+0x0000000008000000-0x0000000037ffffff 768M online yes 1-6
+0x0000000038000000-0x000000003fffffff 128M online no 7
+0x0000000040000000-0x0000000077ffffff 896M online yes 8-14
+0x0000000078000000-0x000000007fffffff 128M online no 15
+0x0000000080000000-0x00000000afffffff 768M online yes 16-21
+0x00000000b0000000-0x00000000bfffffff 256M online no 22-23
+0x0000000100000000-0x00000001a7ffffff 2.6G online no 32-52
+0x00000001a8000000-0x00000001afffffff 128M online yes 53
+0x00000001b0000000-0x00000001bfffffff 256M online no 54-55
+0x00000001c0000000-0x00000001ffffffff 1G online yes 56-63
+0x0000000200000000-0x0000000207ffffff 128M online no 64
+0x0000000208000000-0x000000021fffffff 384M online yes 65-67
+0x0000000220000000-0x0000000237ffffff 384M online no 68-70
+0x0000000238000000-0x0000000277ffffff 1G online yes 71-78
+0x0000000278000000-0x000000028fffffff 384M online no 79-81
+0x0000000290000000-0x0000000297ffffff 128M online yes 82
+0x0000000298000000-0x00000002a7ffffff 256M online no 83-84
+0x00000002a8000000-0x00000002c7ffffff 512M online yes 85-88
+0x00000002c8000000-0x00000002dfffffff 384M online no 89-91
+0x00000002e0000000-0x00000002efffffff 256M online yes 92-93
+0x00000002f0000000-0x000000034fffffff 1.5G online no 94-105
+0x0000000350000000-0x0000000357ffffff 128M online yes 106
+0x0000000358000000-0x000000036fffffff 384M online no 107-109
+0x0000000370000000-0x0000000377ffffff 128M online yes 110
+0x0000000378000000-0x00000003c7ffffff 1.3G online no 111-120
+0x00000003c8000000-0x00000003e7ffffff 512M online yes 121-124
+0x00000003e8000000-0x000000042fffffff 1.1G online no 125-133
+0x0000000430000000-0x0000000437ffffff 128M online yes 134
+0x0000000438000000-0x000000043fffffff 128M online no 135
+
+Memory block size: 128M
+Total online memory: 16G
+Total offline memory: 0B
+
+---
+
+$ lsmem --output RANGE,SIZE --split none
+RANGE SIZE
+0x0000000000000000-0x00000000bfffffff 3G
+0x0000000100000000-0x000000043fffffff 13G
+
+Memory block size: 128M
+Total online memory: 16G
+Total offline memory: 0B
+
+---
+
+$ lsmem --output RANGE,SIZE,STATE --split STATE
+RANGE SIZE STATE
+0x0000000000000000-0x00000000bfffffff 3G online
+0x0000000100000000-0x000000043fffffff 13G online
+
+Memory block size: 128M
+Total online memory: 16G
+Total offline memory: 0B
+
+---
+
+$ lsmem --all --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE
+RANGE SIZE STATE REMOVABLE BLOCK NODE
+0x0000000000000000-0x0000000007ffffff 128M online no 0 0
+0x0000000008000000-0x000000000fffffff 128M online yes 1 0
+0x0000000010000000-0x0000000017ffffff 128M online yes 2 0
+0x0000000018000000-0x000000001fffffff 128M online yes 3 0
+0x0000000020000000-0x0000000027ffffff 128M online yes 4 0
+0x0000000028000000-0x000000002fffffff 128M online yes 5 0
+0x0000000030000000-0x0000000037ffffff 128M online yes 6 0
+0x0000000038000000-0x000000003fffffff 128M online no 7 0
+0x0000000040000000-0x0000000047ffffff 128M online yes 8 0
+0x0000000048000000-0x000000004fffffff 128M online yes 9 0
+0x0000000050000000-0x0000000057ffffff 128M online yes 10 0
+0x0000000058000000-0x000000005fffffff 128M online yes 11 0
+0x0000000060000000-0x0000000067ffffff 128M online yes 12 0
+0x0000000068000000-0x000000006fffffff 128M online yes 13 0
+0x0000000070000000-0x0000000077ffffff 128M online yes 14 0
+0x0000000078000000-0x000000007fffffff 128M online no 15 0
+0x0000000080000000-0x0000000087ffffff 128M online yes 16 0
+0x0000000088000000-0x000000008fffffff 128M online yes 17 0
+0x0000000090000000-0x0000000097ffffff 128M online yes 18 0
+0x0000000098000000-0x000000009fffffff 128M online yes 19 0
+0x00000000a0000000-0x00000000a7ffffff 128M online yes 20 0
+0x00000000a8000000-0x00000000afffffff 128M online yes 21 0
+0x00000000b0000000-0x00000000b7ffffff 128M online no 22 0
+0x00000000b8000000-0x00000000bfffffff 128M online no 23 0
+0x0000000100000000-0x0000000107ffffff 128M online no 32 0
+0x0000000108000000-0x000000010fffffff 128M online no 33 0
+0x0000000110000000-0x0000000117ffffff 128M online no 34 0
+0x0000000118000000-0x000000011fffffff 128M online no 35 0
+0x0000000120000000-0x0000000127ffffff 128M online no 36 0
+0x0000000128000000-0x000000012fffffff 128M online no 37 0
+0x0000000130000000-0x0000000137ffffff 128M online no 38 0
+0x0000000138000000-0x000000013fffffff 128M online no 39 0
+0x0000000140000000-0x0000000147ffffff 128M online no 40 0
+0x0000000148000000-0x000000014fffffff 128M online no 41 0
+0x0000000150000000-0x0000000157ffffff 128M online no 42 0
+0x0000000158000000-0x000000015fffffff 128M online no 43 0
+0x0000000160000000-0x0000000167ffffff 128M online no 44 0
+0x0000000168000000-0x000000016fffffff 128M online no 45 0
+0x0000000170000000-0x0000000177ffffff 128M online no 46 0
+0x0000000178000000-0x000000017fffffff 128M online no 47 0
+0x0000000180000000-0x0000000187ffffff 128M online no 48 0
+0x0000000188000000-0x000000018fffffff 128M online no 49 0
+0x0000000190000000-0x0000000197ffffff 128M online no 50 0
+0x0000000198000000-0x000000019fffffff 128M online no 51 0
+0x00000001a0000000-0x00000001a7ffffff 128M online no 52 0
+0x00000001a8000000-0x00000001afffffff 128M online yes 53 0
+0x00000001b0000000-0x00000001b7ffffff 128M online no 54 0
+0x00000001b8000000-0x00000001bfffffff 128M online no 55 0
+0x00000001c0000000-0x00000001c7ffffff 128M online yes 56 0
+0x00000001c8000000-0x00000001cfffffff 128M online yes 57 0
+0x00000001d0000000-0x00000001d7ffffff 128M online yes 58 0
+0x00000001d8000000-0x00000001dfffffff 128M online yes 59 0
+0x00000001e0000000-0x00000001e7ffffff 128M online yes 60 0
+0x00000001e8000000-0x00000001efffffff 128M online yes 61 0
+0x00000001f0000000-0x00000001f7ffffff 128M online yes 62 0
+0x00000001f8000000-0x00000001ffffffff 128M online yes 63 0
+0x0000000200000000-0x0000000207ffffff 128M online no 64 0
+0x0000000208000000-0x000000020fffffff 128M online yes 65 0
+0x0000000210000000-0x0000000217ffffff 128M online yes 66 0
+0x0000000218000000-0x000000021fffffff 128M online yes 67 0
+0x0000000220000000-0x0000000227ffffff 128M online no 68 0
+0x0000000228000000-0x000000022fffffff 128M online no 69 0
+0x0000000230000000-0x0000000237ffffff 128M online no 70 0
+0x0000000238000000-0x000000023fffffff 128M online yes 71 0
+0x0000000240000000-0x0000000247ffffff 128M online yes 72 0
+0x0000000248000000-0x000000024fffffff 128M online yes 73 0
+0x0000000250000000-0x0000000257ffffff 128M online yes 74 0
+0x0000000258000000-0x000000025fffffff 128M online yes 75 0
+0x0000000260000000-0x0000000267ffffff 128M online yes 76 0
+0x0000000268000000-0x000000026fffffff 128M online yes 77 0
+0x0000000270000000-0x0000000277ffffff 128M online yes 78 0
+0x0000000278000000-0x000000027fffffff 128M online no 79 0
+0x0000000280000000-0x0000000287ffffff 128M online no 80 0
+0x0000000288000000-0x000000028fffffff 128M online no 81 0
+0x0000000290000000-0x0000000297ffffff 128M online yes 82 0
+0x0000000298000000-0x000000029fffffff 128M online no 83 0
+0x00000002a0000000-0x00000002a7ffffff 128M online no 84 0
+0x00000002a8000000-0x00000002afffffff 128M online yes 85 0
+0x00000002b0000000-0x00000002b7ffffff 128M online yes 86 0
+0x00000002b8000000-0x00000002bfffffff 128M online yes 87 0
+0x00000002c0000000-0x00000002c7ffffff 128M online yes 88 0
+0x00000002c8000000-0x00000002cfffffff 128M online no 89 0
+0x00000002d0000000-0x00000002d7ffffff 128M online no 90 0
+0x00000002d8000000-0x00000002dfffffff 128M online no 91 0
+0x00000002e0000000-0x00000002e7ffffff 128M online yes 92 0
+0x00000002e8000000-0x00000002efffffff 128M online yes 93 0
+0x00000002f0000000-0x00000002f7ffffff 128M online no 94 0
+0x00000002f8000000-0x00000002ffffffff 128M online no 95 0
+0x0000000300000000-0x0000000307ffffff 128M online no 96 0
+0x0000000308000000-0x000000030fffffff 128M online no 97 0
+0x0000000310000000-0x0000000317ffffff 128M online no 98 0
+0x0000000318000000-0x000000031fffffff 128M online no 99 0
+0x0000000320000000-0x0000000327ffffff 128M online no 100 0
+0x0000000328000000-0x000000032fffffff 128M online no 101 0
+0x0000000330000000-0x0000000337ffffff 128M online no 102 0
+0x0000000338000000-0x000000033fffffff 128M online no 103 0
+0x0000000340000000-0x0000000347ffffff 128M online no 104 0
+0x0000000348000000-0x000000034fffffff 128M online no 105 0
+0x0000000350000000-0x0000000357ffffff 128M online yes 106 0
+0x0000000358000000-0x000000035fffffff 128M online no 107 0
+0x0000000360000000-0x0000000367ffffff 128M online no 108 0
+0x0000000368000000-0x000000036fffffff 128M online no 109 0
+0x0000000370000000-0x0000000377ffffff 128M online yes 110 0
+0x0000000378000000-0x000000037fffffff 128M online no 111 0
+0x0000000380000000-0x0000000387ffffff 128M online no 112 0
+0x0000000388000000-0x000000038fffffff 128M online no 113 0
+0x0000000390000000-0x0000000397ffffff 128M online no 114 0
+0x0000000398000000-0x000000039fffffff 128M online no 115 0
+0x00000003a0000000-0x00000003a7ffffff 128M online no 116 0
+0x00000003a8000000-0x00000003afffffff 128M online no 117 0
+0x00000003b0000000-0x00000003b7ffffff 128M online no 118 0
+0x00000003b8000000-0x00000003bfffffff 128M online no 119 0
+0x00000003c0000000-0x00000003c7ffffff 128M online no 120 0
+0x00000003c8000000-0x00000003cfffffff 128M online yes 121 0
+0x00000003d0000000-0x00000003d7ffffff 128M online yes 122 0
+0x00000003d8000000-0x00000003dfffffff 128M online yes 123 0
+0x00000003e0000000-0x00000003e7ffffff 128M online yes 124 0
+0x00000003e8000000-0x00000003efffffff 128M online no 125 0
+0x00000003f0000000-0x00000003f7ffffff 128M online no 126 0
+0x00000003f8000000-0x00000003ffffffff 128M online no 127 0
+0x0000000400000000-0x0000000407ffffff 128M online no 128 0
+0x0000000408000000-0x000000040fffffff 128M online no 129 0
+0x0000000410000000-0x0000000417ffffff 128M online no 130 0
+0x0000000418000000-0x000000041fffffff 128M online no 131 0
+0x0000000420000000-0x0000000427ffffff 128M online no 132 0
+0x0000000428000000-0x000000042fffffff 128M online no 133 0
+0x0000000430000000-0x0000000437ffffff 128M online yes 134 0
+0x0000000438000000-0x000000043fffffff 128M online no 135 0
+
+Memory block size: 128M
+Total online memory: 16G
+Total offline memory: 0B
+
+---
+
+$ lsmem --raw --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE --split RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE
+RANGE SIZE STATE REMOVABLE BLOCK NODE
+0x0000000000000000-0x0000000007ffffff 128M online no 0 0
+0x0000000008000000-0x0000000037ffffff 768M online yes 1-6 0
+0x0000000038000000-0x000000003fffffff 128M online no 7 0
+0x0000000040000000-0x0000000077ffffff 896M online yes 8-14 0
+0x0000000078000000-0x000000007fffffff 128M online no 15 0
+0x0000000080000000-0x00000000afffffff 768M online yes 16-21 0
+0x00000000b0000000-0x00000000bfffffff 256M online no 22-23 0
+0x0000000100000000-0x00000001a7ffffff 2.6G online no 32-52 0
+0x00000001a8000000-0x00000001afffffff 128M online yes 53 0
+0x00000001b0000000-0x00000001bfffffff 256M online no 54-55 0
+0x00000001c0000000-0x00000001ffffffff 1G online yes 56-63 0
+0x0000000200000000-0x0000000207ffffff 128M online no 64 0
+0x0000000208000000-0x000000021fffffff 384M online yes 65-67 0
+0x0000000220000000-0x0000000237ffffff 384M online no 68-70 0
+0x0000000238000000-0x0000000277ffffff 1G online yes 71-78 0
+0x0000000278000000-0x000000028fffffff 384M online no 79-81 0
+0x0000000290000000-0x0000000297ffffff 128M online yes 82 0
+0x0000000298000000-0x00000002a7ffffff 256M online no 83-84 0
+0x00000002a8000000-0x00000002c7ffffff 512M online yes 85-88 0
+0x00000002c8000000-0x00000002dfffffff 384M online no 89-91 0
+0x00000002e0000000-0x00000002efffffff 256M online yes 92-93 0
+0x00000002f0000000-0x000000034fffffff 1.5G online no 94-105 0
+0x0000000350000000-0x0000000357ffffff 128M online yes 106 0
+0x0000000358000000-0x000000036fffffff 384M online no 107-109 0
+0x0000000370000000-0x0000000377ffffff 128M online yes 110 0
+0x0000000378000000-0x00000003c7ffffff 1.3G online no 111-120 0
+0x00000003c8000000-0x00000003e7ffffff 512M online yes 121-124 0
+0x00000003e8000000-0x000000042fffffff 1.1G online no 125-133 0
+0x0000000430000000-0x0000000437ffffff 128M online yes 134 0
+0x0000000438000000-0x000000043fffffff 128M online no 135 0
+
+---
+
+$ lsmem --json --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE --split RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE
+{
+ "memory": [
+ {
+ "range": "0x0000000000000000-0x0000000007ffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": false,
+ "block": "0",
+ "node": 0
+ },{
+ "range": "0x0000000008000000-0x0000000037ffffff",
+ "size": "768M",
+ "state": "online",
+ "removable": true,
+ "block": "1-6",
+ "node": 0
+ },{
+ "range": "0x0000000038000000-0x000000003fffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": false,
+ "block": "7",
+ "node": 0
+ },{
+ "range": "0x0000000040000000-0x0000000077ffffff",
+ "size": "896M",
+ "state": "online",
+ "removable": true,
+ "block": "8-14",
+ "node": 0
+ },{
+ "range": "0x0000000078000000-0x000000007fffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": false,
+ "block": "15",
+ "node": 0
+ },{
+ "range": "0x0000000080000000-0x00000000afffffff",
+ "size": "768M",
+ "state": "online",
+ "removable": true,
+ "block": "16-21",
+ "node": 0
+ },{
+ "range": "0x00000000b0000000-0x00000000bfffffff",
+ "size": "256M",
+ "state": "online",
+ "removable": false,
+ "block": "22-23",
+ "node": 0
+ },{
+ "range": "0x0000000100000000-0x00000001a7ffffff",
+ "size": "2.6G",
+ "state": "online",
+ "removable": false,
+ "block": "32-52",
+ "node": 0
+ },{
+ "range": "0x00000001a8000000-0x00000001afffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": true,
+ "block": "53",
+ "node": 0
+ },{
+ "range": "0x00000001b0000000-0x00000001bfffffff",
+ "size": "256M",
+ "state": "online",
+ "removable": false,
+ "block": "54-55",
+ "node": 0
+ },{
+ "range": "0x00000001c0000000-0x00000001ffffffff",
+ "size": "1G",
+ "state": "online",
+ "removable": true,
+ "block": "56-63",
+ "node": 0
+ },{
+ "range": "0x0000000200000000-0x0000000207ffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": false,
+ "block": "64",
+ "node": 0
+ },{
+ "range": "0x0000000208000000-0x000000021fffffff",
+ "size": "384M",
+ "state": "online",
+ "removable": true,
+ "block": "65-67",
+ "node": 0
+ },{
+ "range": "0x0000000220000000-0x0000000237ffffff",
+ "size": "384M",
+ "state": "online",
+ "removable": false,
+ "block": "68-70",
+ "node": 0
+ },{
+ "range": "0x0000000238000000-0x0000000277ffffff",
+ "size": "1G",
+ "state": "online",
+ "removable": true,
+ "block": "71-78",
+ "node": 0
+ },{
+ "range": "0x0000000278000000-0x000000028fffffff",
+ "size": "384M",
+ "state": "online",
+ "removable": false,
+ "block": "79-81",
+ "node": 0
+ },{
+ "range": "0x0000000290000000-0x0000000297ffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": true,
+ "block": "82",
+ "node": 0
+ },{
+ "range": "0x0000000298000000-0x00000002a7ffffff",
+ "size": "256M",
+ "state": "online",
+ "removable": false,
+ "block": "83-84",
+ "node": 0
+ },{
+ "range": "0x00000002a8000000-0x00000002c7ffffff",
+ "size": "512M",
+ "state": "online",
+ "removable": true,
+ "block": "85-88",
+ "node": 0
+ },{
+ "range": "0x00000002c8000000-0x00000002dfffffff",
+ "size": "384M",
+ "state": "online",
+ "removable": false,
+ "block": "89-91",
+ "node": 0
+ },{
+ "range": "0x00000002e0000000-0x00000002efffffff",
+ "size": "256M",
+ "state": "online",
+ "removable": true,
+ "block": "92-93",
+ "node": 0
+ },{
+ "range": "0x00000002f0000000-0x000000034fffffff",
+ "size": "1.5G",
+ "state": "online",
+ "removable": false,
+ "block": "94-105",
+ "node": 0
+ },{
+ "range": "0x0000000350000000-0x0000000357ffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": true,
+ "block": "106",
+ "node": 0
+ },{
+ "range": "0x0000000358000000-0x000000036fffffff",
+ "size": "384M",
+ "state": "online",
+ "removable": false,
+ "block": "107-109",
+ "node": 0
+ },{
+ "range": "0x0000000370000000-0x0000000377ffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": true,
+ "block": "110",
+ "node": 0
+ },{
+ "range": "0x0000000378000000-0x00000003c7ffffff",
+ "size": "1.3G",
+ "state": "online",
+ "removable": false,
+ "block": "111-120",
+ "node": 0
+ },{
+ "range": "0x00000003c8000000-0x00000003e7ffffff",
+ "size": "512M",
+ "state": "online",
+ "removable": true,
+ "block": "121-124",
+ "node": 0
+ },{
+ "range": "0x00000003e8000000-0x000000042fffffff",
+ "size": "1.1G",
+ "state": "online",
+ "removable": false,
+ "block": "125-133",
+ "node": 0
+ },{
+ "range": "0x0000000430000000-0x0000000437ffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": true,
+ "block": "134",
+ "node": 0
+ },{
+ "range": "0x0000000438000000-0x000000043fffffff",
+ "size": "128M",
+ "state": "online",
+ "removable": false,
+ "block": "135",
+ "node": 0
+ }
+ ]
+}
+
+---
+
+$ lsmem -o +ZONES
+RANGE SIZE STATE REMOVABLE BLOCK ZONES
+0x0000000000000000-0x0000000007ffffff 128M online no 0 None
+0x0000000008000000-0x0000000037ffffff 768M online yes 1-6 DMA32
+0x0000000038000000-0x000000003fffffff 128M online no 7 DMA32
+0x0000000040000000-0x0000000077ffffff 896M online yes 8-14 DMA32
+0x0000000078000000-0x000000007fffffff 128M online no 15 DMA32
+0x0000000080000000-0x00000000afffffff 768M online yes 16-21 DMA32
+0x00000000b0000000-0x00000000bfffffff 256M online no 22-23 DMA32
+0x0000000100000000-0x00000001a7ffffff 2.6G online no 32-52 Normal
+0x00000001a8000000-0x00000001afffffff 128M online yes 53 Normal
+0x00000001b0000000-0x00000001bfffffff 256M online no 54-55 Normal
+0x00000001c0000000-0x00000001ffffffff 1G online yes 56-63 Normal
+0x0000000200000000-0x0000000207ffffff 128M online no 64 Normal
+0x0000000208000000-0x000000021fffffff 384M online yes 65-67 Normal
+0x0000000220000000-0x0000000237ffffff 384M online no 68-70 Normal
+0x0000000238000000-0x0000000277ffffff 1G online yes 71-78 Normal
+0x0000000278000000-0x000000028fffffff 384M online no 79-81 Normal
+0x0000000290000000-0x0000000297ffffff 128M online yes 82 Normal
+0x0000000298000000-0x00000002a7ffffff 256M online no 83-84 Normal
+0x00000002a8000000-0x00000002c7ffffff 512M online yes 85-88 Normal
+0x00000002c8000000-0x00000002dfffffff 384M online no 89-91 Normal
+0x00000002e0000000-0x00000002efffffff 256M online yes 92-93 Normal
+0x00000002f0000000-0x000000034fffffff 1.5G online no 94-105 Normal
+0x0000000350000000-0x0000000357ffffff 128M online yes 106 Normal
+0x0000000358000000-0x000000036fffffff 384M online no 107-109 Normal
+0x0000000370000000-0x0000000377ffffff 128M online yes 110 Normal
+0x0000000378000000-0x00000003c7ffffff 1.3G online no 111-120 Normal
+0x00000003c8000000-0x00000003e7ffffff 512M online yes 121-124 Normal
+0x00000003e8000000-0x000000042fffffff 1.1G online no 125-133 Normal
+0x0000000430000000-0x0000000437ffffff 128M online yes 134 Normal
+0x0000000438000000-0x000000043fffffff 128M online no 135 None
+
+Memory block size: 128M
+Total online memory: 16G
+Total offline memory: 0B
+
+---
+
+$ lsmem
+RANGE SIZE STATE REMOVABLE BLOCK
+0x0000000000000000-0x0000000007ffffff 128M online no 0
+0x0000000008000000-0x0000000037ffffff 768M online yes 1-6
+0x0000000038000000-0x000000003fffffff 128M online no 7
+0x0000000040000000-0x0000000077ffffff 896M online yes 8-14
+0x0000000078000000-0x000000007fffffff 128M online no 15
+0x0000000080000000-0x00000000afffffff 768M online yes 16-21
+0x00000000b0000000-0x00000000bfffffff 256M online no 22-23
+0x0000000100000000-0x00000001a7ffffff 2.6G online no 32-52
+0x00000001a8000000-0x00000001afffffff 128M online yes 53
+0x00000001b0000000-0x00000001bfffffff 256M online no 54-55
+0x00000001c0000000-0x00000001ffffffff 1G online yes 56-63
+0x0000000200000000-0x0000000207ffffff 128M online no 64
+0x0000000208000000-0x000000021fffffff 384M online yes 65-67
+0x0000000220000000-0x0000000237ffffff 384M online no 68-70
+0x0000000238000000-0x0000000277ffffff 1G online yes 71-78
+0x0000000278000000-0x000000028fffffff 384M online no 79-81
+0x0000000290000000-0x0000000297ffffff 128M online yes 82
+0x0000000298000000-0x00000002a7ffffff 256M online no 83-84
+0x00000002a8000000-0x00000002c7ffffff 512M online yes 85-88
+0x00000002c8000000-0x00000002dfffffff 384M online no 89-91
+0x00000002e0000000-0x00000002efffffff 256M online yes 92-93
+0x00000002f0000000-0x000000034fffffff 1.5G online no 94-105
+0x0000000350000000-0x0000000357ffffff 128M online yes 106
+0x0000000358000000-0x000000036fffffff 384M online no 107-109
+0x0000000370000000-0x0000000377ffffff 128M online yes 110
+0x0000000378000000-0x00000003c7ffffff 1.3G online no 111-120
+0x00000003c8000000-0x00000003e7ffffff 512M online yes 121-124
+0x00000003e8000000-0x000000042fffffff 1.1G online no 125-133
+0x0000000430000000-0x0000000437ffffff 128M online yes 134
+0x0000000438000000-0x000000043fffffff 128M online no 135
+
+Memory block size: 128M
+Total online memory: 16G
+Total offline memory: 0B
diff --git a/tests/expected/lsns/ioctl_ns b/tests/expected/lsns/ioctl_ns
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/expected/lsns/ioctl_ns
@@ -0,0 +1 @@
+0
diff --git a/tests/expected/lsns/netnsid b/tests/expected/lsns/netnsid
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/expected/lsns/netnsid
@@ -0,0 +1 @@
+0
diff --git a/tests/expected/lsns/nsfs b/tests/expected/lsns/nsfs
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/expected/lsns/nsfs
@@ -0,0 +1 @@
+0
diff --git a/tests/expected/md5/md5 b/tests/expected/md5/md5
new file mode 100644
index 0000000..d6559a7
--- /dev/null
+++ b/tests/expected/md5/md5
@@ -0,0 +1,7 @@
+d41d8cd98f00b204e9800998ecf8427e
+900150983cd24fb0d6963f7d28e17f72
+5eb6d580e5f68fde65c3778afb8826ff
+bd1e13bdaab82581d4dc299eb9a3da0f
+d81ee4f567972a18f9326540b5d8aeaf
+9561bd208c0041c673080ed744919b85
+d98d58d5562ca4dd47f0f0fe86b2d48f
diff --git a/tests/expected/minix/fsck b/tests/expected/minix/fsck
new file mode 100644
index 0000000..fe0c058
--- /dev/null
+++ b/tests/expected/minix/fsck
@@ -0,0 +1,365 @@
+#####################################
+$ mkfs.minix image
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+Filesystem state=1
+namelen=30
+
+
+ 1 inodes used (0%)
+ 59 zones used (1%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -n 14 image
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+Filesystem state=1
+namelen=14
+
+
+ 1 inodes used (0%)
+ 59 zones used (1%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -n 30 image
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+Filesystem state=1
+namelen=30
+
+
+ 1 inodes used (0%)
+ 59 zones used (1%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -n 60 image
+return mkfs: 8
+#####################################
+$ mkfs.minix -1 image
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+Filesystem state=1
+namelen=30
+
+
+ 1 inodes used (0%)
+ 59 zones used (1%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -1 -n 14 image
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+Filesystem state=1
+namelen=14
+
+
+ 1 inodes used (0%)
+ 59 zones used (1%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -1 -n 30 image
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1728 inodes
+5120 blocks
+Firstdatazone=58 (58)
+Zonesize=1024
+Maxsize=268966912
+Filesystem state=1
+namelen=30
+
+
+ 1 inodes used (0%)
+ 59 zones used (1%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -1 -n 60 image
+return mkfs: 8
+#####################################
+$ mkfs.minix -2 image
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+Filesystem state=1
+namelen=30
+
+
+ 1 inodes used (0%)
+ 112 zones used (2%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -2 -n 14 image
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+Filesystem state=1
+namelen=14
+
+
+ 1 inodes used (0%)
+ 112 zones used (2%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -2 -n 30 image
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+Filesystem state=1
+namelen=30
+
+
+ 1 inodes used (0%)
+ 112 zones used (2%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -2 -n 60 image
+return mkfs: 8
+#####################################
+$ mkfs.minix -3 image
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+namelen=60
+
+
+ 1 inodes used (0%)
+ 112 zones used (2%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
+#####################################
+$ mkfs.minix -3 -n 14 image
+return mkfs: 8
+#####################################
+$ mkfs.minix -3 -n 30 image
+return mkfs: 8
+#####################################
+$ mkfs.minix -3 -n 60 image
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+
+return mkfs: 0
+$ fsck.minix -lavsf image
+Forcing filesystem check on image.
+1712 inodes
+5120 blocks
+Firstdatazone=111 (111)
+Zonesize=1024
+Maxsize=2147483647
+namelen=60
+
+
+ 1 inodes used (0%)
+ 112 zones used (2%)
+
+ 0 regular files
+ 1 directories
+ 0 character device files
+ 0 block device files
+ 0 links
+ 0 symbolic links
+------
+ 1 files
+return fsck: 0
diff --git a/tests/expected/minix/fsck-images-auto-fix b/tests/expected/minix/fsck-images-auto-fix
new file mode 100644
index 0000000..74a6487
--- /dev/null
+++ b/tests/expected/minix/fsck-images-auto-fix
@@ -0,0 +1,57 @@
+Filesystem auto-fix is dirty, needs checking.
+Read error: bad block in file '/'
+16 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=2147483647
+namelen=60
+
+Read error: bad block in file '/'
+/: bad directory: '.' isn't first
+Read error: bad block in file '/'
+/: bad directory: '..' isn't second
+Inode 1 not used, marked used in the bitmap.
+
+ 0 inodes used (0%)
+ 6 zones used (37%)
+
+ 0 regular files
+ 0 directories
+ 0 character device files
+ 0 block device files
+ 1 links
+ 0 symbolic links
+------
+ 1 files
+----------------------------
+FILE SYSTEM HAS BEEN CHANGED
+----------------------------
+fsck reports changed and uncorrected: 7
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 10 00 00 00 00 00 01 00 01 00 05 00 00 00 00 00 |................|
+00000410 ff ff ff 7f 10 00 00 00 5a 4d 00 00 00 04 00 00 |........ZM......|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 fe ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 ed 41 02 00 e8 03 e8 03 80 00 00 00 98 3d b9 55 |.A...........=.U|
+00001010 98 3d b9 55 98 3d b9 55 05 00 00 00 00 00 00 00 |.=.U.=.U........|
+00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 01 00 fe ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00001410 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001800 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00001810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001c00 ed 41 02 00 e8 03 e8 03 80 00 00 00 98 3d b9 55 |.A...........=.U|
+00001c10 98 3d b9 55 98 3d b9 55 05 00 00 00 00 00 00 00 |.=.U.=.U........|
+00001c20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00002000
diff --git a/tests/expected/minix/fsck-images-badblocks b/tests/expected/minix/fsck-images-badblocks
new file mode 100644
index 0000000..e521e23
--- /dev/null
+++ b/tests/expected/minix/fsck-images-badblocks
@@ -0,0 +1,35 @@
+32 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=268966912
+
+2 bad blocks
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 20 00 10 00 01 00 01 00 05 00 00 00 00 1c 08 10 | ...............|
+00000410 8f 13 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 07 00 00 00 fe ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 33 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |3...............|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 ed 41 00 00 60 00 00 00 34 29 bd 55 00 02 05 00 |.A..`...4).U....|
+00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001020 00 80 00 00 00 08 00 00 34 29 bd 55 00 01 08 00 |........4).U....|
+00001030 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 01 00 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 01 00 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001440 02 00 2e 62 61 64 62 6c 6f 63 6b 73 00 00 00 00 |...badblocks....|
+00001450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-badblocks.BE b/tests/expected/minix/fsck-images-badblocks.BE
new file mode 100644
index 0000000..724f4de
--- /dev/null
+++ b/tests/expected/minix/fsck-images-badblocks.BE
@@ -0,0 +1,35 @@
+32 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=268966912
+
+2 bad blocks
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 00 20 00 10 00 01 00 01 00 05 00 00 10 08 1c 00 |. ..............|
+00000410 13 8f 00 01 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 07 00 00 00 fe ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 33 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |3...............|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 41 ed 00 00 00 00 00 60 55 bd 29 34 00 02 00 05 |A......`U.)4....|
+00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001020 80 00 00 00 00 00 08 00 55 bd 29 34 00 01 00 08 |........U.)4....|
+00001030 00 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 00 01 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 00 01 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001440 00 02 2e 62 61 64 62 6c 6f 63 6b 73 00 00 00 00 |...badblocks....|
+00001450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-broken-root b/tests/expected/minix/fsck-images-broken-root
new file mode 100644
index 0000000..2c78bdf
--- /dev/null
+++ b/tests/expected/minix/fsck-images-broken-root
@@ -0,0 +1,7 @@
+Read error: bad block in file '/'
+Read error: bad block in file '/'
+/: bad directory: '.' isn't first
+Read error: bad block in file '/'
+/: bad directory: '..' isn't second
+Inode 1 not used, marked used in the bitmap.
+fsck reports uncorrected: 4
diff --git a/tests/expected/minix/fsck-images-bug.773892 b/tests/expected/minix/fsck-images-bug.773892
new file mode 100644
index 0000000..6e22927
--- /dev/null
+++ b/tests/expected/minix/fsck-images-bug.773892
@@ -0,0 +1 @@
+fsck reports uncorrected: 4
diff --git a/tests/expected/minix/fsck-images-check-blocks b/tests/expected/minix/fsck-images-check-blocks
new file mode 100644
index 0000000..fce90fd
--- /dev/null
+++ b/tests/expected/minix/fsck-images-check-blocks
@@ -0,0 +1,29 @@
+32 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=268966912
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 20 00 10 00 01 00 01 00 05 00 00 00 00 1c 08 10 | ...............|
+00000410 8f 13 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 00 00 fe ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 ed 41 00 00 40 00 00 00 34 29 bd 55 00 02 05 00 |.A..@...4).U....|
+00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 01 00 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 01 00 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-check-blocks.BE b/tests/expected/minix/fsck-images-check-blocks.BE
new file mode 100644
index 0000000..8bc29b8
--- /dev/null
+++ b/tests/expected/minix/fsck-images-check-blocks.BE
@@ -0,0 +1,29 @@
+32 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=268966912
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 00 20 00 10 00 01 00 01 00 05 00 00 10 08 1c 00 |. ..............|
+00000410 13 8f 00 01 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 00 00 fe ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 41 ed 00 00 00 00 00 40 55 bd 29 34 00 02 00 05 |A......@U.)4....|
+00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 00 01 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 00 01 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v1c14 b/tests/expected/minix/fsck-images-v1c14
new file mode 100644
index 0000000..75e3310
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v1c14
@@ -0,0 +1,28 @@
+32 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=268966912
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 20 00 10 00 01 00 01 00 05 00 00 00 00 1c 08 10 | ...............|
+00000410 7f 13 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 00 00 fe ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 ed 41 00 00 20 00 00 00 34 29 bd 55 00 02 05 00 |.A.. ...4).U....|
+00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 01 00 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 01 00 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v1c14.BE b/tests/expected/minix/fsck-images-v1c14.BE
new file mode 100644
index 0000000..5df561c
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v1c14.BE
@@ -0,0 +1,28 @@
+32 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=268966912
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 00 20 00 10 00 01 00 01 00 05 00 00 10 08 1c 00 |. ..............|
+00000410 13 7f 00 01 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 00 00 fe ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 41 ed 00 00 00 00 00 20 55 bd 29 34 00 02 00 05 |A...... U.)4....|
+00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 00 01 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 01 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v1c30 b/tests/expected/minix/fsck-images-v1c30
new file mode 100644
index 0000000..fce90fd
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v1c30
@@ -0,0 +1,29 @@
+32 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=268966912
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 20 00 10 00 01 00 01 00 05 00 00 00 00 1c 08 10 | ...............|
+00000410 8f 13 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 00 00 fe ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 ed 41 00 00 40 00 00 00 34 29 bd 55 00 02 05 00 |.A..@...4).U....|
+00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 01 00 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 01 00 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v1c30.BE b/tests/expected/minix/fsck-images-v1c30.BE
new file mode 100644
index 0000000..8bc29b8
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v1c30.BE
@@ -0,0 +1,29 @@
+32 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=268966912
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 00 20 00 10 00 01 00 01 00 05 00 00 10 08 1c 00 |. ..............|
+00000410 13 8f 00 01 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 00 00 fe ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 41 ed 00 00 00 00 00 40 55 bd 29 34 00 02 00 05 |A......@U.)4....|
+00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 00 01 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 00 01 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v2c14 b/tests/expected/minix/fsck-images-v2c14
new file mode 100644
index 0000000..e8bc4e3
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v2c14
@@ -0,0 +1,29 @@
+16 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 10 00 00 00 01 00 01 00 05 00 00 00 ff ff ff 7f |................|
+00000410 68 24 01 00 10 00 00 00 00 00 00 00 00 00 00 00 |h$..............|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 fe ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 ed 41 02 00 00 00 00 00 20 00 00 00 34 29 bd 55 |.A...... ...4).U|
+00001010 34 29 bd 55 34 29 bd 55 05 00 00 00 00 00 00 00 |4).U4).U........|
+00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 01 00 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 01 00 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v2c14.BE b/tests/expected/minix/fsck-images-v2c14.BE
new file mode 100644
index 0000000..8b67386
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v2c14.BE
@@ -0,0 +1,29 @@
+16 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 00 10 00 00 00 01 00 01 00 05 00 00 7f ff ff ff |................|
+00000410 24 68 00 01 00 00 00 10 00 00 00 00 00 00 00 00 |$h..............|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 fe ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 41 ed 00 02 00 00 00 00 00 00 00 20 55 bd 29 34 |A.......... U.)4|
+00001010 55 bd 29 34 55 bd 29 34 00 00 00 05 00 00 00 00 |U.)4U.)4........|
+00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 00 01 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 01 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v2c30 b/tests/expected/minix/fsck-images-v2c30
new file mode 100644
index 0000000..0066e49
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v2c30
@@ -0,0 +1,30 @@
+16 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 10 00 00 00 01 00 01 00 05 00 00 00 ff ff ff 7f |................|
+00000410 78 24 01 00 10 00 00 00 00 00 00 00 00 00 00 00 |x$..............|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 fe ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 ed 41 02 00 00 00 00 00 40 00 00 00 34 29 bd 55 |.A......@...4).U|
+00001010 34 29 bd 55 34 29 bd 55 05 00 00 00 00 00 00 00 |4).U4).U........|
+00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 01 00 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 01 00 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v2c30.BE b/tests/expected/minix/fsck-images-v2c30.BE
new file mode 100644
index 0000000..722d368
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v2c30.BE
@@ -0,0 +1,30 @@
+16 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 00 10 00 00 00 01 00 01 00 05 00 00 7f ff ff ff |................|
+00000410 24 78 00 01 00 00 00 10 00 00 00 00 00 00 00 00 |$x..............|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 fe ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 41 ed 00 02 00 00 00 00 00 00 00 40 55 bd 29 34 |A..........@U.)4|
+00001010 55 bd 29 34 55 bd 29 34 00 00 00 05 00 00 00 00 |U.)4U.)4........|
+00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 00 01 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001420 00 01 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v3c60 b/tests/expected/minix/fsck-images-v3c60
new file mode 100644
index 0000000..89ac9c9
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v3c60
@@ -0,0 +1,31 @@
+16 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 10 00 00 00 00 00 01 00 01 00 05 00 00 00 00 00 |................|
+00000410 ff ff ff 7f 10 00 00 00 5a 4d 00 00 00 04 00 00 |........ZM......|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 fe ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 ed 41 02 00 00 00 00 00 80 00 00 00 34 29 bd 55 |.A..........4).U|
+00001010 34 29 bd 55 34 29 bd 55 05 00 00 00 00 00 00 00 |4).U4).U........|
+00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 01 00 00 00 2e 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001440 01 00 00 00 2e 2e 00 00 00 00 00 00 00 00 00 00 |................|
+00001450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck-images-v3c60.BE b/tests/expected/minix/fsck-images-v3c60.BE
new file mode 100644
index 0000000..788c01d
--- /dev/null
+++ b/tests/expected/minix/fsck-images-v3c60.BE
@@ -0,0 +1,31 @@
+16 inodes
+16 blocks
+Firstdatazone=5 (5)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+fsck return value: 0
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000400 00 00 00 10 00 00 00 01 00 01 00 05 00 00 00 00 |................|
+00000410 7f ff ff ff 00 00 00 10 4d 5a 00 00 04 00 00 00 |........MZ......|
+00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00000800 03 00 fe ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000810 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00000c00 03 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+00000c10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
+*
+00001000 41 ed 00 02 00 00 00 00 00 00 00 80 55 bd 29 34 |A...........U.)4|
+00001010 55 bd 29 34 55 bd 29 34 00 00 00 05 00 00 00 00 |U.)4U.)4........|
+00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001400 00 00 00 01 2e 00 00 00 00 00 00 00 00 00 00 00 |................|
+00001410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00001440 00 00 00 01 2e 2e 00 00 00 00 00 00 00 00 00 00 |................|
+00001450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00004000
diff --git a/tests/expected/minix/fsck.err b/tests/expected/minix/fsck.err
new file mode 100644
index 0000000..30d2735
--- /dev/null
+++ b/tests/expected/minix/fsck.err
@@ -0,0 +1,32 @@
+$ mkfs.minix image
+$ fsck.minix -lavsf image
+$ mkfs.minix -n 14 image
+$ fsck.minix -lavsf image
+$ mkfs.minix -n 30 image
+$ fsck.minix -lavsf image
+$ mkfs.minix -n 60 image
+mkfs.minix: unsupported name length: 60
+$ mkfs.minix -1 image
+$ fsck.minix -lavsf image
+$ mkfs.minix -1 -n 14 image
+$ fsck.minix -lavsf image
+$ mkfs.minix -1 -n 30 image
+$ fsck.minix -lavsf image
+$ mkfs.minix -1 -n 60 image
+mkfs.minix: unsupported name length: 60
+$ mkfs.minix -2 image
+$ fsck.minix -lavsf image
+$ mkfs.minix -2 -n 14 image
+$ fsck.minix -lavsf image
+$ mkfs.minix -2 -n 30 image
+$ fsck.minix -lavsf image
+$ mkfs.minix -2 -n 60 image
+mkfs.minix: unsupported name length: 60
+$ mkfs.minix -3 image
+$ fsck.minix -lavsf image
+$ mkfs.minix -3 -n 14 image
+mkfs.minix: unsupported name length: 14
+$ mkfs.minix -3 -n 30 image
+mkfs.minix: unsupported name length: 30
+$ mkfs.minix -3 -n 60 image
+$ fsck.minix -lavsf image
diff --git a/tests/expected/minix/mkfs-v1c14 b/tests/expected/minix/mkfs-v1c14
new file mode 100644
index 0000000..cd2fa38
--- /dev/null
+++ b/tests/expected/minix/mkfs-v1c14
@@ -0,0 +1,9 @@
+create minix fs -1 -n 14
+3424 inodes
+10224 blocks
+Firstdatazone=112 (112)
+Zonesize=1024
+Maxsize=268966912
+
+mkfs return value: 0
+umount the image
diff --git a/tests/expected/minix/mkfs-v1c30 b/tests/expected/minix/mkfs-v1c30
new file mode 100644
index 0000000..bbcc316
--- /dev/null
+++ b/tests/expected/minix/mkfs-v1c30
@@ -0,0 +1,9 @@
+create minix fs -1 -n 30
+3424 inodes
+10224 blocks
+Firstdatazone=112 (112)
+Zonesize=1024
+Maxsize=268966912
+
+mkfs return value: 0
+umount the image
diff --git a/tests/expected/minix/mkfs-v2c14 b/tests/expected/minix/mkfs-v2c14
new file mode 100644
index 0000000..65293b0
--- /dev/null
+++ b/tests/expected/minix/mkfs-v2c14
@@ -0,0 +1,9 @@
+create minix fs -2 -n 14
+3408 inodes
+10224 blocks
+Firstdatazone=218 (218)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+umount the image
diff --git a/tests/expected/minix/mkfs-v2c30 b/tests/expected/minix/mkfs-v2c30
new file mode 100644
index 0000000..bc76d43
--- /dev/null
+++ b/tests/expected/minix/mkfs-v2c30
@@ -0,0 +1,9 @@
+create minix fs -2 -n 30
+3408 inodes
+10224 blocks
+Firstdatazone=218 (218)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+umount the image
diff --git a/tests/expected/minix/mkfs-v2i65535 b/tests/expected/minix/mkfs-v2i65535
new file mode 100644
index 0000000..761a36b
--- /dev/null
+++ b/tests/expected/minix/mkfs-v2i65535
@@ -0,0 +1,9 @@
+create minix fs -2 -i 65535
+65535 inodes
+10224 blocks
+Firstdatazone=4107 (4107)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+umount the image
diff --git a/tests/expected/minix/mkfs-v3c60 b/tests/expected/minix/mkfs-v3c60
new file mode 100644
index 0000000..ef686d9
--- /dev/null
+++ b/tests/expected/minix/mkfs-v3c60
@@ -0,0 +1,9 @@
+create minix fs -3 -n 60
+3408 inodes
+10224 blocks
+Firstdatazone=218 (218)
+Zonesize=1024
+Maxsize=2147483647
+
+mkfs return value: 0
+umount the image
diff --git a/tests/expected/misc/fallocate b/tests/expected/misc/fallocate
new file mode 100644
index 0000000..e45b99e
--- /dev/null
+++ b/tests/expected/misc/fallocate
@@ -0,0 +1 @@
+384
diff --git a/tests/expected/misc/flock b/tests/expected/misc/flock
new file mode 100644
index 0000000..9c97396
--- /dev/null
+++ b/tests/expected/misc/flock
@@ -0,0 +1,3 @@
+Locking
+Unlocking
+Unlocked
diff --git a/tests/expected/misc/flock-exclusive b/tests/expected/misc/flock-exclusive
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/misc/flock-exclusive
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/misc/flock-fd b/tests/expected/misc/flock-fd
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/misc/flock-fd
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/misc/flock-no-fork b/tests/expected/misc/flock-no-fork
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/misc/flock-no-fork
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/misc/flock-non-block b/tests/expected/misc/flock-non-block
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/misc/flock-non-block
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/misc/flock-shared b/tests/expected/misc/flock-shared
new file mode 100644
index 0000000..011f325
--- /dev/null
+++ b/tests/expected/misc/flock-shared
@@ -0,0 +1,2 @@
+Have shared lock
+Success
diff --git a/tests/expected/misc/flock-time-check b/tests/expected/misc/flock-time-check
new file mode 100644
index 0000000..2e9ba47
--- /dev/null
+++ b/tests/expected/misc/flock-time-check
@@ -0,0 +1 @@
+success
diff --git a/tests/expected/misc/flock-timeout b/tests/expected/misc/flock-timeout
new file mode 100644
index 0000000..b4cd5a4
--- /dev/null
+++ b/tests/expected/misc/flock-timeout
@@ -0,0 +1,2 @@
+After timeout.
+Success
diff --git a/tests/expected/misc/ionice b/tests/expected/misc/ionice
new file mode 100644
index 0000000..a4fdd04
--- /dev/null
+++ b/tests/expected/misc/ionice
@@ -0,0 +1,2 @@
+/etc/passwd
+none: prio 0
diff --git a/tests/expected/misc/ionice.err b/tests/expected/misc/ionice.err
new file mode 100644
index 0000000..7ef5399
--- /dev/null
+++ b/tests/expected/misc/ionice.err
@@ -0,0 +1,7 @@
+ionice: ignoring given class data for none class
+ionice: unknown prio class 7
+ionice: ioprio_set failed: Invalid argument
+ionice: unknown prio class 7
+ionice: ioprio_set failed: Invalid argument
+ionice: unknown prio class 8
+ionice: ioprio_set failed: Invalid argument
diff --git a/tests/expected/misc/line b/tests/expected/misc/line
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/misc/line
diff --git a/tests/expected/misc/line-empty-input b/tests/expected/misc/line-empty-input
new file mode 100644
index 0000000..29c61d5
--- /dev/null
+++ b/tests/expected/misc/line-empty-input
@@ -0,0 +1,2 @@
+
+ret: 1
diff --git a/tests/expected/misc/line-empty-input-wait-for-eof b/tests/expected/misc/line-empty-input-wait-for-eof
new file mode 100644
index 0000000..29c61d5
--- /dev/null
+++ b/tests/expected/misc/line-empty-input-wait-for-eof
@@ -0,0 +1,2 @@
+
+ret: 1
diff --git a/tests/expected/misc/line-large-line b/tests/expected/misc/line-large-line
new file mode 100644
index 0000000..dc4f520
--- /dev/null
+++ b/tests/expected/misc/line-large-line
@@ -0,0 +1,5 @@
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
+00100000 0a |.|
+00100001
+ret: 0
diff --git a/tests/expected/misc/line-one-call b/tests/expected/misc/line-one-call
new file mode 100644
index 0000000..cbf0b3b
--- /dev/null
+++ b/tests/expected/misc/line-one-call
@@ -0,0 +1,2 @@
+a
+ret: 0
diff --git a/tests/expected/misc/line-text-without-eol b/tests/expected/misc/line-text-without-eol
new file mode 100644
index 0000000..42f49d6
--- /dev/null
+++ b/tests/expected/misc/line-text-without-eol
@@ -0,0 +1,2 @@
+abc
+ret: 1
diff --git a/tests/expected/misc/line-two-calls b/tests/expected/misc/line-two-calls
new file mode 100644
index 0000000..dfe723f
--- /dev/null
+++ b/tests/expected/misc/line-two-calls
@@ -0,0 +1,3 @@
+1
+2
+ret: 0
diff --git a/tests/expected/misc/line-wait-for-eof b/tests/expected/misc/line-wait-for-eof
new file mode 100644
index 0000000..fcc3c8f
--- /dev/null
+++ b/tests/expected/misc/line-wait-for-eof
@@ -0,0 +1,2 @@
+xyz
+ret: 1
diff --git a/tests/expected/misc/mbsencode-invalid-ascii b/tests/expected/misc/mbsencode-invalid-ascii
new file mode 100644
index 0000000..4e759e1
--- /dev/null
+++ b/tests/expected/misc/mbsencode-invalid-ascii
@@ -0,0 +1,10 @@
+9 foo bar baz
+15 \\foo.local\bar
+19 \\foo.local\x5cxbar
+11 \xc3\xbcber
+21 c\xcc\x8ca\xcc\x81rka
+56 \xd0\x9c\xd0\xbe\xd1\x81\xd0\xba\xd0\xb2\xd0\xb0\xcc\x81
+24 \xe5\x8c\x97\xe4\xba\xac
+8 \xc2\x83
+4 \xff
+16 \xe8\xe1\xf9\xa7
diff --git a/tests/expected/misc/mbsencode-invalid-utf8 b/tests/expected/misc/mbsencode-invalid-utf8
new file mode 100644
index 0000000..b6b51e6
--- /dev/null
+++ b/tests/expected/misc/mbsencode-invalid-utf8
@@ -0,0 +1,10 @@
+9 foo bar baz
+15 \\foo.local\bar
+19 \\foo.local\x5cxbar
+4 über
+5 cÌŒaÌrka
+6 МоÑкваÌ
+4 北京
+-1 ƒ
+4 \xff
+16 \xe8\xe1\xf9\xa7
diff --git a/tests/expected/misc/mbsencode-safe-ascii b/tests/expected/misc/mbsencode-safe-ascii
new file mode 100644
index 0000000..a7473d7
--- /dev/null
+++ b/tests/expected/misc/mbsencode-safe-ascii
@@ -0,0 +1,10 @@
+14 foo\x09bar baz
+15 \\foo.local\bar
+19 \\foo.local\x5cxbar
+11 \xc3\xbcber
+21 c\xcc\x8ca\xcc\x81rka
+56 \xd0\x9c\xd0\xbe\xd1\x81\xd0\xba\xd0\xb2\xd0\xb0\xcc\x81
+24 \xe5\x8c\x97\xe4\xba\xac
+8 \xc2\x83
+4 \xff
+16 \xe8\xe1\xf9\xa7
diff --git a/tests/expected/misc/mbsencode-safe-utf8 b/tests/expected/misc/mbsencode-safe-utf8
new file mode 100644
index 0000000..63a417c
--- /dev/null
+++ b/tests/expected/misc/mbsencode-safe-utf8
@@ -0,0 +1,10 @@
+14 foo\x09bar baz
+15 \\foo.local\bar
+19 \\foo.local\x5cxbar
+4 über
+5 cÌŒaÌrka
+6 МоÑкваÌ
+4 北京
+8 \xc2\x83
+4 \xff
+16 \xe8\xe1\xf9\xa7
diff --git a/tests/expected/misc/mcookie b/tests/expected/misc/mcookie
new file mode 100644
index 0000000..d1c0351
--- /dev/null
+++ b/tests/expected/misc/mcookie
@@ -0,0 +1 @@
+the string meets expecations
diff --git a/tests/expected/misc/mountpoint b/tests/expected/misc/mountpoint
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/misc/mountpoint
diff --git a/tests/expected/misc/mountpoint-default b/tests/expected/misc/mountpoint-default
new file mode 100644
index 0000000..ca75055
--- /dev/null
+++ b/tests/expected/misc/mountpoint-default
@@ -0,0 +1,2 @@
+./symlink-to-mountpoint is a mountpoint
+0
diff --git a/tests/expected/misc/mountpoint-mutually-exclusive b/tests/expected/misc/mountpoint-mutually-exclusive
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/expected/misc/mountpoint-mutually-exclusive
@@ -0,0 +1 @@
+1
diff --git a/tests/expected/misc/mountpoint-mutually-exclusive.err b/tests/expected/misc/mountpoint-mutually-exclusive.err
new file mode 100644
index 0000000..2e8fefd
--- /dev/null
+++ b/tests/expected/misc/mountpoint-mutually-exclusive.err
@@ -0,0 +1 @@
+mountpoint: --devno and --nofollow are mutually exclusive
diff --git a/tests/expected/misc/mountpoint-nofollow b/tests/expected/misc/mountpoint-nofollow
new file mode 100644
index 0000000..b67c69f
--- /dev/null
+++ b/tests/expected/misc/mountpoint-nofollow
@@ -0,0 +1,2 @@
+./symlink-to-mountpoint is not a mountpoint
+32
diff --git a/tests/expected/misc/pipesz-exec b/tests/expected/misc/pipesz-exec
new file mode 100644
index 0000000..1c6f03b
--- /dev/null
+++ b/tests/expected/misc/pipesz-exec
@@ -0,0 +1 @@
+this_should_be_output_by_cat
diff --git a/tests/expected/misc/pipesz-get-fd b/tests/expected/misc/pipesz-get-fd
new file mode 100644
index 0000000..aa4cab1
--- /dev/null
+++ b/tests/expected/misc/pipesz-get-fd
@@ -0,0 +1 @@
+fd 0 DEFAULT_PIPE_SIZE 0
diff --git a/tests/expected/misc/pipesz-get-fd-bad.err b/tests/expected/misc/pipesz-get-fd-bad.err
new file mode 100644
index 0000000..0394206
--- /dev/null
+++ b/tests/expected/misc/pipesz-get-fd-bad.err
@@ -0,0 +1 @@
+pipesz: cannot get pipe buffer size of fd 42: Bad file descriptor
diff --git a/tests/expected/misc/pipesz-get-file b/tests/expected/misc/pipesz-get-file
new file mode 100644
index 0000000..32dc6bd
--- /dev/null
+++ b/tests/expected/misc/pipesz-get-file
@@ -0,0 +1 @@
+/dev/stdin DEFAULT_PIPE_SIZE 0
diff --git a/tests/expected/misc/pipesz-get-file-bad.err b/tests/expected/misc/pipesz-get-file-bad.err
new file mode 100644
index 0000000..793301d
--- /dev/null
+++ b/tests/expected/misc/pipesz-get-file-bad.err
@@ -0,0 +1 @@
+pipesz: cannot get pipe buffer size of /dev/null: Bad file descriptor
diff --git a/tests/expected/misc/pipesz-set-fd-bad.err b/tests/expected/misc/pipesz-set-fd-bad.err
new file mode 100644
index 0000000..199d18c
--- /dev/null
+++ b/tests/expected/misc/pipesz-set-fd-bad.err
@@ -0,0 +1 @@
+pipesz: cannot set pipe buffer size of fd 42: Bad file descriptor
diff --git a/tests/expected/misc/pipesz-set-file-bad.err b/tests/expected/misc/pipesz-set-file-bad.err
new file mode 100644
index 0000000..f97b1f8
--- /dev/null
+++ b/tests/expected/misc/pipesz-set-file-bad.err
@@ -0,0 +1 @@
+pipesz: cannot set pipe buffer size of /dev/null: Bad file descriptor
diff --git a/tests/expected/misc/rev b/tests/expected/misc/rev
new file mode 100644
index 0000000..bd8f465
--- /dev/null
+++ b/tests/expected/misc/rev
@@ -0,0 +1,5 @@
+53bbf0d98205319cee2ba589e205c68b
+35484965b7a2fd45a471c0d80cb9752c
+cba
+321
+cba|321
diff --git a/tests/expected/misc/setarch-options b/tests/expected/misc/setarch-options
new file mode 100644
index 0000000..c06c8f5
--- /dev/null
+++ b/tests/expected/misc/setarch-options
@@ -0,0 +1,21 @@
+###### unknown arch
+exit: 1
+###### unknown command
+Execute command `/das/gibs/nicht'.
+exit: 127
+###### noop uname -a
+Execute command `uname'.
+uname -a unchanged
+###### almost all options
+Switching on ADDR_NO_RANDOMIZE.
+Switching on FDPIC_FUNCPTRS.
+Switching on MMAP_PAGE_ZERO.
+Switching on ADDR_COMPAT_LAYOUT.
+Switching on READ_IMPLIES_EXEC.
+Switching on ADDR_LIMIT_32BIT.
+Switching on SHORT_INODE.
+Switching on WHOLE_SECONDS.
+Switching on STICKY_TIMEOUTS.
+Switching on ADDR_LIMIT_3GB.
+Execute command `echo'.
+success
diff --git a/tests/expected/misc/setarch-options.err b/tests/expected/misc/setarch-options.err
new file mode 100644
index 0000000..a6e064e
--- /dev/null
+++ b/tests/expected/misc/setarch-options.err
@@ -0,0 +1,4 @@
+###### unknown arch
+setarch: qubit: Unrecognized architecture
+###### unknown command
+setarch: failed to execute /das/gibs/nicht: No such file or directory
diff --git a/tests/expected/misc/setarch-show b/tests/expected/misc/setarch-show
new file mode 100644
index 0000000..fc919c6
--- /dev/null
+++ b/tests/expected/misc/setarch-show
@@ -0,0 +1,7 @@
+###### --show
+0x00000000: PER_LINUX
+0x00800000: PER_LINUX_32BIT
+0x00880000: PER_LINUX (FDPIC_FUNCPTRS ADDR_LIMIT_32BIT)
+0x00000008: PER_LINUX32
+0x08000008: PER_LINUX32_3GB
+0x000040ff: 0xff (0x00004000)
diff --git a/tests/expected/misc/setarch-uname26 b/tests/expected/misc/setarch-uname26
new file mode 100644
index 0000000..13667af
--- /dev/null
+++ b/tests/expected/misc/setarch-uname26
@@ -0,0 +1,6 @@
+###### --uname-2.6 echo
+Switching on UNAME26.
+Execute command `echo'.
+2.6 works or kernel too old
+###### --uname-2.6 true, non-verbose
+2.6 works or kernel too old
diff --git a/tests/expected/misc/setarch-uname26-version b/tests/expected/misc/setarch-uname26-version
new file mode 100644
index 0000000..9c746e1
--- /dev/null
+++ b/tests/expected/misc/setarch-uname26-version
@@ -0,0 +1 @@
+kernel version changed to 2.6
diff --git a/tests/expected/misc/setsid b/tests/expected/misc/setsid
new file mode 100644
index 0000000..2e9ba47
--- /dev/null
+++ b/tests/expected/misc/setsid
@@ -0,0 +1 @@
+success
diff --git a/tests/expected/misc/strtosize b/tests/expected/misc/strtosize
new file mode 100644
index 0000000..0f912f7
--- /dev/null
+++ b/tests/expected/misc/strtosize
@@ -0,0 +1,26 @@
+ 0 : 0 : 0B : 0 B : 0 B
+ 1 : 1 : 1B : 1 B : 1 B
+ 123 : 123 : 123B : 123 B : 123 B
+ 18446744073709551615 : 18446744073709551615 : 16E : 16 EiB : 16 EiB
+ 1K : 1024 : 1K : 1 KiB : 1 KiB
+ 1KiB : 1024 : 1K : 1 KiB : 1 KiB
+ 1M : 1048576 : 1M : 1 MiB : 1 MiB
+ 1MiB : 1048576 : 1M : 1 MiB : 1 MiB
+ 1G : 1073741824 : 1G : 1 GiB : 1 GiB
+ 1GiB : 1073741824 : 1G : 1 GiB : 1 GiB
+ 1T : 1099511627776 : 1T : 1 TiB : 1 TiB
+ 1TiB : 1099511627776 : 1T : 1 TiB : 1 TiB
+ 1P : 1125899906842624 : 1P : 1 PiB : 1 PiB
+ 1PiB : 1125899906842624 : 1P : 1 PiB : 1 PiB
+ 1E : 1152921504606846976 : 1E : 1 EiB : 1 EiB
+ 1EiB : 1152921504606846976 : 1E : 1 EiB : 1 EiB
+ 1KB : 1000 : 1000B : 1000 B : 1000 B
+ 1MB : 1000000 : 976.6K : 976.6 KiB : 976.56 KiB
+ 1GB : 1000000000 : 953.7M : 953.7 MiB : 953.67 MiB
+ 1TB : 1000000000000 : 931.3G : 931.3 GiB : 931.32 GiB
+ 1PB : 1000000000000000 : 909.5T : 909.5 TiB : 909.49 TiB
+ 1EB : 1000000000000000000 : 888.2P : 888.2 PiB : 888.18 PiB
+ 1 : 1 : 1B : 1 B : 1 B
+ 0x0a : 10 : 10B : 10 B : 10 B
+ 0xff00 : 65280 : 63.8K : 63.8 KiB : 63.75 KiB
+ 0x80000000 : 2147483648 : 2G : 2 GiB : 2 GiB
diff --git a/tests/expected/misc/strtosize.err b/tests/expected/misc/strtosize.err
new file mode 100644
index 0000000..67c9b87
--- /dev/null
+++ b/tests/expected/misc/strtosize.err
@@ -0,0 +1,4 @@
+test_strutils: invalid size '-1' value
+test_strutils: invalid size '' value
+test_strutils: invalid size ' ' value
+test_strutils: invalid size '1 ' value
diff --git a/tests/expected/misc/swaplabel b/tests/expected/misc/swaplabel
new file mode 100644
index 0000000..22255bf
--- /dev/null
+++ b/tests/expected/misc/swaplabel
@@ -0,0 +1,4 @@
+Setting up swapspace version 1, size = 9 pages (9xPGSZ bytes)
+LABEL=1234567890abcde, UUID=12345678-abcd-abcd-abcd-1234567890ab
+LABEL: 1234567890abcde
+UUID: 12345678-abcd-abcd-abcd-1234567890ab
diff --git a/tests/expected/misc/swaplabel.err b/tests/expected/misc/swaplabel.err
new file mode 100644
index 0000000..1544511
--- /dev/null
+++ b/tests/expected/misc/swaplabel.err
@@ -0,0 +1,3 @@
+mkswap: error: swap area needs to be at least 10 pages
+mkswap: <swapfile>: insecure permissions <perm>, fix with: chmod 0600 <swapfile>
+mkswap: Label was truncated.
diff --git a/tests/expected/misc/waitpid-count b/tests/expected/misc/waitpid-count
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/expected/misc/waitpid-count
@@ -0,0 +1 @@
+1
diff --git a/tests/expected/misc/waitpid-count.err b/tests/expected/misc/waitpid-count.err
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/expected/misc/waitpid-count.err
@@ -0,0 +1 @@
+0
diff --git a/tests/expected/misc/waitpid-exited.err b/tests/expected/misc/waitpid-exited.err
new file mode 100644
index 0000000..53c255b
--- /dev/null
+++ b/tests/expected/misc/waitpid-exited.err
@@ -0,0 +1,2 @@
+waitpid: PID 2147483647 has exited, skipping
+0
diff --git a/tests/expected/misc/waitpid-normal b/tests/expected/misc/waitpid-normal
new file mode 100644
index 0000000..79d0356
--- /dev/null
+++ b/tests/expected/misc/waitpid-normal
@@ -0,0 +1,4 @@
+3
+2
+1
+4
diff --git a/tests/expected/misc/waitpid-timeout b/tests/expected/misc/waitpid-timeout
new file mode 100644
index 0000000..9b003c7
--- /dev/null
+++ b/tests/expected/misc/waitpid-timeout
@@ -0,0 +1,2 @@
+Timeout expired
+3
diff --git a/tests/expected/misc/whereis b/tests/expected/misc/whereis
new file mode 100644
index 0000000..69d1a6e
--- /dev/null
+++ b/tests/expected/misc/whereis
@@ -0,0 +1,5 @@
+fsck success
+fsck.ext4 success
+python success
+python3 success
+python3.8 success
diff --git a/tests/expected/more/regexp b/tests/expected/more/regexp
new file mode 100644
index 0000000..e88c99b
--- /dev/null
+++ b/tests/expected/more/regexp
@@ -0,0 +1,4 @@
+
+...skipping
+foo
+xyzzy
diff --git a/tests/expected/more/squeeze b/tests/expected/more/squeeze
new file mode 100644
index 0000000..a1a53b5
--- /dev/null
+++ b/tests/expected/more/squeeze
@@ -0,0 +1,3 @@
+a
+
+b
diff --git a/tests/expected/mount/devname b/tests/expected/mount/devname
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/devname
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/dm-verity b/tests/expected/mount/dm-verity
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/dm-verity
diff --git a/tests/expected/mount/fallback-mount_setattr b/tests/expected/mount/fallback-mount_setattr
new file mode 100644
index 0000000..3e18ebf
--- /dev/null
+++ b/tests/expected/mount/fallback-mount_setattr
@@ -0,0 +1 @@
+private
diff --git a/tests/expected/mount/fslists b/tests/expected/mount/fslists
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fslists
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fslists-more-types b/tests/expected/mount/fslists-more-types
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fslists-more-types
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fslists-more-types-fstab b/tests/expected/mount/fslists-more-types-fstab
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fslists-more-types-fstab
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fslists-one-type b/tests/expected/mount/fslists-one-type
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fslists-one-type
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fslists-type-pattern b/tests/expected/mount/fslists-type-pattern
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fslists-type-pattern
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fslists-type-pattern-neg b/tests/expected/mount/fslists-type-pattern-neg
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fslists-type-pattern-neg
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-all b/tests/expected/mount/fstab-all
new file mode 100644
index 0000000..bf27627
--- /dev/null
+++ b/tests/expected/mount/fstab-all
@@ -0,0 +1,5 @@
+Create partitions
+Create filesystem A
+Create filesystem B
+Create filesystem C
+Create filesystem D
diff --git a/tests/expected/mount/fstab-bind b/tests/expected/mount/fstab-bind
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fstab-bind
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-broken b/tests/expected/mount/fstab-broken
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fstab-broken
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-broken-mount b/tests/expected/mount/fstab-broken-mount
new file mode 100644
index 0000000..d86bac9
--- /dev/null
+++ b/tests/expected/mount/fstab-broken-mount
@@ -0,0 +1 @@
+OK
diff --git a/tests/expected/mount/fstab-broken-mount-all b/tests/expected/mount/fstab-broken-mount-all
new file mode 100644
index 0000000..d86bac9
--- /dev/null
+++ b/tests/expected/mount/fstab-broken-mount-all
@@ -0,0 +1 @@
+OK
diff --git a/tests/expected/mount/fstab-btrfs-auto b/tests/expected/mount/fstab-btrfs-auto
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fstab-btrfs-auto
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-btrfs-btrfs b/tests/expected/mount/fstab-btrfs-btrfs
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fstab-btrfs-btrfs
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-devname b/tests/expected/mount/fstab-devname
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/fstab-devname
diff --git a/tests/expected/mount/fstab-devname2label b/tests/expected/mount/fstab-devname2label
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fstab-devname2label
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-devname2uuid b/tests/expected/mount/fstab-devname2uuid
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fstab-devname2uuid
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-label b/tests/expected/mount/fstab-label
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/fstab-label
diff --git a/tests/expected/mount/fstab-label2devname b/tests/expected/mount/fstab-label2devname
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/fstab-label2devname
diff --git a/tests/expected/mount/fstab-label2uuid b/tests/expected/mount/fstab-label2uuid
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/fstab-label2uuid
diff --git a/tests/expected/mount/fstab-loop b/tests/expected/mount/fstab-loop
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fstab-loop
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-none b/tests/expected/mount/fstab-none
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fstab-none
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-symlink b/tests/expected/mount/fstab-symlink
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/fstab-symlink
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/fstab-uuid b/tests/expected/mount/fstab-uuid
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/fstab-uuid
diff --git a/tests/expected/mount/fstab-uuid2devname b/tests/expected/mount/fstab-uuid2devname
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/fstab-uuid2devname
diff --git a/tests/expected/mount/fstab-uuid2label b/tests/expected/mount/fstab-uuid2label
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/fstab-uuid2label
diff --git a/tests/expected/mount/label b/tests/expected/mount/label
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/label
diff --git a/tests/expected/mount/move b/tests/expected/mount/move
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/move
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/regfile b/tests/expected/mount/regfile
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/regfile
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/remount b/tests/expected/mount/remount
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/remount
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/rlimit b/tests/expected/mount/rlimit
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/rlimit
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/rlimit-mount b/tests/expected/mount/rlimit-mount
new file mode 100644
index 0000000..85e2e12
--- /dev/null
+++ b/tests/expected/mount/rlimit-mount
@@ -0,0 +1 @@
+OK: mtab unmodified by mount
diff --git a/tests/expected/mount/rlimit-umount b/tests/expected/mount/rlimit-umount
new file mode 100644
index 0000000..193a8ee
--- /dev/null
+++ b/tests/expected/mount/rlimit-umount
@@ -0,0 +1 @@
+OK: mtab unmodified by umount
diff --git a/tests/expected/mount/set_ugid_mode b/tests/expected/mount/set_ugid_mode
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/set_ugid_mode
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/shared-subtree b/tests/expected/mount/shared-subtree
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/mount/shared-subtree
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/mount/shared-subtree-bind-shared b/tests/expected/mount/shared-subtree-bind-shared
new file mode 100644
index 0000000..8a205e8
--- /dev/null
+++ b/tests/expected/mount/shared-subtree-bind-shared
@@ -0,0 +1 @@
+shared
diff --git a/tests/expected/mount/shared-subtree-make-private b/tests/expected/mount/shared-subtree-make-private
new file mode 100644
index 0000000..3e18ebf
--- /dev/null
+++ b/tests/expected/mount/shared-subtree-make-private
@@ -0,0 +1 @@
+private
diff --git a/tests/expected/mount/shared-subtree-make-shared b/tests/expected/mount/shared-subtree-make-shared
new file mode 100644
index 0000000..8a205e8
--- /dev/null
+++ b/tests/expected/mount/shared-subtree-make-shared
@@ -0,0 +1 @@
+shared
diff --git a/tests/expected/mount/shared-subtree-make-unbindable b/tests/expected/mount/shared-subtree-make-unbindable
new file mode 100644
index 0000000..17f662a
--- /dev/null
+++ b/tests/expected/mount/shared-subtree-make-unbindable
@@ -0,0 +1 @@
+private,unbindable
diff --git a/tests/expected/mount/shared-subtree-mount-private b/tests/expected/mount/shared-subtree-mount-private
new file mode 100644
index 0000000..17f662a
--- /dev/null
+++ b/tests/expected/mount/shared-subtree-mount-private
@@ -0,0 +1 @@
+private,unbindable
diff --git a/tests/expected/mount/shared-subtree-mount-private-ro b/tests/expected/mount/shared-subtree-mount-private-ro
new file mode 100644
index 0000000..f5c8c27
--- /dev/null
+++ b/tests/expected/mount/shared-subtree-mount-private-ro
@@ -0,0 +1,2 @@
+private
+ro,relatime
diff --git a/tests/expected/mount/special b/tests/expected/mount/special
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/special
diff --git a/tests/expected/mount/special-basic b/tests/expected/mount/special-basic
new file mode 100644
index 0000000..99997d3
--- /dev/null
+++ b/tests/expected/mount/special-basic
@@ -0,0 +1 @@
+/sbin/mount.mytest called with "/foo /bar -o rw"
diff --git a/tests/expected/mount/special-multi-types b/tests/expected/mount/special-multi-types
new file mode 100644
index 0000000..99997d3
--- /dev/null
+++ b/tests/expected/mount/special-multi-types
@@ -0,0 +1 @@
+/sbin/mount.mytest called with "/foo /bar -o rw"
diff --git a/tests/expected/mount/special-options b/tests/expected/mount/special-options
new file mode 100644
index 0000000..820a74a
--- /dev/null
+++ b/tests/expected/mount/special-options
@@ -0,0 +1 @@
+/sbin/mount.mytest called with "/foo /bar -o rw,foo"
diff --git a/tests/expected/mount/special-user b/tests/expected/mount/special-user
new file mode 100644
index 0000000..02c112e
--- /dev/null
+++ b/tests/expected/mount/special-user
@@ -0,0 +1 @@
+/sbin/mount.mytest called with "/foo /bar -o rw,user,noexec,nosuid,nodev,abc"
diff --git a/tests/expected/mount/special-username b/tests/expected/mount/special-username
new file mode 100644
index 0000000..c192562
--- /dev/null
+++ b/tests/expected/mount/special-username
@@ -0,0 +1 @@
+/sbin/mount.mytest called with "/foo /bar -o rw,user=name,abc"
diff --git a/tests/expected/mount/umount-alltargets b/tests/expected/mount/umount-alltargets
new file mode 100644
index 0000000..a0e4679
--- /dev/null
+++ b/tests/expected/mount/umount-alltargets
@@ -0,0 +1,6 @@
+Create partitions
+Create filesystem A
+Create filesystem B
+Create filesystem C
+Create filesystem D
+Success
diff --git a/tests/expected/mount/umount-alltargets-all-targets-dev b/tests/expected/mount/umount-alltargets-all-targets-dev
new file mode 100644
index 0000000..7d6f888
--- /dev/null
+++ b/tests/expected/mount/umount-alltargets-all-targets-dev
@@ -0,0 +1,3 @@
+prepare: Mount dev to mnt1
+prepare: Mount dev to mnt2
+prepare: Mount /dev/xxx1 to mnt3
diff --git a/tests/expected/mount/umount-alltargets-all-targets-mnt b/tests/expected/mount/umount-alltargets-all-targets-mnt
new file mode 100644
index 0000000..7d6f888
--- /dev/null
+++ b/tests/expected/mount/umount-alltargets-all-targets-mnt
@@ -0,0 +1,3 @@
+prepare: Mount dev to mnt1
+prepare: Mount dev to mnt2
+prepare: Mount /dev/xxx1 to mnt3
diff --git a/tests/expected/mount/umount-alltargets-all-targets-recursive b/tests/expected/mount/umount-alltargets-all-targets-recursive
new file mode 100644
index 0000000..7d6f888
--- /dev/null
+++ b/tests/expected/mount/umount-alltargets-all-targets-recursive
@@ -0,0 +1,3 @@
+prepare: Mount dev to mnt1
+prepare: Mount dev to mnt2
+prepare: Mount /dev/xxx1 to mnt3
diff --git a/tests/expected/mount/umount-recursive b/tests/expected/mount/umount-recursive
new file mode 100644
index 0000000..0785521
--- /dev/null
+++ b/tests/expected/mount/umount-recursive
@@ -0,0 +1,15 @@
+Init device
+Create partitions
+Create filesystem A
+Create filesystem B
+Create filesystem C
+Create filesystem D
+Do tests...
+A) Mount root
+B) Mount child
+B2) Mount child-bind
+C) Mount child/child
+D) Mount child/child
+E) Mount child-bind
+F) Mount mountpoint-bind
+Success
diff --git a/tests/expected/mount/uuid b/tests/expected/mount/uuid
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/mount/uuid
diff --git a/tests/expected/namei/logic b/tests/expected/namei/logic
new file mode 100644
index 0000000..7cb5a24
--- /dev/null
+++ b/tests/expected/namei/logic
@@ -0,0 +1,8 @@
+f: namei1/namei2/a
+ d namei1
+ d namei2
+ - a
+f: namei1/namei2/b
+ d namei1
+ d namei2
+ - b
diff --git a/tests/expected/partx/partx-add-all b/tests/expected/partx/partx-add-all
new file mode 100644
index 0000000..ce38946
--- /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 0000000..1c281de
--- /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 0000000..d86bac9
--- /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 0000000..ba9de05
--- /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 0000000..ee6da6e
--- /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 0000000..1c281de
--- /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 0000000..da85ea1
--- /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 0000000..d86bac9
--- /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 0000000..0adc855
--- /dev/null
+++ b/tests/expected/partx/partx-detect-parts
@@ -0,0 +1,5 @@
+NR START END SECTORS SIZE NAME UUID
+ 1 32 33791 33760 16.5M 1ddc8a79-01
+ 2 33792 67583 33792 16.5M 1ddc8a79-02
+ 3 67584 102399 34816 17M 1ddc8a79-03
+OK
diff --git a/tests/expected/partx/partx-image-atari-primary b/tests/expected/partx/partx-image-atari-primary
new file mode 100644
index 0000000..044d319
--- /dev/null
+++ b/tests/expected/partx/partx-image-atari-primary
@@ -0,0 +1,2 @@
+NR START END SECTORS SIZE NAME UUID
+ 1 2 10239 10238 5M
diff --git a/tests/expected/partx/partx-image-atari-xgm b/tests/expected/partx/partx-image-atari-xgm
new file mode 100644
index 0000000..557327c
--- /dev/null
+++ b/tests/expected/partx/partx-image-atari-xgm
@@ -0,0 +1,3 @@
+NR START END SECTORS SIZE NAME UUID
+ 1 2 10 9 4.5K
+ 2 14 10239 10226 5M
diff --git a/tests/expected/partx/partx-image-bsd b/tests/expected/partx/partx-image-bsd
new file mode 100644
index 0000000..15568c4
--- /dev/null
+++ b/tests/expected/partx/partx-image-bsd
@@ -0,0 +1,3 @@
+NR START END SECTORS SIZE NAME UUID
+ 1 7936 12799 4864 2.4M
+ 2 12544 16127 3584 1.8M
diff --git a/tests/expected/partx/partx-image-dos+bsd b/tests/expected/partx/partx-image-dos+bsd
new file mode 100644
index 0000000..ae5f314
--- /dev/null
+++ b/tests/expected/partx/partx-image-dos+bsd
@@ -0,0 +1,5 @@
+NR START END SECTORS SIZE NAME UUID
+ 1 32 7679 7648 3.7M 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/partx/partx-image-gpt b/tests/expected/partx/partx-image-gpt
new file mode 100644
index 0000000..c941f36
--- /dev/null
+++ b/tests/expected/partx/partx-image-gpt
@@ -0,0 +1,6 @@
+NR START END SECTORS SIZE NAME UUID
+ 1 34 2047 2014 1007K ThisIsName 1dcf10bc-637e-4c52-8203-087ae10a820b
+ 2 2048 4095 2048 1M ThisIsOtherName a1d03a96-7238-46c6-bbb3-789cbe173ec7
+ 3 4096 6143 2048 1M primary a7101b6c-468c-47df-aff6-cd444d12af61
+ 4 6144 8191 2048 1M primary afc4950a-f0f1-4add-802c-5957133486d1
+ 5 8192 10239 2048 1M primary 0db0a787-c16b-4886-af3a-fbb97299677c
diff --git a/tests/expected/partx/partx-image-sgi b/tests/expected/partx/partx-image-sgi
new file mode 100644
index 0000000..ca5cdfb
--- /dev/null
+++ b/tests/expected/partx/partx-image-sgi
@@ -0,0 +1,5 @@
+NR START END SECTORS SIZE NAME UUID
+ 1 63 1606499 1606437 784.4M
+ 2 1606500 32129999 30523500 14.6G
+ 9 0 4095 4096 2M
+11 0 32129999 32130000 15.3G
diff --git a/tests/expected/partx/partx-image-sun b/tests/expected/partx/partx-image-sun
new file mode 100644
index 0000000..e69fdb1
--- /dev/null
+++ b/tests/expected/partx/partx-image-sun
@@ -0,0 +1,3 @@
+NR START END SECTORS SIZE NAME UUID
+ 1 0 87379 87380 42.7M
+ 2 87380 131069 43690 21.3M
diff --git a/tests/expected/partx/partx-update-one b/tests/expected/partx/partx-update-one
new file mode 100644
index 0000000..4dacd62
--- /dev/null
+++ b/tests/expected/partx/partx-update-one
@@ -0,0 +1 @@
+partitions updated
diff --git a/tests/expected/paths/built-in b/tests/expected/paths/built-in
new file mode 100644
index 0000000..7274afa
--- /dev/null
+++ b/tests/expected/paths/built-in
@@ -0,0 +1,21 @@
+ _PATH_DEFPATH /usr/local/bin:/bin:/usr/bin
+ _PATH_DEFPATH_ROOT /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ _PATH_DEV_LOOP /dev/loop
+ _PATH_HUSHLOGIN .hushlogin
+ _PATH_MAILDIR /var/mail
+ _PATH_MOTDFILE /etc/motd
+ _PATH_NOLOGIN /etc/nologin
+ _PATH_LOGIN /bin/login
+ _PATH_PASSWD /etc/passwd
+ _PATH_GSHADOW /etc/gshadow
+ _PATH_GROUP /etc/group
+ _PATH_SHADOW_PASSWD /etc/shadow
+ _PATH_WORDS /usr/share/dict/words
+ _PATH_WORDS_ALT /usr/share/dict/web2
+ _PATH_FILESYSTEMS /etc/filesystems
+ _PATH_PROC_SWAPS /proc/swaps
+_PATH_PROC_FILESYSTEMS /proc/filesystems
+ _PATH_MOUNTED /etc/mtab
+ _PATH_MNTTAB /etc/fstab
+ _PATH_DEV_BYLABEL /dev/disk/by-label
+ _PATH_DEV_BYUUID /dev/disk/by-uuid
diff --git a/tests/expected/rename/basic b/tests/expected/rename/basic
new file mode 100644
index 0000000..2712ba1
--- /dev/null
+++ b/tests/expected/rename/basic
@@ -0,0 +1,19 @@
+`rename_basic.1' -> `rename_test.1'
+`rename_basic.2' -> `rename_test.2'
+`rename_basic.3' -> `rename_test.3'
+what is rename_basic.? doing here?
+`rename_all file with spaces.1' -> `rename_all_file_with_spaces.1'
+`rename_all file with spaces.2' -> `rename_all_file_with_spaces.2'
+`rename_all file with spaces.3' -> `rename_all_file_with_spaces.3'
+what is rename_all* *.? doing here?
+`rename_zz_last_z.x' -> `rename_AAzzBB_last_z.x'
+`rename_zz_last_z.y' -> `rename_AAzzBB_last_z.y'
+`rename_zz_last_z.z' -> `rename_AAzzBB_last_z.z'
+`rename_zz_last_zz.x' -> `rename_zz_last_AAzzBB.x'
+`rename_zz_last_zz.y' -> `rename_zz_last_AAzzBB.y'
+`rename_zz_last_zz.z' -> `rename_zz_last_AAzzBB.z'
+`rename_zz_last_zzz.x' -> `rename_zz_last_zAAzzBB.x'
+`rename_zz_last_zzz.y' -> `rename_zz_last_zAAzzBB.y'
+`rename_zz_last_zzz.z' -> `rename_zz_last_zAAzzBB.z'
+what is rename*last* doing here?
+`rename_all_empty' -> `_r_e_n_a_m_e___a_l_l___e_m_p_t_y_'
diff --git a/tests/expected/rename/exit_codes b/tests/expected/rename/exit_codes
new file mode 100644
index 0000000..07885f7
--- /dev/null
+++ b/tests/expected/rename/exit_codes
@@ -0,0 +1,6 @@
+RENAME_EXIT_NOTHING: 4
+`rename_exit_codes.1' -> `rename_exit_values.1'
+`rename_exit_codes.2' -> `rename_exit_values.2'
+EXIT_SUCCESS: 0
+`rename_exit_values.1' -> `rename_exit_codes.1'
+RENAME_EXIT_SOMEOK: 2
diff --git a/tests/expected/rename/exit_codes.err b/tests/expected/rename/exit_codes.err
new file mode 100644
index 0000000..6478542
--- /dev/null
+++ b/tests/expected/rename/exit_codes.err
@@ -0,0 +1 @@
+rename: rename_exit_values.2: rename to rename_exit_codes.2 failed: Is a directory
diff --git a/tests/expected/rename/overwrite b/tests/expected/rename/overwrite
new file mode 100644
index 0000000..b16f799
--- /dev/null
+++ b/tests/expected/rename/overwrite
@@ -0,0 +1 @@
+Skipping existing file: `rename_to'
diff --git a/tests/expected/rename/subdir b/tests/expected/rename/subdir
new file mode 100644
index 0000000..c58d18e
--- /dev/null
+++ b/tests/expected/rename/subdir
@@ -0,0 +1,38 @@
+== files ==
+`rename_aa/aa' -> `rename_aa/xa'
+`rename_ab/aa' -> `rename_ab/xa'
+rename_aa
+rename_aa/xa
+rename_ab
+rename_ab/xa
+== symlinks ==
+rename_aa/sublink.1: `rename/aa' -> `rename/xa'
+rename_aa/sublink.2: `rename/aa' -> `rename/xa'
+rename_aa/sublink.3: `rename/aa' -> `rename/xa'
+rename_ab/sublink.1: `rename/aa' -> `rename/xa'
+rename_ab/sublink.2: `rename/aa' -> `rename/xa'
+rename_ab/sublink.3: `rename/aa' -> `rename/xa'
+rename/xa
+rename/xa
+rename/xa
+rename/xa
+rename/xa
+rename/xa
+== fullpath ==
+`./rename_path1' -> `./rename_path2'
+./rename_path2
+`rename_path_test1' -> `rename_path_a/test1'
+./rename_path_a/test1
+`rename_path_a/test2' -> `rename_path_b/test2'
+rename_path_a
+rename_path_b
+rename_path_b/test2
+rename_link: `some/nonexistent/path' -> `some/nonexisten_ath'
+rename_link: `some/nonexisten_ath' -> `some/non/en_ath'
+rename_link: `some/non/en_ath' -> `some/non/xn_ath'
+some/non/xn_ath
+== empty 'from' ==
+`rename_test' -> `_rename_test'
+`./rename_test' -> `./_rename_test'
+`rename_test' -> `rename_subdir/rename_test'
+`./rename_test' -> `rename_subdir/./rename_test'
diff --git a/tests/expected/rename/symlink b/tests/expected/rename/symlink
new file mode 100644
index 0000000..880215f
--- /dev/null
+++ b/tests/expected/rename/symlink
@@ -0,0 +1,7 @@
+rename_slink.1: `old' -> `new'
+rename_slink.2: `old' -> `new'
+rename_slink.3: `old' -> `new'
+`rename_slink.1' -> `rename_symlink.1'
+target
+`rename_slink.2' -> `rename_symlink.2'
+target
diff --git a/tests/expected/rename/symlink.err b/tests/expected/rename/symlink.err
new file mode 100644
index 0000000..956b119
--- /dev/null
+++ b/tests/expected/rename/symlink.err
@@ -0,0 +1 @@
+rename: rename_slink.3: No such file or directory
diff --git a/tests/expected/schedutils/chrt b/tests/expected/schedutils/chrt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/schedutils/chrt
diff --git a/tests/expected/schedutils/chrt-batch b/tests/expected/schedutils/chrt-batch
new file mode 100644
index 0000000..f94fc6f
--- /dev/null
+++ b/tests/expected/schedutils/chrt-batch
@@ -0,0 +1,2 @@
+SCHED_BATCH
+0
diff --git a/tests/expected/schedutils/chrt-deadline b/tests/expected/schedutils/chrt-deadline
new file mode 100644
index 0000000..33d5527
--- /dev/null
+++ b/tests/expected/schedutils/chrt-deadline
@@ -0,0 +1,9 @@
+SCHED_DEADLINE
+0
+<removed>'s current runtime/deadline/period parameters: 13000/13000/13000
+SCHED_DEADLINE
+0
+<removed>'s current runtime/deadline/period parameters: 12000/12000/13000
+SCHED_DEADLINE
+0
+<removed>'s current runtime/deadline/period parameters: 10000/12000/13000
diff --git a/tests/expected/schedutils/chrt-fifo b/tests/expected/schedutils/chrt-fifo
new file mode 100644
index 0000000..4cfa07f
--- /dev/null
+++ b/tests/expected/schedutils/chrt-fifo
@@ -0,0 +1,4 @@
+SCHED_FIFO
+1
+SCHED_FIFO
+99
diff --git a/tests/expected/schedutils/chrt-idle b/tests/expected/schedutils/chrt-idle
new file mode 100644
index 0000000..42a43cb
--- /dev/null
+++ b/tests/expected/schedutils/chrt-idle
@@ -0,0 +1,2 @@
+SCHED_IDLE
+0
diff --git a/tests/expected/schedutils/chrt-non-root-batch-vs-nice b/tests/expected/schedutils/chrt-non-root-batch-vs-nice
new file mode 100644
index 0000000..06cf51a
--- /dev/null
+++ b/tests/expected/schedutils/chrt-non-root-batch-vs-nice
@@ -0,0 +1,3 @@
+<removed> (process ID) old priority 0, new priority 5
+SCHED_BATCH
+0
diff --git a/tests/expected/schedutils/chrt-other b/tests/expected/schedutils/chrt-other
new file mode 100644
index 0000000..07013ea
--- /dev/null
+++ b/tests/expected/schedutils/chrt-other
@@ -0,0 +1,2 @@
+SCHED_OTHER
+0
diff --git a/tests/expected/schedutils/chrt-rr b/tests/expected/schedutils/chrt-rr
new file mode 100644
index 0000000..b5ee90d
--- /dev/null
+++ b/tests/expected/schedutils/chrt-rr
@@ -0,0 +1,4 @@
+SCHED_RR
+1
+SCHED_RR
+99
diff --git a/tests/expected/schedutils/cpuset b/tests/expected/schedutils/cpuset
new file mode 100644
index 0000000..10e1760
--- /dev/null
+++ b/tests/expected/schedutils/cpuset
@@ -0,0 +1,24 @@
+masks:
+0x00000001 = 1 [0]
+0x00000002 = 2 [1]
+0x00000003 = 3 [0,1]
+0x00000004 = 4 [2]
+0x00000005 = 5 [0,2]
+0x00000006 = 6 [1,2]
+0x00000007 = 7 [0-2]
+0x00000008 = 8 [3]
+0x00000009 = 9 [0,3]
+0x00005555 = 5555 [0,2,4,6,8,10,12,14]
+0x00007777 = 7777 [0-2,4-6,8-10,12-14]
+strings:
+0 = 1 [0]
+1 = 2 [1]
+0,1 = 3 [0,1]
+2 = 4 [2]
+0,2 = 5 [0,2]
+1,2 = 6 [1,2]
+0-2 = 7 [0-2]
+3 = 8 [3]
+0,3 = 9 [0,3]
+0,2,4,6,8,10,12,14 = 5555 [0,2,4,6,8,10,12,14]
+0-2,4-6,8-10,12-14 = 7777 [0-2,4-6,8-10,12-14]
diff --git a/tests/expected/script/buffering-race b/tests/expected/script/buffering-race
new file mode 100644
index 0000000..884ad00
--- /dev/null
+++ b/tests/expected/script/buffering-race
@@ -0,0 +1,3 @@
+Script started, output log file is '/dev/null'.
+Hallo World
+Script done.
diff --git a/tests/expected/script/options-append b/tests/expected/script/options-append
new file mode 100644
index 0000000..584d921
--- /dev/null
+++ b/tests/expected/script/options-append
@@ -0,0 +1,8 @@
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="echo append1" <not executed on terminal>]
+append1
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="0"]
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="echo append2" <not executed on terminal>]
+append2
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="0"]
diff --git a/tests/expected/script/options-force b/tests/expected/script/options-force
new file mode 100644
index 0000000..7b9854e
--- /dev/null
+++ b/tests/expected/script/options-force
@@ -0,0 +1,14 @@
+test_script: output file `typescript' is a link
+Use --force if you really want to use it.
+Program not started.
+1
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="echo with force" <not executed on terminal>]
+with force
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="0"]
+0
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="echo not typescript" <not executed on terminal>]
+not typescript
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="0"]
+0
diff --git a/tests/expected/script/options-quiet b/tests/expected/script/options-quiet
new file mode 100644
index 0000000..9718d17
--- /dev/null
+++ b/tests/expected/script/options-quiet
@@ -0,0 +1,8 @@
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="echo quiet1" <not executed on terminal>]
+quiet1
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="0"]
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="echo quiet2" <not executed on terminal>]
+quiet2
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="0"]
diff --git a/tests/expected/script/options-return b/tests/expected/script/options-return
new file mode 100644
index 0000000..94cd860
--- /dev/null
+++ b/tests/expected/script/options-return
@@ -0,0 +1,16 @@
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="exit 1" <not executed on terminal>]
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="1"]
+0
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="exit 0" <not executed on terminal>]
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="0"]
+0
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="exit 42" <not executed on terminal>]
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="42"]
+42
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="exit 127" <not executed on terminal>]
+
+Script done on 2015-05-24 17:43:18+00:00 [COMMAND_EXIT_CODE="127"]
+127
diff --git a/tests/expected/script/options-size b/tests/expected/script/options-size
new file mode 100644
index 0000000..bdbe688
--- /dev/null
+++ b/tests/expected/script/options-size
@@ -0,0 +1,9 @@
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="echo 1:1234567890" <not executed on terminal>]
+1:1234567890
+
+Script done on 2015-05-24 17:43:18+00:00 [<max output size exceeded>]
+Script started on 2015-05-24 17:43:18+00:00 [COMMAND="echo 2:1234567890" <not executed on terminal>]
+2:1234567890
+
+Script done on 2015-05-24 17:43:18+00:00 [<max output size exceeded>]
+1
diff --git a/tests/expected/script/race b/tests/expected/script/race
new file mode 100644
index 0000000..faede5f
--- /dev/null
+++ b/tests/expected/script/race
@@ -0,0 +1 @@
+all bingos seen
diff --git a/tests/expected/script/replay b/tests/expected/script/replay
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/script/replay
diff --git a/tests/expected/script/replay-basic b/tests/expected/script/replay-basic
new file mode 100644
index 0000000..0363253
--- /dev/null
+++ b/tests/expected/script/replay-basic
@@ -0,0 +1,9 @@
+===recording
+Script started, output log file is 'outlog', timing file is 'timingfile'.
+hello world
+all done
+Script done.
+===replaying
+hello world
+all done
+
diff --git a/tests/expected/script/replay-input b/tests/expected/script/replay-input
new file mode 100644
index 0000000..8da6ed2
--- /dev/null
+++ b/tests/expected/script/replay-input
@@ -0,0 +1,4 @@
+===recording
+===replaying
+echo "result is $(($NUMBER + 1))"
+
diff --git a/tests/expected/script/replay-live b/tests/expected/script/replay-live
new file mode 100644
index 0000000..7d575ed
--- /dev/null
+++ b/tests/expected/script/replay-live
@@ -0,0 +1,7 @@
+>>> scriptlive: Starting your typescript execution by sh.
+echo "result is $(($NUMBER + 1))"
+prompt> echo "result is $(($NUMBER + 1))"
+result is 124
+prompt> exit
+
+>>> scriptlive: done.
diff --git a/tests/expected/script/replay-output b/tests/expected/script/replay-output
new file mode 100644
index 0000000..4aace29
--- /dev/null
+++ b/tests/expected/script/replay-output
@@ -0,0 +1,7 @@
+===recording
+Script started, output log file is 'outlog', timing file is 'timingfile'.
+result is 2
+Script done.
+===replaying
+result is 2
+
diff --git a/tests/expected/sfdisk/dos-activate b/tests/expected/sfdisk/dos-activate
new file mode 100644
index 0000000..59f460d
--- /dev/null
+++ b/tests/expected/sfdisk/dos-activate
@@ -0,0 +1,20 @@
+The bootable flag on partition 1 is enabled now.
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 8191 6144 3M 83 Linux
+<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris
+<removed>3 14336 20479 6144 3M 83 Linux
+<removed>4 20480 102399 81920 40M 5 Extended
+<removed>5 22528 28671 6144 3M 83 Linux
+<removed>6 30720 102399 71680 35M 83 Linux
diff --git a/tests/expected/sfdisk/dos-default-vs-gap1 b/tests/expected/sfdisk/dos-default-vs-gap1
new file mode 100644
index 0000000..9539d22
--- /dev/null
+++ b/tests/expected/sfdisk/dos-default-vs-gap1
@@ -0,0 +1,24 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 6144 16383 10240 5M 83 Linux
+<removed>2 16384 28671 12288 6M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-default-vs-gap2 b/tests/expected/sfdisk/dos-default-vs-gap2
new file mode 100644
index 0000000..e76f704
--- /dev/null
+++ b/tests/expected/sfdisk/dos-default-vs-gap2
@@ -0,0 +1,30 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+All partitions used.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 8192 14335 6144 3M 83 Linux
+<removed>2 26624 36863 10240 5M 83 Linux
+<removed>3 14336 22527 8192 4M 83 Linux
+<removed>4 2048 6143 4096 2M 83 Linux
+
+Partition table entries are not in disk order.
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-dump-gaps b/tests/expected/sfdisk/dos-dump-gaps
new file mode 100644
index 0000000..ee473e6
--- /dev/null
+++ b/tests/expected/sfdisk/dos-dump-gaps
@@ -0,0 +1,27 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Ignoring partition.
+<removed>3: Created a new partition <removed>.
+<removed>4: Ignoring partition.
+<removed>5: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 52046 49999 24.4M 83 Linux
+<removed>3 52048 102046 49999 24.4M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-dump-old b/tests/expected/sfdisk/dos-dump-old
new file mode 100644
index 0000000..83f5bdd
--- /dev/null
+++ b/tests/expected/sfdisk/dos-dump-old
@@ -0,0 +1,26 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Ignoring partition.
+<removed>3: Ignoring partition.
+<removed>4: Ignoring partition.
+<removed>5: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 52046 49999 24.4M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-explicit-size b/tests/expected/sfdisk/dos-explicit-size
new file mode 100644
index 0000000..20f421c
--- /dev/null
+++ b/tests/expected/sfdisk/dos-explicit-size
@@ -0,0 +1,36 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Created a new partition <removed>.
+<removed>6: Created a new partition <removed>.
+<removed>7: Created a new partition <removed>.
+<removed>8: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 1 1000 1000 500K 83 Linux
+<removed>2 1001 2000 1000 500K 82 Linux swap / Solaris
+<removed>3 2001 3000 1000 500K 83 Linux
+<removed>4 3001 102399 99399 48.5M 5 Extended
+<removed>5 3002 4001 1000 500K 83 Linux
+<removed>6 4003 5002 1000 500K 83 Linux
+<removed>7 5004 102399 97396 47.6M 83 Linux
+
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-explicit-size.err b/tests/expected/sfdisk/dos-explicit-size.err
new file mode 100644
index 0000000..975a4ee
--- /dev/null
+++ b/tests/expected/sfdisk/dos-explicit-size.err
@@ -0,0 +1,7 @@
+Partition 1 does not start on physical sector boundary.
+Partition 2 does not start on physical sector boundary.
+Partition 3 does not start on physical sector boundary.
+Partition 4 does not start on physical sector boundary.
+Partition 5 does not start on physical sector boundary.
+Partition 6 does not start on physical sector boundary.
+Partition 7 does not start on physical sector boundary.
diff --git a/tests/expected/sfdisk/dos-read-dump b/tests/expected/sfdisk/dos-read-dump
new file mode 100644
index 0000000..a0b0b77
--- /dev/null
+++ b/tests/expected/sfdisk/dos-read-dump
@@ -0,0 +1,35 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Created a new partition <removed>.
+<removed>6: Created a new partition <removed>.
+<removed>7: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 8191 6144 3M 83 Linux
+<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris
+<removed>3 14336 20479 6144 3M 83 Linux
+<removed>4 20480 102399 81920 40M 5 Extended
+<removed>5 20481 26624 6144 3M 83 Linux
+<removed>6 26626 102399 75774 37M 83 Linux
+
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-read-dump-case b/tests/expected/sfdisk/dos-read-dump-case
new file mode 100644
index 0000000..3486cb2
--- /dev/null
+++ b/tests/expected/sfdisk/dos-read-dump-case
@@ -0,0 +1,24 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 8191 6144 3M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-read-dump.err b/tests/expected/sfdisk/dos-read-dump.err
new file mode 100644
index 0000000..48536f8
--- /dev/null
+++ b/tests/expected/sfdisk/dos-read-dump.err
@@ -0,0 +1,2 @@
+Partition 5 does not start on physical sector boundary.
+Partition 6 does not start on physical sector boundary.
diff --git a/tests/expected/sfdisk/dos-reduce-empty-extended b/tests/expected/sfdisk/dos-reduce-empty-extended
new file mode 100644
index 0000000..f37cdcf
--- /dev/null
+++ b/tests/expected/sfdisk/dos-reduce-empty-extended
@@ -0,0 +1,26 @@
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 14335 10240 5M 5 Extended
+
+<removed>2:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 10239 6144 3M 5 Extended
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-resize b/tests/expected/sfdisk/dos-resize
new file mode 100644
index 0000000..a39b940
--- /dev/null
+++ b/tests/expected/sfdisk/dos-resize
@@ -0,0 +1,24 @@
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 22527 20480 10M 82 Linux swap / Solaris
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 102399 100352 49M 82 Linux swap / Solaris
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-resize-empty-extended b/tests/expected/sfdisk/dos-resize-empty-extended
new file mode 100644
index 0000000..14cecbe
--- /dev/null
+++ b/tests/expected/sfdisk/dos-resize-empty-extended
@@ -0,0 +1,26 @@
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 8191 4096 2M 5 Extended
+
+<removed>2:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 102399 98304 48M 5 Extended
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-resize-extended b/tests/expected/sfdisk/dos-resize-extended
new file mode 100644
index 0000000..90dce82
--- /dev/null
+++ b/tests/expected/sfdisk/dos-resize-extended
@@ -0,0 +1,34 @@
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 18431 10240 5M 5 Extended
+<removed>5 10240 12287 2048 1M 83 Linux
+<removed>6 14336 16383 2048 1M 83 Linux
+
+<removed>4:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 102399 94208 46M 5 Extended
+<removed>5 10240 12287 2048 1M 83 Linux
+<removed>6 14336 16383 2048 1M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-resize-logical b/tests/expected/sfdisk/dos-resize-logical
new file mode 100644
index 0000000..e3b805a
--- /dev/null
+++ b/tests/expected/sfdisk/dos-resize-logical
@@ -0,0 +1,34 @@
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 28671 20480 10M 5 Extended
+<removed>5 10240 12287 2048 1M 83 Linux
+<removed>6 14336 16383 2048 1M 83 Linux
+
+<removed>6:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 8191 2048 1M 83 Linux
+<removed>4 8192 28671 20480 10M 5 Extended
+<removed>5 10240 12287 2048 1M 83 Linux
+<removed>6 14336 28671 14336 7M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-simple-commas b/tests/expected/sfdisk/dos-simple-commas
new file mode 100644
index 0000000..b44be41
--- /dev/null
+++ b/tests/expected/sfdisk/dos-simple-commas
@@ -0,0 +1,32 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Created a new partition <removed>.
+<removed>6: Created a new partition <removed>.
+<removed>7: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 8191 6144 3M 83 Linux
+<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris
+<removed>3 14336 20479 6144 3M 83 Linux
+<removed>4 20480 102399 81920 40M 5 Extended
+<removed>5 22528 28671 6144 3M 83 Linux
+<removed>6 30720 102399 71680 35M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-simple-space b/tests/expected/sfdisk/dos-simple-space
new file mode 100644
index 0000000..1e22e9a
--- /dev/null
+++ b/tests/expected/sfdisk/dos-simple-space
@@ -0,0 +1,26 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 8191 6144 3M 83 Linux
+<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris
+<removed>3 14336 102399 88064 43M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-sizes-vs-gaps b/tests/expected/sfdisk/dos-sizes-vs-gaps
new file mode 100644
index 0000000..a3eb790
--- /dev/null
+++ b/tests/expected/sfdisk/dos-sizes-vs-gaps
@@ -0,0 +1,26 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 3070 1023 511.5K 83 Linux
+<removed>2 4096 8190 4095 2M 83 Linux
+<removed>3 8192 16382 8191 4M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/dos-write-dump b/tests/expected/sfdisk/dos-write-dump
new file mode 100644
index 0000000..660c932
--- /dev/null
+++ b/tests/expected/sfdisk/dos-write-dump
@@ -0,0 +1,12 @@
+label: dos
+label-id: 0x1ddc8a79
+device: <removed>
+unit: sectors
+sector-size: 512
+
+<removed>1 : start= 2048, size= 6144, type=83, bootable
+<removed>2 : start= 8192, size= 6144, type=82
+<removed>3 : start= 14336, size= 6144, type=83
+<removed>4 : start= 20480, size= 81920, type=5
+<removed>5 : start= 20481, size= 6144, type=83
+<removed>6 : start= 26626, size= 75774, type=83
diff --git a/tests/expected/sfdisk/dos-write-json b/tests/expected/sfdisk/dos-write-json
new file mode 100644
index 0000000..7a8ec4e
--- /dev/null
+++ b/tests/expected/sfdisk/dos-write-json
@@ -0,0 +1,43 @@
+{
+ "partitiontable": {
+ "label": "dos",
+ "id": "0x1ddc8a79",
+ "device": "<removed>",
+ "unit": "sectors",
+ "sectorsize": 512,
+ "partitions": [
+ {
+ "node": "<removed>1",
+ "start": 2048,
+ "size": 6144,
+ "type": "83",
+ "bootable": true
+ },{
+ "node": "<removed>2",
+ "start": 8192,
+ "size": 6144,
+ "type": "82"
+ },{
+ "node": "<removed>3",
+ "start": 14336,
+ "size": 6144,
+ "type": "83"
+ },{
+ "node": "<removed>4",
+ "start": 20480,
+ "size": 81920,
+ "type": "5"
+ },{
+ "node": "<removed>5",
+ "start": 20481,
+ "size": 6144,
+ "type": "83"
+ },{
+ "node": "<removed>6",
+ "start": 26626,
+ "size": 75774,
+ "type": "83"
+ }
+ ]
+ }
+}
diff --git a/tests/expected/sfdisk/dump b/tests/expected/sfdisk/dump
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/dump
diff --git a/tests/expected/sfdisk/dump-current b/tests/expected/sfdisk/dump-current
new file mode 100644
index 0000000..86b3f40
--- /dev/null
+++ b/tests/expected/sfdisk/dump-current
@@ -0,0 +1,48 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+<removed>2 22528 45055 22528 11M Linux filesystem
+<removed>3 45056 69631 24576 12M Linux filesystem
+<removed>4 69632 204766 135135 66M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Start End Size UUID Type Name
+ 2048 22527 10M 28A432A3-8D63-3142-B9F5-68A2BF2BC60B Linux filesystem
+22528 45055 11M 6A7D17FC-7252-564A-9B68-5E2107999BF1 Linux filesystem
+45056 69631 12M 26C303E4-0321-3346-B9EF-BDD39BEA1166 Linux filesystem
+69632 204766 66M AF79D434-C8B3-2445-80FB-317AB157447C Linux filesystem
diff --git a/tests/expected/sfdisk/dump-v2.32 b/tests/expected/sfdisk/dump-v2.32
new file mode 100644
index 0000000..2c62295
--- /dev/null
+++ b/tests/expected/sfdisk/dump-v2.32
@@ -0,0 +1,47 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+<removed>2 22528 45055 22528 11M Linux filesystem
+<removed>3 45056 69631 24576 12M Linux filesystem
+<removed>4 69632 204766 135135 66M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Start End Size UUID Type Name
+ 2048 22527 10M 28A432A3-8D63-3142-B9F5-68A2BF2BC60B Linux filesystem
+22528 45055 11M 6A7D17FC-7252-564A-9B68-5E2107999BF1 Linux filesystem
+45056 69631 12M 26C303E4-0321-3346-B9EF-BDD39BEA1166 Linux filesystem
+69632 204766 66M AF79D434-C8B3-2445-80FB-317AB157447C Linux filesystem
diff --git a/tests/expected/sfdisk/dump-v2.35 b/tests/expected/sfdisk/dump-v2.35
new file mode 100644
index 0000000..86b3f40
--- /dev/null
+++ b/tests/expected/sfdisk/dump-v2.35
@@ -0,0 +1,48 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+<removed>2 22528 45055 22528 11M Linux filesystem
+<removed>3 45056 69631 24576 12M Linux filesystem
+<removed>4 69632 204766 135135 66M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Start End Size UUID Type Name
+ 2048 22527 10M 28A432A3-8D63-3142-B9F5-68A2BF2BC60B Linux filesystem
+22528 45055 11M 6A7D17FC-7252-564A-9B68-5E2107999BF1 Linux filesystem
+45056 69631 12M 26C303E4-0321-3346-B9EF-BDD39BEA1166 Linux filesystem
+69632 204766 66M AF79D434-C8B3-2445-80FB-317AB157447C Linux filesystem
diff --git a/tests/expected/sfdisk/gpt-all-defaults b/tests/expected/sfdisk/gpt-all-defaults
new file mode 100644
index 0000000..66868ed
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-all-defaults
@@ -0,0 +1,32 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Created a new partition <removed>.
+<removed>6: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 12287 10240 5M Linux filesystem
+<removed>2 12288 22527 10240 5M Linux filesystem
+<removed>3 22528 32767 10240 5M Linux swap
+<removed>4 32768 43007 10240 5M Linux root (x86-64)
+<removed>5 43008 100351 57344 28M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/gpt-attrs b/tests/expected/sfdisk/gpt-attrs
new file mode 100644
index 0000000..7cbfee4
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs
@@ -0,0 +1,102 @@
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+RequiredPartition NoBlockIOProtocol GUID:48,51
+
+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):
+Expert command (m for help):
+PMBR: offset = 0, size = 512 bytes.
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00
+000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
+
+GPT Header: offset = 512, size = 512 bytes.
+00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00
+00000210 9b 58 15 32 00 00 00 00 01 00 00 00 00 00 00 00
+00000220 ff 8f 01 00 00 00 00 00 00 08 00 00 00 00 00 00
+00000230 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c
+00000240 8b 65 9e 76 45 41 21 8d 02 00 00 00 00 00 00 00
+00000250 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00
+00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Entries: offset = 1024, size = 16384 bytes.
+00000400 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b
+00000410 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32
+00000420 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00
+00000430 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00
+00000440 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00
+00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000480 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+00000490 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4
+000004a0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00
+000004b0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00
+000004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000500 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f
+00000510 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87
+00000520 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00
+00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000580 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09
+00000590 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db
+000005a0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00
+000005b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000600 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+00000610 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73
+00000620 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00
+00000630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Backup Entries: offset = 52411904, size = 16384 bytes.
+031fbe00 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b
+031fbe10 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32
+031fbe20 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00
+031fbe30 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00
+031fbe40 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00
+031fbe50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbe80 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+031fbe90 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4
+031fbea0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00
+031fbeb0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00
+031fbec0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbf00 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f
+031fbf10 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87
+031fbf20 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00
+031fbf30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbf80 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09
+031fbf90 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db
+031fbfa0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00
+031fbfb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fc000 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+031fc010 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73
+031fc020 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00
+031fc030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Backup Header: offset = 52428288, size = 512 bytes.
+031ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00
+031ffe10 22 e2 97 b2 00 00 00 00 ff 8f 01 00 00 00 00 00
+031ffe20 01 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00
+031ffe30 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c
+031ffe40 8b 65 9e 76 45 41 21 8d df 8f 01 00 00 00 00 00
+031ffe50 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00
+031ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+Expert command (m for help):
diff --git a/tests/expected/sfdisk/gpt-attrs-broken-guid b/tests/expected/sfdisk/gpt-attrs-broken-guid
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-broken-guid
diff --git a/tests/expected/sfdisk/gpt-attrs-broken-guid.err b/tests/expected/sfdisk/gpt-attrs-broken-guid.err
new file mode 100644
index 0000000..3e57341
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-broken-guid.err
@@ -0,0 +1,2 @@
+unsupported GPT attribute bit 'GUID:NoBlockIOProtocol GUID:GUID:63 RequiredPartiton'
+sfdisk: <removed>: partition 2: failed to set partition attributes
diff --git a/tests/expected/sfdisk/gpt-attrs-broken-nosep b/tests/expected/sfdisk/gpt-attrs-broken-nosep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-broken-nosep
diff --git a/tests/expected/sfdisk/gpt-attrs-broken-nosep.err b/tests/expected/sfdisk/gpt-attrs-broken-nosep.err
new file mode 100644
index 0000000..946979c
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-broken-nosep.err
@@ -0,0 +1,2 @@
+failed to parse GPT attribute string 'NoBlockIOProtocolRequiredPartiton'
+sfdisk: <removed>: partition 2: failed to set partition attributes
diff --git a/tests/expected/sfdisk/gpt-attrs-guid b/tests/expected/sfdisk/gpt-attrs-guid
new file mode 100644
index 0000000..9797b49
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-guid
@@ -0,0 +1,102 @@
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+GUID:48,51,52,63
+
+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):
+Expert command (m for help):
+PMBR: offset = 0, size = 512 bytes.
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00
+000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
+
+GPT Header: offset = 512, size = 512 bytes.
+00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00
+00000210 5a a7 90 27 00 00 00 00 01 00 00 00 00 00 00 00
+00000220 ff 8f 01 00 00 00 00 00 00 08 00 00 00 00 00 00
+00000230 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c
+00000240 8b 65 9e 76 45 41 21 8d 02 00 00 00 00 00 00 00
+00000250 80 00 00 00 80 00 00 00 af 59 5c 2a 00 00 00 00
+00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Entries: offset = 1024, size = 16384 bytes.
+00000400 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b
+00000410 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32
+00000420 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00
+00000430 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00
+00000440 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00
+00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000480 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+00000490 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4
+000004a0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00
+000004b0 00 00 00 00 00 00 19 80 00 00 00 00 00 00 00 00
+000004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000500 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f
+00000510 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87
+00000520 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00
+00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000580 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09
+00000590 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db
+000005a0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00
+000005b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000600 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+00000610 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73
+00000620 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00
+00000630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Backup Entries: offset = 52411904, size = 16384 bytes.
+031fbe00 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b
+031fbe10 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32
+031fbe20 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00
+031fbe30 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00
+031fbe40 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00
+031fbe50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbe80 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+031fbe90 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4
+031fbea0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00
+031fbeb0 00 00 00 00 00 00 19 80 00 00 00 00 00 00 00 00
+031fbec0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbf00 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f
+031fbf10 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87
+031fbf20 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00
+031fbf30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbf80 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09
+031fbf90 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db
+031fbfa0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00
+031fbfb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fc000 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+031fc010 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73
+031fc020 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00
+031fc030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Backup Header: offset = 52428288, size = 512 bytes.
+031ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00
+031ffe10 e3 1d 12 a7 00 00 00 00 ff 8f 01 00 00 00 00 00
+031ffe20 01 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00
+031ffe30 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c
+031ffe40 8b 65 9e 76 45 41 21 8d df 8f 01 00 00 00 00 00
+031ffe50 80 00 00 00 80 00 00 00 af 59 5c 2a 00 00 00 00
+031ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+Expert command (m for help):
diff --git a/tests/expected/sfdisk/gpt-attrs-guid.err b/tests/expected/sfdisk/gpt-attrs-guid.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-guid.err
diff --git a/tests/expected/sfdisk/gpt-attrs-space b/tests/expected/sfdisk/gpt-attrs-space
new file mode 100644
index 0000000..7cbfee4
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-space
@@ -0,0 +1,102 @@
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+RequiredPartition NoBlockIOProtocol GUID:48,51
+
+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):
+Expert command (m for help):
+PMBR: offset = 0, size = 512 bytes.
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00
+000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
+
+GPT Header: offset = 512, size = 512 bytes.
+00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00
+00000210 9b 58 15 32 00 00 00 00 01 00 00 00 00 00 00 00
+00000220 ff 8f 01 00 00 00 00 00 00 08 00 00 00 00 00 00
+00000230 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c
+00000240 8b 65 9e 76 45 41 21 8d 02 00 00 00 00 00 00 00
+00000250 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00
+00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Entries: offset = 1024, size = 16384 bytes.
+00000400 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b
+00000410 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32
+00000420 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00
+00000430 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00
+00000440 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00
+00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000480 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+00000490 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4
+000004a0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00
+000004b0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00
+000004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000500 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f
+00000510 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87
+00000520 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00
+00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000580 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09
+00000590 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db
+000005a0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00
+000005b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000600 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+00000610 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73
+00000620 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00
+00000630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Backup Entries: offset = 52411904, size = 16384 bytes.
+031fbe00 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b
+031fbe10 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32
+031fbe20 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00
+031fbe30 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00
+031fbe40 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00
+031fbe50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbe80 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+031fbe90 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4
+031fbea0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00
+031fbeb0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00
+031fbec0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbf00 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f
+031fbf10 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87
+031fbf20 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00
+031fbf30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbf80 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09
+031fbf90 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db
+031fbfa0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00
+031fbfb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fc000 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+031fc010 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73
+031fc020 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00
+031fc030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Backup Header: offset = 52428288, size = 512 bytes.
+031ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00
+031ffe10 22 e2 97 b2 00 00 00 00 ff 8f 01 00 00 00 00 00
+031ffe20 01 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00
+031ffe30 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c
+031ffe40 8b 65 9e 76 45 41 21 8d df 8f 01 00 00 00 00 00
+031ffe50 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00
+031ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+Expert command (m for help):
diff --git a/tests/expected/sfdisk/gpt-attrs-space.err b/tests/expected/sfdisk/gpt-attrs-space.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-space.err
diff --git a/tests/expected/sfdisk/gpt-attrs-unsupported b/tests/expected/sfdisk/gpt-attrs-unsupported
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-unsupported
diff --git a/tests/expected/sfdisk/gpt-attrs-unsupported.err b/tests/expected/sfdisk/gpt-attrs-unsupported.err
new file mode 100644
index 0000000..8577358
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-unsupported.err
@@ -0,0 +1,2 @@
+unsupported GPT attribute bit 'FooBar 48 51'
+sfdisk: <removed>: partition 2: failed to set partition attributes
diff --git a/tests/expected/sfdisk/gpt-attrs-with-typo b/tests/expected/sfdisk/gpt-attrs-with-typo
new file mode 100644
index 0000000..7cbfee4
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-with-typo
@@ -0,0 +1,102 @@
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+RequiredPartition NoBlockIOProtocol GUID:48,51
+
+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):
+Expert command (m for help):
+PMBR: offset = 0, size = 512 bytes.
+00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00
+000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
+
+GPT Header: offset = 512, size = 512 bytes.
+00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00
+00000210 9b 58 15 32 00 00 00 00 01 00 00 00 00 00 00 00
+00000220 ff 8f 01 00 00 00 00 00 00 08 00 00 00 00 00 00
+00000230 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c
+00000240 8b 65 9e 76 45 41 21 8d 02 00 00 00 00 00 00 00
+00000250 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00
+00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Entries: offset = 1024, size = 16384 bytes.
+00000400 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b
+00000410 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32
+00000420 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00
+00000430 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00
+00000440 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00
+00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000480 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+00000490 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4
+000004a0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00
+000004b0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00
+000004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000500 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f
+00000510 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87
+00000520 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00
+00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000580 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09
+00000590 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db
+000005a0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00
+000005b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+00000600 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+00000610 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73
+00000620 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00
+00000630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Backup Entries: offset = 52411904, size = 16384 bytes.
+031fbe00 28 73 2a c1 1f f8 d2 11 ba 4b 00 a0 c9 3e c9 3b
+031fbe10 7b 65 dc 91 b4 d7 53 46 a3 67 66 31 94 ff d4 32
+031fbe20 00 08 00 00 00 00 00 00 ff 2f 00 00 00 00 00 00
+031fbe30 00 00 00 00 00 00 00 00 45 00 46 00 49 00 20 00
+031fbe40 73 00 79 00 73 00 74 00 65 00 6d 00 00 00 00 00
+031fbe50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbe80 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+031fbe90 df 8a a0 ba 7e 32 77 41 89 53 98 da 1a 51 76 c4
+031fbea0 00 30 00 00 00 00 00 00 ff 57 00 00 00 00 00 00
+031fbeb0 03 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00
+031fbec0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbf00 6d fd 57 06 ab a4 c4 43 84 e5 09 33 c8 4b 4f 4f
+031fbf10 87 8a ad ce 1a ff cb 45 83 e5 99 b0 8d 0e bc 87
+031fbf20 00 58 00 00 00 00 00 00 ff 7f 00 00 00 00 00 00
+031fbf30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fbf80 e3 bc 68 4f cd e8 b1 4d 96 e7 fb ca f9 84 b7 09
+031fbf90 60 dc fc d4 5d 76 c3 4b bd 84 0d 0b 98 42 c6 db
+031fbfa0 00 80 00 00 00 00 00 00 ff a7 00 00 00 00 00 00
+031fbfb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+031fc000 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4
+031fc010 d7 5b 15 60 d8 bf 8c 4e b8 00 22 19 00 77 93 73
+031fc020 00 a8 00 00 00 00 00 00 ff 87 01 00 00 00 00 00
+031fc030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+GPT Backup Header: offset = 52428288, size = 512 bytes.
+031ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00
+031ffe10 22 e2 97 b2 00 00 00 00 ff 8f 01 00 00 00 00 00
+031ffe20 01 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00
+031ffe30 de 8f 01 00 00 00 00 00 99 c3 81 b1 11 47 52 4c
+031ffe40 8b 65 9e 76 45 41 21 8d df 8f 01 00 00 00 00 00
+031ffe50 80 00 00 00 80 00 00 00 25 86 e1 c0 00 00 00 00
+031ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+*
+
+Expert command (m for help):
diff --git a/tests/expected/sfdisk/gpt-attrs-with-typo.err b/tests/expected/sfdisk/gpt-attrs-with-typo.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs-with-typo.err
diff --git a/tests/expected/sfdisk/gpt-attrs.err b/tests/expected/sfdisk/gpt-attrs.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-attrs.err
diff --git a/tests/expected/sfdisk/gpt-label b/tests/expected/sfdisk/gpt-label
new file mode 100644
index 0000000..34ee589
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-label
@@ -0,0 +1,6 @@
+Partition name changed from '' to 'EFI system'.
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+EFI system
diff --git a/tests/expected/sfdisk/gpt-list-pmbr b/tests/expected/sfdisk/gpt-list-pmbr
new file mode 100644
index 0000000..72f5fff
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-list-pmbr
@@ -0,0 +1,10 @@
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 1 102399 102399 50M ee GPT
+
diff --git a/tests/expected/sfdisk/gpt-list-pmbr.err b/tests/expected/sfdisk/gpt-list-pmbr.err
new file mode 100644
index 0000000..5d51390
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-list-pmbr.err
@@ -0,0 +1 @@
+Partition 1 does not start on physical sector boundary.
diff --git a/tests/expected/sfdisk/gpt-read-dump b/tests/expected/sfdisk/gpt-read-dump
new file mode 100644
index 0000000..a35f2d4
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-read-dump
@@ -0,0 +1,44 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 8191 6144 3M Linux root (x86)
+<removed>2 8192 14335 6144 3M Linux filesystem
+<removed>3 14336 20479 6144 3M Linux filesystem
+<removed>4 20480 102366 81887 40M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Start End Size UUID Type Name
+ 2048 8191 3M 4DD6948A-44F8-4E6C-8BDC-064F740704F8 Linux root (x86)
+ 8192 14335 3M 44B51DEF-5F04-465A-91AA-2889A62D8E49 Linux filesystem
+14336 20479 3M 643E1D0D-BC02-4CED-B83B-86121062858F Linux filesystem
+20480 102366 40M D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C Linux filesystem GPT is the best
diff --git a/tests/expected/sfdisk/gpt-reorder b/tests/expected/sfdisk/gpt-reorder
new file mode 100644
index 0000000..184a8ec
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-reorder
@@ -0,0 +1,51 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 8192 14335 6144 3M Linux filesystem
+<removed>2 2048 8191 6144 3M Linux filesystem
+<removed>3 20480 102366 81887 40M Linux filesystem
+<removed>4 14336 20479 6144 3M Linux filesystem
+
+Partition table entries are not in disk order.
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Partitions order fixed.
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 8191 6144 3M Linux filesystem
+<removed>2 8192 14335 6144 3M Linux filesystem
+<removed>3 14336 20479 6144 3M Linux filesystem
+<removed>4 20480 102366 81887 40M Linux filesystem
diff --git a/tests/expected/sfdisk/gpt-resize b/tests/expected/sfdisk/gpt-resize
new file mode 100644
index 0000000..6e9d2e5
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-resize
@@ -0,0 +1,24 @@
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux swap
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 102366 100319 49M Linux swap
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/gpt-type b/tests/expected/sfdisk/gpt-type
new file mode 100644
index 0000000..396b75d
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-type
@@ -0,0 +1,5 @@
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+C12A7328-F81F-11D2-BA4B-00A0C93EC93B
diff --git a/tests/expected/sfdisk/gpt-uuid b/tests/expected/sfdisk/gpt-uuid
new file mode 100644
index 0000000..d3d11e8
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-uuid
@@ -0,0 +1 @@
+91DC657B-D7B4-4653-A367-663194FFD432
diff --git a/tests/expected/sfdisk/gpt-write-dump b/tests/expected/sfdisk/gpt-write-dump
new file mode 100644
index 0000000..2a00786
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-write-dump
@@ -0,0 +1,12 @@
+label: gpt
+label-id: 3B8559DB-33AF-43E9-BEFC-C331D829B539
+device: <removed>
+unit: sectors
+first-lba: 2048
+last-lba: 102366
+sector-size: 512
+
+<removed>1 : start= 2048, size= 6144, type=44479540-F297-41B2-9AF7-D131D5F0458A, uuid=4DD6948A-44F8-4E6C-8BDC-064F740704F8
+<removed>2 : start= 8192, size= 6144, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=44B51DEF-5F04-465A-91AA-2889A62D8E49
+<removed>3 : start= 14336, size= 6144, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=643E1D0D-BC02-4CED-B83B-86121062858F
+<removed>4 : start= 20480, size= 81887, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C, name="GPT is the best"
diff --git a/tests/expected/sfdisk/gpt-write-json b/tests/expected/sfdisk/gpt-write-json
new file mode 100644
index 0000000..19e2824
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-write-json
@@ -0,0 +1,39 @@
+{
+ "partitiontable": {
+ "label": "gpt",
+ "id": "3B8559DB-33AF-43E9-BEFC-C331D829B539",
+ "device": "<removed>",
+ "unit": "sectors",
+ "firstlba": 2048,
+ "lastlba": 102366,
+ "sectorsize": 512,
+ "partitions": [
+ {
+ "node": "<removed>1",
+ "start": 2048,
+ "size": 6144,
+ "type": "44479540-F297-41B2-9AF7-D131D5F0458A",
+ "uuid": "4DD6948A-44F8-4E6C-8BDC-064F740704F8"
+ },{
+ "node": "<removed>2",
+ "start": 8192,
+ "size": 6144,
+ "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
+ "uuid": "44B51DEF-5F04-465A-91AA-2889A62D8E49"
+ },{
+ "node": "<removed>3",
+ "start": 14336,
+ "size": 6144,
+ "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
+ "uuid": "643E1D0D-BC02-4CED-B83B-86121062858F"
+ },{
+ "node": "<removed>4",
+ "start": 20480,
+ "size": 81887,
+ "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
+ "uuid": "D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C",
+ "name": "GPT is the best"
+ }
+ ]
+ }
+}
diff --git a/tests/expected/sfdisk/movedata-down b/tests/expected/sfdisk/movedata-down
new file mode 100644
index 0000000..af0f6e8
--- /dev/null
+++ b/tests/expected/sfdisk/movedata-down
@@ -0,0 +1,31 @@
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 3048 23527 20480 10M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2548 23027 20480 10M 83 Linux
+
+Data move:
+ typescript file <removed>.
+ start sector: (from/to) 3048 / 2548
+ sectors: 20480
+ step size: 1048576 bytes
+
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/movedata-non-overlay b/tests/expected/sfdisk/movedata-non-overlay
new file mode 100644
index 0000000..753a9c3
--- /dev/null
+++ b/tests/expected/sfdisk/movedata-non-overlay
@@ -0,0 +1,31 @@
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2548 23027 20480 10M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 63988 84467 20480 10M 83 Linux
+
+Data move:
+ typescript file <removed>.
+ start sector: (from/to) 2548 / 63988
+ sectors: 20480
+ step size: 1048576 bytes
+
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/movedata-up b/tests/expected/sfdisk/movedata-up
new file mode 100644
index 0000000..9de06db
--- /dev/null
+++ b/tests/expected/sfdisk/movedata-up
@@ -0,0 +1,31 @@
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 22527 20480 10M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 3048 23527 20480 10M 83 Linux
+
+Data move:
+ typescript file <removed>.
+ start sector: (from/to) 2048 / 3048
+ sectors: 20480
+ step size: 1048576 bytes
+
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-0-move-up-absolute b/tests/expected/sfdisk/resize-dos-0-move-up-absolute
new file mode 100644
index 0000000..e1c069f
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-0-move-up-absolute
@@ -0,0 +1,26 @@
+3000,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 22527 20480 10M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 3000 23479 20480 10M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-1-move-down-absolute b/tests/expected/sfdisk/resize-dos-1-move-down-absolute
new file mode 100644
index 0000000..da88635
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-1-move-down-absolute
@@ -0,0 +1,26 @@
+2048,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 3000 23479 20480 10M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 22527 20480 10M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-10-down-enlarge b/tests/expected/sfdisk/resize-dos-10-down-enlarge
new file mode 100644
index 0000000..df392d8
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-10-down-enlarge
@@ -0,0 +1,26 @@
+-10M,+10M,,*
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 22528 204799 182272 89M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 204799 202752 99M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-11-absolute-move-resize b/tests/expected/sfdisk/resize-dos-11-absolute-move-resize
new file mode 100644
index 0000000..43e6837
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-11-absolute-move-resize
@@ -0,0 +1,26 @@
+2048,10M,L
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 204799 202752 99M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 22527 20480 10M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-12-reduce-midle b/tests/expected/sfdisk/resize-dos-12-reduce-midle
new file mode 100644
index 0000000..669fd45
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-12-reduce-midle
@@ -0,0 +1,30 @@
+,-5M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 22527 20480 10M 83 Linux
+<removed>2 22528 43007 20480 10M 83 Linux
+<removed>3 43008 63487 20480 10M 83 Linux
+
+<removed>2:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 22527 20480 10M 83 Linux
+<removed>2 22528 32767 10240 5M 83 Linux
+<removed>3 43008 63487 20480 10M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-13-max-last b/tests/expected/sfdisk/resize-dos-13-max-last
new file mode 100644
index 0000000..3664d88
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-13-max-last
@@ -0,0 +1,30 @@
+-5M,+
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 22527 20480 10M 83 Linux
+<removed>2 22528 32767 10240 5M 83 Linux
+<removed>3 43008 63487 20480 10M 83 Linux
+
+<removed>3:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 22527 20480 10M 83 Linux
+<removed>2 22528 32767 10240 5M 83 Linux
+<removed>3 32768 204799 172032 84M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-2-move-up-relative b/tests/expected/sfdisk/resize-dos-2-move-up-relative
new file mode 100644
index 0000000..75a95b1
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-2-move-up-relative
@@ -0,0 +1,26 @@
++1M,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 22527 20480 10M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 4096 24575 20480 10M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-3-move-down-relative b/tests/expected/sfdisk/resize-dos-3-move-down-relative
new file mode 100644
index 0000000..b3816e0
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-3-move-down-relative
@@ -0,0 +1,26 @@
+-1M,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 4096 24575 20480 10M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 22527 20480 10M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-4-enlarge-absolute b/tests/expected/sfdisk/resize-dos-4-enlarge-absolute
new file mode 100644
index 0000000..0c18f9f
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-4-enlarge-absolute
@@ -0,0 +1,26 @@
+-,15M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 22527 20480 10M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 32767 30720 15M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-5-reduce-absolute b/tests/expected/sfdisk/resize-dos-5-reduce-absolute
new file mode 100644
index 0000000..557875d
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-5-reduce-absolute
@@ -0,0 +1,26 @@
+,5M,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 32767 30720 15M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 12287 10240 5M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-6-enlarge-relative b/tests/expected/sfdisk/resize-dos-6-enlarge-relative
new file mode 100644
index 0000000..528d025
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-6-enlarge-relative
@@ -0,0 +1,26 @@
+, +10M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 12287 10240 5M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 32767 30720 15M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-7-reduce-relative b/tests/expected/sfdisk/resize-dos-7-reduce-relative
new file mode 100644
index 0000000..6a6fa0c
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-7-reduce-relative
@@ -0,0 +1,26 @@
+, -10M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 32767 30720 15M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 12287 10240 5M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-8-enlarge-all b/tests/expected/sfdisk/resize-dos-8-enlarge-all
new file mode 100644
index 0000000..2f6b3fb
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-8-enlarge-all
@@ -0,0 +1,26 @@
+,+
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 12287 10240 5M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 204799 202752 99M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-9-up-preduce b/tests/expected/sfdisk/resize-dos-9-up-preduce
new file mode 100644
index 0000000..2ca6f3b
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-9-up-preduce
@@ -0,0 +1,26 @@
++10M,-10M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 204799 202752 99M 83 Linux
+
+<removed>1:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 22528 204799 182272 89M 83 Linux
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-dos-unsorted b/tests/expected/sfdisk/resize-dos-unsorted
new file mode 100644
index 0000000..a16c326
--- /dev/null
+++ b/tests/expected/sfdisk/resize-dos-unsorted
@@ -0,0 +1,74 @@
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Created a new partition <removed>.
+<removed>6: Created a new partition <removed>.
+<removed>7: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 108543 102400 50M 5 Extended
+<removed>4 108544 110591 2048 1M 83 Linux
+<removed>5 8192 10239 2048 1M 83 Linux
+<removed>6 12288 108543 96256 47M 83 Linux
+
+Partition table entries are not in disk order.
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 108543 102400 50M 5 Extended
+<removed>4 108544 110591 2048 1M 83 Linux
+<removed>5 8192 10239 2048 1M 83 Linux
+<removed>6 12288 108543 96256 47M 83 Linux
+
+Partition table entries are not in disk order.
+
+<removed>4:
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 4095 2048 1M 83 Linux
+<removed>2 4096 6143 2048 1M 83 Linux
+<removed>3 6144 108543 102400 50M 5 Extended
+<removed>4 108544 204799 96256 47M 83 Linux
+<removed>5 8192 10239 2048 1M 83 Linux
+<removed>6 12288 108543 96256 47M 83 Linux
+
+Partition table entries are not in disk order.
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-0-move-up-absolute b/tests/expected/sfdisk/resize-gpt-0-move-up-absolute
new file mode 100644
index 0000000..230841d
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-0-move-up-absolute
@@ -0,0 +1,26 @@
+3000,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 3000 23479 20480 10M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-1-move-down-absolute b/tests/expected/sfdisk/resize-gpt-1-move-down-absolute
new file mode 100644
index 0000000..de2a871
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-1-move-down-absolute
@@ -0,0 +1,26 @@
+2048,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 3000 23479 20480 10M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-10-down-enlarge b/tests/expected/sfdisk/resize-gpt-10-down-enlarge
new file mode 100644
index 0000000..037d0ab
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-10-down-enlarge
@@ -0,0 +1,26 @@
+-10M,+10M,,*
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 22528 204766 182239 89M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 204766 202719 99M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-11-absolute-move-resize b/tests/expected/sfdisk/resize-gpt-11-absolute-move-resize
new file mode 100644
index 0000000..351e858
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-11-absolute-move-resize
@@ -0,0 +1,26 @@
+2048,10M,L
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 204766 202719 99M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-12-reduce-midle b/tests/expected/sfdisk/resize-gpt-12-reduce-midle
new file mode 100644
index 0000000..683cede
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-12-reduce-midle
@@ -0,0 +1,30 @@
+,-5M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+<removed>2 22528 43007 20480 10M Linux filesystem
+<removed>3 43008 63487 20480 10M Linux filesystem
+
+<removed>2:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+<removed>2 22528 32767 10240 5M Linux filesystem
+<removed>3 43008 63487 20480 10M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-13-max-last b/tests/expected/sfdisk/resize-gpt-13-max-last
new file mode 100644
index 0000000..b0483f7
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-13-max-last
@@ -0,0 +1,30 @@
+-5M,+
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+<removed>2 22528 32767 10240 5M Linux filesystem
+<removed>3 43008 63487 20480 10M Linux filesystem
+
+<removed>3:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+<removed>2 22528 32767 10240 5M Linux filesystem
+<removed>3 32768 204766 171999 84M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-2-move-up-relative b/tests/expected/sfdisk/resize-gpt-2-move-up-relative
new file mode 100644
index 0000000..7669dab
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-2-move-up-relative
@@ -0,0 +1,26 @@
++1M,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 4096 24575 20480 10M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-3-move-down-relative b/tests/expected/sfdisk/resize-gpt-3-move-down-relative
new file mode 100644
index 0000000..c8aa63a
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-3-move-down-relative
@@ -0,0 +1,26 @@
+-1M,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 4096 24575 20480 10M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-4-enlarge-absolute b/tests/expected/sfdisk/resize-gpt-4-enlarge-absolute
new file mode 100644
index 0000000..832e112
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-4-enlarge-absolute
@@ -0,0 +1,26 @@
+-,15M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 22527 20480 10M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 32767 30720 15M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-5-reduce-absolute b/tests/expected/sfdisk/resize-gpt-5-reduce-absolute
new file mode 100644
index 0000000..b214183
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-5-reduce-absolute
@@ -0,0 +1,26 @@
+,5M,
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 32767 30720 15M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 12287 10240 5M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-6-enlarge-relative b/tests/expected/sfdisk/resize-gpt-6-enlarge-relative
new file mode 100644
index 0000000..a9090e2
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-6-enlarge-relative
@@ -0,0 +1,26 @@
+, +10M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 12287 10240 5M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 32767 30720 15M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-7-reduce-relative b/tests/expected/sfdisk/resize-gpt-7-reduce-relative
new file mode 100644
index 0000000..7e391cd
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-7-reduce-relative
@@ -0,0 +1,26 @@
+, -10M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 32767 30720 15M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 12287 10240 5M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-8-enlarge-all b/tests/expected/sfdisk/resize-gpt-8-enlarge-all
new file mode 100644
index 0000000..d0c4c5e
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-8-enlarge-all
@@ -0,0 +1,26 @@
+,+
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 12287 10240 5M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 204766 202719 99M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/resize-gpt-9-up-preduce b/tests/expected/sfdisk/resize-gpt-9-up-preduce
new file mode 100644
index 0000000..16d348a
--- /dev/null
+++ b/tests/expected/sfdisk/resize-gpt-9-up-preduce
@@ -0,0 +1,26 @@
++10M,-10M
+
+Disk <removed>: 100 MiB, 104857600 bytes, 204800 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 204766 202719 99M Linux filesystem
+
+<removed>1:
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 22528 204766 182239 89M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
diff --git a/tests/expected/sfdisk/script-broken-1 b/tests/expected/sfdisk/script-broken-1
new file mode 100644
index 0000000..5da9777
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-1
@@ -0,0 +1,15 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>>
+New situation:
+Leaving.
+
diff --git a/tests/expected/sfdisk/script-broken-1.err b/tests/expected/sfdisk/script-broken-1.err
new file mode 100644
index 0000000..bee3b2e
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-1.err
@@ -0,0 +1 @@
+line 5: unsupported command
diff --git a/tests/expected/sfdisk/script-broken-2 b/tests/expected/sfdisk/script-broken-2
new file mode 100644
index 0000000..5da9777
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-2
@@ -0,0 +1,15 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>>
+New situation:
+Leaving.
+
diff --git a/tests/expected/sfdisk/script-broken-2.err b/tests/expected/sfdisk/script-broken-2.err
new file mode 100644
index 0000000..bee3b2e
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-2.err
@@ -0,0 +1 @@
+line 5: unsupported command
diff --git a/tests/expected/sfdisk/script-broken-3 b/tests/expected/sfdisk/script-broken-3
new file mode 100644
index 0000000..5da9777
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-3
@@ -0,0 +1,15 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>>
+New situation:
+Leaving.
+
diff --git a/tests/expected/sfdisk/script-broken-3.err b/tests/expected/sfdisk/script-broken-3.err
new file mode 100644
index 0000000..bee3b2e
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-3.err
@@ -0,0 +1 @@
+line 5: unsupported command
diff --git a/tests/expected/sfdisk/script-broken-4 b/tests/expected/sfdisk/script-broken-4
new file mode 100644
index 0000000..5da9777
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-4
@@ -0,0 +1,15 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>>
+New situation:
+Leaving.
+
diff --git a/tests/expected/sfdisk/script-broken-4.err b/tests/expected/sfdisk/script-broken-4.err
new file mode 100644
index 0000000..bee3b2e
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-4.err
@@ -0,0 +1 @@
+line 5: unsupported command
diff --git a/tests/expected/sfdisk/script-broken-5 b/tests/expected/sfdisk/script-broken-5
new file mode 100644
index 0000000..5da9777
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-5
@@ -0,0 +1,15 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>>
+New situation:
+Leaving.
+
diff --git a/tests/expected/sfdisk/script-broken-5.err b/tests/expected/sfdisk/script-broken-5.err
new file mode 100644
index 0000000..bee3b2e
--- /dev/null
+++ b/tests/expected/sfdisk/script-broken-5.err
@@ -0,0 +1 @@
+line 5: unsupported command
diff --git a/tests/expected/sfdisk/script-quotes b/tests/expected/sfdisk/script-quotes
new file mode 100644
index 0000000..5ae4d4f
--- /dev/null
+++ b/tests/expected/sfdisk/script-quotes
@@ -0,0 +1,44 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 8191 6144 3M Linux filesystem
+<removed>2 8192 14335 6144 3M Linux filesystem
+<removed>3 14336 20479 6144 3M Linux filesystem
+<removed>4 20480 26623 6144 3M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Start End Size UUID Type Name
+ 2048 8191 3M 4DD6948A-44F8-4E6C-8BDC-064F740704F8 Linux filesystem
+ 8192 14335 3M 44B51DEF-5F04-465A-91AA-2889A62D8E49 Linux filesystem
+14336 20479 3M 643E1D0D-BC02-4CED-B83B-86121062858F Linux filesystem
+20480 26623 3M D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C Linux filesystem
diff --git a/tests/expected/sfdisk/script-separator b/tests/expected/sfdisk/script-separator
new file mode 100644
index 0000000..0ac5453
--- /dev/null
+++ b/tests/expected/sfdisk/script-separator
@@ -0,0 +1,44 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 8191 6144 3M Linux filesystem
+<removed>2 8192 14335 6144 3M Linux root (x86)
+<removed>3 14336 20479 6144 3M Linux filesystem
+<removed>4 20480 102366 81887 40M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Start End Size UUID Type Name
+ 2048 8191 3M 4DD6948A-44F8-4E6C-8BDC-064F740704F8 Linux filesystem
+ 8192 14335 3M 44B51DEF-5F04-465A-91AA-2889A62D8E49 Linux root (x86)
+14336 20479 3M 643E1D0D-BC02-4CED-B83B-86121062858F Linux filesystem
+20480 102366 40M D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C Linux filesystem
diff --git a/tests/expected/sfdisk/script-type-and-id b/tests/expected/sfdisk/script-type-and-id
new file mode 100644
index 0000000..ee6dc55
--- /dev/null
+++ b/tests/expected/sfdisk/script-type-and-id
@@ -0,0 +1,44 @@
+Checking that no-one is using this disk right now ... OK
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Created a new partition <removed>.
+<removed>3: Created a new partition <removed>.
+<removed>4: Created a new partition <removed>.
+<removed>5: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 8191 6144 3M Linux root (x86)
+<removed>2 8192 14335 6144 3M Linux root (x86)
+<removed>3 14336 20479 6144 3M Linux root (x86)
+<removed>4 20480 102366 81887 40M Linux root (x86)
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Start End Size UUID Type Name
+ 2048 8191 3M 4DD6948A-44F8-4E6C-8BDC-064F740704F8 Linux root (x86)
+ 8192 14335 3M 44B51DEF-5F04-465A-91AA-2889A62D8E49 Linux root (x86)
+14336 20479 3M 643E1D0D-BC02-4CED-B83B-86121062858F Linux root (x86)
+20480 102366 40M D2A29B0A-FDEE-40C3-9BAE-B9FA782C986C Linux root (x86)
diff --git a/tests/expected/sfdisk/wipe-fs-to-dos b/tests/expected/sfdisk/wipe-fs-to-dos
new file mode 100644
index 0000000..8f97e25
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-fs-to-dos
@@ -0,0 +1,28 @@
+
+=====Create FS================================
+
+=====Create DOS================================
+
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Created a new disklabel.
+
+<removed>1: Created a new partition <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 102399 100352 49M 83 Linux
+
+The partition table has been altered.
+
+=====Check content================================
+OFFSET TYPE
+0x1fe dos
diff --git a/tests/expected/sfdisk/wipe-fs-to-dos.err b/tests/expected/sfdisk/wipe-fs-to-dos.err
new file mode 100644
index 0000000..1a08900
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-fs-to-dos.err
@@ -0,0 +1,2 @@
+The device contains 'swap' signature and it may be removed by a write command. See sfdisk(8) man page and --wipe option for more details.
+The device contains 'swap' signature and it may be removed by a write command. See sfdisk(8) man page and --wipe option for more details.
diff --git a/tests/expected/sfdisk/wipe-gpt-to-dos b/tests/expected/sfdisk/wipe-gpt-to-dos
new file mode 100644
index 0000000..8b9b130
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-gpt-to-dos
@@ -0,0 +1,51 @@
+
+=====Create GPT================================
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 100351 98304 48M Linux filesystem
+
+The partition table has been altered.
+
+=====Create DOS================================
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 100351 98304 48M Linux filesystem
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 102399 100352 49M 83 Linux
+
+The partition table has been altered.
+
+=====Check content================================
+OFFSET TYPE
+0x1fe dos
diff --git a/tests/expected/sfdisk/wipe-gpt-to-dos-auto b/tests/expected/sfdisk/wipe-gpt-to-dos-auto
new file mode 100644
index 0000000..2047a61
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-gpt-to-dos-auto
@@ -0,0 +1,58 @@
+
+=====Create GPT================================
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: dos
+Disk identifier: <removed>
+
+Old situation:
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 102399 100352 49M 83 Linux
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 100351 98304 48M Linux filesystem
+
+The partition table has been altered.
+
+=====Create DOS================================
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Old situation:
+
+Device Start End Sectors Size Type
+<removed>1 2048 100351 98304 48M Linux filesystem
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: dos
+Disk identifier: <removed>
+
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 102399 100352 49M 83 Linux
+
+The partition table has been altered.
+
+=====Check content================================
+OFFSET TYPE
+0x1fe dos
diff --git a/tests/expected/sfdisk/wipe-gpt-to-dos-auto.err b/tests/expected/sfdisk/wipe-gpt-to-dos-auto.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-gpt-to-dos-auto.err
diff --git a/tests/expected/sfdisk/wipe-gpt-to-dos.err b/tests/expected/sfdisk/wipe-gpt-to-dos.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-gpt-to-dos.err
diff --git a/tests/expected/sfdisk/wipe-partition b/tests/expected/sfdisk/wipe-partition
new file mode 100644
index 0000000..765a22e
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-partition
@@ -0,0 +1,59 @@
+
+=====Create GPT================================
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+<removed>2: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 100351 98304 48M Linux filesystem
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+
+=====Create FS in partition================================
+
+=====Wipe whole-disk device================================
+
+=====Create GPT (again)================================
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Disk model: scsi_debug
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / <removed> bytes
+
+>>> Created a new disklabel.
+<removed>1: Created a new partition <removed>.
+The signature will be removed by a write command.
+<removed>2: Done.
+
+New situation:
+Disklabel type: gpt
+Disk identifier: <removed>
+
+Device Start End Sectors Size Type
+<removed>1 2048 100351 98304 48M Linux filesystem
+
+Filesystem/RAID signature on partition 1 will be wiped.
+
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+
+=====Check content (disk)================================
+OFFSET TYPE
+0x200 gpt
+0x31ffe00 gpt
+0x1fe PMBR
+
+=====Check content (partition)================================
diff --git a/tests/expected/sfdisk/wipe-partition.err b/tests/expected/sfdisk/wipe-partition.err
new file mode 100644
index 0000000..bce8a4c
--- /dev/null
+++ b/tests/expected/sfdisk/wipe-partition.err
@@ -0,0 +1 @@
+Partition #1 contains a swap signature.
diff --git a/tests/expected/sfdisk/wipe.err b/tests/expected/sfdisk/wipe.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/sfdisk/wipe.err
diff --git a/tests/expected/sha1/sha1 b/tests/expected/sha1/sha1
new file mode 100644
index 0000000..35c7286
--- /dev/null
+++ b/tests/expected/sha1/sha1
@@ -0,0 +1,7 @@
+da39a3ee5e6b4b0d3255bfef95601890afd80709
+a9993e364706816aba3e25717850c26c9cd0d89d
+da3175a32e6c1aacfd3d3f35770188ae0ab6d078
+7496226c17d4d0a770cea72eebb659c16753b956
+db50ea8b1b20567cd4d8a7fa14de8d37ce9b722c
+90e072e1df8de879ca307610d5ced675af55a4ac
+2eda696c8df17722d80518bebb33742e311a4ac1
diff --git a/tests/expected/swapon/devname b/tests/expected/swapon/devname
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/swapon/devname
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/swapon/fixpgsz b/tests/expected/swapon/fixpgsz
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/swapon/fixpgsz
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/swapon/fixsig b/tests/expected/swapon/fixsig
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/swapon/fixsig
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/swapon/label b/tests/expected/swapon/label
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/swapon/label
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/swapon/uuid b/tests/expected/swapon/uuid
new file mode 100644
index 0000000..3582111
--- /dev/null
+++ b/tests/expected/swapon/uuid
@@ -0,0 +1 @@
+Success
diff --git a/tests/expected/tailf/simple b/tests/expected/tailf/simple
new file mode 100644
index 0000000..ddf72de
--- /dev/null
+++ b/tests/expected/tailf/simple
@@ -0,0 +1,2 @@
+a b c d e f g h i j k l m n o p q r s t u v w x y z
+0 1 2 3 4 5 6 7 8 9
diff --git a/tests/expected/ul/basic b/tests/expected/ul/basic
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/expected/ul/basic
diff --git a/tests/expected/ul/basic-filter-input b/tests/expected/ul/basic-filter-input
new file mode 100644
index 0000000..b8154c1
--- /dev/null
+++ b/tests/expected/ul/basic-filter-input
@@ -0,0 +1,11 @@
+backspacex
+ tab
+R
+SO
+SI(B
+underline
+flush
+ after flush
+normal
+reverse
+eof
diff --git a/tests/expected/ul/basic-indicated b/tests/expected/ul/basic-indicated
new file mode 100644
index 0000000..5b57285
--- /dev/null
+++ b/tests/expected/ul/basic-indicated
@@ -0,0 +1,2 @@
+ul
+__
diff --git a/tests/expected/ul/basic-printable-characters b/tests/expected/ul/basic-printable-characters
new file mode 100644
index 0000000..3bc7fbc
--- /dev/null
+++ b/tests/expected/ul/basic-printable-characters
@@ -0,0 +1,95 @@
+
+!
+"
+#
+$
+%
+&
+'
+(
+)
+*
++
+,
+-
+.
+/
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+:
+;
+<
+=
+>
+?
+@
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+[
+\
+]
+^
+_
+`
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+{
+|
+}
+~
diff --git a/tests/expected/ul/ul b/tests/expected/ul/ul
new file mode 100644
index 0000000..f3aecd1
--- /dev/null
+++ b/tests/expected/ul/ul
@@ -0,0 +1,3 @@
+a(Bbc
+ tab
+ \ No newline at end of file
diff --git a/tests/expected/utmp/last-dns b/tests/expected/utmp/last-dns
new file mode 100644
index 0000000..34012c7
--- /dev/null
+++ b/tests/expected/utmp/last-dns
@@ -0,0 +1,12 @@
+~~~ dns short ~~~
+IPv4 root a.root-servers.n Wed Aug 28 13:00 - 14:00 (01:00)
+
+wtmp-a 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-a 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-a begins Wed Aug 28 03:00:00 2013
diff --git a/tests/expected/utmp/last-ipv6-dns b/tests/expected/utmp/last-ipv6-dns
new file mode 100644
index 0000000..aa53a64
--- /dev/null
+++ b/tests/expected/utmp/last-ipv6-dns
@@ -0,0 +1,12 @@
+~~~ dns short ~~~
+IPv6 root a.root-servers.n Wed Aug 28 20:30 - 20:40 (00:10)
+
+wtmp-ipv6 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)
+
+wtmp-ipv6 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
+
+wtmp-ipv6 begins Wed Aug 28 20:30:40 2013
diff --git a/tests/expected/utmp/last-ipv6-nodns b/tests/expected/utmp/last-ipv6-nodns
new file mode 100644
index 0000000..65d422a
--- /dev/null
+++ b/tests/expected/utmp/last-ipv6-nodns
@@ -0,0 +1,8 @@
+~~~ show ip ~~~
+IPv6 root 2001:503:ba3e::2 Wed Aug 28 20:30 - 20:40 (00:10)
+
+wtmp-ipv6 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
+
+wtmp-ipv6 begins Wed Aug 28 20:30:40 2013
diff --git a/tests/expected/utmp/last-nodns b/tests/expected/utmp/last-nodns
new file mode 100644
index 0000000..5b9171d
--- /dev/null
+++ b/tests/expected/utmp/last-nodns
@@ -0,0 +1,124 @@
+~~~ 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 gone - no logout
+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-a 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 gone - no logout
+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-a begins Wed Aug 28 03:00:00 2013
+~~~ show ip ~~~
+torvalds linux 128.214.205.14 Mon Aug 26 00:57 gone - no logout
+
+wtmp-a begins Wed Aug 28 03:00:00 2013
+~~~ no host ~~~
+torvalds linux Mon Aug 26 00:57 gone - no logout
+
+wtmp-a begins Wed Aug 28 03:00:00 2013
+~~~ full times shortopt ~~~
+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 gone - no logout
+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-a begins Wed Aug 28 03:00:00 2013
+~~~ full times longopt ~~~
+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 gone - no logout
+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-a begins Wed Aug 28 03:00:00 2013
+~~~ no time ~~~
+rick long never-gonna-logo (24855+03:14)
+torvalds linux hobby no logout
+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)
+~~~ iso-8601 time ~~~
+rick long never-gonna-logout 1970-01-01T00:00:00+00:00 - 2038-01-19T03:14:07+00:00 (24855+03:14)
+torvalds linux hobby 1991-08-26T00:57:08+00:00 gone - no logout
+reboot system boot system-name 2013-08-28T18:00:00+00:00 still running
+reboot system boot system-name 2013-08-28T16:00:00+00:00 - 2013-08-28T17:00:00+00:00 (01:00)
+IPv4 root dns-server 2013-08-28T13:00:00+00:00 - 2013-08-28T14:00:00+00:00 (01:00)
+nonvalid foo zero 2013-08-28T12:00:00+00:00 - down (03:00)
+runlevel foo one 2013-08-28T11:00:00+00:00 - 2013-08-28T12:00:00+00:00 (01:00)
+sysboot foo two 2013-08-28T10:00:00+00:00 - 2013-08-28T11:00:00+00:00 (01:00)
+newtime foo three 2013-08-28T09:00:00+00:00 - 2013-08-28T10:00:00+00:00 (01:00)
+oldtime foo four 2013-08-28T08:00:00+00:00 - 2013-08-28T09:00:00+00:00 (01:00)
+init foo five 2013-08-28T07:00:00+00:00 - 2013-08-28T08:00:00+00:00 (01:00)
+login foo six 2013-08-28T06:00:00+00:00 - 2013-08-28T07:00:00+00:00 (01:00)
+user_process foo seven 2013-08-28T05:00:00+00:00 - 2013-08-28T06:00:00+00:00 (01:00)
+accounting foo nine 2013-08-28T03:00:00+00:00 - 2013-08-28T04:00:00+00:00 (01:00)
+
+wtmp-a begins 2013-08-28T03:00:00+00:00
+~~~ 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-a 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 gone - no logout
+runlevel foo one Wed Aug 28 11:00 - 12:00 (01:00)
+
+wtmp-a begins Wed Aug 28 03:00:00 2013
diff --git a/tests/expected/utmp/utmpdump-circle b/tests/expected/utmp/utmpdump-circle
new file mode 100644
index 0000000..96fd2a9
--- /dev/null
+++ b/tests/expected/utmp/utmpdump-circle
@@ -0,0 +1 @@
+no output expected
diff --git a/tests/expected/utmp/utmpdump-subsecond b/tests/expected/utmp/utmpdump-subsecond
new file mode 100644
index 0000000..67d2cf8
--- /dev/null
+++ b/tests/expected/utmp/utmpdump-subsecond
@@ -0,0 +1,4 @@
+last 9 is expected to disappear in conversion
+[7] [00010] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [2013-08-28T20:30:40,123456+00:00]
+[8] [00011] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [2013-08-28T20:40:50,999999+00:00]
+[0] [00000] [ts/0] [nonvalid] [foo ] [zero ] [0.0.0.0 ] [2013-08-28T12:00:00,12345678+00:00]
diff --git a/tests/expected/utmp/utmpdump-tobin b/tests/expected/utmp/utmpdump-tobin
new file mode 100644
index 0000000..d0f1b61
--- /dev/null
+++ b/tests/expected/utmp/utmpdump-tobin
@@ -0,0 +1 @@
+no diff
diff --git a/tests/expected/utmp/utmpdump-tobin-ipv6 b/tests/expected/utmp/utmpdump-tobin-ipv6
new file mode 100644
index 0000000..d0f1b61
--- /dev/null
+++ b/tests/expected/utmp/utmpdump-tobin-ipv6
@@ -0,0 +1 @@
+no diff
diff --git a/tests/expected/utmp/utmpdump-totxt b/tests/expected/utmp/utmpdump-totxt
new file mode 100644
index 0000000..f929273
--- /dev/null
+++ b/tests/expected/utmp/utmpdump-totxt
@@ -0,0 +1,10 @@
+[7] [17058] [ts/1] [kerolasa] [pts/1 ] [:0.0 ] [0.0.0.0 ] [2013-01-16T23:44:09,000000+00:00]
+[7] [22098] [ts/2] [kerolasa] [pts/2 ] [:0.0 ] [0.0.0.0 ] [2013-01-16T23:49:17,000000+00:00]
+[7] [24915] [ts/3] [kerolasa] [pts/3 ] [:0.0 ] [0.0.0.0 ] [2013-01-17T12:23:33,000000+00:00]
+[8] [24915] [ts/3] [kerolasa] [pts/3 ] [ ] [0.0.0.0 ] [2013-01-17T12:24:49,000000+00:00]
+[7] [30629] [ts/3] [kerolasa] [pts/3 ] [:0.0 ] [0.0.0.0 ] [2013-01-17T13:12:39,000000+00:00]
+[8] [30629] [ts/3] [kerolasa] [pts/3 ] [ ] [0.0.0.0 ] [2013-01-17T13:42:19,000000+00:00]
+[8] [22098] [ts/2] [kerolasa] [pts/2 ] [ ] [0.0.0.0 ] [2013-01-17T13:42:48,000000+00:00]
+[8] [17058] [ts/1] [kerolasa] [pts/1 ] [ ] [0.0.0.0 ] [2013-01-17T13:42:48,000000+00:00]
+[7] [31545] [ts/1] [kerolasa] [pts/1 ] [:0.0 ] [0.0.0.0 ] [2013-01-17T20:17:21,000000+00:00]
+[7] [28496] [ts/2] [kerolasa] [pts/2 ] [:0.0 ] [0.0.0.0 ] [2013-01-17T21:09:39,000000+00:00]
diff --git a/tests/expected/utmp/utmpdump-totxt-ipv6 b/tests/expected/utmp/utmpdump-totxt-ipv6
new file mode 100644
index 0000000..cceb411
--- /dev/null
+++ b/tests/expected/utmp/utmpdump-totxt-ipv6
@@ -0,0 +1,2 @@
+[7] [00010] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [2013-08-28T20:30:40,000000+00:00]
+[8] [00011] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [2013-08-28T20:40:50,000000+00:00]
diff --git a/tests/expected/uuid/namespace b/tests/expected/uuid/namespace
new file mode 100644
index 0000000..7860975
--- /dev/null
+++ b/tests/expected/uuid/namespace
@@ -0,0 +1,7 @@
+uuid_get_template dns returns 6ba7b810-9dad-11d1-80b4-00c04fd430c8
+uuid_get_template url returns 6ba7b811-9dad-11d1-80b4-00c04fd430c8
+uuid_get_template oid returns 6ba7b812-9dad-11d1-80b4-00c04fd430c8
+uuid_get_template x500 returns 6ba7b814-9dad-11d1-80b4-00c04fd430c8
+uuid_get_template NULL returns NULL
+uuid_get_template returns NULL
+uuid_get_template unknown returns NULL
diff --git a/tests/expected/uuid/oids b/tests/expected/uuid/oids
new file mode 100644
index 0000000..c121cbe
--- /dev/null
+++ b/tests/expected/uuid/oids
@@ -0,0 +1,4 @@
+3d813cbb-47fb-32ba-91df-831e1593ac29
+5df41881-3aed-3515-88a7-2f4a814cf09e
+2ed6657d-e927-568b-95e1-2665a8aea6a2
+fcdc2122-78d2-59f7-b1ed-041a561ef652
diff --git a/tests/expected/uuid/uuid_parser b/tests/expected/uuid/uuid_parser
new file mode 100644
index 0000000..a9eb672
--- /dev/null
+++ b/tests/expected/uuid/uuid_parser
@@ -0,0 +1,15 @@
+84949cc5-4701-4a84-895b-354c584a981b is valid, OK
+84949CC5-4701-4A84-895B-354C584A981B is valid, OK
+84949cc5-4701-4a84-895b-354c584a981bc is invalid, OK
+84949cc5-4701-4a84-895b-354c584a981 is invalid, OK
+84949cc5x4701-4a84-895b-354c584a981b is invalid, OK
+84949cc504701-4a84-895b-354c584a981b is invalid, OK
+84949cc5-470104a84-895b-354c584a981b is invalid, OK
+84949cc5-4701-4a840895b-354c584a981b is invalid, OK
+84949cc5-4701-4a84-895b0354c584a981b is invalid, OK
+g4949cc5-4701-4a84-895b-354c584a981b is invalid, OK
+84949cc5-4701-4a84-895b-354c584a981g is invalid, OK
+00000000-0000-0000-0000-000000000000 is valid, OK
+01234567-89ab-cdef-0134-567890abcedf is valid, OK
+ffffffff-ffff-ffff-ffff-ffffffffffff is valid, OK
+return value: 0
diff --git a/tests/expected/uuid/uuidd b/tests/expected/uuid/uuidd
new file mode 100644
index 0000000..ae440b2
--- /dev/null
+++ b/tests/expected/uuid/uuidd
@@ -0,0 +1,11 @@
+options: -t
+return value: 0
+options: --time
+return value: 0
+options: -r
+return value: 0
+options: --random
+return value: 0
+options: -r -n 65
+return value: 0
+Killed uuidd running at pid <num>.
diff --git a/tests/expected/uuid/uuidgen b/tests/expected/uuid/uuidgen
new file mode 100644
index 0000000..b0d1d98
--- /dev/null
+++ b/tests/expected/uuid/uuidgen
@@ -0,0 +1,8 @@
+option: -r
+return values: 0 and 0
+option: -t
+return values: 0 and 0
+option: --random
+return values: 0 and 0
+option: --time
+return values: 0 and 0
diff --git a/tests/expected/uuid/uuidparse b/tests/expected/uuid/uuidparse
new file mode 100644
index 0000000..8b23a25
--- /dev/null
+++ b/tests/expected/uuid/uuidparse
@@ -0,0 +1,31 @@
+UUID VARIANT TYPE TIME
+00000000-0000-0000-0000-000000000000 NCS nil
+00000000-0000-1000-0000-000000000000 NCS time-based
+00000000-0000-2000-0000-000000000000 NCS DCE
+00000000-0000-3000-0000-000000000000 NCS name-based
+00000000-0000-4000-0000-000000000000 NCS random
+00000000-0000-5000-0000-000000000000 NCS sha1-based
+00000000-0000-6000-0000-000000000000 NCS unknown
+00000000-0000-0000-8000-000000000000 DCE unknown
+00000000-0000-2000-8000-000000000000 DCE DCE
+00000000-0000-3000-8000-000000000000 DCE name-based
+00000000-0000-4000-8000-000000000000 DCE random
+00000000-0000-5000-8000-000000000000 DCE sha1-based
+00000000-0000-6000-8000-000000000000 DCE unknown
+00000000-0000-0000-d000-000000000000 Microsoft unknown
+00000000-0000-1000-d000-000000000000 Microsoft time-based
+00000000-0000-2000-d000-000000000000 Microsoft DCE
+00000000-0000-3000-d000-000000000000 Microsoft name-based
+00000000-0000-4000-d000-000000000000 Microsoft random
+00000000-0000-5000-d000-000000000000 Microsoft sha1-based
+00000000-0000-6000-d000-000000000000 Microsoft unknown
+00000000-0000-0000-f000-000000000000 other unknown
+00000000-0000-1000-f000-000000000000 other time-based
+00000000-0000-2000-f000-000000000000 other DCE
+00000000-0000-3000-f000-000000000000 other name-based
+00000000-0000-4000-f000-000000000000 other random
+00000000-0000-5000-f000-000000000000 other sha1-based
+00000000-0000-6000-f000-000000000000 other unknown
+9b274c46-544a-11e7-a972-00037f500001 DCE time-based 2017-06-18 17:21:46,544647+00:00
+invalid-input invalid invalid invalid
+return value: 0
diff --git a/tests/expected/wipefs/wipefs b/tests/expected/wipefs/wipefs
new file mode 100644
index 0000000..d86bac9
--- /dev/null
+++ b/tests/expected/wipefs/wipefs
@@ -0,0 +1 @@
+OK
diff --git a/tests/functions.sh b/tests/functions.sh
new file mode 100644
index 0000000..5a562a3
--- /dev/null
+++ b/tests/functions.sh
@@ -0,0 +1,1169 @@
+#
+# Copyright (C) 2007 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_EXIT_NOTSUPP=2
+
+function ts_abspath {
+ cd $1
+ pwd
+}
+
+function ts_canonicalize {
+ P="$1"
+ C=$(readlink -f $P)
+
+ if [ -n "$C" ]; then
+ echo "$C"
+ else
+ echo "$P"
+ fi
+}
+
+function ts_cd {
+ if [ $# -eq 0 ]; then
+ ts_failed "ul_cd: not enough arguments"
+ fi
+ DEST=$(readlink -f "$1" 2>/dev/null)
+ if [ "x$DEST" = "x" ] || [ ! -d "$DEST" ]; then
+ ts_failed "ul_cd: $1: no such directory"
+ fi
+ cd "$DEST" 2>/dev/null || ts_failed "ul_cd: $1: cannot change directory"
+ if [ "$PWD" != "$DEST" ]; then
+ ts_failed "ul_cd: $PWD is not $DEST"
+ fi
+}
+
+function ts_separator {
+ local header="$1"
+ echo >> $TS_OUTPUT
+ if [ -z "$header" ]; then
+ echo "============================================" >> $TS_OUTPUT
+ else
+ echo "=====$header================================" >> $TS_OUTPUT
+ fi
+}
+
+function ts_report {
+ local desc=
+
+ if [ "$TS_PARSABLE" != "yes" ]; then
+ if [ $TS_NSUBTESTS -ne 0 ] && [ -z "$TS_SUBNAME" ]; then
+ desc=$(printf "%11s...")
+ fi
+ echo "$desc$1"
+ return
+ fi
+
+ if [ -n "$TS_SUBNAME" ]; then
+ desc=$(printf "%s: [%02d] %s" "$TS_DESC" "$TS_NSUBTESTS" "$TS_SUBNAME")
+ else
+ desc=$TS_DESC
+ fi
+ printf "%13s: %-45s ...%s\n" "$TS_COMPONENT" "$desc" "$1"
+}
+
+function ts_check_test_command {
+ case "$1" in
+ "")
+ ts_failed "invalid test_command requested"
+ ;;
+ */*)
+ # paths
+ if [ ! -x "$1" ]; then
+ ts_skip "${1##*/} not found"
+ fi
+ ;;
+ *)
+ # just command names (e.g. --use-system-commands)
+ local cmd=$1
+ type "$cmd" >/dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ if [ "$TS_NOSKIP_COMMANDS" = "yes" ]; then
+ ts_failed "missing in PATH: $cmd"
+ fi
+ ts_skip "missing in PATH: $cmd"
+ fi
+ ;;
+ esac
+}
+
+function ts_check_prog {
+ local cmd=$1
+ [ -z "$cmd" ] && ts_failed "invalid prog requested"
+ type "$cmd" >/dev/null 2>&1 || ts_skip "missing in PATH: $cmd"
+}
+
+function ts_check_losetup {
+ local tmp
+ ts_check_test_command "$TS_CMD_LOSETUP"
+
+ if [ "$TS_SKIP_LOOPDEVS" = "yes" ]; then
+ ts_skip "loop-device tests disabled"
+ fi
+
+ # assuming that losetup -f works ... to be checked somewhere else
+ tmp=$($TS_CMD_LOSETUP -f 2>/dev/null)
+ if test -b "$tmp"; then
+ return 0
+ fi
+ ts_skip "no loop-device support"
+}
+
+function ts_check_wcsspn {
+ # https://gitlab.com/qemu-project/qemu/-/issues/1248
+ if [ -e "$TS_HELPER_SYSINFO" ] &&
+ [ "$("$TS_HELPER_SYSINFO" wcsspn-ok)" = "0" ]; then
+
+ ts_skip "non-functional widestring functions"
+ fi
+}
+
+function ts_check_native_byteorder {
+ if [ "$QEMU_USER" == "1" ] && [ ! -e /sys/kernel/cpu_byteorder ]; then
+ ts_skip "non-native byteorder"
+ fi
+}
+
+function ts_check_enotty {
+ # https://lore.kernel.org/qemu-devel/20230426070659.80649-1-thomas@t-8ch.de/
+ if [ -e "$TS_HELPER_SYSINFO" ] &&
+ [ "$("$TS_HELPER_SYSINFO" enotty-ok)" = "0" ]; then
+
+ ts_skip "broken ENOTTY return"
+ fi
+}
+
+function ts_report_skip {
+ ts_report " SKIPPED ($1)"
+}
+
+function ts_skip {
+ ts_report_skip "$1"
+
+ ts_cleanup_on_exit
+ exit 0
+}
+
+function ts_skip_nonroot {
+ if [ $UID -ne 0 ]; then
+ ts_skip "no root permissions"
+ fi
+}
+
+function ts_skip_qemu_user {
+ if [ "$QEMU_USER" == "1" ]; then
+ ts_skip "running under qemu-user emulation"
+ fi
+}
+
+function ts_failed_subtest {
+ local msg="FAILED"
+ local ret=1
+ if [ "$TS_KNOWN_FAIL" = "yes" ]; then
+ msg="KNOWN FAILED"
+ ret=0
+ fi
+
+ if [ x"$1" == x"" ]; then
+ ts_report " $msg ($TS_NS)"
+ else
+ ts_report " $msg ($1)"
+ fi
+
+ return $ret
+}
+
+function ts_failed {
+ ts_failed_subtest "$1"
+ exit $?
+}
+
+function ts_report_ok {
+ if [ x"$1" == x"" ]; then
+ ts_report " OK"
+ else
+ ts_report " OK ($1)"
+ fi
+}
+
+function ts_ok {
+ ts_report_ok "$1"
+ exit 0
+}
+
+function ts_log {
+ echo "$1" >> $TS_OUTPUT
+ [ "$TS_VERBOSE" == "yes" ] && echo "$1"
+}
+
+function ts_logerr {
+ echo "$1" >> $TS_ERRLOG
+ [ "$TS_VERBOSE" == "yes" ] && echo "$1"
+}
+
+function ts_log_both {
+ echo "$1" >> $TS_OUTPUT
+ echo "$1" >> $TS_ERRLOG
+ [ "$TS_VERBOSE" == "yes" ] && echo "$1"
+}
+
+function ts_has_option {
+ NAME="$1"
+ ALL="$2"
+
+ # user may set options by env for a single test or whole component
+ # e.g. TS_OPT_ipcs_limits2_fake="yes" or TS_OPT_ipcs_fake="yes"
+ local v_test=${TS_TESTNAME//[-.]/_}
+ local v_comp=${TS_COMPONENT//[-.]/_}
+ local v_name=${NAME//[-.]/_}
+ eval local env_opt_test=\$TS_OPT_${v_comp}_${v_test}_${v_name}
+ eval local env_opt_comp=\$TS_OPT_${v_comp}_${v_name}
+ if [ "$env_opt_test" = "yes" \
+ -o "$env_opt_comp" = "yes" -a "$env_opt_test" != "no" ]; then
+ echo "yes"
+ return
+ elif [ "$env_opt_test" = "no" \
+ -o "$env_opt_comp" = "no" -a "$env_opt_test" != "yes" ]; then
+ return
+ fi
+
+ # or just check the global command line options
+ if [[ $ALL =~ ([$' \t\n']|^)--$NAME([$'= \t\n']|$) ]]; then
+ echo yes
+ return
+ fi
+
+ # or the _global_ env, e.g TS_OPT_parsable="yes"
+ eval local env_opt=\$TS_OPT_${v_name}
+ if [ "$env_opt" = "yes" ]; then echo "yes"; fi
+}
+
+function ts_option_argument {
+ NAME="$1"
+ ALL="$2"
+
+ # last option wins!
+ echo "$ALL" | sed -n "s/.*[ \t\n]--$NAME=\([^ \t\n]*\).*/\1/p" | tail -n 1
+}
+
+function ts_init_core_env {
+ TS_SUBNAME=""
+ TS_NS="$TS_COMPONENT/$TS_TESTNAME"
+ TS_OUTPUT="$TS_OUTDIR/$TS_TESTNAME"
+ TS_ERRLOG="$TS_OUTDIR/$TS_TESTNAME.err"
+ TS_VGDUMP="$TS_OUTDIR/$TS_TESTNAME.vgdump"
+ TS_EXIT_CODE="$TS_OUTDIR/$TS_TESTNAME.exit_code"
+ TS_DIFF="$TS_DIFFDIR/$TS_TESTNAME"
+ TS_EXPECTED="$TS_TOPDIR/expected/$TS_NS"
+ TS_EXPECTED_ERR="$TS_TOPDIR/expected/$TS_NS.err"
+ TS_MOUNTPOINT="$TS_OUTDIR/${TS_TESTNAME}-mnt"
+}
+
+function ts_init_core_subtest_env {
+ TS_NS="$TS_COMPONENT/$TS_TESTNAME-$TS_SUBNAME"
+ TS_OUTPUT="$TS_OUTDIR/$TS_TESTNAME-$TS_SUBNAME"
+ TS_ERRLOG="$TS_OUTDIR/$TS_TESTNAME-$TS_SUBNAME.err"
+ TS_VGDUMP="$TS_OUTDIR/$TS_TESTNAME-$TS_SUBNAME.vgdump"
+ TS_EXIT_CODE="$TS_OUTDIR/$TS_TESTNAME-$TS_SUBNAME.exit_code"
+ TS_DIFF="$TS_DIFFDIR/$TS_TESTNAME-$TS_SUBNAME"
+ TS_EXPECTED="$TS_TOPDIR/expected/$TS_NS"
+ TS_EXPECTED_ERR="$TS_TOPDIR/expected/$TS_NS.err"
+ TS_MOUNTPOINT="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-mnt"
+
+ rm -f $TS_OUTPUT $TS_ERRLOG $TS_VGDUMP $TS_EXIT_CODE
+ [ -d "$TS_OUTDIR" ] || mkdir -p "$TS_OUTDIR"
+
+ touch $TS_OUTPUT $TS_ERRLOG $TS_EXIT_CODE
+ [ -n "$TS_VALGRIND_CMD" ] && touch $TS_VGDUMP
+}
+
+function ts_init_env {
+ local mydir=$(ts_abspath ${0%/*})
+ local tmp
+
+ LANG="POSIX"
+ LANGUAGE="POSIX"
+ LC_ALL="POSIX"
+ CHARSET="UTF-8"
+ ASAN_OPTIONS="detect_leaks=0"
+ UBSAN_OPTIONS="print_stacktrace=1:print_summary=1:halt_on_error=1"
+
+ export LANG LANGUAGE LC_ALL CHARSET ASAN_OPTIONS UBSAN_OPTIONS
+
+ mydir=$(ts_canonicalize "$mydir")
+
+ # automake directories
+ top_srcdir=$(ts_option_argument "srcdir" "$*")
+ top_builddir=$(ts_option_argument "builddir" "$*")
+
+ # where is this script
+ TS_TOPDIR=$(ts_abspath $mydir/../../)
+
+ # default
+ if [ -z "$top_srcdir" ]; then
+ top_srcdir="$TS_TOPDIR/.."
+ fi
+ if [ -z "$top_builddir" ]; then
+ top_builddir="$TS_TOPDIR/.."
+ fi
+
+ top_srcdir=$(ts_abspath $top_srcdir)
+ top_builddir=$(ts_abspath $top_builddir)
+
+ if [ -e "$top_builddir/meson.conf" ]; then
+ . "$top_builddir/meson.conf"
+ fi
+
+ # We use helpser always from build tree
+ ts_helpersdir="${top_builddir}/"
+
+ TS_USE_SYSTEM_COMMANDS=$(ts_has_option "use-system-commands" "$*")
+ if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
+ # Don't define anything, just follow current PATH
+ ts_commandsdir=""
+ else
+ # The default is to use commands from build tree
+ ts_commandsdir="${top_builddir}/"
+
+ # some ul commands search other ul commands in $PATH
+ export PATH="$ts_commandsdir:$PATH"
+ fi
+
+ TS_SCRIPT="$mydir/$(basename $0)"
+ TS_SUBDIR=$(dirname $TS_SCRIPT)
+ TS_TESTNAME=$(basename $TS_SCRIPT)
+ TS_COMPONENT=$(basename $TS_SUBDIR)
+ TS_DESC=${TS_DESC:-$TS_TESTNAME}
+
+ TS_NSUBTESTS=0
+ TS_NSUBFAILED=0
+
+ TS_SELF="$TS_SUBDIR"
+
+ TS_OUTDIR="$top_builddir/tests/output/$TS_COMPONENT"
+ TS_DIFFDIR="$top_builddir/tests/diff/$TS_COMPONENT"
+
+ TS_NOLOCKS=$(ts_has_option "nolocks" "$*")
+ TS_LOCKDIR="$top_builddir/tests/output"
+
+ # Don't lock if flock(1) is missing
+ type "flock" >/dev/null 2>&1 || TS_NOLOCKS="yes"
+
+ ts_init_core_env
+
+ TS_NOSKIP_COMMANDS=$(ts_has_option "noskip-commands" "$*")
+ TS_VERBOSE=$(ts_has_option "verbose" "$*")
+ TS_SHOWDIFF=$(ts_has_option "show-diff" "$*")
+ TS_PARALLEL=$(ts_has_option "parallel" "$*")
+ TS_KNOWN_FAIL=$(ts_has_option "known-fail" "$*")
+ TS_SKIP_LOOPDEVS=$(ts_has_option "skip-loopdevs" "$*")
+ TS_PARSABLE=$(ts_has_option "parsable" "$*")
+ [ "$TS_PARSABLE" = "yes" ] || TS_PARSABLE="$TS_PARALLEL"
+
+ tmp=$( ts_has_option "memcheck-valgrind" "$*")
+ if [ "$tmp" == "yes" -a -f /usr/bin/valgrind ]; then
+ TS_VALGRIND_CMD="/usr/bin/valgrind"
+ fi
+ tmp=$( ts_has_option "memcheck-asan" "$*")
+ if [ "$tmp" == "yes" ]; then
+ TS_ENABLE_ASAN="yes"
+ fi
+ tmp=$( ts_has_option "memcheck-ubsan" "$*")
+ if [ "$tmp" == "yes" ]; then
+ TS_ENABLE_UBSAN="yes"
+ fi
+
+ BLKID_FILE="$TS_OUTDIR/${TS_TESTNAME}.blkidtab"
+
+ declare -a TS_SUID_PROGS
+ declare -a TS_SUID_USER
+ declare -a TS_SUID_GROUP
+ declare -a TS_LOOP_DEVS
+ declare -a TS_LOCKFILE_FD
+
+ if [ -f $TS_TOPDIR/commands.sh ]; then
+ . $TS_TOPDIR/commands.sh
+ fi
+
+ export BLKID_FILE
+
+ rm -f $TS_OUTPUT $TS_ERRLOG $TS_VGDUMP $TS_EXIT_CODE
+ [ -d "$TS_OUTDIR" ] || mkdir -p "$TS_OUTDIR"
+
+ touch $TS_OUTPUT $TS_ERRLOG $TS_EXIT_CODE
+ [ -n "$TS_VALGRIND_CMD" ] && touch $TS_VGDUMP
+
+ if [ "$TS_VERBOSE" == "yes" ]; then
+ echo
+ echo " script: $TS_SCRIPT"
+ echo " commands: $ts_commandsdir"
+ echo " helpers: $ts_helpersdir"
+ echo " sub dir: $TS_SUBDIR"
+ echo " top dir: $TS_TOPDIR"
+ echo " self: $TS_SELF"
+ echo " test name: $TS_TESTNAME"
+ echo " test desc: $TS_DESC"
+ echo " component: $TS_COMPONENT"
+ echo " namespace: $TS_NS"
+ echo " verbose: $TS_VERBOSE"
+ echo " output: $TS_OUTPUT"
+ echo " error log: $TS_ERRLOG"
+ echo " exit code: $TS_EXIT_CODE"
+ echo " valgrind: $TS_VGDUMP"
+ echo " expected: $TS_EXPECTED{.err}"
+ echo " mountpoint: $TS_MOUNTPOINT"
+ echo
+ fi
+}
+
+function ts_init_subtest {
+
+ TS_SUBNAME="$1"
+ ts_init_core_subtest_env
+ TS_NSUBTESTS=$(( $TS_NSUBTESTS + 1 ))
+
+ if [ "$TS_PARSABLE" != "yes" ]; then
+ [ $TS_NSUBTESTS -eq 1 ] && echo
+ printf "%16s: %-27s ..." "" "$TS_SUBNAME"
+ fi
+}
+
+function ts_init {
+ ts_init_env "$*"
+
+ local is_fake=$( ts_has_option "fake" "$*")
+ local is_force=$( ts_has_option "force" "$*")
+
+ if [ "$TS_PARSABLE" != "yes" ]; then
+ printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_DESC"
+ fi
+
+ [ "$is_fake" == "yes" ] && ts_skip "fake mode"
+ [ "$TS_OPTIONAL" == "yes" -a "$is_force" != "yes" ] && ts_skip "optional"
+}
+
+function ts_init_suid {
+ PROG="$1"
+ ct=${#TS_SUID_PROGS[*]}
+
+ # Save info about original setting
+ TS_SUID_PROGS[$ct]=$PROG
+ TS_SUID_USER[$ct]=$(stat --printf="%U" $PROG)
+ TS_SUID_GROUP[$ct]=$(stat --printf="%G" $PROG)
+
+ chown root:root $PROG &> /dev/null
+ chmod u+s $PROG &> /dev/null
+}
+
+function ts_init_py {
+ LIBNAME="$1"
+
+ if [ -f "$top_builddir/py${LIBNAME}.la" ]; then
+ # autotoolz build
+ export LD_LIBRARY_PATH="$top_builddir/.libs:$LD_LIBRARY_PATH"
+ export PYTHONPATH="$top_builddir/$LIBNAME/python:$top_builddir/.libs:$PYTHONPATH"
+
+ PYTHON_VERSION=$(awk '/^PYTHON_VERSION/ { print $3 }' $top_builddir/Makefile)
+ PYTHON_MAJOR_VERSION=$(echo $PYTHON_VERSION | sed 's/\..*//')
+
+ export PYTHON="python${PYTHON_MAJOR_VERSION}"
+
+ elif compgen -G "$top_builddir/$LIBNAME/python/py$LIBNAME*.so" >/dev/null; then
+ # mezon!
+ export PYTHONPATH="$top_builddir/$LIBNAME/python:$PYTHONPATH"
+
+ else
+ ts_skip "py${LIBNAME} not compiled"
+ fi
+}
+
+function ts_run {
+ declare -a args
+ local asan_options="strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
+
+ #
+ # ASAN mode
+ #
+ if [ "$TS_ENABLE_ASAN" == "yes" -o "$TS_ENABLE_UBSAN" == "yes" ]; then
+ args+=(env)
+ if [ "$TS_ENABLE_ASAN" == "yes" ]; then
+ # detect_leaks isn't supported on s390x: https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/lsan/lsan_common.h
+ if [ "$(uname -m)" != "s390x" ]; then
+ asan_options="$asan_options:detect_leaks=1"
+ fi
+ args+=(ASAN_OPTIONS=$asan_options)
+ fi
+ if [ "$TS_ENABLE_UBSAN" == "yes" ]; then
+ args+=(UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1)
+ fi
+ fi
+
+ #
+ # valgrind mode
+ #
+ if [ -n "$TS_VALGRIND_CMD" ]; then
+ args+=(libtool --mode=execute "$TS_VALGRIND_CMD" --tool=memcheck --leak-check=full)
+ args+=(--leak-resolution=high --num-callers=20 --log-file="$TS_VGDUMP")
+ fi
+
+ "${args[@]}" "$@"
+ echo $? >$TS_EXIT_CODE
+}
+
+function ts_gen_diff_from {
+ local res=0
+ local expected="$1"
+ local output="$2"
+ local difffile="$3"
+
+ diff -u $expected $output > $difffile
+
+ if [ $? -ne 0 ] || [ -s $difffile ]; then
+ res=1
+ if [ "$TS_SHOWDIFF" == "yes" -a "$TS_KNOWN_FAIL" != "yes" ]; then
+ echo
+ echo "diff-{{{"
+ cat $difffile
+ echo "}}}-diff"
+ echo
+ fi
+ else
+ rm -f $difffile;
+ fi
+
+ return $res
+}
+
+function ts_gen_diff {
+ local status_out=0
+ local status_err=0
+ local exit_code=0
+
+ [ -f "$TS_OUTPUT" ] || return 1
+ [ -f "$TS_EXPECTED" ] || TS_EXPECTED=/dev/null
+
+ # remove libtool lt- prefixes
+ sed --in-place 's/^lt\-\(.*\: \)/\1/g' $TS_OUTPUT
+ sed --in-place 's/^lt\-\(.*\: \)/\1/g' $TS_ERRLOG
+
+ [ -d "$TS_DIFFDIR" ] || mkdir -p "$TS_DIFFDIR"
+
+ # error log is fully optional
+ [ -f "$TS_EXPECTED_ERR" ] || TS_EXPECTED_ERR=/dev/null
+ [ -f "$TS_ERRLOG" ] || TS_ERRLOG=/dev/null
+
+ if [ "$TS_COMPONENT" != "fuzzers" ]; then
+ ts_gen_diff_from $TS_EXPECTED $TS_OUTPUT $TS_DIFF
+ status_out=$?
+
+ ts_gen_diff_from $TS_EXPECTED_ERR $TS_ERRLOG $TS_DIFF.err
+ status_err=$?
+ else
+ # TS_EXIT_CODE is empty when tests aren't run with ts_run: https://github.com/util-linux/util-linux/issues/1072
+ # or when ts_finalize is called right after ts_finalize_subtest.
+ exit_code="$(cat $TS_EXIT_CODE)"
+ if [ -z "$exit_code" ]; then
+ exit_code=0
+ fi
+
+ if [ $exit_code -ne 0 ]; then
+ ts_gen_diff_from $TS_EXPECTED $TS_OUTPUT $TS_DIFF
+ ts_gen_diff_from $TS_EXPECTED_ERR $TS_ERRLOG $TS_DIFF.err
+ fi
+ fi
+
+ if [ $status_out -ne 0 -o $status_err -ne 0 -o $exit_code -ne 0 ]; then
+ return 1
+ fi
+ return 0
+}
+
+function tt_gen_mem_report {
+ if [ -n "$TS_VALGRIND_CMD" ]; then
+ grep -q -E 'ERROR SUMMARY: [1-9]' $TS_VGDUMP &> /dev/null
+ if [ $? -eq 0 ]; then
+ echo "mem-error detected!"
+ fi
+ else
+ echo "$1"
+ fi
+}
+
+function ts_finalize_subtest {
+ local res=0
+
+ ts_gen_diff
+ if [ $? -eq 1 ]; then
+ ts_failed_subtest "$1"
+ res=1
+ else
+ ts_report_ok "$(tt_gen_mem_report "$1")"
+ fi
+
+ [ $res -ne 0 ] && TS_NSUBFAILED=$(( $TS_NSUBFAILED + 1 ))
+
+ # reset environment back to parental test
+ ts_init_core_env
+
+ return $res
+}
+
+function ts_skip_subtest {
+ ts_report_skip "$1"
+ # reset environment back to parental test
+ ts_init_core_env
+
+}
+
+function ts_finalize {
+ ts_cleanup_on_exit
+
+ if [ $TS_NSUBTESTS -ne 0 ]; then
+ if ! ts_gen_diff || [ $TS_NSUBFAILED -ne 0 ]; then
+ ts_failed "$TS_NSUBFAILED from $TS_NSUBTESTS sub-tests"
+ else
+ ts_ok "all $TS_NSUBTESTS sub-tests PASSED"
+ fi
+ fi
+
+ ts_gen_diff || ts_failed "$1"
+ ts_ok "$1"
+}
+
+function ts_die {
+ ts_log "$1"
+ ts_finalize
+}
+
+function ts_cleanup_on_exit {
+
+ for idx in $(seq 0 $((${#TS_SUID_PROGS[*]} - 1))); do
+ PROG=${TS_SUID_PROGS[$idx]}
+ chmod a-s $PROG &> /dev/null
+ chown ${TS_SUID_USER[$idx]}:${TS_SUID_GROUP[$idx]} $PROG &> /dev/null
+ done
+
+ for dev in "${TS_LOOP_DEVS[@]}"; do
+ ts_device_deinit "$dev"
+ done
+ unset TS_LOOP_DEVS
+
+ ts_scsi_debug_rmmod
+}
+
+function ts_image_md5sum {
+ local img=${1:-"$TS_OUTDIR/${TS_TESTNAME}.img"}
+ echo $("$TS_HELPER_MD5" < "$img") $(basename "$img")
+}
+
+function ts_image_init {
+ local mib=${1:-"5"} # size in MiBs
+ local img=${2:-"$TS_OUTDIR/${TS_TESTNAME}.img"}
+
+ rm -f $img
+ truncate -s "${mib}M" "$img"
+ echo "$img"
+ return 0
+}
+
+function ts_register_loop_device {
+ local ct=${#TS_LOOP_DEVS[*]}
+ TS_LOOP_DEVS[$ct]=$1
+}
+
+function ts_device_init {
+ local img
+ local dev
+
+ img=$(ts_image_init $1 $2)
+ dev=$($TS_CMD_LOSETUP --show --partscan -f "$img")
+ if [ "$?" != "0" -o "$dev" = "" ]; then
+ ts_die "Cannot init device"
+ fi
+
+ ts_register_loop_device "$dev"
+ TS_LODEV=$dev
+}
+
+# call from ts_cleanup_on_exit() only because of TS_LOOP_DEVS maintenance
+function ts_device_deinit {
+ local DEV="$1"
+
+ if [ -b "$DEV" ]; then
+ $TS_CMD_UMOUNT "$DEV" &> /dev/null
+ $TS_CMD_LOSETUP -d "$DEV" &> /dev/null
+ fi
+}
+
+function ts_blkidtag_by_devname()
+{
+ local tag=$1
+ local dev=$2
+ local out
+ local rval
+
+ out=$($TS_CMD_BLKID -p -s "$tag" -o value "$dev")
+ rval=$?
+ printf "%s\n" "$out"
+
+ test -n "$out" -a "$rval" = "0"
+ return $?
+}
+
+function ts_uuid_by_devname {
+ ts_blkidtag_by_devname "UUID" "$1"
+ return $?
+}
+
+function ts_label_by_devname {
+ ts_blkidtag_by_devname "LABEL" "$1"
+ return $?
+}
+
+function ts_fstype_by_devname {
+ ts_blkidtag_by_devname "TYPE" "$1"
+ return $?
+}
+
+function ts_vfs_dump {
+ if [ "$TS_SHOWDIFF" == "yes" -a "$TS_KNOWN_FAIL" != "yes" ]; then
+ echo
+ echo "{{{{ VFS dump:"
+ findmnt
+ echo "}}}}"
+ fi
+}
+
+function ts_blk_dump {
+ if [ "$TS_SHOWDIFF" == "yes" -a "$TS_KNOWN_FAIL" != "yes" ]; then
+ echo
+ echo "{{{{ blkdevs dump:"
+ lsblk -o+FSTYPE
+ echo "}}}}"
+ fi
+}
+
+function ts_device_has {
+ local TAG="$1"
+ local VAL="$2"
+ local DEV="$3"
+ local vl=""
+ local res=""
+
+ vl=$(ts_blkidtag_by_devname "$TAG" "$DEV")
+ test $? = 0 -a "$vl" = "$VAL"
+ res=$?
+
+ if [ "$res" != 0 ]; then
+ ts_vfs_dump
+ ts_blk_dump
+ fi
+
+ return $res
+}
+
+function ts_is_uuid()
+{
+ printf "%s\n" "$1" | grep -E -q '^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$'
+ return $?
+}
+
+function ts_udevadm_settle()
+{
+ local dev=$1 # optional, might be empty
+ shift # all other args are tags, LABEL, UUID, ...
+ udevadm settle
+}
+
+function ts_mount {
+ local out
+ local result
+ local msg
+ local fs
+ local fs_exp=$1
+ shift
+
+ out=$($TS_CMD_MOUNT "$@" 2>&1)
+ result=$?
+ echo -n "$out" >> $TS_OUTPUT
+
+ if [ $result != 0 ] \
+ && msg=$(echo "$out" | grep -m1 "unknown filesystem type")
+ then
+ # skip only if reported fs correctly and if it's not available
+ fs=$(echo "$msg" | sed -n "s/.*type '\(.*\)'$/\1/p")
+ [ "$fs" = "fs_exp" ] \
+ && grep -qe "[[:space:]]${fs}$" /proc/filesystems &>/dev/null \
+ || ts_skip "$msg"
+ fi
+ return $result
+}
+
+function ts_is_mounted {
+ local DEV=$(ts_canonicalize "$1")
+
+ grep -q "\(^\| \)$DEV " /proc/mounts && return 0
+
+ if [ "${DEV#/dev/loop/}" != "$DEV" ]; then
+ grep -q "^/dev/loop${DEV#/dev/loop/} " /proc/mounts && return 0
+ fi
+ return 1
+}
+
+function ts_fstab_open {
+ echo "# <!-- util-linux test entry" >> /etc/fstab
+}
+
+function ts_fstab_close {
+ echo "# -->" >> /etc/fstab
+ sync /etc/fstab 2>/dev/null
+}
+
+function ts_fstab_addline {
+ local SPEC="$1"
+ local MNT=${2:-"$TS_MOUNTPOINT"}
+ local FS=${3:-"auto"}
+ local OPT=${4:-"defaults"}
+
+ echo "$SPEC $MNT $FS $OPT 0 0" >> /etc/fstab
+}
+
+function ts_fstab_lock {
+ ts_lock "fstab"
+}
+
+function ts_fstab_add {
+ ts_fstab_lock
+ ts_fstab_open
+ ts_fstab_addline $*
+ ts_fstab_close
+}
+
+function ts_fstab_clean {
+ ts_have_lock "fstab" || return 0
+ sed --in-place "
+/# <!-- util-linux/!b
+:a
+/# -->/!{
+ N
+ ba
+}
+s/# <!-- util-linux.*-->//;
+/^$/d" /etc/fstab
+
+ sync /etc/fstab 2>/dev/null
+ ts_unlock "fstab"
+}
+
+function ts_fdisk_clean {
+ local DEVNAME=$1
+
+ # remove non comparable parts of fdisk output
+ if [ -n "${DEVNAME}" ]; then
+ # escape "@" with "\@" in $DEVNAME. This way sed correctly
+ # replaces paths containing "@" characters
+ sed -i -e "s@${DEVNAME//\@/\\\@}@<removed>@;" $TS_OUTPUT $TS_ERRLOG
+ fi
+
+ sed -i \
+ -e 's/Disk identifier:.*/Disk identifier: <removed>/' \
+ -e 's/Created a new partition.*/Created a new partition <removed>./' \
+ -e 's/Created a new .* disklabel .*/Created a new disklabel./' \
+ -e 's/^Device[[:blank:]]*Start/Device Start/' \
+ -e 's/^Device[[:blank:]]*Boot/Device Boot/' \
+ -e 's/Welcome to fdisk.*/Welcome to fdisk <removed>./' \
+ -e 's/typescript file.*/typescript file <removed>./' \
+ -e 's@^\(I/O size (minimum/op.* bytes /\) [1-9][0-9]* @\1 <removed> @' \
+ $TS_OUTPUT $TS_ERRLOG
+}
+
+
+# https://stackoverflow.com/questions/41603787/how-to-find-next-available-file-descriptor-in-bash
+function ts_find_free_fd()
+{
+ local rco
+ local rci
+ for fd in {3..200}; do
+ rco="$(true 2>/dev/null >&${fd}; echo $?)"
+ rci="$(true 2>/dev/null <&${fd}; echo $?)"
+ if [[ "${rco}${rci}" = "11" ]]; then
+ echo "$fd"
+ return 0
+ fi
+ done
+ return 1
+}
+
+function ts_get_lock_fd {
+ local resource=$1
+ local fd
+
+ for fd in "${!TS_LOCKFILE_FD[@]}"; do
+ if [ "${TS_LOCKFILE_FD["$fd"]}" = "$resource" ]; then
+ echo "$fd"
+ return 0
+ fi
+ done
+ return 1
+}
+
+function ts_have_lock {
+ local resource=$1
+
+ test "$TS_NOLOCKS" = "yes" && return 0
+ ts_get_lock_fd "$resource" >/dev/null && return 0
+ return 1
+}
+
+function ts_lock {
+ local resource="$1"
+ local lockfile="${TS_LOCKDIR}/${resource}.lock"
+ local fd
+
+ if [ "$TS_NOLOCKS" == "yes" ]; then
+ return 0
+ fi
+
+ # Don't lock again
+ fd=$(ts_get_lock_fd "$resource")
+ if [ -n "$fd" ]; then
+ echo "[$$ $TS_TESTNAME] ${resource} already locked!"
+ return 0
+ fi
+
+ fd=$(ts_find_free_fd) || ts_skip "failed to find lock fd"
+
+ eval "exec $fd>$lockfile"
+ flock --exclusive "$fd" || ts_skip "failed to lock $resource"
+
+ TS_LOCKFILE_FD["$fd"]="$resource"
+ ###echo "[$$ $TS_TESTNAME] Locked $resource"
+}
+
+function ts_unlock {
+ local resource="$1"
+ local lockfile="${TS_LOCKDIR}/${resource}.lock"
+ local fd
+
+ if [ "$TS_NOLOCKS" == "yes" ]; then
+ return 0
+ fi
+
+ fd=$(ts_get_lock_fd "$resource")
+ if [ -n "$fd" ]; then
+ eval "exec $fd<&-"
+ TS_LOCKFILE_FD["$fd"]=""
+ ###echo "[$$ $TS_TESTNAME] Unlocked $resource"
+ else
+ echo "[$$ $TS_TESTNAME] unlocking unlocked $resource!?"
+ fi
+}
+
+function ts_scsi_debug_init {
+ local devname
+ local t
+ TS_DEVICE="none"
+
+ ts_lock "scsi_debug"
+
+ # dry run is not really reliable, real modprobe may still fail
+ modprobe --dry-run --quiet scsi_debug &>/dev/null \
+ || ts_skip "missing scsi_debug module (dry-run)"
+
+ # skip if still in use or removal of modules not supported at all
+ # We don't want a slow timeout here so we don't use ts_scsi_debug_rmmod!
+ modprobe -r scsi_debug &>/dev/null
+ if [ "$?" -eq 1 ]; then
+ ts_unlock "scsi_debug"
+ ts_skip "cannot remove scsi_debug module (rmmod)"
+ fi
+
+ modprobe -b scsi_debug "$@" &>/dev/null \
+ || ts_skip "cannot load scsi_debug module (modprobe)"
+
+ # it might be still not loaded, modprobe.conf or whatever
+ lsmod 2>/dev/null | grep -q "^scsi_debug " \
+ || ts_skip "scsi_debug module not loaded (lsmod)"
+
+ udevadm settle
+
+ # wait for device if udevadm settle does not work
+ for t in 0 0.02 0.05 0.1 1; do
+ sleep $t
+ devname=$(grep --no-messages --with-filename scsi_debug /sys/block/*/device/model) && break
+ done
+ [ -n "${devname}" ] || ts_skip "timeout waiting for scsi_debug device"
+
+ devname=$(echo $devname | awk -F '/' '{print $4}')
+ TS_DEVICE="/dev/${devname}"
+
+ # TODO validate that device is really up, for now just a warning on stderr
+ test -b $TS_DEVICE || echo "warning: scsi_debug device is still down" >&2
+}
+
+# automatically called once in ts_cleanup_on_exit()
+function ts_scsi_debug_rmmod {
+ local err=1
+ local t
+ local lastmsg
+
+ # We must not run if we don't have the lock
+ ts_have_lock "scsi_debug" || return 0
+
+ # Return early most importantly in case we are not root or the module does
+ # not exist at all.
+ [ $UID -eq 0 ] || return 0
+ [ -n "$TS_DEVICE" ] || return 0
+ lsmod 2>/dev/null | grep -q "^scsi_debug " || return 0
+
+ udevadm settle
+
+ # wait for successful rmmod if udevadm settle does not work
+ for t in 0 0.02 0.05 0.1 1; do
+ sleep $t
+ lastmsg="$(modprobe -r scsi_debug 2>&1)" && err=0 && break
+ done
+
+ if [ "$err" = "1" ]; then
+ ts_log "rmmod failed: '$lastmsg'"
+ ts_log "timeout removing scsi_debug module (rmmod)"
+ return 1
+ fi
+ if lsmod | grep -q "^scsi_debug "; then
+ ts_log "BUG! scsi_debug still loaded"
+ return 1
+ fi
+
+ # TODO Do we need to validate that all devices are gone?
+ udevadm settle
+ test -b "$TS_DEVICE" && echo "warning: scsi_debug device is still up" >&2
+
+ # TODO unset TS_DEVICE, check that nobody uses it later, e.g. ts_fdisk_clean
+
+ ts_unlock "scsi_debug"
+ return 0
+}
+
+function ts_resolve_host {
+ local host="$1"
+ local tmp
+
+ # currently we just resolve default records (might be "A", ipv4 only)
+ if type "dig" >/dev/null 2>&1; then
+ tmp=$(dig "$host" +short 2>/dev/null) || return 1
+ elif type "nslookup" >/dev/null 2>&1; then
+ tmp=$(nslookup "$host" 2>/dev/null) || return 1
+ tmp=$(echo "$tmp"| grep -A1 "^Name:"| grep "^Address:"| cut -d" " -f2)
+ elif type "host" >/dev/null 2>&1; then
+ tmp=$(host "$host" 2>/dev/null) || return 1
+ tmp=$(echo "$tmp" | grep " has address " | cut -d " " -f4)
+ elif type "getent" >/dev/null 2>&1; then
+ tmp=$(getent ahosts "$host" 2>/dev/null) || return 1
+ tmp=$(echo "$tmp" | cut -d " " -f 1 | sort -u)
+ fi
+
+ # we return 1 if tmp is empty
+ test -n "$tmp" || return 1
+ echo "$tmp" | sort -R | head -n 1
+}
+
+# listen to unix socket (background socat)
+function ts_init_socket_to_file {
+ local socket=$1
+ local outfile=$2
+ local pid="0"
+
+ ts_check_prog "socat"
+ rm -f "$socket" "$outfile"
+
+ # if socat is too old for these options we'll skip it below
+ socat -u UNIX-LISTEN:$socket,fork,max-children=1,backlog=128 \
+ STDOUT > "$outfile" 2>/dev/null &
+ pid=$!
+
+ # check for running background process
+ if [ "$pid" -le "0" ] || ! kill -s 0 "$pid" &>/dev/null; then
+ ts_skip "unable to run socat"
+ fi
+ # wait for the socket listener
+ if ! socat -u /dev/null UNIX-CONNECT:$socket,retry=30,interval=0.1 &>/dev/null; then
+ kill -9 "$pid" &>/dev/null
+ ts_skip "timeout waiting for socat socket"
+ fi
+ # check socket again
+ if ! socat -u /dev/null UNIX-CONNECT:$socket &>/dev/null; then
+ kill -9 "$pid" &>/dev/null
+ ts_skip "socat socket stopped listening"
+ fi
+}
+
+function ts_has_ncurses_support {
+ grep -q '#define HAVE_LIBNCURSES' ${top_builddir}/config.h
+ if [ $? == 0 ]; then
+ echo "yes"
+ else
+ echo "no"
+ fi
+}
+
+# Get path to the ASan runtime DSO the given binary was compiled with
+function ts_get_asan_rt_path {
+ local binary="${1?}"
+ local rt_path
+
+ ts_check_prog "ldd"
+ ts_check_prog "awk"
+
+ rt_path="$(ldd "$binary" | awk '/lib.+asan.*.so/ {print $3; exit}')"
+ if [ -n "$rt_path" -a -f "$rt_path" ]; then
+ echo "$rt_path"
+ fi
+}
+
+function ts_skip_exitcode_not_supported {
+ if [ $? -eq $TS_EXIT_NOTSUPP ]; then
+ ts_skip "functionality not implemented by system"
+ fi
+}
+
+function ts_inhibit_custom_colorscheme {
+ export XDG_CONFIG_HOME=/dev/null
+}
+
+function ts_is_virt {
+ type "systemd-detect-virt" >/dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+
+ virt="$(systemd-detect-virt)"
+ for arg in "$@"; do
+ if [ "$virt" = "$arg" ]; then
+ return 0;
+ fi
+ done
+ return 1
+}
+
+function ts_check_enosys_syscalls {
+ ts_check_test_command "$TS_HELPER_ENOSYS"
+ "$TS_HELPER_ENOSYS" ${@/#/-s } true 2> /dev/null
+ [ $? -ne 0 ] && ts_skip "test_enosys does not work: $*"
+}
+
+function ts_skip_docker {
+ test -e /.dockerenv && ts_skip "unsupported in docker environment"
+}
diff --git a/tests/helpers/Makemodule.am b/tests/helpers/Makemodule.am
new file mode 100644
index 0000000..2b1df3c
--- /dev/null
+++ b/tests/helpers/Makemodule.am
@@ -0,0 +1,40 @@
+check_PROGRAMS += test_mbsencode
+test_mbsencode_SOURCES = tests/helpers/test_mbsencode.c
+test_mbsencode_LDADD = $(LDADD) libcommon.la
+
+check_PROGRAMS += test_byteswap
+test_byteswap_SOURCES = tests/helpers/test_byteswap.c
+
+check_PROGRAMS += test_md5
+test_md5_SOURCES = tests/helpers/test_md5.c lib/md5.c
+
+check_PROGRAMS += test_sha1
+test_sha1_SOURCES = tests/helpers/test_sha1.c lib/sha1.c
+
+check_PROGRAMS += test_pathnames
+test_pathnames_SOURCES = tests/helpers/test_pathnames.c
+
+check_PROGRAMS += test_strerror
+test_strerror_SOURCES = tests/helpers/test_strerror.c
+
+check_PROGRAMS += test_sysinfo
+test_sysinfo_SOURCES = tests/helpers/test_sysinfo.c
+
+check_PROGRAMS += test_sigreceive
+test_sigreceive_SOURCES = tests/helpers/test_sigreceive.c
+test_sigreceive_LDADD = $(LDADD) libcommon.la
+
+check_PROGRAMS += test_tiocsti
+test_tiocsti_SOURCES = tests/helpers/test_tiocsti.c
+
+check_PROGRAMS += test_uuid_namespace
+test_uuid_namespace_SOURCES = tests/helpers/test_uuid_namespace.c \
+ libuuid/src/predefined.c libuuid/src/unpack.c libuuid/src/unparse.c
+
+if LINUX
+check_PROGRAMS += test_mkfds
+test_mkfds_SOURCES = tests/helpers/test_mkfds.c
+
+check_PROGRAMS += test_enosys
+test_enosys_SOURCES = tests/helpers/test_enosys.c
+endif
diff --git a/tests/helpers/test_byteswap.c b/tests/helpers/test_byteswap.c
new file mode 100644
index 0000000..d8a7b2f
--- /dev/null
+++ b/tests/helpers/test_byteswap.c
@@ -0,0 +1,113 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This testing program makes sure the byteswap functions work
+ *
+ * Copyright (C) 2000 by Theodore Ts'o.
+ * Copyright (C) 2008 Karel Zak <kzak@redhat.com>
+ */
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <inttypes.h>
+
+#include "bitops.h"
+
+static uint16_t ary16[] = {
+ 0x0001, 0x0100,
+ 0x1234, 0x3412,
+ 0xff00, 0x00ff,
+ 0x4000, 0x0040,
+ 0xfeff, 0xfffe,
+ 0x0000, 0x0000
+ };
+
+static uint32_t ary32[] = {
+ 0x00000001, 0x01000000,
+ 0x80000000, 0x00000080,
+ 0x12345678, 0x78563412,
+ 0xffff0000, 0x0000ffff,
+ 0x00ff0000, 0x0000ff00,
+ 0xff000000, 0x000000ff,
+ 0x00000000, 0x00000000
+ };
+
+static uint64_t ary64[] = {
+ 0x0000000000000001, 0x0100000000000000,
+ 0x8000000000000000, 0x0000000000000080,
+ 0x1234567812345678, 0x7856341278563412,
+ 0xffffffff00000000, 0x00000000ffffffff,
+ 0x00ff000000000000, 0x000000000000ff00,
+ 0xff00000000000000, 0x00000000000000ff,
+ 0x0000000000000000, 0x0000000000000000
+ };
+
+int main(void)
+{
+ int i;
+ int errors = 0;
+
+ printf("Testing swab16\n");
+ i=0;
+ do {
+ printf("swab16(0x%04"PRIx16") = 0x%04"PRIx16"\n",
+ ary16[i], swab16(ary16[i]));
+ if (swab16(ary16[i]) != ary16[i+1]) {
+ printf("Error!!! %04"PRIx16" != %04"PRIx16"\n",
+ swab16(ary16[i]), ary16[i+1]);
+ errors++;
+ }
+ if (swab16(ary16[i+1]) != ary16[i]) {
+ printf("Error!!! %04"PRIx16" != %04"PRIx16"\n",
+ swab16(ary16[i+1]), ary16[i]);
+ errors++;
+ }
+ i += 2;
+ } while (ary16[i] != 0);
+
+ printf("Testing swab32\n");
+ i = 0;
+ do {
+ printf("swab32(0x%08"PRIx32") = 0x%08"PRIx32"\n",
+ ary32[i], swab32(ary32[i]));
+ if (swab32(ary32[i]) != ary32[i+1]) {
+ printf("Error!!! %04"PRIx32" != %04"PRIx32"\n",
+ swab32(ary32[i]), ary32[i+1]);
+ errors++;
+ }
+ if (swab32(ary32[i+1]) != ary32[i]) {
+ printf("Error!!! %04"PRIx32" != %04"PRIx32"\n",
+ swab32(ary32[i+1]), ary32[i]);
+ errors++;
+ }
+ i += 2;
+ } while (ary32[i] != 0);
+
+ printf("Testing swab64\n");
+ i = 0;
+ do {
+ printf("swab64(0x%016"PRIx64") = 0x%016"PRIx64"\n",
+ ary64[i], swab64(ary64[i]));
+ if (swab64(ary64[i]) != ary64[i+1]) {
+ printf("Error!!! %016"PRIx64" != %016"PRIx64"\n",
+ swab64(ary64[i]), ary64[i+1]);
+ errors++;
+ }
+ if (swab64(ary64[i+1]) != ary64[i]) {
+ printf("Error!!! %016"PRIx64" != %016"PRIx64"\n",
+ swab64(ary64[i+1]), ary64[i]);
+ errors++;
+ }
+ i += 2;
+ } while (ary64[i] != 0);
+
+ if (!errors)
+ printf("No errors found in the byteswap implementation\n");
+
+ return errors;
+}
diff --git a/tests/helpers/test_enosys.c b/tests/helpers/test_enosys.c
new file mode 100644
index 0000000..9e93cc2
--- /dev/null
+++ b/tests/helpers/test_enosys.c
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2023 Thomas Weißschuh <thomas@t-8ch.de>
+ *
+ * This program 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 program is distributed in the hope that it would 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.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <stddef.h>
+#include <stdbool.h>
+#include <getopt.h>
+
+#include <linux/unistd.h>
+#include <linux/filter.h>
+#include <linux/seccomp.h>
+#include <linux/audit.h>
+#include <sys/prctl.h>
+
+#include "c.h"
+#include "audit-arch.h"
+#include "exitcodes.h"
+
+#define syscall_nr (offsetof(struct seccomp_data, nr))
+
+struct syscall {
+ const char *const name;
+ int number;
+};
+
+const struct syscall syscalls[] = {
+#ifdef __NR_move_mount
+ { "move_mount", __NR_move_mount },
+#endif
+#ifdef __NR_open_tree
+ { "open_tree", __NR_open_tree },
+#endif
+#ifdef __NR_fsopen
+ { "fsopen", __NR_fsopen },
+#endif
+#ifdef __NR_mount_setattr
+ { "mount_setattr", __NR_mount_setattr },
+#endif
+
+};
+
+int main(int argc, char **argv)
+{
+ int c;
+ size_t i;
+ bool found;
+ static const struct option longopts[] = {
+ { "syscall", required_argument, NULL, 's' },
+ { 0 }
+ };
+
+ bool blocked_syscalls[ARRAY_SIZE(syscalls)] = {};
+
+ while ((c = getopt_long (argc, argv, "s:", longopts, NULL)) != -1) {
+ switch (c) {
+ case 's':
+ found = 0;
+ for (i = 0; i < ARRAY_SIZE(syscalls); i++) {
+ if (strcmp(optarg, syscalls[i].name) == 0) {
+ blocked_syscalls[i] = true;
+ found = 1;
+ break;
+ }
+ }
+ if (!found)
+ errx(EXIT_FAILURE, "Unknown syscall '%s'", optarg);
+ break;
+ default:
+ errx(EXIT_FAILURE, "Unknown option");
+ }
+ }
+
+ if (optind >= argc)
+ errx(EXIT_FAILURE, "No executable specified");
+
+#define N_FILTERS (ARRAY_SIZE(syscalls) + 3)
+
+ struct sock_filter filter[N_FILTERS] = {
+ [0] = BPF_STMT(BPF_LD | BPF_W | BPF_ABS, syscall_nr),
+
+ [N_FILTERS - 2] = BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
+ [N_FILTERS - 1] = BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | ENOSYS),
+ };
+
+ const struct sock_filter nop = BPF_JUMP(BPF_JMP | BPF_JA, 0, 0, 0);
+
+ for (i = 0; i < ARRAY_SIZE(syscalls); i++) {
+ if (blocked_syscalls[i]) {
+ const struct sock_filter block = BPF_JUMP(
+ BPF_JMP | BPF_JEQ | BPF_K,
+ syscalls[i].number,
+ N_FILTERS - 3 - i, 0);
+ filter[i + 1] = block;
+ } else {
+ filter[i + 1] = nop;
+ }
+ }
+
+ struct sock_fprog prog = {
+ .len = ARRAY_SIZE(filter),
+ .filter = filter,
+ };
+
+ if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0))
+ err(EXIT_NOTSUPP, "prctl(PR_SET_NO_NEW_PRIVS)");
+
+ if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog))
+ err(EXIT_NOTSUPP, "prctl(PR_SET_SECCOMP)");
+
+ if (execvp(argv[optind], argv + optind))
+ err(EXIT_NOTSUPP, "Could not exec");
+}
diff --git a/tests/helpers/test_mbsencode.c b/tests/helpers/test_mbsencode.c
new file mode 100644
index 0000000..44d88f9
--- /dev/null
+++ b/tests/helpers/test_mbsencode.c
@@ -0,0 +1,43 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * Copyright (C) 2018 Vaclav Dolezal <vdolezal@redhat.com>
+ *
+ * This file is part of util-linux.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <locale.h>
+
+#include "mbsalign.h"
+
+int main(int argc, char **argv)
+{
+ int i = 1;
+ char *(*encode_fn)(const char *, size_t *) = mbs_safe_encode;
+
+ setlocale(LC_ALL, "");
+
+ if (i < argc) {
+ if (!strcmp(argv[i], "--safe")) {
+ i++;
+ encode_fn = mbs_safe_encode;
+ } else if (!strcmp(argv[i], "--invalid")) {
+ i++;
+ encode_fn = mbs_invalid_encode;
+ } else if (!strcmp(argv[i], "--")) {
+ i++;
+ }
+ }
+
+ for (; i < argc; i++) {
+ size_t width;
+ char *res;
+ res = encode_fn(argv[i], &width);
+ printf("%zi %s\n", width, res);
+ free(res);
+ }
+
+ return 0;
+}
diff --git a/tests/helpers/test_md5.c b/tests/helpers/test_md5.c
new file mode 100644
index 0000000..dc49d21
--- /dev/null
+++ b/tests/helpers/test_md5.c
@@ -0,0 +1,37 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * Copyright (C) 2008 Karel Zak <kzak@redhat.com>
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <err.h>
+
+#include "md5.h"
+
+int main(void)
+{
+ int i, ret;
+ struct UL_MD5Context ctx;
+ unsigned char digest[UL_MD5LENGTH];
+ unsigned char buf[BUFSIZ];
+
+ ul_MD5Init( &ctx );
+
+ while(!feof(stdin) && !ferror(stdin)) {
+ ret = fread(buf, 1, sizeof(buf), stdin);
+ if (ret)
+ ul_MD5Update( &ctx, buf, ret );
+ }
+
+ if(freopen ("/dev/null", "r", stdin) == NULL)
+ err(EXIT_FAILURE, "stdin->null failed!");
+
+ ul_MD5Final( digest, &ctx );
+
+ for (i = 0; i < UL_MD5LENGTH; i++)
+ printf( "%02x", digest[i] );
+ printf("\n");
+ return 0;
+}
diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c
new file mode 100644
index 0000000..194c175
--- /dev/null
+++ b/tests/helpers/test_mkfds.c
@@ -0,0 +1,2665 @@
+/*
+ * test_mkfds - make various file descriptors
+ *
+ * Written by Masatake YAMATO <yamato@redhat.com>
+ *
+ * This program 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.
+ *
+ * This program is distributed in the hope that it would 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.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <arpa/inet.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <linux/if_ether.h>
+#include <linux/if_packet.h>
+#include <linux/netlink.h>
+#include <linux/sockios.h> /* SIOCGSKNS */
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <sched.h>
+#include <signal.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/inotify.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+#include <sys/un.h>
+#include <sys/user.h>
+#include <unistd.h>
+
+#include "c.h"
+#include "xalloc.h"
+
+#define EXIT_ENOSYS 17
+#define EXIT_EPERM 18
+#define EXIT_ENOPROTOOPT 19
+#define EXIT_EPROTONOSUPPORT 20
+#define EXIT_EACCESS 21
+
+#define _U_ __attribute__((__unused__))
+
+static int pidfd_open(pid_t pid, unsigned int flags);
+
+static void __attribute__((__noreturn__)) usage(FILE *out, int status)
+{
+ fputs("\nUsage:\n", out);
+ fprintf(out, " %s [options] FACTORY FD... [PARAM=VAL...]\n", program_invocation_short_name);
+
+ fputs("\nOptions:\n", out);
+ fputs(" -l, --list list available file descriptor factories and exit\n", out);
+ fputs(" -I, --parameters <factory> list parameters the factory takes\n", out);
+ fputs(" -r, --comm <name> rename self\n", out);
+ fputs(" -q, --quiet don't print pid(s)\n", out);
+ fputs(" -c, --dont-pause don't pause after making fd(s)\n", out);
+
+ fputs("\n", out);
+ fputs("Examples:\n", out);
+ fprintf(out, "Using 3, open /etc/group:\n\n $ %s ro-regular-file 3 file=/etc/group\n\n",
+ program_invocation_short_name);
+ fprintf(out, "Using 3 and 4, make a pipe:\n\n $ %s pipe-no-fork 3 4\n\n",
+ program_invocation_short_name);
+
+ exit(status);
+}
+
+union value {
+ const char *string;
+ long integer;
+ unsigned long uinteger;
+ bool boolean;
+};
+
+enum ptype {
+ PTYPE_STRING,
+ PTYPE_INTEGER,
+ PTYPE_UINTEGER,
+ PTYPE_BOOLEAN,
+};
+
+struct ptype_class {
+ const char *name;
+
+ /* Covert to a string representation.
+ * A caller must free the returned value with free(3) after using. */
+ char *(*sprint)(const union value *value);
+
+ /* Convert from a string. If ARG is NULL, use DEFV instead.
+ * A caller must free the returned value with the free method
+ * after using. */
+ union value (*read)(const char *arg, const union value *defv);
+
+ /* Free the value returned from the read method. */
+ void (*free)(union value value);
+};
+
+#define ARG_STRING(A) (A.v.string)
+#define ARG_INTEGER(A) (A.v.integer)
+#define ARG_UINTEGER(A) (A.v.uinteger)
+#define ARG_BOOLEAN(A) (A.v.boolean)
+struct arg {
+ union value v;
+ void (*free)(union value value);
+};
+
+struct parameter {
+ const char *name;
+ const enum ptype type;
+ const char *desc;
+ union value defv; /* Default value */
+};
+
+static char *string_sprint(const union value *value)
+{
+ return xstrdup(value->string);
+}
+
+static union value string_read(const char *arg, const union value *defv)
+{
+ return (union value){ .string = xstrdup(arg?: defv->string) };
+}
+
+static void string_free(union value value)
+{
+ free((void *)value.string);
+}
+
+static char *integer_sprint(const union value *value)
+{
+ char *str = NULL;
+ xasprintf(&str, "%ld", value->integer);
+ return str;
+}
+
+static union value integer_read(const char *arg, const union value *defv)
+{
+ char *ep;
+ union value r;
+
+ if (!arg)
+ return *defv;
+
+ errno = 0;
+ r.integer = strtol(arg, &ep, 10);
+ if (errno)
+ err(EXIT_FAILURE, "fail to make a number from %s", arg);
+ else if (*ep != '\0')
+ errx(EXIT_FAILURE, "garbage at the end of number: %s", arg);
+ return r;
+}
+
+static void integer_free(union value value _U_)
+{
+ /* Do nothing */
+}
+
+static char *uinteger_sprint(const union value *value)
+{
+ char *str = NULL;
+ xasprintf(&str, "%lu", value->uinteger);
+ return str;
+}
+
+static union value uinteger_read(const char *arg, const union value *defv)
+{
+ char *ep;
+ union value r;
+
+ if (!arg)
+ return *defv;
+
+ errno = 0;
+ r.uinteger = strtoul(arg, &ep, 10);
+ if (errno)
+ err(EXIT_FAILURE, "fail to make a number from %s", arg);
+ else if (*ep != '\0')
+ errx(EXIT_FAILURE, "garbage at the end of number: %s", arg);
+ return r;
+}
+
+static void uinteger_free(union value value _U_)
+{
+ /* Do nothing */
+}
+
+static char *boolean_sprint(const union value *value)
+{
+ return xstrdup(value->boolean? "true": "false");
+}
+
+static union value boolean_read(const char *arg, const union value *defv)
+{
+ union value r;
+
+ if (!arg)
+ return *defv;
+
+ if (strcasecmp(arg, "true") == 0
+ || strcmp(arg, "1") == 0
+ || strcasecmp(arg, "yes") == 0
+ || strcasecmp(arg, "y") == 0)
+ r.boolean = true;
+ else
+ r.boolean = false;
+ return r;
+}
+
+static void boolean_free(union value value _U_)
+{
+ /* Do nothing */
+}
+
+struct ptype_class ptype_classes [] = {
+ [PTYPE_STRING] = {
+ .name = "string",
+ .sprint = string_sprint,
+ .read = string_read,
+ .free = string_free,
+ },
+ [PTYPE_INTEGER] = {
+ .name = "integer",
+ .sprint = integer_sprint,
+ .read = integer_read,
+ .free = integer_free,
+ },
+ [PTYPE_UINTEGER] = {
+ .name = "uinteger",
+ .sprint = uinteger_sprint,
+ .read = uinteger_read,
+ .free = uinteger_free,
+ },
+ [PTYPE_BOOLEAN] = {
+ .name = "boolean",
+ .sprint = boolean_sprint,
+ .read = boolean_read,
+ .free = boolean_free,
+ },
+};
+
+static struct arg decode_arg(const char *pname,
+ const struct parameter *parameters,
+ int argc, char **argv)
+{
+ char *v = NULL;
+ size_t len = strlen(pname);
+ const struct parameter *p = NULL;
+ struct arg arg;
+
+ while (parameters->name) {
+ if (strcmp(pname, parameters->name) == 0) {
+ p = parameters;
+ break;
+ }
+ parameters++;
+ }
+ if (p == NULL)
+ errx(EXIT_FAILURE, "no such parameter: %s", pname);
+
+ for (int i = 0; i < argc; i++) {
+ if (strncmp(pname, argv[i], len) == 0) {
+ v = argv[i] + len;
+ if (*v == '=') {
+ v++;
+ break;
+ } else if (*v == '\0')
+ errx(EXIT_FAILURE,
+ "no value given for \"%s\" parameter",
+ pname);
+ else
+ v = NULL;
+ }
+ }
+ arg.v = ptype_classes [p->type].read (v, &p->defv);
+ arg.free = ptype_classes [p->type].free;
+ return arg;
+}
+
+static void free_arg(struct arg *arg)
+{
+ arg->free(arg->v);
+}
+
+struct fdesc {
+ int fd;
+ void (*close)(int, void *);
+ void *data;
+};
+
+struct factory {
+ const char *name; /* [-a-zA-Z0-9_]+ */
+ const char *desc;
+ bool priv; /* the root privilege is needed to make fd(s) */
+#define MAX_N 5
+ int N; /* the number of fds this factory makes */
+ int EX_N; /* fds made optionally */
+ void *(*make)(const struct factory *, struct fdesc[], int, char **);
+ void (*free)(const struct factory *, void *);
+ void (*report)(const struct factory *, void *, FILE *);
+ const struct parameter * params;
+};
+
+static void close_fdesc(int fd, void *data _U_)
+{
+ close(fd);
+}
+
+static void *open_ro_regular_file(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg file = decode_arg("file", factory->params, argc, argv);
+ struct arg offset = decode_arg("offset", factory->params, argc, argv);
+
+ int fd = open(ARG_STRING(file), O_RDONLY);
+ if (fd < 0)
+ err(EXIT_FAILURE, "failed to open: %s", ARG_STRING(file));
+ free_arg(&file);
+
+ if (ARG_INTEGER(offset) != 0) {
+ if (lseek(fd, (off_t)ARG_INTEGER(offset), SEEK_CUR) < 0) {
+ int e = errno;
+ close(fd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to seek 0 -> %ld", ARG_INTEGER(offset));
+ }
+ }
+ free_arg(&offset);
+
+ if (fd != fdescs[0].fd) {
+ if (dup2(fd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(fd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", fd, fdescs[0].fd);
+ }
+ close(fd);
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL
+ };
+
+ return NULL;
+}
+
+static void *make_pipe(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ int pd[2];
+ int nonblock_flags[2] = {0, 0};
+ struct arg nonblock = decode_arg("nonblock", factory->params, argc, argv);
+ if (strlen(ARG_STRING(nonblock)) != 2) {
+ errx(EXIT_FAILURE, "string value for %s has unexpected length: %s",
+ "nonblock", ARG_STRING(nonblock));
+ }
+
+ /* Make extra pipe descriptors for making pipe objects connected
+ * with fds more than 2.
+ * See https://github.com/util-linux/util-linux/pull/1622
+ * about the background of the requirement. */
+ struct arg rdup = decode_arg("rdup", factory->params, argc, argv);
+ struct arg wdup = decode_arg("wdup", factory->params, argc, argv);
+ int xpd[2];
+ xpd [0] = ARG_INTEGER(rdup);
+ xpd [1] = ARG_INTEGER(wdup);
+
+ for (int i = 0; i < 2; i++) {
+ if (ARG_STRING(nonblock)[i] == '-')
+ continue;
+ if ((i == 0 && ARG_STRING(nonblock)[i] == 'r')
+ || (i == 1 && ARG_STRING(nonblock)[i] == 'w'))
+ nonblock_flags[i] = 1;
+ else
+ errx(EXIT_FAILURE, "unexpected value %c for the %s fd of %s",
+ ARG_STRING(nonblock)[i],
+ (i == 0)? "read": "write",
+ "nonblock");
+ }
+ free_arg(&nonblock);
+
+ if (pipe(pd) < 0)
+ err(EXIT_FAILURE, "failed to make pipe");
+
+ for (int i = 0; i < 2; i++) {
+ if (nonblock_flags[i]) {
+ int flags = fcntl(pd[i], F_GETFL);
+ if (fcntl(pd[i], F_SETFL, flags|O_NONBLOCK) < 0) {
+ int e = errno;
+ close(pd[0]);
+ close(pd[1]);
+ errno = e;
+ errx(EXIT_FAILURE, "failed to set NONBLOCK flag to the %s fd",
+ (i == 0)? "read": "write");
+ }
+ }
+ }
+
+ for (int i = 0; i < 2; i++) {
+ if (pd[i] != fdescs[i].fd) {
+ if (dup2(pd[i], fdescs[i].fd) < 0) {
+ int e = errno;
+ close(pd[0]);
+ close(pd[1]);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d",
+ pd[i], fdescs[i].fd);
+ }
+ close(pd[i]);
+ }
+ fdescs[i] = (struct fdesc){
+ .fd = fdescs[i].fd,
+ .close = close_fdesc,
+ .data = NULL
+ };
+ }
+
+ /* Make extra pipe descriptors. */
+ for (int i = 0; i < 2; i++) {
+ if (xpd[i] >= 0) {
+ if (dup2(fdescs[i].fd, xpd[i]) < 0) {
+ int e = errno;
+ close(fdescs[0].fd);
+ close(fdescs[1].fd);
+ if (i > 0 && xpd[0] >= 0)
+ close(xpd[0]);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d",
+ fdescs[i].fd, xpd[i]);
+ }
+ fdescs[i + 2] = (struct fdesc){
+ .fd = xpd[i],
+ .close = close_fdesc,
+ .data = NULL
+ };
+ }
+ }
+
+ return NULL;
+}
+
+static void close_dir(int fd, void *data)
+{
+ DIR *dp = data;
+ if (dp)
+ closedir(dp);
+ else
+ close_fdesc(fd, NULL);
+}
+
+static void *open_directory(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg dir = decode_arg("dir", factory->params, argc, argv);
+ struct arg dentries = decode_arg("dentries", factory->params, argc, argv);
+ DIR *dp = NULL;
+
+ int fd = open(ARG_STRING(dir), O_RDONLY|O_DIRECTORY);
+ if (fd < 0)
+ err(EXIT_FAILURE, "failed to open: %s", ARG_STRING(dir));
+ free_arg(&dir);
+
+ if (fd != fdescs[0].fd) {
+ if (dup2(fd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(fd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", fd, fdescs[0].fd);
+ }
+ close(fd);
+ }
+
+ if (ARG_INTEGER(dentries) > 0) {
+ dp = fdopendir(fdescs[0].fd);
+ if (dp == NULL) {
+ int e = errno;
+ close(fdescs[0].fd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to make DIR* from fd: %s", ARG_STRING(dir));
+ }
+ for (int i = 0; i < ARG_INTEGER(dentries); i++) {
+ struct dirent *d = readdir(dp);
+ if (!d) {
+ int e = errno;
+ closedir(dp);
+ errno = e;
+ err(EXIT_FAILURE, "failed in readdir(3)");
+ }
+ }
+ }
+ free_arg(&dentries);
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_dir,
+ .data = dp
+ };
+
+ return NULL;
+}
+
+static void *open_rw_chrdev(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg chrdev = decode_arg("chrdev", factory->params, argc, argv);
+ int fd = open(ARG_STRING(chrdev), O_RDWR);
+ if (fd < 0)
+ err(EXIT_FAILURE, "failed to open: %s", ARG_STRING(chrdev));
+ free_arg(&chrdev);
+
+ if (fd != fdescs[0].fd) {
+ if (dup2(fd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(fd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", fd, fdescs[0].fd);
+ }
+ close(fd);
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL
+ };
+
+ return NULL;
+}
+
+static void *make_socketpair(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ int sd[2];
+ struct arg socktype = decode_arg("socktype", factory->params, argc, argv);
+ int isocktype;
+ if (strcmp(ARG_STRING(socktype), "STREAM") == 0)
+ isocktype = SOCK_STREAM;
+ else if (strcmp(ARG_STRING(socktype), "DGRAM") == 0)
+ isocktype = SOCK_DGRAM;
+ else if (strcmp(ARG_STRING(socktype), "SEQPACKET") == 0)
+ isocktype = SOCK_SEQPACKET;
+ else
+ errx(EXIT_FAILURE,
+ "unknown socket type for socketpair(AF_UNIX,...): %s",
+ ARG_STRING(socktype));
+ free_arg(&socktype);
+
+ if (socketpair(AF_UNIX, isocktype, 0, sd) < 0)
+ err(EXIT_FAILURE, "failed to make socket pair");
+
+ for (int i = 0; i < 2; i++) {
+ if (sd[i] != fdescs[i].fd) {
+ if (dup2(sd[i], fdescs[i].fd) < 0) {
+ int e = errno;
+ close(sd[0]);
+ close(sd[1]);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d",
+ sd[i], fdescs[i].fd);
+ }
+ close(sd[i]);
+ }
+ fdescs[i] = (struct fdesc){
+ .fd = fdescs[i].fd,
+ .close = close_fdesc,
+ .data = NULL
+ };
+ }
+
+ return NULL;
+}
+
+static void *open_with_opath(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg path = decode_arg("path", factory->params, argc, argv);
+ int fd = open(ARG_STRING(path), O_PATH|O_NOFOLLOW);
+ if (fd < 0)
+ err(EXIT_FAILURE, "failed to open with O_PATH: %s", ARG_STRING(path));
+ free_arg(&path);
+
+ if (fd != fdescs[0].fd) {
+ if (dup2(fd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(fd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", fd, fdescs[0].fd);
+ }
+ close(fd);
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL
+ };
+
+ return NULL;
+}
+
+static void *open_ro_blkdev(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg blkdev = decode_arg("blkdev", factory->params, argc, argv);
+ int fd = open(ARG_STRING(blkdev), O_RDONLY);
+ if (fd < 0)
+ err(EXIT_FAILURE, "failed to open: %s", ARG_STRING(blkdev));
+ free_arg(&blkdev);
+
+ if (fd != fdescs[0].fd) {
+ if (dup2(fd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(fd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", fd, fdescs[0].fd);
+ }
+ close(fd);
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+
+ return NULL;
+}
+
+static int make_packet_socket(int socktype, const char *interface)
+{
+ int sd;
+ struct sockaddr_ll addr;
+
+ sd = socket(AF_PACKET, socktype, htons(ETH_P_ALL));
+ if (sd < 0)
+ err(EXIT_FAILURE, "failed to make a socket with AF_PACKET");
+
+ if (interface == NULL)
+ return sd; /* Just making a socket */
+
+ memset(&addr, 0, sizeof(struct sockaddr_ll));
+ addr.sll_family = AF_PACKET;
+ addr.sll_ifindex = if_nametoindex(interface);
+ if (addr.sll_ifindex == 0) {
+ int e = errno;
+ close(sd);
+ errno = e;
+ err(EXIT_FAILURE,
+ "failed to get the interface index for %s", interface);
+ }
+ if (bind(sd, (struct sockaddr *)&addr, sizeof(struct sockaddr_ll)) < 0) {
+ int e = errno;
+ close(sd);
+ errno = e;
+ err(EXIT_FAILURE,
+ "failed to get the interface index for %s", interface);
+ }
+
+ return sd;
+}
+
+struct munmap_data {
+ void *ptr;
+ size_t len;
+};
+
+static void close_fdesc_after_munmap(int fd, void *data)
+{
+ struct munmap_data *munmap_data = data;
+ munmap(munmap_data->ptr, munmap_data->len);
+ free(data);
+ close(fd);
+}
+
+static void *make_mmapped_packet_socket(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ int sd;
+ struct arg socktype = decode_arg("socktype", factory->params, argc, argv);
+ struct arg interface = decode_arg("interface", factory->params, argc, argv);
+
+ int isocktype;
+ const char *sinterface;
+ struct tpacket_req req;
+ struct munmap_data *munmap_data;
+
+ if (strcmp(ARG_STRING(socktype), "DGRAM") == 0)
+ isocktype = SOCK_DGRAM;
+ else if (strcmp(ARG_STRING(socktype), "RAW") == 0)
+ isocktype = SOCK_RAW;
+ else
+ errx(EXIT_FAILURE,
+ "unknown socket type for socket(AF_PACKET,...): %s",
+ ARG_STRING(socktype));
+ free_arg(&socktype);
+
+ sinterface = ARG_STRING(interface);
+ sd = make_packet_socket(isocktype, sinterface);
+ free_arg(&interface);
+
+ /* Specify the spec of ring buffers.
+ *
+ * ref.
+ * - linux/Documentation/networking/packet_mmap.rst
+ * - https://sites.google.com/site/packetmmap/home
+ */
+ req.tp_block_size = getpagesize();
+ req.tp_frame_size = getpagesize();
+ req.tp_block_nr = 1;
+ req.tp_frame_nr = 1;
+ if (setsockopt(sd, SOL_PACKET, PACKET_TX_RING, (char *)&req, sizeof(req)) < 0) {
+ int e = errno;
+ close(sd);
+ errno = e;
+ err((errno == ENOPROTOOPT? EXIT_ENOPROTOOPT: EXIT_FAILURE),
+ "failed to specify a buffer spec to a packet socket");
+ }
+
+ munmap_data = xmalloc(sizeof (*munmap_data));
+ munmap_data->len = (size_t) req.tp_block_size * req.tp_block_nr;
+ munmap_data->ptr = mmap(NULL, munmap_data->len, PROT_WRITE, MAP_SHARED, sd, 0);
+ if (munmap_data->ptr == MAP_FAILED) {
+ int e = errno;
+ close(sd);
+ free(munmap_data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to do mmap a packet socket");
+ }
+
+ if (sd != fdescs[0].fd) {
+ if (dup2(sd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(sd);
+ munmap(munmap_data->ptr, munmap_data->len);
+ free(munmap_data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", sd, fdescs[0].fd);
+ }
+ close(sd);
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc_after_munmap,
+ .data = munmap_data,
+ };
+
+ return NULL;
+}
+
+static void *make_pidfd(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg target_pid = decode_arg("target-pid", factory->params, argc, argv);
+ pid_t pid = ARG_INTEGER(target_pid);
+
+ int fd = pidfd_open(pid, 0);
+ if (fd < 0)
+ err((errno == ENOSYS? EXIT_ENOSYS: EXIT_FAILURE),
+ "failed in pidfd_open(%d)", (int)pid);
+ free_arg(&target_pid);
+
+ if (fd != fdescs[0].fd) {
+ if (dup2(fd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(fd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", fd, fdescs[0].fd);
+ }
+ close(fd);
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL
+ };
+
+ return NULL;
+}
+
+static void *make_inotify_fd(const struct factory *factory _U_, struct fdesc fdescs[],
+ int argc _U_, char ** argv _U_)
+{
+ int fd = inotify_init();
+ if (fd < 0)
+ err(EXIT_FAILURE, "failed in inotify_init()");
+
+ if (fd != fdescs[0].fd) {
+ if (dup2(fd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(fd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", fd, fdescs[0].fd);
+ }
+ close(fd);
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL
+ };
+
+ return NULL;
+}
+
+static void close_unix_socket(int fd, void *data)
+{
+ char *path = data;
+ close(fd);
+ if (path) {
+ unlink(path);
+ free(path);
+ }
+}
+
+static void *make_unix_stream_core(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv, int type, const char *typestr)
+{
+ struct arg path = decode_arg("path", factory->params, argc, argv);
+ const char *spath = ARG_STRING(path);
+
+ struct arg backlog = decode_arg("backlog", factory->params, argc, argv);
+ int ibacklog = ARG_INTEGER(path);
+
+ struct arg abstract = decode_arg("abstract", factory->params, argc, argv);
+ bool babstract = ARG_BOOLEAN(abstract);
+
+ struct arg server_shutdown = decode_arg("server-shutdown", factory->params, argc, argv);
+ int iserver_shutdown = ARG_INTEGER(server_shutdown);
+ struct arg client_shutdown = decode_arg("client-shutdown", factory->params, argc, argv);
+ int iclient_shutdown = ARG_INTEGER(client_shutdown);
+
+ int ssd, csd, asd; /* server, client, and accepted socket descriptors */
+ struct sockaddr_un un;
+ size_t un_len = sizeof(un);
+
+ memset(&un, 0, sizeof(un));
+ un.sun_family = AF_UNIX;
+ if (babstract) {
+ strncpy(un.sun_path + 1, spath, sizeof(un.sun_path) - 1 - 1);
+ size_t pathlen = strlen(spath);
+ if (sizeof(un.sun_path) - 1 > pathlen)
+ un_len = sizeof(un) - sizeof(un.sun_path) + 1 + pathlen;
+ } else
+ strncpy(un.sun_path, spath, sizeof(un.sun_path) - 1 );
+
+ free_arg(&client_shutdown);
+ free_arg(&server_shutdown);
+ free_arg(&abstract);
+ free_arg(&backlog);
+ free_arg(&path);
+
+ if (iserver_shutdown < 0 || iserver_shutdown > 3)
+ errx(EXIT_FAILURE, "the server shudown specification in unexpected range");
+ if (iclient_shutdown < 0 || iclient_shutdown > 3)
+ errx(EXIT_FAILURE, "the client shudown specification in unexpected range");
+
+ ssd = socket(AF_UNIX, type, 0);
+ if (ssd < 0)
+ err(EXIT_FAILURE,
+ "failed to make a socket with AF_UNIX + SOCK_%s (server side)", typestr);
+ if (ssd != fdescs[0].fd) {
+ if (dup2(ssd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", ssd, fdescs[0].fd);
+ }
+ close(ssd);
+ ssd = fdescs[0].fd;
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_unix_socket,
+ .data = NULL,
+ };
+
+ if (!babstract)
+ unlink(un.sun_path);
+ if (bind(ssd, (const struct sockaddr *)&un, un_len) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to bind a socket for listening");
+ }
+
+ if (!babstract)
+ fdescs[0].data = xstrdup(un.sun_path);
+ if (listen(ssd, ibacklog) < 0) {
+ int e = errno;
+ close_unix_socket(ssd, fdescs[0].data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to listen a socket");
+ }
+
+ csd = socket(AF_UNIX, type, 0);
+ if (csd < 0)
+ err(EXIT_FAILURE,
+ "failed to make a socket with AF_UNIX + SOCK_%s (client side)", typestr);
+ if (csd != fdescs[1].fd) {
+ if (dup2(csd, fdescs[1].fd) < 0) {
+ int e = errno;
+ close(csd);
+ close_unix_socket(ssd, fdescs[0].data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", csd, fdescs[1].fd);
+ }
+ close(csd);
+ csd = fdescs[1].fd;
+ }
+
+ fdescs[1] = (struct fdesc){
+ .fd = fdescs[1].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+
+ if (connect(csd, (const struct sockaddr *)&un, un_len) < 0) {
+ int e = errno;
+ close_fdesc(csd, NULL);
+ close_unix_socket(ssd, fdescs[0].data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to connect a socket to the listening socket");
+ }
+
+ if (!babstract)
+ unlink(un.sun_path);
+
+ asd = accept(ssd, NULL, NULL);
+ if (asd < 0) {
+ int e = errno;
+ close_fdesc(csd, NULL);
+ close_unix_socket(ssd, fdescs[0].data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to accept a socket from the listening socket");
+ }
+ if (asd != fdescs[2].fd) {
+ if (dup2(asd, fdescs[2].fd) < 0) {
+ int e = errno;
+ close(asd);
+ close_fdesc(csd, NULL);
+ close_unix_socket(ssd, fdescs[0].data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", asd, fdescs[2].fd);
+ }
+ close(asd);
+ asd = fdescs[2].fd;
+ }
+
+ if (iserver_shutdown & (1 << 0))
+ shutdown(asd, SHUT_RD);
+ if (iserver_shutdown & (1 << 1))
+ shutdown(asd, SHUT_WR);
+ if (iclient_shutdown & (1 << 0))
+ shutdown(csd, SHUT_RD);
+ if (iclient_shutdown & (1 << 1))
+ shutdown(csd, SHUT_WR);
+
+ return NULL;
+}
+
+static void *make_unix_stream(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg type = decode_arg("type", factory->params, argc, argv);
+ const char *stype = ARG_STRING(type);
+
+ int typesym;
+ const char *typestr;
+
+ if (strcmp(stype, "stream") == 0) {
+ typesym = SOCK_STREAM;
+ typestr = "STREAM";
+ } else if (strcmp(stype, "seqpacket") == 0) {
+ typesym = SOCK_SEQPACKET;
+ typestr = "SEQPACKET";
+ } else
+ errx(EXIT_FAILURE, "unknown unix socket type: %s", stype);
+
+ free_arg(&type);
+
+ return make_unix_stream_core(factory, fdescs, argc, argv, typesym, typestr);
+}
+
+static void *make_unix_dgram(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg path = decode_arg("path", factory->params, argc, argv);
+ const char *spath = ARG_STRING(path);
+
+ struct arg abstract = decode_arg("abstract", factory->params, argc, argv);
+ bool babstract = ARG_BOOLEAN(abstract);
+
+ int ssd, csd; /* server and client socket descriptors */
+
+ struct sockaddr_un un;
+ size_t un_len = sizeof(un);
+
+ memset(&un, 0, sizeof(un));
+ un.sun_family = AF_UNIX;
+ if (babstract) {
+ strncpy(un.sun_path + 1, spath, sizeof(un.sun_path) - 1 - 1);
+ size_t pathlen = strlen(spath);
+ if (sizeof(un.sun_path) - 1 > pathlen)
+ un_len = sizeof(un) - sizeof(un.sun_path) + 1 + pathlen;
+ } else
+ strncpy(un.sun_path, spath, sizeof(un.sun_path) - 1 );
+
+ free_arg(&abstract);
+ free_arg(&path);
+
+ ssd = socket(AF_UNIX, SOCK_DGRAM, 0);
+ if (ssd < 0)
+ err(EXIT_FAILURE,
+ "failed to make a socket with AF_UNIX + SOCK_DGRAM (server side)");
+ if (ssd != fdescs[0].fd) {
+ if (dup2(ssd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", ssd, fdescs[0].fd);
+ }
+ close(ssd);
+ ssd = fdescs[0].fd;
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_unix_socket,
+ .data = NULL,
+ };
+
+ if (!babstract)
+ unlink(un.sun_path);
+ if (bind(ssd, (const struct sockaddr *)&un, un_len) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to bind a socket for server");
+ }
+
+ if (!babstract)
+ fdescs[0].data = xstrdup(un.sun_path);
+ csd = socket(AF_UNIX, SOCK_DGRAM, 0);
+ if (csd < 0)
+ err(EXIT_FAILURE,
+ "failed to make a socket with AF_UNIX + SOCK_DGRAM (client side)");
+ if (csd != fdescs[1].fd) {
+ if (dup2(csd, fdescs[1].fd) < 0) {
+ int e = errno;
+ close(csd);
+ close_unix_socket(ssd, fdescs[0].data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", csd, fdescs[1].fd);
+ }
+ close(csd);
+ csd = fdescs[1].fd;
+ }
+
+ fdescs[1] = (struct fdesc){
+ .fd = fdescs[1].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+
+ if (connect(csd, (const struct sockaddr *)&un, un_len) < 0) {
+ int e = errno;
+ close_fdesc(csd, NULL);
+ close_unix_socket(ssd, fdescs[0].data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to connect a socket to the server socket");
+ }
+
+ if (!babstract)
+ unlink(un.sun_path);
+
+ return NULL;
+}
+
+static void *make_unix_in_new_netns(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg type = decode_arg("type", factory->params, argc, argv);
+ const char *stype = ARG_STRING(type);
+
+ struct arg path = decode_arg("path", factory->params, argc, argv);
+ const char *spath = ARG_STRING(path);
+
+ struct arg abstract = decode_arg("abstract", factory->params, argc, argv);
+ bool babstract = ARG_BOOLEAN(abstract);
+
+ int typesym;
+ const char *typestr;
+
+ struct sockaddr_un un;
+ size_t un_len = sizeof(un);
+
+ int self_netns, tmp_netns, sd;
+
+ if (strcmp(stype, "stream") == 0) {
+ typesym = SOCK_STREAM;
+ typestr = "STREAM";
+ } else if (strcmp(stype, "seqpacket") == 0) {
+ typesym = SOCK_SEQPACKET;
+ typestr = "SEQPACKET";
+ } else if (strcmp(stype, "dgram") == 0) {
+ typesym = SOCK_DGRAM;
+ typestr = "DGRAM";
+ } else {
+ free_arg(&abstract);
+ free_arg(&path);
+ free_arg(&type);
+ errx(EXIT_FAILURE, "unknown unix socket type: %s", stype);
+ }
+
+ memset(&un, 0, sizeof(un));
+ un.sun_family = AF_UNIX;
+ if (babstract) {
+ strncpy(un.sun_path + 1, spath, sizeof(un.sun_path) - 1 - 1);
+ size_t pathlen = strlen(spath);
+ if (sizeof(un.sun_path) - 1 > pathlen)
+ un_len = sizeof(un) - sizeof(un.sun_path) + 1 + pathlen;
+ } else
+ strncpy(un.sun_path, spath, sizeof(un.sun_path) - 1 );
+
+ free_arg(&abstract);
+ free_arg(&path);
+ free_arg(&type);
+
+ self_netns = open("/proc/self/ns/net", O_RDONLY);
+ if (self_netns < 0)
+ err(EXIT_FAILURE, "failed to open /proc/self/ns/net");
+ if (self_netns != fdescs[0].fd) {
+ if (dup2(self_netns, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(self_netns);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", self_netns, fdescs[0].fd);
+ }
+ close(self_netns);
+ self_netns = fdescs[0].fd;
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+
+ if (unshare(CLONE_NEWNET) < 0) {
+ int e = errno;
+ close_fdesc(self_netns, NULL);
+ errno = e;
+ err((errno == EPERM? EXIT_EPERM: EXIT_FAILURE),
+ "failed in unshare");
+ }
+
+ tmp_netns = open("/proc/self/ns/net", O_RDONLY);
+ if (tmp_netns < 0) {
+ int e = errno;
+ close_fdesc(self_netns, NULL);
+ errno = e;
+ err(EXIT_FAILURE, "failed to open /proc/self/ns/net for the new netns");
+ }
+ if (tmp_netns != fdescs[1].fd) {
+ if (dup2(tmp_netns, fdescs[1].fd) < 0) {
+ int e = errno;
+ close_fdesc(self_netns, NULL);
+ close(tmp_netns);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", tmp_netns, fdescs[1].fd);
+ }
+ close(tmp_netns);
+ tmp_netns = fdescs[1].fd;
+ }
+
+ fdescs[1] = (struct fdesc){
+ .fd = fdescs[1].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+
+ sd = socket(AF_UNIX, typesym, 0);
+ if (sd < 0) {
+ int e = errno;
+ close_fdesc(self_netns, NULL);
+ close_fdesc(tmp_netns, NULL);
+ errno = e;
+ err(EXIT_FAILURE,
+ "failed to make a socket with AF_UNIX + SOCK_%s",
+ typestr);
+ }
+
+ if (sd != fdescs[2].fd) {
+ if (dup2(sd, fdescs[2].fd) < 0) {
+ int e = errno;
+ close_fdesc(self_netns, NULL);
+ close_fdesc(tmp_netns, NULL);
+ close(sd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", sd, fdescs[2].fd);
+ }
+ close(sd);
+ sd = fdescs[2].fd;
+ }
+
+ fdescs[2] = (struct fdesc){
+ .fd = fdescs[2].fd,
+ .close = close_unix_socket,
+ .data = NULL,
+ };
+
+ if (!babstract)
+ unlink(un.sun_path);
+ if (bind(sd, (const struct sockaddr *)&un, un_len) < 0) {
+ int e = errno;
+ close_fdesc(self_netns, NULL);
+ close_fdesc(tmp_netns, NULL);
+ close_unix_socket(sd, NULL);
+ errno = e;
+ err(EXIT_FAILURE, "failed to bind a socket");
+ }
+
+ if (!babstract)
+ fdescs[2].data = xstrdup(un.sun_path);
+
+ if (typesym != SOCK_DGRAM) {
+ if (listen(sd, 1) < 0) {
+ int e = errno;
+ close_fdesc(self_netns, NULL);
+ close_fdesc(tmp_netns, NULL);
+ close_unix_socket(sd, fdescs[2].data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to listen a socket");
+ }
+ }
+
+ if (setns(self_netns, CLONE_NEWNET) < 0) {
+ int e = errno;
+ close_fdesc(self_netns, NULL);
+ close_fdesc(tmp_netns, NULL);
+ close_unix_socket(sd, fdescs[2].data);
+ errno = e;
+ err(EXIT_FAILURE, "failed to swich back to the original net namespace");
+ }
+
+ return NULL;
+}
+
+static void *make_tcp_common(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv,
+ int family,
+ void (*init_addr)(struct sockaddr *, unsigned short),
+ size_t addr_size,
+ struct sockaddr * sin, struct sockaddr * cin)
+{
+ struct arg server_port = decode_arg("server-port", factory->params, argc, argv);
+ unsigned short iserver_port = (unsigned short)ARG_INTEGER(server_port);
+ struct arg client_port = decode_arg("client-port", factory->params, argc, argv);
+ unsigned short iclient_port = (unsigned short)ARG_INTEGER(client_port);
+
+ int ssd, csd, asd;
+
+ const int y = 1;
+
+ free_arg(&server_port);
+ free_arg(&client_port);
+
+ ssd = socket(family, SOCK_STREAM, 0);
+ if (ssd < 0)
+ err(EXIT_FAILURE,
+ "failed to make a tcp socket for listening");
+
+ if (setsockopt(ssd, SOL_SOCKET,
+ SO_REUSEADDR, (const char *)&y, sizeof(y)) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to setsockopt(SO_REUSEADDR)");
+ }
+
+ if (ssd != fdescs[0].fd) {
+ if (dup2(ssd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", ssd, fdescs[0].fd);
+ }
+ close(ssd);
+ ssd = fdescs[0].fd;
+ }
+
+ init_addr(sin, iserver_port);
+ if (bind(ssd, sin, addr_size) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to bind a listening socket");
+ }
+
+ if (listen(ssd, 1) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to listen a socket");
+ }
+
+ csd = socket(family, SOCK_STREAM, 0);
+ if (csd < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE,
+ "failed to make a tcp client socket");
+ }
+
+ if (setsockopt(csd, SOL_SOCKET,
+ SO_REUSEADDR, (const char *)&y, sizeof(y)) < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to setsockopt(SO_REUSEADDR)");
+ }
+
+ if (csd != fdescs[1].fd) {
+ if (dup2(csd, fdescs[1].fd) < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", csd, fdescs[1].fd);
+ }
+ close(csd);
+ csd = fdescs[1].fd;
+ }
+
+ init_addr(cin, iclient_port);
+ if (bind(csd, cin, addr_size) < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to bind a client socket");
+ }
+
+ if (connect(csd, sin, addr_size) < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to connect a client socket to the server socket");
+ }
+
+ asd = accept(ssd, NULL, NULL);
+ if (asd < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to accept a socket from the listening socket");
+ }
+ if (asd != fdescs[2].fd) {
+ if (dup2(asd, fdescs[2].fd) < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", asd, fdescs[2].fd);
+ }
+ close(asd);
+ asd = fdescs[2].fd;
+ }
+
+ fdescs[0] = (struct fdesc) {
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+ fdescs[1] = (struct fdesc) {
+ .fd = fdescs[1].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+ fdescs[2] = (struct fdesc) {
+ .fd = fdescs[2].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+
+ return NULL;
+}
+
+static void tcp_init_addr(struct sockaddr *addr, unsigned short port)
+{
+ struct sockaddr_in *in = (struct sockaddr_in *)addr;
+ memset(in, 0, sizeof(*in));
+ in->sin_family = AF_INET;
+ in->sin_port = htons(port);
+ in->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+}
+
+static void *make_tcp(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct sockaddr_in sin, cin;
+ return make_tcp_common(factory, fdescs, argc, argv,
+ AF_INET,
+ tcp_init_addr, sizeof(sin),
+ (struct sockaddr *)&sin, (struct sockaddr *)&cin);
+}
+
+static void *make_udp_common(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv,
+ int family,
+ void (*init_addr)(struct sockaddr *, unsigned short),
+ size_t addr_size,
+ struct sockaddr * sin, struct sockaddr * cin)
+{
+ struct arg lite = decode_arg("lite", factory->params, argc, argv);
+ bool blite = ARG_BOOLEAN(lite);
+
+ struct arg server_port = decode_arg("server-port", factory->params, argc, argv);
+ unsigned short iserver_port = (unsigned short)ARG_INTEGER(server_port);
+ struct arg client_port = decode_arg("client-port", factory->params, argc, argv);
+ unsigned short iclient_port = (unsigned short)ARG_INTEGER(client_port);
+
+ struct arg server_do_bind = decode_arg("server-do-bind", factory->params, argc, argv);
+ bool bserver_do_bind = ARG_BOOLEAN(server_do_bind);
+ struct arg client_do_bind = decode_arg("client-do-bind", factory->params, argc, argv);
+ bool bclient_do_bind = ARG_BOOLEAN(client_do_bind);
+ struct arg client_do_connect = decode_arg("client-do-connect", factory->params, argc, argv);
+ bool bclient_do_connect = ARG_BOOLEAN(client_do_connect);
+
+ int ssd, csd;
+
+ const int y = 1;
+
+ free_arg(&client_do_connect);
+ free_arg(&client_do_bind);
+ free_arg(&server_do_bind);
+ free_arg(&server_port);
+ free_arg(&client_port);
+ free_arg(&lite);
+
+ ssd = socket(family, SOCK_DGRAM, blite? IPPROTO_UDPLITE: 0);
+ if (ssd < 0)
+ err(EXIT_FAILURE,
+ "failed to make a udp socket for server");
+
+ if (setsockopt(ssd, SOL_SOCKET,
+ SO_REUSEADDR, (const char *)&y, sizeof(y)) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to setsockopt(SO_REUSEADDR)");
+ }
+
+ if (ssd != fdescs[0].fd) {
+ if (dup2(ssd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", ssd, fdescs[0].fd);
+ }
+ close(ssd);
+ ssd = fdescs[0].fd;
+ }
+
+ init_addr(sin, iserver_port);
+ if (bserver_do_bind) {
+ if (bind(ssd, sin, addr_size) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to bind a server socket");
+ }
+ }
+
+ csd = socket(family, SOCK_DGRAM, blite? IPPROTO_UDPLITE: 0);
+ if (csd < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE,
+ "failed to make a udp client socket");
+ }
+
+ if (setsockopt(csd, SOL_SOCKET,
+ SO_REUSEADDR, (const char *)&y, sizeof(y)) < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to setsockopt(SO_REUSEADDR)");
+ }
+
+ if (csd != fdescs[1].fd) {
+ if (dup2(csd, fdescs[1].fd) < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", csd, fdescs[1].fd);
+ }
+ close(csd);
+ csd = fdescs[1].fd;
+ }
+
+ if (bclient_do_bind) {
+ init_addr(cin, iclient_port);
+ if (bind(csd, cin, addr_size) < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to bind a client socket");
+ }
+ }
+
+ if (bclient_do_connect) {
+ if (connect(csd, sin, addr_size) < 0) {
+ int e = errno;
+ close(ssd);
+ close(csd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to connect a client socket to the server socket");
+ }
+ }
+
+ fdescs[0] = (struct fdesc) {
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+ fdescs[1] = (struct fdesc) {
+ .fd = fdescs[1].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+
+ return NULL;
+}
+
+static void *make_udp(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct sockaddr_in sin, cin;
+ return make_udp_common(factory, fdescs, argc, argv,
+ AF_INET,
+ tcp_init_addr, sizeof(sin),
+ (struct sockaddr *)&sin, (struct sockaddr *)&cin);
+}
+
+static void *make_raw_common(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv,
+ int family,
+ void (*init_addr)(struct sockaddr *, bool),
+ size_t addr_size,
+ struct sockaddr * sin)
+{
+ struct arg protocol = decode_arg("protocol", factory->params, argc, argv);
+ int iprotocol = ARG_INTEGER(protocol);
+ int ssd;
+
+ free_arg(&protocol);
+
+ ssd = socket(family, SOCK_RAW, iprotocol);
+ if (ssd < 0)
+ err(EXIT_FAILURE,
+ "failed to make a udp socket for server");
+
+ if (ssd != fdescs[0].fd) {
+ if (dup2(ssd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", ssd, fdescs[0].fd);
+ }
+ close(ssd);
+ ssd = fdescs[0].fd;
+ }
+
+ init_addr(sin, false);
+ if (bind(ssd, sin, addr_size) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed in bind(2)");
+ }
+
+ init_addr(sin, true);
+ if (connect(ssd, sin, addr_size) < 0) {
+ int e = errno;
+ close(ssd);
+ errno = e;
+ err(EXIT_FAILURE, "failed in connect(2)");
+ }
+
+ fdescs[0] = (struct fdesc) {
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+
+ return NULL;
+}
+
+static void raw_init_addr(struct sockaddr * addr, bool remote_addr)
+{
+ struct sockaddr_in *in = (struct sockaddr_in *)addr;
+ memset(in, 0, sizeof(*in));
+ in->sin_family = AF_INET;
+ in->sin_addr.s_addr = htonl(INADDR_LOOPBACK + (remote_addr? 1: 0));
+}
+
+static void *make_raw(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct sockaddr_in sin;
+ return make_raw_common(factory, fdescs, argc, argv,
+ AF_INET,
+ raw_init_addr, sizeof(sin),
+ (struct sockaddr *)&sin);
+}
+
+static void *make_ping_common(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv,
+ int family, int protocol,
+ void (*init_addr)(struct sockaddr *, unsigned short),
+ size_t addr_size,
+ struct sockaddr *sin)
+{
+ struct arg connect_ = decode_arg("connect", factory->params, argc, argv);
+ bool bconnect = ARG_BOOLEAN(connect_);
+
+ struct arg bind_ = decode_arg("bind", factory->params, argc, argv);
+ bool bbind = ARG_BOOLEAN(bind_);
+
+ struct arg id = decode_arg("id", factory->params, argc, argv);
+ unsigned short iid = (unsigned short)ARG_INTEGER(id);
+
+ int sd;
+
+ free_arg(&id);
+ free_arg(&bind_);
+ free_arg(&connect_);
+
+ sd = socket(family, SOCK_DGRAM, protocol);
+ if (sd < 0)
+ err((errno == EACCES? EXIT_EACCESS: EXIT_FAILURE),
+ "failed to make an icmp socket");
+
+ if (sd != fdescs[0].fd) {
+ if (dup2(sd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(sd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", sd, fdescs[0].fd);
+ }
+ close(sd);
+ sd = fdescs[0].fd;
+ }
+
+ if (bbind) {
+ init_addr(sin, iid);
+ if (bind(sd, sin, addr_size) < 0) {
+ int e = errno;
+ close(sd);
+ errno = e;
+ err((errno == EACCES? EXIT_EACCESS: EXIT_FAILURE),
+ "failed in bind(2)");
+ }
+ }
+
+ if (bconnect) {
+ init_addr(sin, 0);
+ if (connect(sd, sin, addr_size) < 0) {
+ int e = errno;
+ close(sd);
+ errno = e;
+ err(EXIT_FAILURE, "failed in connect(2)");
+ }
+ }
+
+ fdescs[0] = (struct fdesc) {
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL,
+ };
+
+ return NULL;
+}
+
+static void ping_init_addr(struct sockaddr *addr, unsigned short id)
+{
+ struct sockaddr_in *in = (struct sockaddr_in *)addr;
+ memset(in, 0, sizeof(*in));
+ in->sin_family = AF_INET;
+ in->sin_port = htons(id);
+ in->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+}
+
+static void *make_ping(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct sockaddr_in in;
+ return make_ping_common(factory, fdescs, argc, argv,
+ AF_INET, IPPROTO_ICMP,
+ ping_init_addr,
+ sizeof(in),
+ (struct sockaddr *)&in);
+}
+
+static void tcp6_init_addr(struct sockaddr *addr, unsigned short port)
+{
+ struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr;
+ memset(in6, 0, sizeof(*in6));
+ in6->sin6_family = AF_INET6;
+ in6->sin6_flowinfo = 0;
+ in6->sin6_port = htons(port);
+ in6->sin6_addr = in6addr_loopback;
+}
+
+static void *make_tcp6(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct sockaddr_in6 sin, cin;
+ return make_tcp_common(factory, fdescs, argc, argv,
+ AF_INET6,
+ tcp6_init_addr, sizeof(sin),
+ (struct sockaddr *)&sin, (struct sockaddr *)&cin);
+}
+
+static void *make_udp6(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct sockaddr_in6 sin, cin;
+ return make_udp_common(factory, fdescs, argc, argv,
+ AF_INET6,
+ tcp6_init_addr, sizeof(sin),
+ (struct sockaddr *)&sin, (struct sockaddr *)&cin);
+}
+
+static void raw6_init_addr(struct sockaddr *addr, bool remote_addr)
+{
+ struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr;
+ memset(in6, 0, sizeof(*in6));
+ in6->sin6_family = AF_INET6;
+ in6->sin6_flowinfo = 0;
+
+ if (remote_addr) {
+ /* ::ffff:127.0.0.1 */
+ in6->sin6_addr.s6_addr16[5] = 0xffff;
+ in6->sin6_addr.s6_addr32[3] = htonl(INADDR_LOOPBACK);
+ } else
+ in6->sin6_addr = in6addr_loopback;
+}
+
+static void *make_raw6(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct sockaddr_in6 sin;
+ return make_raw_common(factory, fdescs, argc, argv,
+ AF_INET6,
+ raw6_init_addr, sizeof(sin),
+ (struct sockaddr *)&sin);
+}
+
+static void ping6_init_addr(struct sockaddr *addr, unsigned short id)
+{
+ struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr;
+ memset(in6, 0, sizeof(*in6));
+ in6->sin6_family = AF_INET6;
+ in6->sin6_port = htons(id);
+ in6->sin6_addr = in6addr_loopback;
+}
+
+static void *make_ping6(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct sockaddr_in6 in6;
+ return make_ping_common(factory, fdescs, argc, argv,
+ AF_INET6, IPPROTO_ICMPV6,
+ ping6_init_addr,
+ sizeof(in6),
+ (struct sockaddr *)&in6);
+}
+
+static void *make_netns(const struct factory *factory _U_, struct fdesc fdescs[],
+ int argc _U_, char ** argv _U_)
+{
+ int sd = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (sd < 0)
+ err(EXIT_FAILURE, "failed in socket()");
+
+ int ns = ioctl(sd, SIOCGSKNS);
+ if (ns < 0)
+ err((errno == ENOSYS? EXIT_ENOSYS: EXIT_FAILURE),
+ "failed in ioctl(SIOCGSKNS)");
+ close(sd);
+
+ if (ns != fdescs[0].fd) {
+ if (dup2(ns, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(ns);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", ns, fdescs[0].fd);
+ }
+ close(ns);
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL
+ };
+
+ return NULL;
+}
+
+static void *make_netlink(const struct factory *factory, struct fdesc fdescs[],
+ int argc, char ** argv)
+{
+ struct arg protocol = decode_arg("protocol", factory->params, argc, argv);
+ int iprotocol = ARG_INTEGER(protocol);
+ struct arg groups = decode_arg("groups", factory->params, argc, argv);
+ unsigned int ugroups = ARG_UINTEGER(groups);
+ int sd;
+
+ free_arg(&protocol);
+
+ sd = socket(AF_NETLINK, SOCK_RAW, iprotocol);
+ if (sd < 0)
+ err((errno == EPROTONOSUPPORT)? EXIT_EPROTONOSUPPORT: EXIT_FAILURE,
+ "failed in socket()");
+
+ if (sd != fdescs[0].fd) {
+ if (dup2(sd, fdescs[0].fd) < 0) {
+ int e = errno;
+ close(sd);
+ errno = e;
+ err(EXIT_FAILURE, "failed to dup %d -> %d", sd, fdescs[0].fd);
+ }
+ close(sd);
+ }
+
+ struct sockaddr_nl nl;
+ memset(&nl, 0, sizeof(nl));
+ nl.nl_family = AF_NETLINK;
+ nl.nl_groups = ugroups;
+ if (bind(sd, (struct sockaddr*)&nl, sizeof(nl)) < 0) {
+ int e = errno;
+ close(sd);
+ errno = e;
+ err(EXIT_FAILURE, "failed in bind(2)");
+ }
+
+ fdescs[0] = (struct fdesc){
+ .fd = fdescs[0].fd,
+ .close = close_fdesc,
+ .data = NULL
+ };
+
+ return NULL;
+}
+
+#define PARAM_END { .name = NULL, }
+static const struct factory factories[] = {
+ {
+ .name = "ro-regular-file",
+ .desc = "read-only regular file",
+ .priv = false,
+ .N = 1,
+ .EX_N = 0,
+ .make = open_ro_regular_file,
+ .params = (struct parameter []) {
+ {
+ .name = "file",
+ .type = PTYPE_STRING,
+ .desc = "file to be opened",
+ .defv.string = "/etc/passwd",
+ },
+ {
+ .name = "offset",
+ .type = PTYPE_INTEGER,
+ .desc = "seek bytes after open with SEEK_CUR",
+ .defv.integer = 0,
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "pipe-no-fork",
+ .desc = "making pair of fds with pipe(2)",
+ .priv = false,
+ .N = 2,
+ .EX_N = 2,
+ .make = make_pipe,
+ .params = (struct parameter []) {
+ {
+ .name = "nonblock",
+ .type = PTYPE_STRING,
+ .desc = "set nonblock flag (\"--\", \"r-\", \"-w\", or \"rw\")",
+ .defv.string = "--",
+ },
+ {
+ .name = "rdup",
+ .type = PTYPE_INTEGER,
+ .desc = "file descriptor for duplicating the pipe input",
+ .defv.integer = -1,
+ },
+ {
+ .name = "wdup",
+ .type = PTYPE_INTEGER,
+ .desc = "file descriptor for duplicating the pipe output",
+ .defv.integer = -1,
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "directory",
+ .desc = "directory",
+ .priv = false,
+ .N = 1,
+ .EX_N = 0,
+ .make = open_directory,
+ .params = (struct parameter []) {
+ {
+ .name = "dir",
+ .type = PTYPE_STRING,
+ .desc = "directory to be opened",
+ .defv.string = "/",
+ },
+ {
+ .name = "dentries",
+ .type = PTYPE_INTEGER,
+ .desc = "read the number of dentries after open with readdir(3)",
+ .defv.integer = 0,
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "rw-character-device",
+ .desc = "character device with O_RDWR flag",
+ .priv = false,
+ .N = 1,
+ .EX_N = 0,
+ .make = open_rw_chrdev,
+ .params = (struct parameter []) {
+ {
+ .name = "chrdev",
+ .type = PTYPE_STRING,
+ .desc = "character device node to be opened",
+ .defv.string = "/dev/zero",
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "socketpair",
+ .desc = "AF_UNIX socket pair created with socketpair(2)",
+ .priv = false,
+ .N = 2,
+ .EX_N = 0,
+ .make = make_socketpair,
+ .params = (struct parameter []) {
+ {
+ .name = "socktype",
+ .type = PTYPE_STRING,
+ .desc = "STREAM, DGRAM, or SEQPACKET",
+ .defv.string = "STREAM",
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "symlink",
+ .desc = "symbolic link itself opened with O_PATH",
+ .priv = false,
+ .N = 1,
+ .EX_N = 0,
+ .make = open_with_opath,
+ .params = (struct parameter []) {
+ {
+ .name = "path",
+ .type = PTYPE_STRING,
+ .desc = "path to a symbolic link",
+ .defv.string = "/dev/stdin",
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "ro-block-device",
+ .desc = "block device with O_RDONLY flag",
+ .priv = true,
+ .N = 1,
+ .EX_N = 0,
+ .make = open_ro_blkdev,
+ .params = (struct parameter []) {
+ {
+ .name = "blkdev",
+ .type = PTYPE_STRING,
+ .desc = "block device node to be opened",
+ .defv.string = "/dev/nullb0",
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "mapped-packet-socket",
+ .desc = "mmap'ed AF_PACKET socket",
+ .priv = true,
+ .N = 1,
+ .EX_N = 0,
+ .make = make_mmapped_packet_socket,
+ .params = (struct parameter []) {
+ {
+ .name = "socktype",
+ .type = PTYPE_STRING,
+ .desc = "DGRAM or RAW",
+ .defv.string = "RAW",
+ },
+ {
+ .name = "interface",
+ .type = PTYPE_STRING,
+ .desc = "a name of network interface like eth0 or lo",
+ .defv.string = "lo",
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "pidfd",
+ .desc = "pidfd returned from pidfd_open(2)",
+ .priv = false,
+ .N = 1,
+ .EX_N = 0,
+ .make = make_pidfd,
+ .params = (struct parameter []) {
+ {
+ .name = "target-pid",
+ .type = PTYPE_INTEGER,
+ .desc = "the pid of the target process",
+ .defv.integer = 1,
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "inotify",
+ .desc = "inotify fd returned from inotify_init(2)",
+ .priv = false,
+ .N = 1,
+ .EX_N = 0,
+ .make = make_inotify_fd,
+ .params = (struct parameter []) {
+ PARAM_END
+ },
+ },
+ {
+ .name = "unix-stream",
+ .desc = "AF_UNIX+SOCK_STREAM sockets",
+ .priv = false,
+ .N = 3,
+ .EX_N = 0,
+ .make = make_unix_stream,
+ .params = (struct parameter []) {
+ {
+ .name = "path",
+ .type = PTYPE_STRING,
+ .desc = "path for listening-socket bound to",
+ .defv.string = "/tmp/test_mkfds-unix-stream",
+ },
+ {
+ .name = "backlog",
+ .type = PTYPE_INTEGER,
+ .desc = "backlog passed to listen(2)",
+ .defv.integer = 5,
+ },
+ {
+ .name = "abstract",
+ .type = PTYPE_BOOLEAN,
+ .desc = "use PATH as an abstract socket address",
+ .defv.boolean = false,
+ },
+ {
+ .name = "server-shutdown",
+ .type = PTYPE_INTEGER,
+ .desc = "shutdown the accepted socket; 1: R, 2: W, 3: RW",
+ .defv.integer = 0,
+ },
+ {
+ .name = "client-shutdown",
+ .type = PTYPE_INTEGER,
+ .desc = "shutdown the client socket; 1: R, 2: W, 3: RW",
+ .defv.integer = 0,
+ },
+ {
+ .name = "type",
+ .type = PTYPE_STRING,
+ .desc = "stream or seqpacket",
+ .defv.string = "stream",
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "unix-dgram",
+ .desc = "AF_UNIX+SOCK_DGRAM sockets",
+ .priv = false,
+ .N = 2,
+ .EX_N = 0,
+ .make = make_unix_dgram,
+ .params = (struct parameter []) {
+ {
+ .name = "path",
+ .type = PTYPE_STRING,
+ .desc = "path for unix non-stream bound to",
+ .defv.string = "/tmp/test_mkfds-unix-dgram",
+ },
+ {
+ .name = "abstract",
+ .type = PTYPE_BOOLEAN,
+ .desc = "use PATH as an abstract socket address",
+ .defv.boolean = false,
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "unix-in-netns",
+ .desc = "make a unix socket in a new network namespace",
+ .priv = true,
+ .N = 3,
+ .EX_N = 0,
+ .make = make_unix_in_new_netns,
+ .params = (struct parameter []) {
+ {
+ .name = "type",
+ .type = PTYPE_STRING,
+ .desc = "dgram, stream, or seqpacket",
+ .defv.string = "stream",
+ },
+ {
+ .name = "path",
+ .type = PTYPE_STRING,
+ .desc = "path for unix non-stream bound to",
+ .defv.string = "/tmp/test_mkfds-unix-in-netns",
+ },
+ {
+ .name = "abstract",
+ .type = PTYPE_BOOLEAN,
+ .desc = "use PATH as an abstract socket address",
+ .defv.boolean = false,
+ },
+ PARAM_END
+ },
+ },
+ {
+ .name = "tcp",
+ .desc = "AF_INET+SOCK_STREAM sockets",
+ .priv = false,
+ .N = 3,
+ .EX_N = 0,
+ .make = make_tcp,
+ .params = (struct parameter []) {
+ {
+ .name = "server-port",
+ .type = PTYPE_INTEGER,
+ .desc = "TCP port the server may listen",
+ .defv.integer = 12345,
+ },
+ {
+ .name = "client-port",
+ .type = PTYPE_INTEGER,
+ .desc = "TCP port the client may bind",
+ .defv.integer = 23456,
+ },
+ PARAM_END
+ }
+ },
+ {
+ .name = "udp",
+ .desc = "AF_INET+SOCK_DGRAM sockets",
+ .priv = false,
+ .N = 2,
+ .EX_N = 0,
+ .make = make_udp,
+ .params = (struct parameter []) {
+ {
+ .name = "lite",
+ .type = PTYPE_BOOLEAN,
+ .desc = "Use UDPLITE instead of UDP",
+ .defv.boolean = false,
+ },
+ {
+ .name = "server-port",
+ .type = PTYPE_INTEGER,
+ .desc = "UDP port the server may listen",
+ .defv.integer = 12345,
+ },
+ {
+ .name = "client-port",
+ .type = PTYPE_INTEGER,
+ .desc = "UDP port the client may bind",
+ .defv.integer = 23456,
+ },
+ {
+ .name = "server-do-bind",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call bind with the server socket",
+ .defv.boolean = true,
+ },
+ {
+ .name = "client-do-bind",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call bind with the client socket",
+ .defv.boolean = true,
+ },
+ {
+ .name = "client-do-connect",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call connect with the client socket",
+ .defv.boolean = true,
+ },
+ PARAM_END
+ }
+ },
+ {
+ .name = "raw",
+ .desc = "AF_INET+SOCK_RAW sockets",
+ .priv = true,
+ .N = 1,
+ .EX_N = 0,
+ .make = make_raw,
+ .params = (struct parameter []) {
+ {
+ .name = "protocol",
+ .type = PTYPE_INTEGER,
+ .desc = "protocol passed to socket(AF_INET, SOCK_RAW, protocol)",
+ .defv.integer = IPPROTO_IPIP,
+ },
+ PARAM_END
+ }
+
+ },
+ {
+ .name = "ping",
+ .desc = "AF_INET+SOCK_DGRAM+IPPROTO_ICMP sockets",
+ .priv = false,
+ .N = 1,
+ .EX_N = 0,
+ .make = make_ping,
+ .params = (struct parameter []) {
+ {
+ .name = "connect",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call connect(2) with the socket",
+ .defv.boolean = true,
+ },
+ {
+ .name = "bind",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call bind(2) with the socket",
+ .defv.boolean = true,
+ },
+ {
+ .name = "id",
+ .type = PTYPE_INTEGER,
+ .desc = "ICMP echo request id",
+ .defv.integer = 0,
+ },
+ PARAM_END
+ }
+ },
+ {
+ .name = "tcp6",
+ .desc = "AF_INET6+SOCK_STREAM sockets",
+ .priv = false,
+ .N = 3,
+ .EX_N = 0,
+ .make = make_tcp6,
+ .params = (struct parameter []) {
+ {
+ .name = "server-port",
+ .type = PTYPE_INTEGER,
+ .desc = "TCP port the server may listen",
+ .defv.integer = 12345,
+ },
+ {
+ .name = "client-port",
+ .type = PTYPE_INTEGER,
+ .desc = "TCP port the client may bind",
+ .defv.integer = 23456,
+ },
+ PARAM_END
+ }
+ },
+ {
+ .name = "udp6",
+ .desc = "AF_INET6+SOCK_DGRAM sockets",
+ .priv = false,
+ .N = 2,
+ .EX_N = 0,
+ .make = make_udp6,
+ .params = (struct parameter []) {
+ {
+ .name = "lite",
+ .type = PTYPE_BOOLEAN,
+ .desc = "Use UDPLITE instead of UDP",
+ .defv.boolean = false,
+ },
+ {
+ .name = "server-port",
+ .type = PTYPE_INTEGER,
+ .desc = "UDP port the server may listen",
+ .defv.integer = 12345,
+ },
+ {
+ .name = "client-port",
+ .type = PTYPE_INTEGER,
+ .desc = "UDP port the client may bind",
+ .defv.integer = 23456,
+ },
+ {
+ .name = "server-do-bind",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call bind with the server socket",
+ .defv.boolean = true,
+ },
+ {
+ .name = "client-do-bind",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call bind with the client socket",
+ .defv.boolean = true,
+ },
+ {
+ .name = "client-do-connect",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call connect with the client socket",
+ .defv.boolean = true,
+ },
+ PARAM_END
+ }
+ },
+ {
+ .name = "raw6",
+ .desc = "AF_INET6+SOCK_RAW sockets",
+ .priv = true,
+ .N = 1,
+ .EX_N = 0,
+ .make = make_raw6,
+ .params = (struct parameter []) {
+ {
+ .name = "protocol",
+ .type = PTYPE_INTEGER,
+ .desc = "protocol passed to socket(AF_INET6, SOCK_RAW, protocol)",
+ .defv.integer = IPPROTO_IPIP,
+ },
+ PARAM_END
+ }
+
+ },
+ {
+ .name = "ping6",
+ .desc = "AF_INET6+SOCK_DGRAM+IPPROTO_ICMPV6 sockets",
+ .priv = false,
+ .N = 1,
+ .EX_N = 0,
+ .make = make_ping6,
+ .params = (struct parameter []) {
+ {
+ .name = "connect",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call connect(2) with the socket",
+ .defv.boolean = true,
+ },
+ {
+ .name = "bind",
+ .type = PTYPE_BOOLEAN,
+ .desc = "call bind(2) with the socket",
+ .defv.boolean = true,
+ },
+ {
+ .name = "id",
+ .type = PTYPE_INTEGER,
+ .desc = "ICMP echo request id",
+ .defv.integer = 0,
+ },
+ PARAM_END
+ }
+ },
+ {
+ .name = "netns",
+ .desc = "open a file specifying a netns",
+ .priv = true,
+ .N = 1,
+ .EX_N = 0,
+ .make = make_netns,
+ .params = (struct parameter []) {
+ PARAM_END
+ }
+ },
+ {
+ .name = "netlink",
+ .desc = "AF_NETLINK sockets",
+ .priv = false,
+ .N = 1,
+ .EX_N = 0,
+ .make = make_netlink,
+ .params = (struct parameter []) {
+ {
+ .name = "protocol",
+ .type = PTYPE_INTEGER,
+ .desc = "protocol passed to socket(AF_NETLINK, SOCK_RAW, protocol)",
+ .defv.integer = NETLINK_USERSOCK,
+ },
+ {
+ .name = "groups",
+ .type = PTYPE_UINTEGER,
+ .desc = "multicast groups of netlink communication (requires CAP_NET_ADMIN)",
+ .defv.uinteger = 0,
+ },
+ PARAM_END
+ }
+ },
+};
+
+static int count_parameters(const struct factory *factory)
+{
+
+ const struct parameter *p = factory->params;
+ if (!p)
+ return 0;
+ while (p->name)
+ p++;
+ return p - factory->params;
+}
+
+static void print_factory(const struct factory *factory)
+{
+ printf("%-20s %4s %5d %6d %s\n",
+ factory->name,
+ factory->priv? "yes": "no",
+ factory->N,
+ count_parameters(factory),
+ factory->desc);
+}
+
+static void list_factories(void)
+{
+ printf("%-20s PRIV COUNT NPARAM DESCRIPTION\n", "FACTORY");
+ for (size_t i = 0; i < ARRAY_SIZE(factories); i++)
+ print_factory(factories + i);
+}
+
+static const struct factory *find_factory(const char *name)
+{
+ for (size_t i = 0; i < ARRAY_SIZE(factories); i++)
+ if (strcmp(factories[i].name, name) == 0)
+ return factories + i;
+ return NULL;
+}
+
+static void list_parameters(const char *factory_name)
+{
+ const struct factory *factory = find_factory(factory_name);
+ const char *fmt = "%-15s %-8s %15s %s\n";
+
+ if (!factory)
+ errx(EXIT_FAILURE, "no such factory: %s", factory_name);
+
+ if (!factory->params)
+ return;
+
+ printf(fmt, "PARAMETER", "TYPE", "DEFAULT_VALUE", "DESCRIPTION");
+ for (const struct parameter *p = factory->params; p->name != NULL; p++) {
+ char *defv = ptype_classes[p->type].sprint(&p->defv);
+ printf(fmt, p->name, ptype_classes[p->type].name, defv, p->desc);
+ free(defv);
+ }
+}
+
+static void rename_self(const char *comm)
+{
+ if (prctl(PR_SET_NAME, (unsigned long)comm, 0, 0, 0) < 0)
+ err(EXIT_FAILURE, "failed to rename self via prctl: %s", comm);
+}
+
+static void do_nothing(int signum _U_)
+{
+}
+
+#ifdef __NR_pidfd_open
+
+static int
+pidfd_open(pid_t pid, unsigned int flags)
+{
+ return syscall(__NR_pidfd_open, pid, flags);
+}
+#else
+static int
+pidfd_open(pid_t pid _U_, unsigned int flags _U_)
+{
+ errno = ENOSYS;
+ return -1;
+}
+#endif
+
+static void wait_event(void)
+{
+ fd_set readfds;
+ sigset_t sigset;
+ int n = 0;
+
+ FD_ZERO(&readfds);
+ /* Monitor the standard input only when the process
+ * is in foreground. */
+ if (tcgetpgrp(STDIN_FILENO) == getpgrp()) {
+ n = 1;
+ FD_SET(0, &readfds);
+ }
+
+ sigemptyset(&sigset);
+
+ if (pselect(n, &readfds, NULL, NULL, NULL, &sigset) < 0
+ && errno != EINTR)
+ errx(EXIT_FAILURE, "failed in pselect");
+}
+
+int main(int argc, char **argv)
+{
+ int c;
+ const struct factory *factory;
+ struct fdesc fdescs[MAX_N];
+ bool quiet = false;
+ bool cont = false;
+ void *data;
+
+ static const struct option longopts[] = {
+ { "list", no_argument, NULL, 'l' },
+ { "parameters", required_argument, NULL, 'I' },
+ { "comm", required_argument, NULL, 'r' },
+ { "quiet", no_argument, NULL, 'q' },
+ { "dont-puase", no_argument, NULL, 'c' },
+ { "help", no_argument, NULL, 'h' },
+ { NULL, 0, NULL, 0 },
+ };
+
+ while ((c = getopt_long(argc, argv, "lhqcI:r:", longopts, NULL)) != -1) {
+ switch (c) {
+ case 'h':
+ usage(stdout, EXIT_SUCCESS);
+ case 'l':
+ list_factories();
+ exit(EXIT_SUCCESS);
+ case 'I':
+ list_parameters(optarg);
+ exit(EXIT_SUCCESS);
+ case 'q':
+ quiet = true;
+ break;
+ case 'c':
+ cont = true;
+ break;
+ case 'r':
+ rename_self(optarg);
+ break;
+ default:
+ usage(stderr, EXIT_FAILURE);
+ }
+ }
+
+ if (optind == argc)
+ errx(EXIT_FAILURE, "no file descriptor specification given");
+
+ factory = find_factory(argv[optind]);
+ if (!factory)
+ errx(EXIT_FAILURE, "no such factory: %s", argv[optind]);
+ assert(factory->N + factory->EX_N < MAX_N);
+ optind++;
+
+ if ((optind + factory->N) > argc)
+ errx(EXIT_FAILURE, "not enough file descriptors given for %s",
+ factory->name);
+
+ if (factory->priv && getuid() != 0)
+ errx(EXIT_FAILURE, "%s factory requires root privilege", factory->name);
+
+ for (int i = 0; i < MAX_N; i++) {
+ fdescs[i].fd = -1;
+ fdescs[i].close = NULL;
+ }
+
+ for (int i = 0; i < factory->N; i++) {
+ char *str = argv[optind + i];
+ long fd;
+ char *ep;
+
+ errno = 0;
+ fd = strtol(str, &ep, 10);
+ if (errno)
+ err(EXIT_FAILURE, "failed to convert fd number: %s", str);
+ if (ep == str)
+ errx(EXIT_FAILURE, "failed to convert fd number: %s", str);
+ if (*ep != '\0')
+ errx(EXIT_FAILURE, "garbage at the end of number: %s", str);
+ if (fd < 0)
+ errx(EXIT_FAILURE, "fd number should not be negative: %s", str);
+ if (fd < 3)
+ errx(EXIT_FAILURE, "fd 0, 1, 2 are reserved: %s", str);
+ fdescs[i].fd = fd;
+ }
+ optind += factory->N;
+
+ data = factory->make(factory, fdescs, argc - optind, argv + optind);
+
+ signal(SIGCONT, do_nothing);
+
+ if (!quiet) {
+ printf("%d", getpid());
+ putchar('\n');
+ if (factory->report)
+ factory->report(factory, data, stdout);
+ fflush(stdout);
+ }
+
+ if (!cont)
+ wait_event();
+
+ for (int i = 0; i < factory->N + factory->EX_N; i++)
+ if (fdescs[i].fd >= 0 && fdescs[i].close)
+ fdescs[i].close(fdescs[i].fd, fdescs[i].data);
+
+ if (factory->free)
+ factory->free (factory, data);
+
+ exit(EXIT_SUCCESS);
+}
diff --git a/tests/helpers/test_pathnames.c b/tests/helpers/test_pathnames.c
new file mode 100644
index 0000000..2368641
--- /dev/null
+++ b/tests/helpers/test_pathnames.c
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2007 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.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "pathnames.h"
+
+struct hlpPath
+{
+ const char *name;
+ const char *path;
+};
+
+#define DEF_HLPPATH(_p) { #_p, _p }
+
+static struct hlpPath paths[] =
+{
+ DEF_HLPPATH(_PATH_DEFPATH),
+ DEF_HLPPATH(_PATH_DEFPATH_ROOT),
+ DEF_HLPPATH(_PATH_DEV_LOOP),
+ DEF_HLPPATH(_PATH_HUSHLOGIN),
+ DEF_HLPPATH(_PATH_MAILDIR),
+ DEF_HLPPATH(_PATH_MOTDFILE),
+ DEF_HLPPATH(_PATH_NOLOGIN),
+ DEF_HLPPATH(_PATH_LOGIN),
+ DEF_HLPPATH(_PATH_PASSWD),
+ DEF_HLPPATH(_PATH_GSHADOW),
+ DEF_HLPPATH(_PATH_GROUP),
+ DEF_HLPPATH(_PATH_SHADOW_PASSWD),
+ DEF_HLPPATH(_PATH_WORDS),
+ DEF_HLPPATH(_PATH_WORDS_ALT),
+ DEF_HLPPATH(_PATH_FILESYSTEMS),
+ DEF_HLPPATH(_PATH_PROC_SWAPS),
+ DEF_HLPPATH(_PATH_PROC_FILESYSTEMS),
+ DEF_HLPPATH(_PATH_MOUNTED),
+ DEF_HLPPATH(_PATH_MNTTAB),
+ DEF_HLPPATH(_PATH_DEV_BYLABEL),
+ DEF_HLPPATH(_PATH_DEV_BYUUID),
+ { NULL, NULL }
+};
+
+int
+main(int argc, char **argv)
+{
+ struct hlpPath *p;
+
+ if (argc == 1) {
+ for (p = paths; p->name; p++)
+ printf("%20s %s\n", p->name, p->path);
+ exit(EXIT_SUCCESS);
+ } else {
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0) {
+ printf("%s <option>\n", argv[0]);
+ fputs("options:\n", stdout);
+ for (p = paths; p->name; p++)
+ printf("\t%s\n", p->name);
+ exit(EXIT_SUCCESS);
+ }
+
+ for (p = paths; p->name; p++) {
+ if (strcmp(p->name, argv[1]) == 0) {
+ printf("%s\n", p->path);
+ exit(EXIT_SUCCESS);
+ }
+ }
+ }
+
+ exit(EXIT_FAILURE);
+}
+
diff --git a/tests/helpers/test_sha1.c b/tests/helpers/test_sha1.c
new file mode 100644
index 0000000..7cb107f
--- /dev/null
+++ b/tests/helpers/test_sha1.c
@@ -0,0 +1,37 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * Copyright (C) 2017 Philip Prindeville <philipp@redfish-solutions.com>
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <err.h>
+#include <stdlib.h>
+
+#include "sha1.h"
+
+int main(void)
+{
+ int i, ret;
+ UL_SHA1_CTX ctx;
+ unsigned char digest[UL_SHA1LENGTH];
+ unsigned char buf[BUFSIZ];
+
+ ul_SHA1Init( &ctx );
+
+ while(!feof(stdin) && !ferror(stdin)) {
+ ret = fread(buf, 1, sizeof(buf), stdin);
+ if (ret)
+ ul_SHA1Update( &ctx, buf, ret );
+ }
+
+ if(freopen ("/dev/null", "r", stdin) == NULL)
+ err(EXIT_FAILURE, "stdin->null failed!");
+
+ ul_SHA1Final( digest, &ctx );
+
+ for (i = 0; i < UL_SHA1LENGTH; i++)
+ printf( "%02x", digest[i] );
+ printf("\n");
+ return 0;
+}
diff --git a/tests/helpers/test_sigreceive.c b/tests/helpers/test_sigreceive.c
new file mode 100644
index 0000000..8f83e05
--- /dev/null
+++ b/tests/helpers/test_sigreceive.c
@@ -0,0 +1,170 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * test_sigreceive - wait for signal and exit with value of it
+ *
+ * Written by Sami Kerola <kerolasa@iki.fi>
+ */
+
+#include <err.h>
+#include <getopt.h>
+#include <pwd.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/select.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "strutils.h"
+
+#define TEST_SIGRECEIVE_FAILURE 0
+
+static void __attribute__((__noreturn__)) usage(FILE *out)
+{
+ fputs("Usage: test_sigreceive [-s|--setuid <login|uid>]\n", out);
+ exit(TEST_SIGRECEIVE_FAILURE);
+}
+
+static __attribute__((__noreturn__))
+void exiter(int signo __attribute__((__unused__)),
+ siginfo_t *info,
+ void *context __attribute__((__unused__)))
+{
+ int ret = info->si_signo;
+
+ if (info->si_code == SI_QUEUE && info->si_value.sival_int != 0)
+ ret = info->si_value.sival_int;
+ _exit(ret);
+}
+
+int main(int argc, char **argv)
+{
+ struct sigaction sigact;
+ fd_set rfds;
+ struct timeval timeout;
+ char *user = NULL;
+ int c;
+
+ static const struct option longopts[] = {
+ {"setuid", required_argument, NULL, 's'},
+ {NULL, 0, NULL, 0}
+ };
+
+ while ((c = getopt_long(argc, argv, "s:h", longopts, NULL)) != -1)
+ switch (c) {
+ case 's':
+ user = optarg;
+ break;
+ case 'h':
+ usage(stdout);
+ default:
+ usage(stderr);
+ }
+
+ if (user) {
+ struct passwd *pw;
+ uid_t uid;
+
+ pw = getpwnam(user);
+ if (pw)
+ uid = pw->pw_uid;
+ else
+ uid = strtou32_or_err(user, "failed to parse uid");
+ if (setuid(uid) < 0)
+ err(TEST_SIGRECEIVE_FAILURE, "setuid failed");
+ }
+
+ sigemptyset(&sigact.sa_mask);
+ sigact.sa_flags = SA_SIGINFO;
+ sigact.sa_sigaction = exiter;
+ timeout.tv_sec = 5;
+ timeout.tv_usec = 0;
+
+ sigaction(SIGINT, &sigact, NULL);
+ sigaction(SIGQUIT, &sigact, NULL);
+ sigaction(SIGILL, &sigact, NULL);
+#ifdef SIGTRAP
+ sigaction(SIGTRAP, &sigact, NULL);
+#endif
+ sigaction(SIGABRT, &sigact, NULL);
+#ifdef SIGIOT
+ sigaction(SIGIOT, &sigact, NULL);
+#endif
+#ifdef SIGEMT
+ sigaction(SIGEMT, &sigact, NULL);
+#endif
+#ifdef SIGBUS
+ sigaction(SIGBUS, &sigact, NULL);
+#endif
+ sigaction(SIGFPE, &sigact, NULL);
+ sigaction(SIGUSR1, &sigact, NULL);
+ sigaction(SIGSEGV, &sigact, NULL);
+ sigaction(SIGUSR2, &sigact, NULL);
+ sigaction(SIGPIPE, &sigact, NULL);
+ sigaction(SIGALRM, &sigact, NULL);
+ sigaction(SIGTERM, &sigact, NULL);
+#ifdef SIGSTKFLT
+ sigaction(SIGSTKFLT, &sigact, NULL);
+#endif
+ sigaction(SIGCHLD, &sigact, NULL);
+#ifdef SIGCLD
+ sigaction(SIGCLD, &sigact, NULL);
+#endif
+ sigaction(SIGCONT, &sigact, NULL);
+ sigaction(SIGTSTP, &sigact, NULL);
+ sigaction(SIGTTIN, &sigact, NULL);
+ sigaction(SIGTTOU, &sigact, NULL);
+#ifdef SIGURG
+ sigaction(SIGURG, &sigact, NULL);
+#endif
+#ifdef SIGXCPU
+ sigaction(SIGXCPU, &sigact, NULL);
+#endif
+#ifdef SIGXFSZ
+ sigaction(SIGXFSZ, &sigact, NULL);
+#endif
+#ifdef SIGVTALRM
+ sigaction(SIGVTALRM, &sigact, NULL);
+#endif
+#ifdef SIGPROF
+ sigaction(SIGPROF, &sigact, NULL);
+#endif
+#ifdef SIGWINCH
+ sigaction(SIGWINCH, &sigact, NULL);
+#endif
+#ifdef SIGIO
+ sigaction(SIGIO, &sigact, NULL);
+#endif
+#ifdef SIGPOLL
+ sigaction(SIGPOLL, &sigact, NULL);
+#endif
+#ifdef SIGINFO
+ sigaction(SIGINFO, &sigact, NULL);
+#endif
+#ifdef SIGLOST
+ sigaction(SIGLOST, &sigact, NULL);
+#endif
+#ifdef SIGPWR
+ sigaction(SIGPWR, &sigact, NULL);
+#endif
+#ifdef SIGUNUSED
+ sigaction(SIGUNUSED, &sigact, NULL);
+#endif
+#ifdef SIGSYS
+ sigaction(SIGSYS, &sigact, NULL);
+#endif
+#ifdef SIGRTMIN
+ sigaction(SIGRTMIN, &sigact, NULL);
+ sigaction(SIGRTMAX, &sigact, NULL);
+#endif
+ /* Keep SIGHUP last, the bit it flips tells to check script the
+ * helper is ready to be killed. */
+ sigaction(SIGHUP, &sigact, NULL);
+
+ FD_ZERO(&rfds);
+ FD_SET(STDIN_FILENO, &rfds);
+ select(0, &rfds, NULL, NULL, &timeout);
+
+ exit(TEST_SIGRECEIVE_FAILURE);
+}
diff --git a/tests/helpers/test_strerror.c b/tests/helpers/test_strerror.c
new file mode 100644
index 0000000..a574c6e
--- /dev/null
+++ b/tests/helpers/test_strerror.c
@@ -0,0 +1,44 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This test program prints errno messages to allow for portable
+ * verification of error messages.
+ *
+ * Copyright (C) 2019 Patrick Steinhardt <ps@pks.im
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define E(x) { #x, x }
+static struct {
+ const char *str;
+ int error;
+} errors[] = {
+ E(ENOENT),
+ E(ENOTTY),
+ E(EILSEQ),
+ E(EINVAL),
+};
+
+int main(int argc, const char *argv[])
+{
+ size_t i;
+
+ if (argc != 2) {
+ fprintf(stderr, "USAGE: %s <errno>\n", argv[0]);
+ return -1;
+ }
+
+ for (i = 0; i < sizeof(errors)/sizeof(*errors); i++) {
+ if (strcmp(errors[i].str, argv[1]) != 0)
+ continue;
+ puts(strerror(errors[i].error));
+ return 0;
+ }
+
+ fprintf(stderr, "Invalid errno: %s\n", argv[1]);
+ return -1;
+}
diff --git a/tests/helpers/test_sysinfo.c b/tests/helpers/test_sysinfo.c
new file mode 100644
index 0000000..81fbdd7
--- /dev/null
+++ b/tests/helpers/test_sysinfo.c
@@ -0,0 +1,176 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * Copyright (C) 2007 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.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <limits.h>
+#include <stdint.h>
+#include <inttypes.h>
+#include <wchar.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <sys/mount.h>
+
+#include "mount-api-utils.h"
+
+typedef struct {
+ const char *name;
+ int (*fnc)(void);
+} mntHlpfnc;
+
+static int hlp_wordsize(void)
+{
+ printf("%zu\n", CHAR_BIT * sizeof(void*));
+ return 0;
+}
+
+static int hlp_endianness(void)
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ printf("LE\n");
+#else
+ printf("BE\n");
+#endif
+ return 0;
+}
+
+
+static int hlp_pagesize(void)
+{
+ printf("%d\n", getpagesize());
+ return 0;
+}
+
+static int hlp_int_max(void)
+{
+ printf("%d\n", INT_MAX);
+ return 0;
+}
+
+static int hlp_uint_max(void)
+{
+ printf("%u\n", UINT_MAX);
+ return 0;
+}
+
+static int hlp_long_max(void)
+{
+ printf("%ld\n", LONG_MAX);
+ return 0;
+}
+
+static int hlp_ulong_max(void)
+{
+ printf("%lu\n", ULONG_MAX);
+ return 0;
+}
+
+static int hlp_u64_max(void)
+{
+ printf("%" PRIu64 "\n", UINT64_MAX);
+ return 0;
+}
+
+static int hlp_ulong_max32(void)
+{
+#if __WORDSIZE == 64
+ printf("%lu\n", ULONG_MAX >> 32);
+#else
+ printf("%lu\n", ULONG_MAX);
+#endif
+ return 0;
+}
+
+static int hlp_wcsspn_ok(void)
+{
+ printf("%d\n", wcsspn(L"FOO", L"F") == 1);
+ return 0;
+}
+
+static int hlp_enotty_ok(void)
+{
+ errno = 0;
+ ioctl(STDOUT_FILENO, 0);
+
+ printf("%d\n", errno != ENOSYS);
+ return 0;
+}
+
+static int hlp_fsopen_ok(void)
+{
+#ifdef FSOPEN_CLOEXEC
+ errno = 0;
+ fsopen(NULL, FSOPEN_CLOEXEC);
+#else
+ errno = ENOSYS;
+#endif
+ printf("%d\n", errno != ENOSYS);
+ return 0;
+}
+
+static mntHlpfnc hlps[] =
+{
+ { "WORDSIZE", hlp_wordsize },
+ { "pagesize", hlp_pagesize },
+ { "INT_MAX", hlp_int_max },
+ { "UINT_MAX", hlp_uint_max },
+ { "LONG_MAX", hlp_long_max },
+ { "ULONG_MAX", hlp_ulong_max },
+ { "ULONG_MAX32",hlp_ulong_max32 },
+ { "UINT64_MAX", hlp_u64_max },
+ { "byte-order", hlp_endianness },
+ { "wcsspn-ok", hlp_wcsspn_ok },
+ { "enotty-ok", hlp_enotty_ok },
+ { "fsopen-ok", hlp_fsopen_ok },
+ { NULL, NULL }
+};
+
+int main(int argc, char **argv)
+{
+ int re = 0;
+ mntHlpfnc *fn;
+
+ if (argc == 1) {
+ for (fn = hlps; fn->name; fn++) {
+ printf("%15s: ", fn->name);
+ re += fn->fnc();
+ }
+ } else {
+ int i;
+
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0) {
+ printf("%s <option>\n", argv[0]);
+ fputs("options:\n", stdout);
+ for (fn = hlps; fn->name; fn++)
+ printf("\t%s\n", fn->name);
+ exit(EXIT_SUCCESS);
+ }
+
+ for (i=1; i < argc; i++) {
+ for (fn = hlps; fn->name; fn++) {
+ if (strcmp(fn->name, argv[i]) == 0)
+ re += fn->fnc();
+ }
+ }
+ }
+
+ exit(re ? EXIT_FAILURE : EXIT_SUCCESS);
+}
+
diff --git a/tests/helpers/test_tiocsti.c b/tests/helpers/test_tiocsti.c
new file mode 100644
index 0000000..c92645a
--- /dev/null
+++ b/tests/helpers/test_tiocsti.c
@@ -0,0 +1,21 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * test_tiocsti - test security of TIOCSTI
+ *
+ * Written by Federico Bento <up201407890@alunos.dcc.fc.up.pt>
+ */
+
+#include <stdlib.h>
+#include <sys/ioctl.h>
+
+int main(void)
+{
+ int rc = 0;
+ char *cmd = "id -u -n\n";
+
+ while(*cmd)
+ rc += ioctl(0, TIOCSTI, cmd++);
+
+ exit(rc ? EXIT_FAILURE : EXIT_SUCCESS);
+}
diff --git a/tests/helpers/test_uuid_namespace.c b/tests/helpers/test_uuid_namespace.c
new file mode 100644
index 0000000..3ee6aca
--- /dev/null
+++ b/tests/helpers/test_uuid_namespace.c
@@ -0,0 +1,42 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * Copyright (C) 2017 Philip Prindeville <philipp@redfish-solutions.com>
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../libuuid/src/uuid.h"
+
+static void get_template(const char *ns)
+{
+ const uuid_t *uuidptr;
+ char buf[UUID_STR_LEN];
+
+ uuidptr = uuid_get_template(ns);
+ if (uuidptr == NULL)
+ strcpy(buf, "NULL");
+ else
+ uuid_unparse_lower(*uuidptr, buf);
+
+ printf("uuid_get_template %s returns %s\n", (ns ? ns : "NULL"), buf);
+}
+
+int main(void)
+{
+ get_template("dns");
+
+ get_template("url");
+
+ get_template("oid");
+
+ get_template("x500");
+
+ get_template(NULL);
+ get_template("");
+ get_template("unknown");
+
+ exit(0);
+}
+
diff --git a/tests/run.sh b/tests/run.sh
new file mode 100755
index 0000000..214e2fc
--- /dev/null
+++ b/tests/run.sh
@@ -0,0 +1,282 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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=$(cd ${0%/*} && pwd)
+SUBTESTS=
+EXCLUDETESTS=
+OPTS=
+SYSCOMMANDS=
+
+top_srcdir=
+top_builddir=
+paraller_jobs=1
+has_asan_opt=
+has_ubsan_opt=
+
+function num_cpus()
+{
+ local num
+
+ # coreutils
+ if num=$(nproc 2>/dev/null); then
+ :
+ # BSD, OSX
+ elif num=$(sysctl -n hw.ncpu 2>/dev/null); then
+ :
+ else
+ num=$(grep -c "^processor" /proc/cpuinfo 2>/dev/null)
+ fi
+
+ # translate garbage output to "1"
+ if test "$num" -gt "0" 2>/dev/null ;then
+ echo "$num"
+ else
+ echo 1
+ fi
+}
+
+function find_test_scripts()
+{
+ local searchdir="$1"
+ find "$searchdir" -type f -regex ".*/[^\.~]*" \
+ \( -perm -u=x -o -perm -g=x -o -perm -o=x \)
+}
+
+while [ -n "$1" ]; do
+ case "$1" in
+ --force |\
+ --fake |\
+ --memcheck-valgrind |\
+ --nolocks |\
+ --show-diff |\
+ --verbose |\
+ --skip-loopdevs |\
+ --noskip-commands |\
+ --parsable)
+ # these options are simply forwarded to the test scripts
+ OPTS="$OPTS $1"
+ ;;
+ --memcheck-asan)
+ OPTS="$OPTS $1"
+ has_asan_opt="yes"
+ ;;
+ --memcheck-ubsan)
+ OPTS="$OPTS $1"
+ has_ubsan_opt="yes"
+ ;;
+ --use-system-commands)
+ OPTS="$OPTS $1"
+ SYSCOMMANDS="yes"
+ ;;
+
+ --nonroot)
+ if [ $(id -ru) -eq 0 ]; then
+ echo "Ignore util-linux test suite [non-root UID expected]."
+ exit 0
+ fi
+ ;;
+ --srcdir=*)
+ top_srcdir="${1##--srcdir=}"
+ ;;
+ --builddir=*)
+ top_builddir="${1##--builddir=}"
+ ;;
+ --parallel=*)
+ paraller_jobs="${1##--parallel=}"
+ if ! [ "$paraller_jobs" -ge 0 ] 2>/dev/null; then
+ echo "invalid argument '$paraller_jobs' for --parallel="
+ exit 1
+ fi
+ ;;
+ --parallel)
+ paraller_jobs=$(num_cpus)
+ ;;
+ --parsable)
+ OPTS="$OPTS $1"
+ ;;
+ --exclude=*)
+ EXCLUDETESTS="${1##--exclude=}"
+ ;;
+ --*)
+ echo "Unknown option $1"
+ echo "Usage: "
+ echo " $(basename $0) [options] [<component> ...]"
+ echo "Options:"
+ echo " --force execute demanding tests"
+ echo " --fake do not run, setup tests only"
+ echo " --memcheck-valgrind run with valgrind"
+ echo " --memcheck-asan enable ASAN (requires ./configure --enable-asan)"
+ echo " --nolocks don't use flock to lock resources"
+ echo " --verbose verbose mode"
+ echo " --show-diff show diff from failed tests"
+ echo " --nonroot ignore test suite if user is root"
+ echo " --use-system-commands use PATH rather than builddir"
+ echo " --noskip-commands fail on missing commands"
+ echo " --srcdir=<path> autotools top source directory"
+ echo " --builddir=<path> autotools top build directory"
+ echo " --parallel=<num> number of parallel test jobs, default: num cpus"
+ echo " --parsable use parsable output (default on --parallel)"
+ echo " --exclude=<list> exclude tests by list '<utilname>/<testname> ..'"
+ echo
+ exit 1
+ ;;
+
+ *)
+ SUBTESTS="$SUBTESTS $1"
+ ;;
+ esac
+ shift
+done
+
+# For compatibility with autotools is necessary to differentiate between source
+# (with test scripts) and build (with temporary files) directories when
+# executed by our build-system.
+#
+# The default is the source tree with this script.
+#
+if [ -z "$top_srcdir" ]; then
+ top_srcdir="$TS_TOPDIR/.."
+fi
+if [ -z "$top_builddir" ]; then
+ top_builddir="$TS_TOPDIR/.."
+ if [ -e "$top_builddir/build/meson.conf" ]; then
+ top_builddir="$TS_TOPDIR/../build"
+ elif [ -e "$PWD/meson.conf" ]; then
+ top_builddir="$PWD"
+ fi
+fi
+
+OPTS="$OPTS --srcdir=$top_srcdir --builddir=$top_builddir"
+
+# Auto-enable ASAN to avoid conflicts between tests and binaries
+if [ -z "$has_asan_opt" ]; then
+ if [ -e "$top_builddir/Makefile" ]; then
+ asan=$(awk '/^ASAN_LDFLAGS/ { print $3 }' $top_builddir/Makefile)
+ elif [ -f "$top_builddir/meson.conf" ]; then
+ . "$top_builddir/meson.conf"
+ fi
+ if [ -n "$asan" ]; then
+ OPTS="$OPTS --memcheck-asan"
+ fi
+fi
+
+if [ -z "$has_ubsan_opt" ]; then
+ if [ -e "$top_builddir/Makefile" ]; then
+ ubsan=$(awk '/^UBSAN_LDFLAGS/ { print $3 }' $top_builddir/Makefile)
+ fi
+ if [ -n "$ubsan" ]; then
+ OPTS="$OPTS --memcheck-ubsan"
+ fi
+fi
+
+declare -a comps
+if [ -n "$SUBTESTS" ]; then
+ # selected tests only
+ for s in $SUBTESTS; do
+ if [ -e "$top_srcdir/tests/ts/$s" ]; then
+ comps+=( $(find_test_scripts "$top_srcdir/tests/ts/$s") ) || exit 1
+ else
+ echo "Unknown test component '$s'"
+ exit 1
+ fi
+ done
+else
+ if [ -z "$SYSCOMMANDS" -a ! -f "$top_builddir/test_ttyutils" ]; then
+ echo "Tests not compiled! Run 'make check-programs' to fix the problem."
+ exit 1
+ fi
+
+ comps=( $(find_test_scripts "$top_srcdir/tests/ts") ) || exit 1
+fi
+
+if [ -n "$EXCLUDETESTS" ]; then
+ declare -a xcomps # temporary array
+ for ts in ${comps[@]}; do
+ tsname=${ts##*ts/} # test name
+
+ if [[ "$EXCLUDETESTS" == *${tsname}* ]]; then
+ #echo "Ignore ${tsname}."
+ true
+ else
+ xcomps+=($ts)
+ fi
+ done
+ comps=("${xcomps[@]}") # replace the array
+fi
+
+unset LIBMOUNT_DEBUG
+unset LIBBLKID_DEBUG
+unset LIBFDISK_DEBUG
+unset LIBSMARTCOLS_DEBUG
+
+echo
+echo "-------------------- util-linux regression tests --------------------"
+echo
+echo " For development purpose only. "
+echo " Don't execute on production system! "
+echo
+
+# TODO: add more information about system
+printf "%13s: %-30s " "kernel" "$(uname -r)"
+echo
+echo
+echo " options: $(echo $OPTS | sed 's/ / \\\n /g')"
+echo
+
+if [ "$paraller_jobs" -ne 1 ]; then
+ tmp=$paraller_jobs
+ [ "$paraller_jobs" -eq 0 ] && tmp=infinite
+ echo " Executing the tests in parallel ($tmp jobs) "
+ echo
+ OPTS="$OPTS --parallel"
+fi
+
+count=0
+mkdir -p $top_builddir/tests/
+>| $top_builddir/tests/failures
+printf "%s\n" ${comps[*]} |
+ sort |
+ xargs -I '{}' -P $paraller_jobs -n 1 bash -c "'{}' \"$OPTS\" ||
+ echo '{}' >> $top_builddir/tests/failures"
+if [ $? != 0 ]; then
+ echo "xargs error" >&2
+ exit 1
+fi
+
+declare -a fail_file
+fail_file=( $( < $top_builddir/tests/failures ) ) || exit 1
+echo
+echo "---------------------------------------------------------------------"
+if [ ${#fail_file[@]} -eq 0 ]; then
+ echo " All ${#comps[@]} tests PASSED"
+ res=0
+else
+ echo " ${#fail_file[@]} tests of ${#comps[@]} FAILED"
+
+ echo
+ for ts in ${fail_file[@]}; do
+ NAME=$(basename $ts)
+ COMPONENT=$(basename $(dirname $ts))
+ echo " $COMPONENT/$NAME"
+ done
+ res=1
+fi
+echo "---------------------------------------------------------------------"
+
+rm -f $top_builddir/tests/failures
+exit $res
diff --git a/tests/ts/bitops/swapbytes b/tests/ts/bitops/swapbytes
new file mode 100755
index 0000000..1272617
--- /dev/null
+++ b/tests/ts/bitops/swapbytes
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="swap bytes"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_BYTESWAP"
+
+$TS_HELPER_BYTESWAP >> $TS_OUTPUT
+
+ts_finalize
+
diff --git a/tests/ts/blkdiscard/offsets b/tests/ts/blkdiscard/offsets
new file mode 100755
index 0000000..21bb78a
--- /dev/null
+++ b/tests/ts/blkdiscard/offsets
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2014 Federico Simoncelli <fsimonce@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="${0%/*}/../.."
+TS_DESC="offsets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_BLKDISCARD"
+
+ts_skip_nonroot
+ts_check_losetup
+
+ORIGPWD=$(pwd)
+IMAGE_NAME="${TS_TESTNAME}-loop.img"
+IMAGE_PATH="$TS_OUTDIR/$IMAGE_NAME"
+
+truncate -s 10M $IMAGE_PATH
+
+ts_log "create loop device from image"
+DEVICE=$($TS_CMD_LOSETUP --show -f $IMAGE_PATH)
+ts_register_loop_device "$DEVICE"
+
+function run_tscmd {
+ local ret
+ "$@" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ret=$?
+ echo "ret: $ret" >> "$TS_OUTPUT"
+ return $ret
+}
+
+ts_log "testing offsets with full block size"
+run_tscmd $TS_CMD_BLKDISCARD -v $DEVICE
+if [ "$?" != "0" ]; then
+ # Skip the rest? For example loop backing files on NFS seem unsupported.
+ grep -q "BLKDISCARD ioctl failed: Operation not supported" "$TS_ERRLOG" \
+ && ts_skip "BLKDISCARD not supported"
+fi
+run_tscmd $TS_CMD_BLKDISCARD -v -o 1 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -o 511 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -o 512 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -o 1024 $DEVICE
+
+ts_log "testing offsets with specific length"
+run_tscmd $TS_CMD_BLKDISCARD -v -l 5242880 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -l 5242881 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -l 5243391 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -o 1 -l 5242880 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -o 511 -l 5242880 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -o 512 -l 5242880 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -o 1024 -l 5242880 $DEVICE
+
+ts_log "testing aligned steps full device"
+run_tscmd $TS_CMD_BLKDISCARD -v -p 5242880 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 1310720 $DEVICE
+
+ts_log "testing aligned steps with offsets and length"
+run_tscmd $TS_CMD_BLKDISCARD -v -p 512 -l 1024 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 512 -o 1 -l 1024 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 512 -o 1 -l 1536 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 512 -o 511 -l 1536 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 512 -o 512 -l 1536 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 512 -o 1024 -l 1024 $DEVICE
+
+ts_log "testing misaligned steps full device"
+run_tscmd $TS_CMD_BLKDISCARD -v -p 1 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 256 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 511 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 513 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 768 $DEVICE
+
+ts_log "testing misaligned steps with offsets and length"
+run_tscmd $TS_CMD_BLKDISCARD -v -p 511 -l 1024 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 511 -o 1 -l 1536 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 511 -o 511 -l 1536 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 511 -l 10240 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 511 -o 1 -l 10240 $DEVICE
+run_tscmd $TS_CMD_BLKDISCARD -v -p 511 -o 511 -l 10240 $DEVICE
+
+sed -i "s#$DEVICE:\s##" $TS_OUTPUT $TS_ERRLOG
+
+ts_log "detach loop device from image"
+
+ts_cd "$ORIGPWD"
+
+ts_finalize
diff --git a/tests/ts/blkid/cache b/tests/ts/blkid/cache
new file mode 100755
index 0000000..7c35805
--- /dev/null
+++ b/tests/ts/blkid/cache
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2009 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="${0%/*}/../.."
+TS_DESC="caching"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_skip_nonroot
+ts_check_test_command "$TS_CMD_BLKID"
+ts_check_test_command "$TS_CMD_MKSWAP"
+ts_check_losetup
+
+ts_device_init
+
+"$TS_CMD_MKSWAP" -q -p 4096 -e little \
+ -U 11111111-1111-1111-1111-111111111111 \
+ "$TS_LODEV" \
+ >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
+
+blkid "$TS_LODEV" \
+ | sed -e "s|$TS_LODEV|DEVICE|" \
+ >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
+
+cat "$BLKID_FILE" \
+ | sed -e 's/DEVNO="[^"]*"/DEVNO=""/' \
+ -e 's/TIME="[^"]*"/TIME=""/' \
+ -e "s|$TS_LODEV|DEVICE|" \
+ >> "$TS_OUTPUT"
+
+ts_finalize
diff --git a/tests/ts/blkid/dm-err b/tests/ts/blkid/dm-err
new file mode 100755
index 0000000..a23b2e0
--- /dev/null
+++ b/tests/ts/blkid/dm-err
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2016 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="${0%/*}/../.."
+TS_DESC="DM error"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_BLKID"
+
+ts_skip_nonroot
+ts_check_prog "dmsetup"
+
+DEVNAME="blkid-dm-err"
+DEVICE="/dev/mapper/${DEVNAME}"
+
+ts_log "Initialize device"
+echo "0 262144 error" | dmsetup create $DEVNAME
+
+# Some tests are run in LXD containers on Travis CI where `mknod` doesn't always work
+# https://docs.travis-ci.com/user/multi-cpu-architectures/#security-and-lxd-container
+# https://linuxcontainers.org/lxd/docs/master/syscall-interception
+if [ "$TRAVIS" == "true" ] && [ ! -b "$DEVICE" ]; then
+ ts_skip "$DEVICE wasn't created"
+fi
+
+ts_log "Probe device"
+$TS_CMD_BLKID -p -o udev $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "Return code: $?" >> $TS_OUTPUT
+
+udevadm settle
+ts_log "Deinitialize device"
+
+dmsetup remove $DEVNAME
+
+ts_finalize
diff --git a/tests/ts/blkid/images-fs/adaptec-raid.img.xz b/tests/ts/blkid/images-fs/adaptec-raid.img.xz
new file mode 100644
index 0000000..20387cd
--- /dev/null
+++ b/tests/ts/blkid/images-fs/adaptec-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/apfs.img.xz b/tests/ts/blkid/images-fs/apfs.img.xz
new file mode 100644
index 0000000..4145c01
--- /dev/null
+++ b/tests/ts/blkid/images-fs/apfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/bcache-B.img.xz b/tests/ts/blkid/images-fs/bcache-B.img.xz
new file mode 100644
index 0000000..ed187f1
--- /dev/null
+++ b/tests/ts/blkid/images-fs/bcache-B.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/bcache-C.img.xz b/tests/ts/blkid/images-fs/bcache-C.img.xz
new file mode 100644
index 0000000..af90cbf
--- /dev/null
+++ b/tests/ts/blkid/images-fs/bcache-C.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/bcache-journal.img.xz b/tests/ts/blkid/images-fs/bcache-journal.img.xz
new file mode 100644
index 0000000..5d2201b
--- /dev/null
+++ b/tests/ts/blkid/images-fs/bcache-journal.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/bcachefs-2.img.xz b/tests/ts/blkid/images-fs/bcachefs-2.img.xz
new file mode 100644
index 0000000..267df3f
--- /dev/null
+++ b/tests/ts/blkid/images-fs/bcachefs-2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/bcachefs.img.xz b/tests/ts/blkid/images-fs/bcachefs.img.xz
new file mode 100644
index 0000000..6ef0e50
--- /dev/null
+++ b/tests/ts/blkid/images-fs/bcachefs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/befs.img.xz b/tests/ts/blkid/images-fs/befs.img.xz
new file mode 100644
index 0000000..188a6e8
--- /dev/null
+++ b/tests/ts/blkid/images-fs/befs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/bfs.img.xz b/tests/ts/blkid/images-fs/bfs.img.xz
new file mode 100644
index 0000000..98f024a
--- /dev/null
+++ b/tests/ts/blkid/images-fs/bfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/bluestore.img.xz b/tests/ts/blkid/images-fs/bluestore.img.xz
new file mode 100644
index 0000000..4fd8cbd
--- /dev/null
+++ b/tests/ts/blkid/images-fs/bluestore.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/btrfs.img.xz b/tests/ts/blkid/images-fs/btrfs.img.xz
new file mode 100644
index 0000000..418833d
--- /dev/null
+++ b/tests/ts/blkid/images-fs/btrfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/cramfs-big.img.xz b/tests/ts/blkid/images-fs/cramfs-big.img.xz
new file mode 100644
index 0000000..3d5dbe8
--- /dev/null
+++ b/tests/ts/blkid/images-fs/cramfs-big.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/cramfs.img.xz b/tests/ts/blkid/images-fs/cramfs.img.xz
new file mode 100644
index 0000000..5943867
--- /dev/null
+++ b/tests/ts/blkid/images-fs/cramfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/cs_fvault2.img.xz b/tests/ts/blkid/images-fs/cs_fvault2.img.xz
new file mode 100644
index 0000000..a1dec14
--- /dev/null
+++ b/tests/ts/blkid/images-fs/cs_fvault2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/ddf-raid.img.xz b/tests/ts/blkid/images-fs/ddf-raid.img.xz
new file mode 100644
index 0000000..b5b64fe
--- /dev/null
+++ b/tests/ts/blkid/images-fs/ddf-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/drbd-v08.img.xz b/tests/ts/blkid/images-fs/drbd-v08.img.xz
new file mode 100644
index 0000000..2c8db6b
--- /dev/null
+++ b/tests/ts/blkid/images-fs/drbd-v08.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/drbd-v09.img.xz b/tests/ts/blkid/images-fs/drbd-v09.img.xz
new file mode 100644
index 0000000..798042d
--- /dev/null
+++ b/tests/ts/blkid/images-fs/drbd-v09.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/drbdmanage-control-volume.img.xz b/tests/ts/blkid/images-fs/drbdmanage-control-volume.img.xz
new file mode 100644
index 0000000..d31bfc1
--- /dev/null
+++ b/tests/ts/blkid/images-fs/drbdmanage-control-volume.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/erofs.img.xz b/tests/ts/blkid/images-fs/erofs.img.xz
new file mode 100644
index 0000000..4087344
--- /dev/null
+++ b/tests/ts/blkid/images-fs/erofs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/exfat.img.xz b/tests/ts/blkid/images-fs/exfat.img.xz
new file mode 100644
index 0000000..43cc09a
--- /dev/null
+++ b/tests/ts/blkid/images-fs/exfat.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/ext2.img.xz b/tests/ts/blkid/images-fs/ext2.img.xz
new file mode 100644
index 0000000..3b5489f
--- /dev/null
+++ b/tests/ts/blkid/images-fs/ext2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/ext3.img.xz b/tests/ts/blkid/images-fs/ext3.img.xz
new file mode 100644
index 0000000..7d170e2
--- /dev/null
+++ b/tests/ts/blkid/images-fs/ext3.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/ext4.img.xz b/tests/ts/blkid/images-fs/ext4.img.xz
new file mode 100644
index 0000000..7dbfd70
--- /dev/null
+++ b/tests/ts/blkid/images-fs/ext4.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/f2fs.img.xz b/tests/ts/blkid/images-fs/f2fs.img.xz
new file mode 100644
index 0000000..ed6b95e
--- /dev/null
+++ b/tests/ts/blkid/images-fs/f2fs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat.img.xz b/tests/ts/blkid/images-fs/fat.img.xz
new file mode 100644
index 0000000..4e0997a
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat16_noheads.img.xz b/tests/ts/blkid/images-fs/fat16_noheads.img.xz
new file mode 100644
index 0000000..a0ee296
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat16_noheads.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_cp850_O_tilde.img.xz b/tests/ts/blkid/images-fs/fat32_cp850_O_tilde.img.xz
new file mode 100644
index 0000000..06eb2c9
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_cp850_O_tilde.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_label_64MB.img.xz b/tests/ts/blkid/images-fs/fat32_label_64MB.img.xz
new file mode 100644
index 0000000..f0976bc
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_label_64MB.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_label1.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1.img.xz
new file mode 100644
index 0000000..4df4b1d
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_NO_NAME.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_NO_NAME.img.xz
new file mode 100644
index 0000000..932ab11
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_NO_NAME.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_empty.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_empty.img.xz
new file mode 100644
index 0000000..3027031
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_empty.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_label2.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_label2.img.xz
new file mode 100644
index 0000000..1551e11
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_label2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_NO_NAME.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_NO_NAME.img.xz
new file mode 100644
index 0000000..264c440
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_NO_NAME.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_erase.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_erase.img.xz
new file mode 100644
index 0000000..f0a9571
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_erase.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_erase.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_erase.img.xz
new file mode 100644
index 0000000..cc4280e
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_erase.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_label2.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_label2.img.xz
new file mode 100644
index 0000000..66d4838
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_label2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_none.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_none.img.xz
new file mode 100644
index 0000000..0d084f3
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_NO_NAME.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_NO_NAME.img.xz
new file mode 100644
index 0000000..a238a01
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_NO_NAME.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1.img.xz
new file mode 100644
index 0000000..1486031
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1_xp_label2.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1_xp_label2.img.xz
new file mode 100644
index 0000000..5401e1f
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1_xp_label2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1.img.xz
new file mode 100644
index 0000000..acf01cc
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1_dosfslabel_label2.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1_dosfslabel_label2.img.xz
new file mode 100644
index 0000000..bff0971
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1_dosfslabel_label2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_xp_label1.img.xz b/tests/ts/blkid/images-fs/fat32_xp_label1.img.xz
new file mode 100644
index 0000000..97d71e9
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_xp_label1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_xp_none.img.xz b/tests/ts/blkid/images-fs/fat32_xp_none.img.xz
new file mode 100644
index 0000000..a8c819e
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_xp_none.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_xp_none_dosfslabel_label1.img.xz b/tests/ts/blkid/images-fs/fat32_xp_none_dosfslabel_label1.img.xz
new file mode 100644
index 0000000..0ebe6be
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_xp_none_dosfslabel_label1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/fat32_xp_none_mlabel_label1.img.xz b/tests/ts/blkid/images-fs/fat32_xp_none_mlabel_label1.img.xz
new file mode 100644
index 0000000..5a7a774
--- /dev/null
+++ b/tests/ts/blkid/images-fs/fat32_xp_none_mlabel_label1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/gfs2.img.xz b/tests/ts/blkid/images-fs/gfs2.img.xz
new file mode 100644
index 0000000..22d4d6b
--- /dev/null
+++ b/tests/ts/blkid/images-fs/gfs2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/hfs.img.xz b/tests/ts/blkid/images-fs/hfs.img.xz
new file mode 100644
index 0000000..cfa3252
--- /dev/null
+++ b/tests/ts/blkid/images-fs/hfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/hfsplus.img.xz b/tests/ts/blkid/images-fs/hfsplus.img.xz
new file mode 100644
index 0000000..1c37a70
--- /dev/null
+++ b/tests/ts/blkid/images-fs/hfsplus.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/hpfs.img.xz b/tests/ts/blkid/images-fs/hpfs.img.xz
new file mode 100644
index 0000000..4e22a8e
--- /dev/null
+++ b/tests/ts/blkid/images-fs/hpfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/hpt37x-raid.img.xz b/tests/ts/blkid/images-fs/hpt37x-raid.img.xz
new file mode 100644
index 0000000..1b53059
--- /dev/null
+++ b/tests/ts/blkid/images-fs/hpt37x-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/hpt45x-raid.img.xz b/tests/ts/blkid/images-fs/hpt45x-raid.img.xz
new file mode 100644
index 0000000..7dfe68a
--- /dev/null
+++ b/tests/ts/blkid/images-fs/hpt45x-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/iso-different-iso-joliet-label.img.xz b/tests/ts/blkid/images-fs/iso-different-iso-joliet-label.img.xz
new file mode 100644
index 0000000..73c5f2b
--- /dev/null
+++ b/tests/ts/blkid/images-fs/iso-different-iso-joliet-label.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/iso-joliet.img.xz b/tests/ts/blkid/images-fs/iso-joliet.img.xz
new file mode 100644
index 0000000..16b8961
--- /dev/null
+++ b/tests/ts/blkid/images-fs/iso-joliet.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/iso-multi-0-174-348-genisoimage.img.xz b/tests/ts/blkid/images-fs/iso-multi-0-174-348-genisoimage.img.xz
new file mode 100644
index 0000000..ec15d8c
--- /dev/null
+++ b/tests/ts/blkid/images-fs/iso-multi-0-174-348-genisoimage.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/iso-rr-joliet.img.xz b/tests/ts/blkid/images-fs/iso-rr-joliet.img.xz
new file mode 100644
index 0000000..1d6ad2c
--- /dev/null
+++ b/tests/ts/blkid/images-fs/iso-rr-joliet.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/iso-unicode-long-label.img.xz b/tests/ts/blkid/images-fs/iso-unicode-long-label.img.xz
new file mode 100644
index 0000000..488be1a
--- /dev/null
+++ b/tests/ts/blkid/images-fs/iso-unicode-long-label.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/iso.img.xz b/tests/ts/blkid/images-fs/iso.img.xz
new file mode 100644
index 0000000..f1146f3
--- /dev/null
+++ b/tests/ts/blkid/images-fs/iso.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/isw-raid.img.xz b/tests/ts/blkid/images-fs/isw-raid.img.xz
new file mode 100644
index 0000000..8e5529a
--- /dev/null
+++ b/tests/ts/blkid/images-fs/isw-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/jbd.img.xz b/tests/ts/blkid/images-fs/jbd.img.xz
new file mode 100644
index 0000000..7c5a089
--- /dev/null
+++ b/tests/ts/blkid/images-fs/jbd.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/jfs.img.xz b/tests/ts/blkid/images-fs/jfs.img.xz
new file mode 100644
index 0000000..4780f6d
--- /dev/null
+++ b/tests/ts/blkid/images-fs/jfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/jmicron-raid.img.xz b/tests/ts/blkid/images-fs/jmicron-raid.img.xz
new file mode 100644
index 0000000..cde0811
--- /dev/null
+++ b/tests/ts/blkid/images-fs/jmicron-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/lsi-raid.img.xz b/tests/ts/blkid/images-fs/lsi-raid.img.xz
new file mode 100644
index 0000000..d6ae15a
--- /dev/null
+++ b/tests/ts/blkid/images-fs/lsi-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/luks1.img.xz b/tests/ts/blkid/images-fs/luks1.img.xz
new file mode 100644
index 0000000..c0f5902
--- /dev/null
+++ b/tests/ts/blkid/images-fs/luks1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/luks2.img.xz b/tests/ts/blkid/images-fs/luks2.img.xz
new file mode 100644
index 0000000..997fb04
--- /dev/null
+++ b/tests/ts/blkid/images-fs/luks2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/lvm2.img.xz b/tests/ts/blkid/images-fs/lvm2.img.xz
new file mode 100644
index 0000000..4c3c183
--- /dev/null
+++ b/tests/ts/blkid/images-fs/lvm2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/mdraid-1.img.xz b/tests/ts/blkid/images-fs/mdraid-1.img.xz
new file mode 100644
index 0000000..c17ad3b
--- /dev/null
+++ b/tests/ts/blkid/images-fs/mdraid-1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/mdraid.img.xz b/tests/ts/blkid/images-fs/mdraid.img.xz
new file mode 100644
index 0000000..e8ff4f5
--- /dev/null
+++ b/tests/ts/blkid/images-fs/mdraid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/minix-BE.img.xz b/tests/ts/blkid/images-fs/minix-BE.img.xz
new file mode 100644
index 0000000..c349a4f
--- /dev/null
+++ b/tests/ts/blkid/images-fs/minix-BE.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/minix-LE.img.xz b/tests/ts/blkid/images-fs/minix-LE.img.xz
new file mode 100644
index 0000000..da646a8
--- /dev/null
+++ b/tests/ts/blkid/images-fs/minix-LE.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/mpool.img.xz b/tests/ts/blkid/images-fs/mpool.img.xz
new file mode 100644
index 0000000..4bfefde
--- /dev/null
+++ b/tests/ts/blkid/images-fs/mpool.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/netware.img.xz b/tests/ts/blkid/images-fs/netware.img.xz
new file mode 100644
index 0000000..fe5b103
--- /dev/null
+++ b/tests/ts/blkid/images-fs/netware.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/nilfs2.img.xz b/tests/ts/blkid/images-fs/nilfs2.img.xz
new file mode 100644
index 0000000..38de645
--- /dev/null
+++ b/tests/ts/blkid/images-fs/nilfs2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/ntfs.img.xz b/tests/ts/blkid/images-fs/ntfs.img.xz
new file mode 100644
index 0000000..2b414c4
--- /dev/null
+++ b/tests/ts/blkid/images-fs/ntfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/nvidia-raid.img.xz b/tests/ts/blkid/images-fs/nvidia-raid.img.xz
new file mode 100644
index 0000000..775f810
--- /dev/null
+++ b/tests/ts/blkid/images-fs/nvidia-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/ocfs2.img.xz b/tests/ts/blkid/images-fs/ocfs2.img.xz
new file mode 100644
index 0000000..12ed926
--- /dev/null
+++ b/tests/ts/blkid/images-fs/ocfs2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/promise-raid.img.xz b/tests/ts/blkid/images-fs/promise-raid.img.xz
new file mode 100644
index 0000000..77f135f
--- /dev/null
+++ b/tests/ts/blkid/images-fs/promise-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/reiser3.img.xz b/tests/ts/blkid/images-fs/reiser3.img.xz
new file mode 100644
index 0000000..8bc595f
--- /dev/null
+++ b/tests/ts/blkid/images-fs/reiser3.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/reiser4.img.xz b/tests/ts/blkid/images-fs/reiser4.img.xz
new file mode 100644
index 0000000..e97f960
--- /dev/null
+++ b/tests/ts/blkid/images-fs/reiser4.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/romfs.img.xz b/tests/ts/blkid/images-fs/romfs.img.xz
new file mode 100644
index 0000000..680eeed
--- /dev/null
+++ b/tests/ts/blkid/images-fs/romfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/silicon-raid.img.xz b/tests/ts/blkid/images-fs/silicon-raid.img.xz
new file mode 100644
index 0000000..28d6a42
--- /dev/null
+++ b/tests/ts/blkid/images-fs/silicon-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/small-fat32.img.xz b/tests/ts/blkid/images-fs/small-fat32.img.xz
new file mode 100644
index 0000000..7a04f42
--- /dev/null
+++ b/tests/ts/blkid/images-fs/small-fat32.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/squashfs3.img.xz b/tests/ts/blkid/images-fs/squashfs3.img.xz
new file mode 100755
index 0000000..8b2e15d
--- /dev/null
+++ b/tests/ts/blkid/images-fs/squashfs3.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/squashfs4.img.xz b/tests/ts/blkid/images-fs/squashfs4.img.xz
new file mode 100644
index 0000000..81f0785
--- /dev/null
+++ b/tests/ts/blkid/images-fs/squashfs4.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/swap0.img.xz b/tests/ts/blkid/images-fs/swap0.img.xz
new file mode 100644
index 0000000..3cfea73
--- /dev/null
+++ b/tests/ts/blkid/images-fs/swap0.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/swap1-big.img.xz b/tests/ts/blkid/images-fs/swap1-big.img.xz
new file mode 100644
index 0000000..7d256fc
--- /dev/null
+++ b/tests/ts/blkid/images-fs/swap1-big.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/swap1.img.xz b/tests/ts/blkid/images-fs/swap1.img.xz
new file mode 100644
index 0000000..6e6f539
--- /dev/null
+++ b/tests/ts/blkid/images-fs/swap1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/tuxonice.img.xz b/tests/ts/blkid/images-fs/tuxonice.img.xz
new file mode 100644
index 0000000..472cf9c
--- /dev/null
+++ b/tests/ts/blkid/images-fs/tuxonice.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/ubi.img.xz b/tests/ts/blkid/images-fs/ubi.img.xz
new file mode 100644
index 0000000..1a073f2
--- /dev/null
+++ b/tests/ts/blkid/images-fs/ubi.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/ubifs.img.xz b/tests/ts/blkid/images-fs/ubifs.img.xz
new file mode 100644
index 0000000..2004f5b
--- /dev/null
+++ b/tests/ts/blkid/images-fs/ubifs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-bdr-2.60-nero.img.xz b/tests/ts/blkid/images-fs/udf-bdr-2.60-nero.img.xz
new file mode 100644
index 0000000..9fb9a4f
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-bdr-2.60-nero.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-cd-mkudfiso-20100208.img.xz b/tests/ts/blkid/images-fs/udf-cd-mkudfiso-20100208.img.xz
new file mode 100644
index 0000000..1da9a28
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-cd-mkudfiso-20100208.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-cd-nero-6.img.xz b/tests/ts/blkid/images-fs/udf-cd-nero-6.img.xz
new file mode 100644
index 0000000..673fa62
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-cd-nero-6.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-macosx-2.60-4096.img.xz b/tests/ts/blkid/images-fs/udf-hdd-macosx-2.60-4096.img.xz
new file mode 100644
index 0000000..68412ad
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-macosx-2.60-4096.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-1.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-1.img.xz
new file mode 100644
index 0000000..39db4be
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-2.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-2.img.xz
new file mode 100644
index 0000000..4cba447
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-1.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-1.img.xz
new file mode 100644
index 0000000..7df36db
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-1.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-2.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-2.img.xz
new file mode 100644
index 0000000..bc0facc
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-3.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-3.img.xz
new file mode 100644
index 0000000..d774e0a
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-3.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-4.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-4.img.xz
new file mode 100644
index 0000000..047e39a
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-4.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-5.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-5.img.xz
new file mode 100644
index 0000000..291d7eb
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-5.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-6.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-6.img.xz
new file mode 100644
index 0000000..393ab9e
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-6.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-7.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-7.img.xz
new file mode 100644
index 0000000..5940009
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-7.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-8.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-8.img.xz
new file mode 100644
index 0000000..b91180c
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-8.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-2.2.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-2.2.img.xz
new file mode 100644
index 0000000..bc00729
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-2.2.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.5.img.xz b/tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.5.img.xz
new file mode 100644
index 0000000..baddc84
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.5.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.7.img.xz b/tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.7.img.xz
new file mode 100644
index 0000000..dfb8cdb
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.7.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-hdd-win7.img.xz b/tests/ts/blkid/images-fs/udf-hdd-win7.img.xz
new file mode 100644
index 0000000..ee86115
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-hdd-win7.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-multi-0-320-640-mkudffs.img.xz b/tests/ts/blkid/images-fs/udf-multi-0-320-640-mkudffs.img.xz
new file mode 100644
index 0000000..cac6318
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-multi-0-320-640-mkudffs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf-multi-0-417-834-genisoimage.img.xz b/tests/ts/blkid/images-fs/udf-multi-0-417-834-genisoimage.img.xz
new file mode 100644
index 0000000..c1c6fc7
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf-multi-0-417-834-genisoimage.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/udf.img.xz b/tests/ts/blkid/images-fs/udf.img.xz
new file mode 100644
index 0000000..fdf0edf
--- /dev/null
+++ b/tests/ts/blkid/images-fs/udf.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/ufs.img.xz b/tests/ts/blkid/images-fs/ufs.img.xz
new file mode 100644
index 0000000..58f8b20
--- /dev/null
+++ b/tests/ts/blkid/images-fs/ufs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/vdo.img.xz b/tests/ts/blkid/images-fs/vdo.img.xz
new file mode 100644
index 0000000..08c7ecb
--- /dev/null
+++ b/tests/ts/blkid/images-fs/vdo.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/via-raid.img.xz b/tests/ts/blkid/images-fs/via-raid.img.xz
new file mode 100644
index 0000000..c5f6fb7
--- /dev/null
+++ b/tests/ts/blkid/images-fs/via-raid.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/vmfs.img.xz b/tests/ts/blkid/images-fs/vmfs.img.xz
new file mode 100644
index 0000000..ce4544e
--- /dev/null
+++ b/tests/ts/blkid/images-fs/vmfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/vmfs_volume.img.xz b/tests/ts/blkid/images-fs/vmfs_volume.img.xz
new file mode 100644
index 0000000..93f11b4
--- /dev/null
+++ b/tests/ts/blkid/images-fs/vmfs_volume.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/xfs-log.img.xz b/tests/ts/blkid/images-fs/xfs-log.img.xz
new file mode 100644
index 0000000..35ff33b
--- /dev/null
+++ b/tests/ts/blkid/images-fs/xfs-log.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/xfs-v5.img.xz b/tests/ts/blkid/images-fs/xfs-v5.img.xz
new file mode 100644
index 0000000..e2399e3
--- /dev/null
+++ b/tests/ts/blkid/images-fs/xfs-v5.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/xfs.img.xz b/tests/ts/blkid/images-fs/xfs.img.xz
new file mode 100644
index 0000000..5576c66
--- /dev/null
+++ b/tests/ts/blkid/images-fs/xfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/zfs.img.xz b/tests/ts/blkid/images-fs/zfs.img.xz
new file mode 100644
index 0000000..f85e536
--- /dev/null
+++ b/tests/ts/blkid/images-fs/zfs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-fs/zonefs.img.xz b/tests/ts/blkid/images-fs/zonefs.img.xz
new file mode 100644
index 0000000..c936a80
--- /dev/null
+++ b/tests/ts/blkid/images-fs/zonefs.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-pt/atari-primary.img.xz b/tests/ts/blkid/images-pt/atari-primary.img.xz
new file mode 100644
index 0000000..6f915fa
--- /dev/null
+++ b/tests/ts/blkid/images-pt/atari-primary.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-pt/atari-xgm.img.xz b/tests/ts/blkid/images-pt/atari-xgm.img.xz
new file mode 100644
index 0000000..a98c02d
--- /dev/null
+++ b/tests/ts/blkid/images-pt/atari-xgm.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-pt/bsd.img.xz b/tests/ts/blkid/images-pt/bsd.img.xz
new file mode 100644
index 0000000..bfdb50b
--- /dev/null
+++ b/tests/ts/blkid/images-pt/bsd.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-pt/dos+bsd.img.xz b/tests/ts/blkid/images-pt/dos+bsd.img.xz
new file mode 100644
index 0000000..f87dd74
--- /dev/null
+++ b/tests/ts/blkid/images-pt/dos+bsd.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-pt/gpt.img.xz b/tests/ts/blkid/images-pt/gpt.img.xz
new file mode 100644
index 0000000..9a085b4
--- /dev/null
+++ b/tests/ts/blkid/images-pt/gpt.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-pt/sgi.img.xz b/tests/ts/blkid/images-pt/sgi.img.xz
new file mode 100644
index 0000000..d5fed80
--- /dev/null
+++ b/tests/ts/blkid/images-pt/sgi.img.xz
Binary files differ
diff --git a/tests/ts/blkid/images-pt/sun.img.xz b/tests/ts/blkid/images-pt/sun.img.xz
new file mode 100644
index 0000000..a00594a
--- /dev/null
+++ b/tests/ts/blkid/images-pt/sun.img.xz
Binary files differ
diff --git a/tests/ts/blkid/low-probe b/tests/ts/blkid/low-probe
new file mode 100755
index 0000000..27a074b
--- /dev/null
+++ b/tests/ts/blkid/low-probe
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2009 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="${0%/*}/../.."
+TS_DESC="superblocks probing"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_BLKID"
+ts_check_prog "xz"
+
+mkdir -p $TS_OUTDIR/images-fs
+
+for img in $(ls $TS_SELF/images-fs/*.img.xz | sort); do
+ name=$(basename $img .img.xz)
+ outimg=$TS_OUTDIR/images-fs/${name}.img
+
+ xz -dc $img > $outimg
+
+ #
+ # multi session images, the image name contains "-multi-" and all
+ # -<numbers>- are interpreted as offset to the sessions. The offset is
+ # calculated in 2048 sectors. For example: iso-multi-0-174-348-genisoimage.img
+ #
+ if [[ $name =~ (.*multi.*) ]]; then
+ sessions=$(echo "$name" \
+ | awk 'BEGIN { RS="-" } /^[[:digit:]]+$/ { print $0 }')
+ name=$(echo "$name" \
+ | awk 'BEGIN { RS="-"; ORS="-" } !/^[[:digit:]]+$/ { print $1 }' \
+ | sed 's/-$//g')
+ for off in $sessions; do
+ ts_init_subtest $name-$off
+ $TS_CMD_BLKID -p -o udev $outimg \
+ --hint session_offset=$(( $off * 2048 )) \
+ 2> $TS_ERRLOG | sort > $TS_OUTPUT
+ ts_finalize_subtest
+ done
+ #
+ # Standard filesystem images
+ #
+ else
+ ts_init_subtest $name
+ $TS_CMD_BLKID -p -o udev $outimg 2> $TS_ERRLOG | sort > $TS_OUTPUT
+ ts_finalize_subtest
+ fi
+done
+
+ts_finalize
+
diff --git a/tests/ts/blkid/lowprobe-pt b/tests/ts/blkid/lowprobe-pt
new file mode 100755
index 0000000..8e55ccc
--- /dev/null
+++ b/tests/ts/blkid/lowprobe-pt
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2009 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="${0%/*}/../.."
+TS_DESC="partitions probing"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_PARTITIONS"
+ts_check_prog "xz"
+
+mkdir -p $TS_OUTDIR/images-pt
+
+for img in $(ls $TS_SELF/images-pt/*.img.xz | sort); do
+ name=$(basename $img .img.xz)
+ outimg=$TS_OUTDIR/images-pt/${name}.img
+
+ ts_init_subtest $name
+
+ xz -dc $img > $outimg
+
+ $TS_HELPER_PARTITIONS $outimg &> $TS_OUTPUT
+ ts_finalize_subtest
+done
+
+ts_finalize
+
diff --git a/tests/ts/blkid/md-raid0-whole b/tests/ts/blkid/md-raid0-whole
new file mode 100755
index 0000000..0c957ab
--- /dev/null
+++ b/tests/ts/blkid/md-raid0-whole
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2010 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="${0%/*}/../.."
+TS_DESC="MD raid0 (whole-disks)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_BLKID"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mdadm"
+
+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1
+TS_KNOWN_FAIL="yes"
+
+ts_log "Initialize devices"
+IMGNAME="${TS_OUTDIR}/${TS_TESTNAME}"
+
+ts_device_init 50 ${IMGNAME}1.img
+DEVICE1=$TS_LODEV
+
+ts_device_init 50 ${IMGNAME}2.img
+DEVICE2=$TS_LODEV
+
+MD_DEVNAME=md8
+MD_DEVICE=/dev/${MD_DEVNAME}
+
+ts_lock "md"
+mdadm -q -S ${MD_DEVICE} &> /dev/null
+
+ts_log "Create RAID device"
+mdadm -q --create ${MD_DEVICE} --metadata=0.90 --chunk=64 --level=0 \
+ --raid-devices=2 ${DEVICE1} ${DEVICE2} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+# create dos partition table
+$TS_CMD_FDISK --noauto-pt ${MD_DEVICE} &>/dev/null <<EOF
+o
+w
+q
+EOF
+
+ts_log "Create partitions on RAID device"
+$TS_CMD_FDISK ${MD_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+n
+p
+1
+
++10M
+n
+p
+2
+
+
+p
+w
+q
+EOF
+
+udevadm settle
+
+ts_log "Probe first RAID member"
+$TS_CMD_BLKID -p -o udev $DEVICE1 2>> $TS_ERRLOG | sort >> $TS_OUTPUT
+
+ts_log "Probe second RAID member"
+$TS_CMD_BLKID -p -o udev $DEVICE1 2>> $TS_ERRLOG | sort >> $TS_OUTPUT
+
+ts_log "Stop RAID device"
+mdadm -q -S ${MD_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+udevadm settle
+ts_unlock "md"
+
+ts_log "Deinitialize devices"
+
+ts_fdisk_clean $MD_DEVICE
+
+# remove generated UUIDs
+sed -i -e 's/ID_FS_UUID.*//g' $TS_OUTPUT
+
+ts_finalize
diff --git a/tests/ts/blkid/md-raid1-part b/tests/ts/blkid/md-raid1-part
new file mode 100755
index 0000000..b0ef822
--- /dev/null
+++ b/tests/ts/blkid/md-raid1-part
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2010 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="${0%/*}/../.."
+TS_DESC="MD raid1 (last partition)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_BLKID"
+
+ts_skip_nonroot
+ts_check_prog "mdadm"
+
+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1
+TS_KNOWN_FAIL="yes"
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=51 sector_size=512
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+o
+n
+p
+1
+
++25M
+n
+p
+2
+
+
+p
+w
+q
+EOF
+
+# replace generated ID with something stable
+$TS_CMD_FDISK ${TS_DEVICE} &> /dev/null <<EOF
+x
+i
+0x1
+r
+w
+q
+EOF
+
+udevadm settle
+MD_DEVNAME=md8
+MD_DEVICE=/dev/${MD_DEVNAME}
+
+ts_lock "md"
+
+ts_log "Create RAID1 device"
+mdadm -q -S ${MD_DEVICE} &> /dev/null
+mdadm -q --create ${MD_DEVICE} --metadata=0.90 --chunk=64 --level=1 \
+ --raid-devices=2 ${TS_DEVICE}1 ${TS_DEVICE}2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+
+ts_log "Probe whole-disk"
+$TS_CMD_BLKID -p -o udev ${TS_DEVICE} 2>> $TS_ERRLOG | sort >> $TS_OUTPUT
+
+ts_log "Probe first RAID member"
+$TS_CMD_BLKID -p -o udev ${TS_DEVICE}1 2>> $TS_ERRLOG | sort >> $TS_OUTPUT
+
+ts_log "Probe second RAID member"
+$TS_CMD_BLKID -p -o udev ${TS_DEVICE}2 2>> $TS_ERRLOG | sort >> $TS_OUTPUT
+
+mdadm -q -S ${MD_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+udevadm settle
+ts_unlock "md"
+
+ts_fdisk_clean $TS_DEVICE
+# substitute UUIDs and major/minor number before comparison
+sed -i \
+ -e 's/^\(ID_FS_UUID\)=.*/\1=__ts_uuid__/' \
+ -e 's/^\(ID_FS_UUID_ENC\)=.*/\1=__ts_uuid_enc__/' \
+ -e 's/^\(ID_PART_ENTRY_DISK\)=.*/\1=__ts_majorminor__/' \
+ $TS_OUTPUT
+
+ts_finalize
diff --git a/tests/ts/blkid/md-raid1-whole b/tests/ts/blkid/md-raid1-whole
new file mode 100755
index 0000000..1199fab
--- /dev/null
+++ b/tests/ts/blkid/md-raid1-whole
@@ -0,0 +1,103 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2010 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="${0%/*}/../.."
+TS_DESC="MD raid1 (whole-disks)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_BLKID"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mdadm"
+
+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1
+TS_KNOWN_FAIL="yes"
+
+ts_log "Initialize devices"
+IMGNAME="${TS_OUTDIR}/${TS_TESTNAME}"
+
+ts_device_init 50 ${IMGNAME}1.img
+DEVICE1=$TS_LODEV
+
+ts_device_init 50 ${IMGNAME}2.img
+DEVICE2=$TS_LODEV
+
+MD_DEVNAME=md8
+MD_DEVICE=/dev/${MD_DEVNAME}
+
+ts_lock "md"
+
+mdadm -q -S ${MD_DEVICE} &> /dev/null
+udevadm settle
+
+ts_log "Create RAID device"
+mdadm -q --create ${MD_DEVICE} --metadata=0.90 --chunk=64 --level=1 \
+ --raid-devices=2 ${DEVICE1} ${DEVICE2} >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+
+# create dos partition table
+$TS_CMD_FDISK --noauto-pt ${MD_DEVICE} &>/dev/null <<EOF
+o
+w
+q
+EOF
+
+ts_log "Create partitions on RAID device"
+$TS_CMD_FDISK ${MD_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+n
+p
+1
+
++10M
+n
+p
+2
+
++10M
+p
+w
+q
+EOF
+
+udevadm settle
+
+ts_log "Probe first RAID member"
+$TS_CMD_BLKID -p -o udev $DEVICE1 2>> $TS_ERRLOG | sort >> $TS_OUTPUT
+
+ts_log "Probe second RAID member"
+$TS_CMD_BLKID -p -o udev $DEVICE1 2>> $TS_ERRLOG | sort >> $TS_OUTPUT
+
+ts_log "Stop RAID device"
+mdadm -q -S ${MD_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+udevadm settle
+ts_unlock "md"
+
+ts_log "Deinitialize devices"
+
+ts_fdisk_clean
+# seems that raid1 minimum I/O size has been changed in kernels >4.4.x and >4.8
+sed -i 's@^\(I/O size (minimum/optimal): \)[1-9][0-9]*@\1<removed>@' $TS_OUTPUT
+# remove generated UUIDs
+sed -i -e 's/ID_FS_UUID.*//g' $TS_OUTPUT
+
+ts_finalize
diff --git a/tests/ts/blkid/offset b/tests/ts/blkid/offset
new file mode 100755
index 0000000..1b81ecf
--- /dev/null
+++ b/tests/ts/blkid/offset
@@ -0,0 +1,58 @@
+#!/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="offset"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_CMD_BLKID"
+ts_check_test_command "$TS_CMD_PARTX"
+
+ts_check_prog "mkfs.ext2"
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512
+
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+label: gpt
+label-id: b181c399-4711-4c52-8b65-9e764541218d
+
+,5M,L
+,5M,L
+,5M,L
+, ,
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+
+
+mkfs.ext2 -b 4096 -L FOO -U ccf3dc28-f697-4577-971b-0bc79300a700 ${TS_DEVICE}2 &> /dev/null
+udevadm settle
+ts_device_has "TYPE" "ext2" ${TS_DEVICE}2 ||
+ ts_die "Cannot find ext2 on ${TS_DEVICE}2"
+
+DEVNAME=$(basename $TS_DEVICE)
+offset=$(( $(cat /sys/block/${DEVNAME}/${DEVNAME}2/start) * 512))
+size=$(( $(cat /sys/block/${DEVNAME}/${DEVNAME}2/size) * 512))
+
+$TS_CMD_PARTX --delete ${TS_DEVICE} &> /dev/null
+
+$TS_CMD_BLKID -p -o udev --offset=${offset} --size=${size} $TS_DEVICE \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/blkid/topology b/tests/ts/blkid/topology
new file mode 100755
index 0000000..fcf0724
--- /dev/null
+++ b/tests/ts/blkid/topology
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2022 Thomas Weißschuh <thomas@t-8ch.de>
+#
+# 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="topology probing"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_test_command "$TS_CMD_BLKID"
+ts_check_test_command "$TS_CMD_SFDISK"
+
+ts_device_init
+
+
+ts_init_subtest disk
+echo -e 'label: dos\n- - - -' | "$TS_CMD_SFDISK" -q "$TS_LODEV"
+
+"$TS_CMD_BLKID" -i -o udev "$TS_LODEV" \
+ 2> "$TS_ERRLOG" \
+ | sed -E -e 's/^ID_FS_DISKSEQ=[[:digit:]]+$/ID_FS_DISKSEQ=S/' \
+ | sort > "$TS_OUTPUT"
+
+ts_finalize_subtest
+
+
+ts_init_subtest partition
+
+"$TS_CMD_BLKID" -i -o udev "$TS_LODEV"p1 \
+ 2> "$TS_ERRLOG" \
+ | sed -E -e 's/^ID_FS_DISKSEQ=[[:digit:]]+$/ID_FS_DISKSEQ=S/' \
+ | sort > "$TS_OUTPUT"
+
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/build-sys/config b/tests/ts/build-sys/config
new file mode 100755
index 0000000..2d12913
--- /dev/null
+++ b/tests/ts/build-sys/config
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+# Copyright (C) 2011 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="config"
+
+# Don't execute this test by default, --force required
+TS_OPTIONAL="yes"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_prog "readelf"
+ts_check_prog "file"
+
+config_gen_dir="$top_srcdir/tools"
+. $config_gen_dir/config-gen-functions.sh
+
+[ -n "$CFLAGS" ] && export CFLAGS="$CFLAGS"
+
+ts_cd $top_builddir && make -j clean &> /dev/null
+
+wanted=$(ts_option_argument "conf" "$*")
+
+function make_conf {
+ local conf="$1"
+
+ ts_init_subtest $(basename $conf | sed 's/\.conf//')
+
+ opts=$(ul_get_configuration $conf | sed 's/--enable-asan//')
+
+ olddir=$(pwd)
+ ts_cd $top_builddir
+
+ ./configure $opts &> /dev/null
+ make -j &> /dev/null
+
+ bins=$(find . -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \) | sort)
+ for b in $bins; do
+ libs=$(readelf --dynamic $b 2> /dev/null | \
+ awk '/NEEDED/ { print $5 }' | \
+ sed 's:\[::g; s:\..*::g; s:^libc$::g; s:ld\-.*::g' | \
+ sort -u | tr '\n' ' ')
+
+ if [ -n "$libs" ]; then
+ echo "$(basename $b): $libs" >> $TS_OUTPUT
+ else
+ fres=$(file $b)
+ case $fres in
+ *statically*)
+ echo "$(basename $b): STATIC" >> $TS_OUTPUT
+ ;;
+ *) # ignore scripts, ...etc.
+ ;;
+ esac
+ fi
+ done
+
+ # clean the tree, but exclude tests/{diff,output} dirs
+ #
+ [ -d tests/diff ] && mv tests/diff tests/diff.save
+ [ -d tests/output ] && mv tests/output tests/output.save
+
+ make -j clean &> /dev/null
+
+ [ -d tests/diff.save ] && mv tests/diff.save tests/diff
+ [ -d tests/output.save ] && mv tests/output.save tests/output
+
+ ts_cd $olddir
+ ts_finalize_subtest
+}
+
+
+if [ -n "$wanted" ]; then
+ make_conf $wanted
+else
+ for x in $config_gen_dir/config-gen.d/*.conf; do
+ make_conf "$x"
+ done
+fi
+
+ts_finalize
diff --git a/tests/ts/cal/bigyear b/tests/ts/cal/bigyear
new file mode 100755
index 0000000..25c54f5
--- /dev/null
+++ b/tests/ts/cal/bigyear
@@ -0,0 +1,83 @@
+#!/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="Year 2147483646"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_CAL"
+
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+MYMONTH="12 2147483646"
+MYYEAR="2147483646"
+
+
+CAL_TEST_TIME=1516562739 # 21st January 2018
+export CAL_TEST_TIME
+
+function call_cal {
+ local testname=$(echo "$2" | sed 's/-//g')
+
+ if [ "$3" == "$MYYEAR" ]; then
+ testname="${testname}-year"
+ else
+ testname="${testname}-month"
+ fi
+
+ ts_init_subtest "$testname"
+ ts_log "$1"
+ shift
+ if [ "$USETERM" == "yes" ]; then
+ $TS_HELPER_CAL "$@"
+ fi
+ $TS_HELPER_CAL "$@" >> $TS_OUTPUT
+ ts_finalize_subtest
+}
+
+call_cal "Gregorian - Monday-based month" -1m $MYMONTH
+call_cal "Gregorian - Sunday-based month" -1s $MYMONTH
+call_cal "Julian - Monday-based month" -1mj $MYMONTH
+call_cal "Julian - Sunday-based month" -1sj $MYMONTH
+
+call_cal "Gregorian - Monday-based 3 months" -3m $MYMONTH
+call_cal "Gregorian - Sunday-based 3 months" -3s $MYMONTH
+call_cal "Julian - Monday-based 3 months" -3mj $MYMONTH
+call_cal "Julian - Sunday-based 3 months" -3sj $MYMONTH
+
+call_cal "Gregorian - Monday-based year" -1m $MYYEAR
+call_cal "Gregorian - Sunday-based year" -1s $MYYEAR
+call_cal "Julian - Monday-based year" -1mj $MYYEAR
+call_cal "Julian - Sunday-based year" -1sj $MYYEAR
+
+
+call_cal "Gregorian - Monday-based month with weeks" -1mw $MYMONTH
+call_cal "Gregorian - Sunday-based month with weeks" -1sw $MYMONTH
+call_cal "Julian - Monday-based month with weeks" -1mjw $MYMONTH
+call_cal "Julian - Sunday-based month with weeks" -1sjw $MYMONTH
+
+call_cal "Gregorian - Monday-based 3 months with weeks" -3mw $MYMONTH
+call_cal "Gregorian - Sunday-based 3 months with weeks" -3sw $MYMONTH
+call_cal "Julian - Monday-based 3 months with weeks" -3mjw $MYMONTH
+call_cal "Julian - Sunday-based 3 months with weeks" -3sjw $MYMONTH
+
+call_cal "Gregorian - Monday-based year with weeks" -1mw $MYYEAR
+call_cal "Gregorian - Sunday-based year with weeks" -1sw $MYYEAR
+call_cal "Julian - Monday-based year with weeks" -1mjw $MYYEAR
+call_cal "Julian - Sunday-based year with weeks" -1sjw $MYYEAR
+
+ts_finalize
diff --git a/tests/ts/cal/color b/tests/ts/cal/color
new file mode 100755
index 0000000..90840ea
--- /dev/null
+++ b/tests/ts/cal/color
@@ -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="${0%/*}/../.."
+TS_DESC="color"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_CAL"
+ts_inhibit_custom_colorscheme
+
+has_ncurses=$( ts_has_ncurses_support )
+if [ "$has_ncurses" != "yes" ]; then
+ ts_skip "without-ncurses"
+fi
+
+# --color output depends on terminal type
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+
+[ "$USETERM" == "yes" ] && TS_VERBOSE="yes"
+
+ts_init_subtest "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_finalize_subtest
+
+ts_init_subtest "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_finalize_subtest
+
+ts_init_subtest "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_finalize_subtest
+
+ts_init_subtest "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_finalize_subtest
+
+ts_init_subtest "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_finalize_subtest
+
+ts_init_subtest "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_subtest
+
+ts_init_subtest "vertical"
+if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL --color=always 15 2 2023
+fi
+$TS_CMD_CAL --color=always --vertical 15 2 2023 >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "vertical-week"
+if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL --color=always 15 2 2023
+fi
+$TS_CMD_CAL --color=always --vertical --week=15 15 2 2023 >> $TS_OUTPUT
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/cal/colorw b/tests/ts/cal/colorw
new file mode 100755
index 0000000..96e6e0a
--- /dev/null
+++ b/tests/ts/cal/colorw
@@ -0,0 +1,80 @@
+#!/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="color with week numbers"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_CAL"
+ts_inhibit_custom_colorscheme
+
+has_ncurses=$( ts_has_ncurses_support )
+if [ "$has_ncurses" != "yes" ]; then
+ ts_skip "without-ncurses"
+fi
+
+# --color output depends on terminal type
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+
+[ "$USETERM" == "yes" ] && TS_VERBOSE="yes"
+
+ts_init_subtest "first-day-week-numbers"
+if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL -w --color=always 1 1 1
+fi
+$TS_CMD_CAL -w --color=always 1 1 1 >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "reformation-corner-cases-1-week-numbers"
+if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL -w --color=always 2 9 1752
+fi
+$TS_CMD_CAL -w --color=always 2 9 1752 >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "reformation-corner-cases-2-week-numbers"
+if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL -w --color=always 3 9 1752
+fi
+$TS_CMD_CAL -w --color=always 3 9 1752 >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "reformation-corner-cases-3-week-numbers"
+if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL -w --color=always 13 9 1752
+fi
+$TS_CMD_CAL -w --color=always 13 9 1752 >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "reformation-corner-cases-4-week-numbers"
+if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL -w --color=always 14 9 1752
+fi
+$TS_CMD_CAL -w --color=always 14 9 1752 >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "last-day-week-numbers"
+if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL -w --color=always 31 12 9999
+fi
+$TS_CMD_CAL -w --color=always -3 31 12 9999 >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/cal/column b/tests/ts/cal/column
new file mode 100755
index 0000000..ce336ca
--- /dev/null
+++ b/tests/ts/cal/column
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007-2018 Karel Zak <kzak@redhat.com>
+# Copyright (C) 2023 Thomas Weißschuh <thomas@t-8ch.de>
+#
+# 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="year"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_CAL"
+
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+MYTIME="29 11 2006"
+
+function call_cal {
+
+ ts_init_subtest "$(echo "$1" | cut -d ' ' -f 1)"
+ ts_log "$1"
+ shift
+ if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL "$@"
+ fi
+ $TS_CMD_CAL "$@" >> $TS_OUTPUT
+ ts_finalize_subtest
+}
+
+call_cal "6 columns" --year --columns 6 $MYTIME
+call_cal "5 columns" --year --columns 5 $MYTIME
+call_cal "auto columns" --year --columns auto $MYTIME
+
+ts_finalize
+
diff --git a/tests/ts/cal/jan1753 b/tests/ts/cal/jan1753
new file mode 100755
index 0000000..5366e68
--- /dev/null
+++ b/tests/ts/cal/jan1753
@@ -0,0 +1,45 @@
+#!/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="January 1753"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_CAL"
+
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+MYMONTH="1 1753"
+
+function call_cal {
+ local testname=$(echo "$2" | sed 's/-//g')
+
+ ts_init_subtest "$testname"
+ ts_log "$1"
+ shift
+ if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL "$@"
+ fi
+ $TS_CMD_CAL "$@" >> $TS_OUTPUT
+
+ ts_finalize_subtest
+}
+
+call_cal "Monday-based 1753 week numbers" -m3w $MYMONTH
+call_cal "Sunday-based 1753 week numbers" -3w $MYMONTH
+
+ts_finalize
diff --git a/tests/ts/cal/month b/tests/ts/cal/month
new file mode 100755
index 0000000..96ab113
--- /dev/null
+++ b/tests/ts/cal/month
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007-2018 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="${0%/*}/../.."
+TS_DESC="month"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_CAL"
+
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+MYTIME="27 09 2006"
+
+CAL_TEST_TIME=1516562739 # 21st January 2018
+export CAL_TEST_TIME
+
+function call_cal {
+ local testname=$(echo "$2" | sed 's/-//g; s/ //g')
+
+ ts_init_subtest "$testname"
+ ts_log "$1"
+ shift
+ if [ "$USETERM" == "yes" ]; then
+ $TS_HELPER_CAL "$@"
+ fi
+ $TS_HELPER_CAL "$@" >> $TS_OUTPUT
+
+ ts_finalize_subtest
+}
+
+call_cal "Gregorian - Monday-based week" -1m $MYTIME
+call_cal "Gregorian - Sunday-based week" -1s $MYTIME
+call_cal "Julian - Monday-based week" -1mj $MYTIME
+call_cal "Julian - Sunday-based week" -1sj $MYTIME
+call_cal "Gregorian - Monday-based week with week numbers" -1mw $MYTIME
+call_cal "Gregorian - Sunday-based week with week numbers" -1sw $MYTIME
+call_cal "Julian - Monday-based week with week numbers" -1mjw $MYTIME
+call_cal "Julian - Sunday-based week with week numbers" -1sjw $MYTIME
+call_cal "Gregorian - Monday-based week" -3m $MYTIME
+call_cal "Gregorian - Sunday-based week" -3s $MYTIME
+call_cal "Julian - Monday-based week" -3mj $MYTIMET
+call_cal "Julian - Sunday-based week" -3sj $MYTIME
+call_cal "Gregorian - Monday-based week with week numbers" -3mw $MYTIME
+call_cal "Gregorian - Sunday-based week with week numbers" -3sw $MYTIME
+call_cal "Julian - Monday-based week with week numbers" -3mjw $MYTIME
+call_cal "Julian - Sunday-based week with week numbers" -3sjw $MYTIME
+
+call_cal "Normal span" "-Sn 3" $MYTIME
+call_cal "Large span" "-Sn 21" $MYTIME
+call_cal "Very Large span" "-Sn 51" $MYTIME
+call_cal "Extreme span" "-Sn 201" $MYTIME
+
+ts_finalize
+
diff --git a/tests/ts/cal/sep1752 b/tests/ts/cal/sep1752
new file mode 100755
index 0000000..0fe1ffd
--- /dev/null
+++ b/tests/ts/cal/sep1752
@@ -0,0 +1,86 @@
+#!/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="September 1752"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_CAL"
+
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+MYMONTH="09 1752"
+MYYEAR="1752"
+
+CAL_TEST_TIME=1516562739 # 21st January 2018
+export CAL_TEST_TIME
+
+function call_cal_simple {
+ ts_log "$1"
+ shift
+ if [ "$USETERM" == "yes" ]; then
+ $TS_HELPER_CAL "$@"
+ fi
+ $TS_HELPER_CAL "$@" >> $TS_OUTPUT
+}
+
+function call_cal {
+ local testname=$(echo "$2" | sed 's/-//g')
+
+ if [ "$3" == "$MYYEAR" ]; then
+ testname="${testname}-year"
+ else
+ testname="${testname}-month"
+ fi
+
+ ts_init_subtest "$testname"
+ call_cal_simple "$@"
+ ts_finalize_subtest
+}
+
+
+call_cal "Gregorian - Monday-based month with week numbers" -1mw $MYMONTH
+call_cal "Gregorian - Sunday-based month with week numbers" -1sw $MYMONTH
+call_cal "Julian - Monday-based month with week numbers" -1mjw $MYMONTH
+call_cal "Julian - Sunday-based month with week numbers" -1sjw $MYMONTH
+call_cal "Gregorian - Monday-based three months with week numbers" -3mw $MYMONTH
+call_cal "Gregorian - Sunday-based three months with week numbers" -3sw $MYMONTH
+call_cal "Julian - Monday-based three months with week numbers" -3mjw $MYMONTH
+call_cal "Julian - Sunday-based three months with week numbers" -3sjw $MYMONTH
+call_cal "Gregorian - Monday-based year with week numbers" -1mw $MYYEAR
+call_cal "Gregorian - Sunday-based year with week numbers" -1sw $MYYEAR
+call_cal "Julian - Monday-based year with week numbers" -1mjw $MYYEAR
+call_cal "Julian - Sunday-based year with week numbers" -1sjw $MYYEAR
+
+ts_init_subtest "week-iso"
+call_cal_simple "Gregorian - address by week number" --week=40 --iso $MYYEAR
+ts_finalize_subtest
+
+call_cal "Gregorian - Monday-based month" -1m $MYMONTH
+call_cal "Gregorian - Sunday-based month" -1s $MYMONTH
+call_cal "Julian - Monday-based month" -1mj $MYMONTH
+call_cal "Julian - Sunday-based month" -1sj $MYMONTH
+call_cal "Gregorian - Monday-based three months" -3m $MYMONTH
+call_cal "Gregorian - Sunday-based three months" -3s $MYMONTH
+call_cal "Julian - Monday-based three months" -3mj $MYMONTH
+call_cal "Julian - Sunday-based three months" -3sj $MYMONTH
+call_cal "Gregorian - Monday-based year" -1m $MYYEAR
+call_cal "Gregorian - Sunday-based year" -1s $MYYEAR
+call_cal "Julian - Monday-based year" -1mj $MYYEAR
+call_cal "Julian - Sunday-based year" -1sj $MYYEAR
+
+ts_finalize
diff --git a/tests/ts/cal/vertical b/tests/ts/cal/vertical
new file mode 100755
index 0000000..fe0b904
--- /dev/null
+++ b/tests/ts/cal/vertical
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007-2018 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="${0%/*}/../.."
+TS_DESC="vertical"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_CAL"
+
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+MYTIME="27 09 2006"
+
+CAL_TEST_TIME=1516562739 # 21st January 2018
+export CAL_TEST_TIME
+
+function call_cal {
+ local testname=$(echo "$2" | sed 's/-//g; s/ //g')
+
+ ts_init_subtest "$testname"
+ ts_log "$1"
+ shift
+ if [ "$USETERM" == "yes" ]; then
+ $TS_HELPER_CAL "$@"
+ fi
+ $TS_HELPER_CAL "$@" >> $TS_OUTPUT
+
+ ts_finalize_subtest
+}
+
+call_cal "Gregorian - Monday-based week" -1mv $MYTIME
+call_cal "Gregorian - Sunday-based week" -1sv $MYTIME
+call_cal "Julian - Monday-based week" -1mjv $MYTIME
+call_cal "Julian - Sunday-based week" -1sjv $MYTIME
+call_cal "Gregorian - Monday-based week with week numbers" -1mwv $MYTIME
+call_cal "Gregorian - Sunday-based week with week numbers" -1swv $MYTIME
+call_cal "Julian - Monday-based week with week numbers" -1mjwv $MYTIME
+call_cal "Julian - Sunday-based week with week numbers" -1sjwv $MYTIME
+call_cal "Gregorian - Monday-based week" -3mv $MYTIME
+call_cal "Gregorian - Sunday-based week" -3sv $MYTIME
+call_cal "Julian - Monday-based week" -3mjv $MYTIMET
+call_cal "Julian - Sunday-based week" -3sjv $MYTIME
+call_cal "Gregorian - Monday-based week with week numbers" -3mwv $MYTIME
+call_cal "Gregorian - Sunday-based week with week numbers" -3swv $MYTIME
+call_cal "Julian - Monday-based week with week numbers" -3mjwv $MYTIME
+call_cal "Julian - Sunday-based week with week numbers" -3sjwv $MYTIME
+
+call_cal "Normal span" "-vSn 3" $MYTIME
+call_cal "Large span" "-vSn 21" $MYTIME
+call_cal "Very Large span" "-vSn 51" $MYTIME
+call_cal "Extreme span" "-vSn 201" $MYTIME
+
+ts_finalize
+
diff --git a/tests/ts/cal/weekarg b/tests/ts/cal/weekarg
new file mode 100755
index 0000000..477cbd5
--- /dev/null
+++ b/tests/ts/cal/weekarg
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="week number given as argument"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_CAL"
+ts_inhibit_custom_colorscheme
+
+has_ncurses=$( ts_has_ncurses_support )
+if [ "$has_ncurses" != "yes" ]; then
+ ts_skip "without-ncurses"
+fi
+
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+
+function call_cal_simple {
+ ts_log "$1"
+ shift
+ if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL "$@"
+ fi
+ $TS_CMD_CAL "$@" >> $TS_OUTPUT
+}
+
+function call_cal {
+ local testname=$(echo "${2}" | sed 's/-//g')
+ testname="${testname}-$(echo "${3}" | sed 's/=//g;s/-//g')"
+
+ ts_init_subtest "$testname"
+ call_cal_simple "$@"
+ ts_finalize_subtest
+}
+
+function call_cal_color {
+ local testname=$(echo "${2}" | sed 's/-//g')
+ testname="${testname}-$(echo "${3}" | sed 's/=//g;s/-//g')-color"
+
+ ts_init_subtest "$testname"
+ call_cal_simple "$@" --color=always
+ ts_finalize_subtest
+}
+
+MYTIME="7 10 2013"
+PWEEK="week 40"
+WEEK="--week=40"
+call_cal "Gregorian - Monday-based, $PWEEK, 3 month" -3m $WEEK $MYTIME
+call_cal "Gregorian - Sunday-based, $PWEEK, 3 month" -3s $WEEK $MYTIME
+call_cal "Julian - Monday-based, $PWEEK, 3 month" -3mj $WEEK $MYTIME
+call_cal "Julian - Sunday-based, $PWEEK, 3 month" -3sj $WEEK $MYTIME
+call_cal "Gregorian - Monday-based, $PWEEK, 1 month" -m $WEEK $MYTIME
+call_cal "Gregorian - Sunday-based, $PWEEK, 1 month" -s $WEEK $MYTIME
+call_cal "Julian - Monday-based, $PWEEK, 1 month" -mj $WEEK $MYTIME
+call_cal "Julian - Sunday-based, $PWEEK, 1 month" -sj $WEEK $MYTIME
+
+call_cal_color "Gregorian - Monday-based, $PWEEK, 3 month" -3m $WEEK $MYTIME
+call_cal_color "Julian - Monday-based, $PWEEK, 3 month" -3mj $WEEK $MYTIME
+
+# tricky year, starts with a bit of 53 yet ends during 52
+MYTIME="2010"
+PWEEK="week 53"
+WEEK="--week=53"
+call_cal "Gregorian - Monday-based, $PWEEK, 1 month" -1m $WEEK $MYTIME
+call_cal "Julian - Monday-based, $PWEEK, 1 month" -1mj $WEEK $MYTIME
+call_cal_color "Gregorian - Monday-based, $PWEEK, 3 month" -3m $WEEK $MYTIME
+call_cal_color "Gregorian - Monday-based, $PWEEK, 1 month" -1m $WEEK $MYTIME
+call_cal_color "Julian - Monday-based, $PWEEK, 1 month" -1mj $WEEK $MYTIME
+
+MYTIME="31 12 2000"
+PWEEK="week 54"
+WEEK="--week=54"
+call_cal_color "Gregorian - Sunday-based, $PWEEK, 3 month" -3s $WEEK $MYTIME
+
+MYTIME="31 12 2000"
+PWEEK="week 52"
+WEEK="--week=52"
+call_cal_color "Gregorian - Monday-based, $PWEEK, 3 month" -3m $WEEK $MYTIME
+
+ts_finalize
+
diff --git a/tests/ts/cal/weeknum b/tests/ts/cal/weeknum
new file mode 100755
index 0000000..444c50b
--- /dev/null
+++ b/tests/ts/cal/weeknum
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="week number corner cases"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_CAL"
+
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+
+[ "$USETERM" == "yes" ] && TS_VERBOSE="yes"
+
+function call_cal {
+ local testname=$(echo "$2" | sed 's/-//g')
+
+ ts_init_subtest "$testname"
+ ts_log "$1"
+ shift
+ for x in 2001 2002 2003 2009 2010 2011 2012 ; do
+ if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL "$@" 1 $x
+ fi
+ $TS_CMD_CAL "$@" 1 $x >> $TS_OUTPUT
+ done
+ ts_finalize_subtest
+}
+
+call_cal "Gregorian - Monday-based week with week numbers" -ymw
+call_cal "Gregorian - Sunday-based week with week numbers" -ysw
+call_cal "Julian - Monday-based week with week numbers" -ymjw
+call_cal "Julian - Sunday-based week with week numbers" -ysjw
+call_cal "Gregorian - Monday-based week with week number" -3mw
+call_cal "Gregorian - Sunday-based week with week numbers - 3 month" -3sw
+call_cal "Julian - Monday-based week with week numbers - 3 month" -3mjw
+call_cal "Julian - Sunday-based week with week numbers - 3 month" -3sjw
+
+ts_finalize
+
diff --git a/tests/ts/cal/year b/tests/ts/cal/year
new file mode 100755
index 0000000..6bd958a
--- /dev/null
+++ b/tests/ts/cal/year
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007-2018 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="${0%/*}/../.."
+TS_DESC="year"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_CAL"
+
+export TERM=linux
+
+USETERM=$( ts_has_option "useterm" "$*" )
+MYTIME="29 11 2006"
+
+function call_cal {
+ local testname=$(echo "$2" | sed 's/-//g')
+
+ ts_init_subtest "$testname"
+ ts_log "$1"
+ shift
+ if [ "$USETERM" == "yes" ]; then
+ $TS_CMD_CAL "$@"
+ fi
+ $TS_CMD_CAL "$@" >> $TS_OUTPUT
+ ts_finalize_subtest
+}
+
+call_cal "Gregorian - Monday-based week" -ym $MYTIME
+call_cal "Gregorian - Sunday-based week" -ys $MYTIME
+call_cal "Julian - Monday-based week" -ymj $MYTIME
+call_cal "Julian - Sunday-based week" -ysj $MYTIME
+call_cal "Gregorian - Monday-based week with week numbers" -ymw $MYTIME
+call_cal "Gregorian - Sunday-based week with week numbers" -ysw $MYTIME
+call_cal "Julian - Monday-based week with week numbers" -ymjw $MYTIME
+call_cal "Julian - Sunday-based week with week numbers" -ysjw $MYTIME
+
+ts_finalize
+
diff --git a/tests/ts/chfn/gecos b/tests/ts/chfn/gecos
new file mode 100755
index 0000000..f7a0bdb
--- /dev/null
+++ b/tests/ts/chfn/gecos
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2019 Radka Skvarilova <rskvaril@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="${0%/*}/../.."
+TS_DESC="gecos"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+export LIBUSER_CONF=/dev/null
+
+ts_skip_nonroot
+ts_check_test_command "$TS_CMD_CHFN"
+ts_check_prog "useradd"
+ts_check_prog "userdel"
+
+ts_log "Initialize user"
+useradd -u 9899 --shell /bin/bash testuser_chfn_test
+grep testuser /etc/passwd >> $TS_OUTPUT
+$TS_CMD_CHFN -f test_gecos testuser_chfn_test >>$TS_OUTPUT
+grep testuser /etc/passwd >> $TS_OUTPUT
+userdel --remove testuser_chfn_test &> /dev/null
+ts_finalize
diff --git a/tests/ts/col/io b/tests/ts/col/io
new file mode 100755
index 0000000..9766683
--- /dev/null
+++ b/tests/ts/col/io
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2020 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="io effects"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_COL"
+
+ts_init_subtest "trailing-spaces"
+printf "1 \t\n2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "tab-backspace"
+printf "1\t\x082\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "various-spaces"
+printf "1 \t\f2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "cr"
+printf "1\r2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "vt1"
+printf "1\n23\v\n4\n5\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "vt2"
+printf "a\v\vb\v\vc" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "reverse-lf"
+printf "1\n2\e\x073\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "so-si"
+printf "\x0e\x0f" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "esc-tab"
+printf "\e\t\b1\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "esc-backspace"
+printf "1\e\b2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "cs-normal"
+printf "<B\x10\x0E\t\v\x100" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "cs-alternate"
+printf "1\t\x0E2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "allocate-here"
+printf "1\t\v2\t\n3" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "half-line"
+printf "\e\t\b1\n" | ts_run $TS_CMD_COL --fine >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "flushing"
+seq 1 199 | ts_run $TS_CMD_COL --lines 8 >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/col/multibyte b/tests/ts/col/multibyte
new file mode 100755
index 0000000..fa14a0a
--- /dev/null
+++ b/tests/ts/col/multibyte
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="multibyte input"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_COL"
+ts_check_test_command "$TS_HELPER_STRERROR"
+
+ts_init_subtest "valid"
+cat $TS_SELF/multibyte.data |
+ LC_ALL=C ts_run $TS_CMD_COL 2>&1 |
+ sed -e "s@$($TS_HELPER_STRERROR EILSEQ)@EILSEQ@" > $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "invalid"
+printf '%s\n' $'abc\200\200jkl' |
+ LC_ALL=C ts_run $TS_CMD_COL 2>&1 |
+ sed -e "s@$($TS_HELPER_STRERROR EILSEQ)@EILSEQ@" > $TS_OUTPUT
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/col/multibyte.data b/tests/ts/col/multibyte.data
new file mode 100644
index 0000000..b203afd
--- /dev/null
+++ b/tests/ts/col/multibyte.data
@@ -0,0 +1 @@
+Dateiname der Versandhülle
diff --git a/tests/ts/col/newlines b/tests/ts/col/newlines
new file mode 100755
index 0000000..8a6d904
--- /dev/null
+++ b/tests/ts/col/newlines
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2020 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="newline handling"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_COL"
+
+ts_init_subtest "zero-length-file"
+printf "" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "one-line-no-nl"
+printf "1" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "one-line-with-nl"
+printf "1\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "second-line-no-nl"
+printf "1\n2" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "second-line-with-nl"
+printf "1\n2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/col/options b/tests/ts/col/options
new file mode 100755
index 0000000..6df11ae
--- /dev/null
+++ b/tests/ts/col/options
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2020 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="options"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_COL"
+
+ts_init_subtest "no-backspaces"
+printf "FIXME" | ts_run $TS_CMD_COL --no-backspaces >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "pass"
+printf "a\x11b" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>> $TS_ERRLOG
+printf "a\x11b" | ts_run $TS_CMD_COL --pass >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "tabs"
+printf " 1\n" | ts_run $TS_CMD_COL --tabs >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "spaces"
+printf "\t1\n" | ts_run $TS_CMD_COL --spaces >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/colcrt/crash1 b/tests/ts/colcrt/crash1
new file mode 100644
index 0000000..6681181
--- /dev/null
+++ b/tests/ts/colcrt/crash1
Binary files differ
diff --git a/tests/ts/colcrt/crash2 b/tests/ts/colcrt/crash2
new file mode 100644
index 0000000..0843cb6
--- /dev/null
+++ b/tests/ts/colcrt/crash2
Binary files differ
diff --git a/tests/ts/colcrt/functional b/tests/ts/colcrt/functional
new file mode 100755
index 0000000..26014b8
--- /dev/null
+++ b/tests/ts/colcrt/functional
@@ -0,0 +1,51 @@
+#!/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="functional"
+
+export LC_CTYPE='C'
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_check_wcsspn
+
+ts_check_test_command "$TS_CMD_COLCRT"
+
+ts_init_subtest 'no-options'
+$TS_CMD_COLCRT < $TS_SELF/nasty-input >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_COLCRT < $TS_SELF/underlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "return value: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest 'no-underlining'
+$TS_CMD_COLCRT --no-underlining < $TS_SELF/nasty-input >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_COLCRT --no-underlining < $TS_SELF/underlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "return value: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest 'half-lines'
+$TS_CMD_COLCRT --half-lines < $TS_SELF/nasty-input >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_COLCRT --half-lines < $TS_SELF/underlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "return value: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest 'short-options'
+$TS_CMD_COLCRT - -2 $TS_SELF/nasty-input >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_COLCRT - -2 $TS_SELF/underlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "return value: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/colcrt/hang1 b/tests/ts/colcrt/hang1
new file mode 100644
index 0000000..d26259e
--- /dev/null
+++ b/tests/ts/colcrt/hang1
@@ -0,0 +1 @@
+789:;<=>=>?IABUVNXYZ[_`abcdefgg !"#$%&'()*+,-./01234)*:,-./0123456789:;[=>?1234)*:,-./0123456789:;[=>?4456789:;<=>?IABUVN`abcdefg !" $%&'()*+,-./0123z{|ü~e \ No newline at end of file
diff --git a/tests/ts/colcrt/nasty-input b/tests/ts/colcrt/nasty-input
new file mode 100644
index 0000000..5e541bc
--- /dev/null
+++ b/tests/ts/colcrt/nasty-input
Binary files differ
diff --git a/tests/ts/colcrt/regressions b/tests/ts/colcrt/regressions
new file mode 100755
index 0000000..7bbba65
--- /dev/null
+++ b/tests/ts/colcrt/regressions
@@ -0,0 +1,38 @@
+#!/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="regressions"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_check_wcsspn
+
+ts_check_test_command "$TS_CMD_COLCRT"
+ts_check_prog "timeout"
+ts_check_prog "env"
+
+check_input_file() {
+ ts_init_subtest ${1##*/}
+ timeout 2 env LC_ALL=C.UTF-8 $TS_CMD_COLCRT < $1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ echo "return value: $?" >> $TS_OUTPUT
+ ts_finalize_subtest
+}
+
+check_input_file "$TS_SELF/crash1"
+check_input_file "$TS_SELF/crash2"
+check_input_file "$TS_SELF/hang1"
+
+ts_finalize
diff --git a/tests/ts/colcrt/underlines b/tests/ts/colcrt/underlines
new file mode 100644
index 0000000..940c7a8
--- /dev/null
+++ b/tests/ts/colcrt/underlines
@@ -0,0 +1,23 @@
+ 200 ___
+ 201 abc
+ 202 _abc
+ 203 a_bc
+ 204 ab_c
+ 205 abc_
+ 206 __abc
+ 207 a__bc
+ 208 ab__c
+ 209 abc__
+ 210 _a_bc
+ 211 _ab_c
+ 212 a_b_c
+ 213 a__bc
+ 214 a_bc_
+ 215 abc__
+ 216 _abc_
+ 217 _a_b_c
+ 218 _a__bc
+ 219 a__bc_
+ 220 _abc__
+ 221 ___abc
+ 222 abc___
diff --git a/tests/ts/colrm/rm2-2 b/tests/ts/colrm/rm2-2
new file mode 100755
index 0000000..ed6e962
--- /dev/null
+++ b/tests/ts/colrm/rm2-2
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2011 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="basic check"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_COLRM"
+
+printf "a b\nc\td\nef\b\tg\n" | $TS_CMD_COLRM 2 2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/column/columnate b/tests/ts/column/columnate
new file mode 100755
index 0000000..9bd53a7
--- /dev/null
+++ b/tests/ts/column/columnate
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2011 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="columnate"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_COLUMN"
+ts_cd "$TS_OUTDIR"
+
+
+ts_init_subtest "fill-cols-80"
+$TS_CMD_COLUMN -c 80 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "fill-cols-50"
+$TS_CMD_COLUMN -c 50 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "fill-cols-250"
+$TS_CMD_COLUMN -c 250 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "fill-rows-80"
+$TS_CMD_COLUMN --fillrows -c 80 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "fill-rows-50"
+$TS_CMD_COLUMN --fillrows -c 50 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "fill-rows-250"
+$TS_CMD_COLUMN --fillrows -c 250 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/column/files/fivecols b/tests/ts/column/files/fivecols
new file mode 100644
index 0000000..d3ea4a8
--- /dev/null
+++ b/tests/ts/column/files/fivecols
@@ -0,0 +1,10 @@
+0 1 2 3 4 5
+0 1 2 3 4 5
+0 1 2 3 4 5
+0 1 2 3 4 5
+0 1 2 3 4 5
+0 1 2 3 4 5
+0 1 2 3 4 5
+0 1 2 3 4 5
+0 1 2 3 4 5
+0 1 2 3 4 5
diff --git a/tests/ts/column/files/mountinfo b/tests/ts/column/files/mountinfo
new file mode 100644
index 0000000..b751e16
--- /dev/null
+++ b/tests/ts/column/files/mountinfo
@@ -0,0 +1,41 @@
+17 62 0:17 / /sys rw,nosuid,nodev,noexec,relatime shared:6 - sysfs sysfs rw
+18 62 0:4 / /proc rw,nosuid,nodev,noexec,relatime shared:5 - proc proc rw
+19 62 0:6 / /dev rw,nosuid shared:2 - devtmpfs devtmpfs rw,size=8175740k,nr_inodes=2043935,mode=755
+20 17 0:18 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime shared:7 - securityfs securityfs rw
+21 19 0:19 / /dev/shm rw,nosuid,nodev shared:3 - tmpfs tmpfs rw
+22 19 0:20 / /dev/pts rw,nosuid,noexec,relatime shared:4 - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+23 62 0:21 / /run rw,nosuid,nodev shared:23 - tmpfs tmpfs rw,mode=755
+24 17 0:22 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:8 - tmpfs tmpfs ro,mode=755
+25 24 0:23 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:9 - cgroup cgroup rw,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
+26 17 0:24 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime shared:20 - pstore pstore rw
+27 17 0:25 / /sys/firmware/efi/efivars rw,nosuid,nodev,noexec,relatime shared:21 - efivarfs efivarfs rw
+28 24 0:26 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime shared:10 - cgroup cgroup rw,blkio
+29 24 0:27 / /sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime shared:11 - cgroup cgroup rw,cpu,cpuacct
+30 24 0:28 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime shared:12 - cgroup cgroup rw,devices
+31 24 0:29 / /sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime shared:13 - cgroup cgroup rw,hugetlb
+32 24 0:30 / /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime shared:14 - cgroup cgroup rw,pids
+33 24 0:31 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:15 - cgroup cgroup rw,memory
+34 24 0:32 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:16 - cgroup cgroup rw,cpuset
+35 24 0:33 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime shared:17 - cgroup cgroup rw,perf_event
+36 24 0:34 / /sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime shared:18 - cgroup cgroup rw,net_cls,net_prio
+37 24 0:35 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:19 - cgroup cgroup rw,freezer
+60 17 0:36 / /sys/kernel/config rw,relatime shared:22 - configfs configfs rw
+62 0 8:4 / / rw,relatime shared:1 - ext4 /dev/sda4 rw,data=ordered
+38 18 0:37 / /proc/sys/fs/binfmt_misc rw,relatime shared:24 - autofs systemd-1 rw,fd=37,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12781
+39 17 0:7 / /sys/kernel/debug rw,relatime shared:25 - debugfs debugfs rw
+40 19 0:38 / /dev/hugepages rw,relatime shared:26 - hugetlbfs hugetlbfs rw
+41 19 0:16 / /dev/mqueue rw,relatime shared:27 - mqueue mqueue rw
+42 38 0:39 / /proc/sys/fs/binfmt_misc rw,relatime shared:28 - binfmt_misc binfmt_misc rw
+75 18 0:40 / /proc/fs/nfsd rw,relatime shared:29 - nfsd nfsd rw
+77 62 0:41 / /tmp rw,nosuid,nodev shared:30 - tmpfs tmpfs rw
+80 62 8:3 / /home rw,relatime shared:31 - ext4 /dev/sda3 rw,data=ordered
+81 62 8:2 / /boot rw,relatime shared:32 - ext4 /dev/sda2 rw,data=ordered
+84 80 8:5 / /home/games rw,relatime shared:33 - ext4 /dev/sda5 rw,data=ordered
+86 81 8:1 / /boot/efi rw,relatime shared:34 - vfat /dev/sda1 rw,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro
+88 80 8:17 / /home/archive rw,relatime shared:35 - ext4 /dev/sdb1 rw,data=ordered
+90 62 0:43 / /var/lib/nfs/rpc_pipefs rw,relatime shared:36 - rpc_pipefs sunrpc rw
+223 17 0:47 / /sys/fs/fuse/connections rw,relatime shared:163 - fusectl fusectl rw
+217 23 0:46 / /run/user/1000 rw,nosuid,nodev,relatime shared:158 - tmpfs tmpfs rw,size=1637324k,mode=700,uid=1000,gid=1000
+203 217 0:45 / /run/user/1000/gvfs rw,nosuid,nodev,relatime shared:153 - fuse.gvfsd-fuse gvfsd-fuse rw,user_id=1000,group_id=1000
+171 23 0:44 / /run/user/0 rw,nosuid,nodev,relatime shared:114 - tmpfs tmpfs rw,size=1637324k,mode=700
+177 62 0:48 / /mnt/sounds rw,relatime shared:119 - cifs //sr.net.home/sounds rw,vers=1.0,cache=strict,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=65536,echo_interval=60,actimeo=1
diff --git a/tests/ts/column/files/onecolumn b/tests/ts/column/files/onecolumn
new file mode 100644
index 0000000..69ec82f
--- /dev/null
+++ b/tests/ts/column/files/onecolumn
@@ -0,0 +1,9 @@
+AAAAAAAAAAAAAAAAAAAA
+BBBBBBBBBBBBBBBBBBBBB
+CCCCCCCCCCCCCCCC
+DDDDDDDDDDDDDDDDD
+EEEEEEEEEEEEE
+FFFFFFFFFFFFFFFFFFF
+XXXXXXX
+YYYYYYYYYYY
+ZZZZZZZZZZZ
diff --git a/tests/ts/column/files/table b/tests/ts/column/files/table
new file mode 100644
index 0000000..e051631
--- /dev/null
+++ b/tests/ts/column/files/table
@@ -0,0 +1,6 @@
+AAA BBBB C DDDD
+A BBB CCCC DDD
+AA BB CCC DD
+AAAA B CC D
+AA BB CC DD
+AAAAA BBB CCC DDDD
diff --git a/tests/ts/column/files/table-empty-lines b/tests/ts/column/files/table-empty-lines
new file mode 100644
index 0000000..9429b4d
--- /dev/null
+++ b/tests/ts/column/files/table-empty-lines
@@ -0,0 +1,6 @@
+
+A B CCC
+AA BBB AA
+AAA BB C
+
+AAAA BBBB CCCC
diff --git a/tests/ts/column/files/table-sep b/tests/ts/column/files/table-sep
new file mode 100644
index 0000000..d4c2bf3
--- /dev/null
+++ b/tests/ts/column/files/table-sep
@@ -0,0 +1,6 @@
+AAA,BBBB,C,DDDD
+,BBB,CCCC,DDD
+AA,BB,,DD
+AAAA,B,CC,D
+AA,,CC,DD
+AAAAA,BBB,CCC,DDDD
diff --git a/tests/ts/column/files/table-sep-space b/tests/ts/column/files/table-sep-space
new file mode 100644
index 0000000..25d9b5a
--- /dev/null
+++ b/tests/ts/column/files/table-sep-space
@@ -0,0 +1,6 @@
+AAA BBBB C DDDD
+ BBB CCCC DDD
+AA BB DD
+AAAA B CC D
+AA CC DD
+AAAAA BBB CCC DDDD
diff --git a/tests/ts/column/invalid-multibyte b/tests/ts/column/invalid-multibyte
new file mode 100755
index 0000000..32cc3f3
--- /dev/null
+++ b/tests/ts/column/invalid-multibyte
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2014 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="invalid multibyte"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_COLUMN"
+
+ts_cd "$TS_OUTDIR"
+
+printf "\x94\x7e\n" | LC_ALL=C.UTF-8 $TS_CMD_COLUMN >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/column/multi-file b/tests/ts/column/multi-file
new file mode 100755
index 0000000..28c3689
--- /dev/null
+++ b/tests/ts/column/multi-file
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2011 Sami Kerola <kerolasa@iki.fi>
+# 2011 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="${0%/*}/../.."
+TS_DESC="multiple files"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_COLUMN"
+
+ts_cd "$TS_OUTDIR"
+
+$TS_CMD_COLUMN -x -c 50 $TS_SELF/files/fivecols \
+ $TS_SELF/files/fivecols \
+ $TS_SELF/files/fivecols >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
+
diff --git a/tests/ts/column/table b/tests/ts/column/table
new file mode 100755
index 0000000..8b22d83
--- /dev/null
+++ b/tests/ts/column/table
@@ -0,0 +1,148 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2011 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="table"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_check_wcsspn
+
+ts_check_test_command "$TS_CMD_COLUMN"
+ts_cd "$TS_OUTDIR"
+
+ts_init_subtest "default"
+$TS_CMD_COLUMN --table $TS_SELF/files/table >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "output-separator"
+$TS_CMD_COLUMN --output-separator '|' --table $TS_SELF/files/table >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "input-separator"
+$TS_CMD_COLUMN --separator ',' --table $TS_SELF/files/table-sep >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "input-separator-space"
+$TS_CMD_COLUMN --separator "$(echo -e '\t')" --table $TS_SELF/files/table-sep-space >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "empty-lines"
+$TS_CMD_COLUMN --table --table-empty-lines $TS_SELF/files/table-empty-lines >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "noempty-lines"
+$TS_CMD_COLUMN --table $TS_SELF/files/table-empty-lines >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "long"
+$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "hide"
+$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \
+ --table-hide 1,2,3,4,7,8 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "headers"
+$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \
+ --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \
+ --table-hide SEP,ID,PARENT,ROOT \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "truncate"
+$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \
+ --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \
+ --table-hide SEP,ID,PARENT,ROOT \
+ --table-truncate VFS-OPTS,FS-OPTS \
+ --output-width 80 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "right"
+$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \
+ --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \
+ --table-hide SEP,ID,PARENT,ROOT,VFS-OPTS,FS-OPTS,PROP \
+ --table-right SOURCE,TYPE \
+ --output-width 80 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "wrap"
+$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \
+ --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \
+ --table-hide=SEP,ID,PARENT,ROOT,VFS-OPTS,PROP \
+ --table-wrap FS-OPTS \
+ --output-width 110 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "order"
+$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \
+ --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \
+ --table-hide=SEP,ID,PARENT,ROOT,PROP,FS-OPTS,MAJMIN \
+ --table-order TARGET,SOURCE,TYPE,VFS-OPTS \
+ --output-width 110 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "tree"
+$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \
+ --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \
+ --table-hide=SEP,ID,PARENT,ROOT,PROP,FS-OPTS,MAJMIN \
+ --table-order TARGET,SOURCE,TYPE,VFS-OPTS \
+ --tree TARGET \
+ --tree-id ID \
+ --tree-parent PARENT \
+ --output-width 110 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "empty-column"
+printf ':a:b\n' | $TS_CMD_COLUMN --table --separator ':' --output-separator ':' >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "empty-column-at-eol"
+printf '|' | $TS_CMD_COLUMN --separator '|' --output-separator '|' --table >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "empty-column-at-eol2"
+printf '||' | $TS_CMD_COLUMN --separator '|' --output-separator '|' --table >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "neg-1"
+echo "A B C D" | $TS_CMD_COLUMN --output-separator '|' --table --table-maxout \
+ --table-right -1 --output-width=80 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "neg-2"
+echo "A B C D" | $TS_CMD_COLUMN --output-separator '|' --table --table-maxout \
+ --table-right -2 --output-width=80 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "neg-1-2"
+echo "A B C D" | $TS_CMD_COLUMN --output-separator '|' --table --table-maxout \
+ --table-right -1,-2 --output-width=80 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "range"
+echo "A B C D" | $TS_CMD_COLUMN --output-separator '|' --table --table-maxout \
+ --table-right 2-3 --output-width=80 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/cramfs/cramfs-big.img b/tests/ts/cramfs/cramfs-big.img
new file mode 100644
index 0000000..2ea516e
--- /dev/null
+++ b/tests/ts/cramfs/cramfs-big.img
Binary files differ
diff --git a/tests/ts/cramfs/cramfs-little.img b/tests/ts/cramfs/cramfs-little.img
new file mode 100644
index 0000000..a1dfab5
--- /dev/null
+++ b/tests/ts/cramfs/cramfs-little.img
Binary files differ
diff --git a/tests/ts/cramfs/doubles b/tests/ts/cramfs/doubles
new file mode 100755
index 0000000..d81daf1
--- /dev/null
+++ b/tests/ts/cramfs/doubles
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2011 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="${0%/*}/../.."
+TS_DESC="mkfs doubles"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKCRAMFS"
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+
+ORIGPWD=$(pwd)
+IMAGE_NAME="${TS_TESTNAME}.img"
+IMAGE_PATH="$TS_OUTDIR/$IMAGE_NAME"
+IMAGE_SRC="$TS_OUTDIR/${TS_TESTNAME}-data"
+
+ts_log "create mountpoint dir"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+rm -rf "$IMAGE_SRC"
+mkdir -m 755 -p $IMAGE_SRC
+
+umask 133
+
+echo hello > $IMAGE_SRC/a
+echo hello > $IMAGE_SRC/b
+
+# sudo may use whatever group
+chgrp -R 0 "$IMAGE_SRC"
+
+ts_log "create cramfs image"
+$TS_CMD_MKCRAMFS $IMAGE_SRC $IMAGE_PATH >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ -s "$IMAGE_PATH" ] || ts_die "Cannot create $IMAGE_PATH"
+
+ts_mount "cramfs" -r $IMAGE_PATH $TS_MOUNTPOINT
+
+# check it
+ts_is_mounted $TS_MOUNTPOINT || ts_die "Cannot find $TS_MOUNTPOINT in /proc/mounts"
+
+ts_log "umount the image"
+$TS_CMD_UMOUNT $TS_MOUNTPOINT
+ts_finalize
+
diff --git a/tests/ts/cramfs/fsck-bad-header b/tests/ts/cramfs/fsck-bad-header
new file mode 100755
index 0000000..d834b24
--- /dev/null
+++ b/tests/ts/cramfs/fsck-bad-header
@@ -0,0 +1,102 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="fsck bad header"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKCRAMFS"
+ts_check_test_command "$TS_CMD_FSCKCRAMFS"
+ts_check_prog "dd"
+
+function num2binary()
+{
+ local num=$1
+ local endian=$2
+
+ test "$num" -ge 0 -a "$num" -le 4294967295 || return 1
+ test "$endian" = "be" -o "$endian" = "le" || return 1
+
+ # how to do that easier?
+ if test "$endian" = "be"; then
+ echo -en "$(printf "%08x" "$1" | sed 's/\(..\)/\\x\1/g')"
+ else
+ echo -en "$(printf "%08x" "$1" | sed 's/^\(..\)\(..\)\(..\)\(..\)$/\\x\4\\x\3\\x\2\\x\1/')"
+ fi
+}
+
+function fsck_loop_sizes()
+{
+ local endian=$1 # be, le
+ local seek=$2 # 4 for nopad, 516 for pad
+ shift 2 # the rest are sizes to loop over
+
+ for size in "$@"; do
+ ts_log_both "## size: $size"
+ cp -a "$IMAGE_FILE" "$IMAGE_FILE.tmp"
+ num2binary "$size" $endian |
+ dd of="$IMAGE_FILE.tmp" bs=1 seek="$seek" count=4 conv=notrunc &> /dev/null
+ $TS_CMD_FSCKCRAMFS "$IMAGE_FILE.tmp" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_log "ret: $?
+"
+ done
+ rm -f "$IMAGE_FILE"
+}
+
+
+IMAGE_SOURCE="$TS_OUTDIR/${TS_TESTNAME}-data"
+IMAGE_FILE="$TS_OUTDIR/${TS_TESTNAME}-cramfs.img"
+
+mkdir -p "${IMAGE_SOURCE}/subdir" &> /dev/null
+
+ts_init_subtest "nopad-4K-be"
+$TS_CMD_MKCRAMFS -N big -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null
+fsck_loop_sizes be 4 0 75 76 4095 4096 4097 4294967295
+rm -f "$IMAGE_FILE"
+ts_finalize_subtest
+
+ts_init_subtest "nopad-4K-le"
+$TS_CMD_MKCRAMFS -N little -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null
+fsck_loop_sizes le 4 0 75 76 4095 4096 4097 4294967295
+ts_finalize_subtest
+
+ts_init_subtest "pad-4K-be"
+$TS_CMD_MKCRAMFS -p -N big -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null
+fsck_loop_sizes be 516 76 587 588 4095 4096 4097 4294967295
+ts_finalize_subtest
+
+ts_init_subtest "pad-4K-le"
+$TS_CMD_MKCRAMFS -p -N little -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null
+fsck_loop_sizes le 516 76 587 588 4095 4096 4097 4294967295
+ts_finalize_subtest
+
+ts_init_subtest "pad-64K-be"
+$TS_CMD_MKCRAMFS -p -N big -b 65536 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null
+fsck_loop_sizes be 516 76 587 588 65535 65536 65537 4294967295
+ts_finalize_subtest
+
+ts_init_subtest "pad-64K-le"
+$TS_CMD_MKCRAMFS -p -N little -b 65536 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null
+fsck_loop_sizes le 516 76 587 588 65535 65536 65537 4294967295
+ts_finalize_subtest
+
+rm -rf "$IMAGE_SOURCE" "$IMAGE_FILE.tmp"
+
+ts_finalize
+
diff --git a/tests/ts/cramfs/fsck-endianness b/tests/ts/cramfs/fsck-endianness
new file mode 100755
index 0000000..53af53e
--- /dev/null
+++ b/tests/ts/cramfs/fsck-endianness
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="fsck endianness"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKCRAMFS"
+ts_check_test_command "$TS_CMD_FSCKCRAMFS"
+ts_check_test_command "$TS_HELPER_MD5"
+
+ts_skip_nonroot
+
+IMAGE_LITTLE="$TS_SELF/cramfs-little.img" #Known good little endian image
+IMAGE_BIG="$TS_SELF/cramfs-big.img" #Known good big endian image
+
+IMAGE_CREATED="$TS_OUTDIR/${TS_TESTNAME}-cramfs.img" #Image created during the test and compared against the known images.
+IMAGE_DATA="$TS_OUTDIR/${TS_TESTNAME}-data"
+
+test_image() {
+ local FROM_ENDIANNESS="$1"; shift
+ local TO_ENDIANNESS="$1"; shift
+ local FROM_IMAGE="$1"; shift
+
+ rm -rf "$IMAGE_DATA"
+ ts_log "extract from $FROM_ENDIANNESS endian"
+ $TS_CMD_FSCKCRAMFS -v -b 4096 --extract=$IMAGE_DATA $FROM_IMAGE | head -n1 | cut -d" " -f4 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ ts_log "create $TO_ENDIANNESS endian"
+ $TS_CMD_MKCRAMFS -N "$TO_ENDIANNESS" -b 4096 "$IMAGE_DATA" \
+ "$IMAGE_CREATED" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ "$TS_HELPER_MD5" < "$IMAGE_CREATED" >> $TS_OUTPUT
+
+ rm "$IMAGE_CREATED"
+}
+
+test_image "little" "big" "$IMAGE_LITTLE"
+test_image "big" "little" "$IMAGE_BIG"
+
+ts_finalize
+
diff --git a/tests/ts/cramfs/mkfs b/tests/ts/cramfs/mkfs
new file mode 100755
index 0000000..1e415d8
--- /dev/null
+++ b/tests/ts/cramfs/mkfs
@@ -0,0 +1,125 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="mkfs checksums"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKCRAMFS"
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_BLKID"
+ts_check_test_command "$TS_HELPER_MD5"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+ts_skip_nonroot
+ts_check_losetup
+
+ORIGPWD=$(pwd)
+IMAGE_NAME="${TS_TESTNAME}-loop.img"
+IMAGE_PATH="$TS_OUTDIR/$IMAGE_NAME"
+IMAGE_SRC="$TS_OUTDIR/${TS_TESTNAME}-data"
+LABEL="testCramfs"
+
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
+PAGE_SIZE=$($TS_HELPER_SYSINFO pagesize)
+case "${BYTE_ORDER}:${PAGE_SIZE}" in
+ LE:4096)
+ MD5_EXP="a6667acb1cb0685d9eb5b9cd3724766c" ;;
+ LE:16384 | LE:65536)
+ MD5_EXP="b60133682603b0118592b55f1dba017c" ;;
+ BE:4096)
+ MD5_EXP="eaf05031dc8ec97c91ba5c773635cc89" ;;
+ BE:8192 | BE:65536)
+ MD5_EXP="5859f87b185b1187fca3b2b00c809c03" ;;
+ *)
+ echo "warning ${TS_NS}: unknown checksum for ${BYTE_ORDER}:${PAGE_SIZE}"
+ MD5_EXP="unknown" ;;
+esac
+
+ts_log "create mountpoint dir"
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+ts_log "generate data"
+rm -rf "$IMAGE_SRC"
+mkdir -m 755 -p $IMAGE_SRC
+
+umask 133
+
+for d in `seq 0 110`; do
+ DIRNAME="$IMAGE_SRC/$(printf "dir-%03d" $d)"
+ mkdir -m 755 $DIRNAME
+ for f in `seq 0 10`; do
+ FILENAME="$DIRNAME/$(printf "data.%03d" $f)"
+ printf "data in %03d-%03d" $d $f >> $FILENAME
+ done
+done
+
+chgrp -R 0 "$IMAGE_SRC"
+
+ts_cd "$IMAGE_SRC"
+
+ts_log "list checksums from original data"
+find . -type f -exec md5sum {} \; | sort >> $TS_OUTPUT
+echo >> $TS_OUTPUT
+
+ts_log "create cramfs image"
+$TS_CMD_MKCRAMFS -n $LABEL $IMAGE_SRC $IMAGE_PATH >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ -s "$IMAGE_PATH" ] || ts_die "Cannot create $IMAGE_PATH"
+
+ts_cd "$TS_OUTDIR"
+
+ts_log "count MD5 from the image"
+MD5_OUT=$("$TS_HELPER_MD5" < "$IMAGE_NAME") >> $TS_OUTPUT 2>> $TS_ERRLOG
+if [ "$MD5_EXP" != "$MD5_OUT" -a "$MD5_EXP" != "unknown" ]; then
+ ts_log "is $MD5_OUT, should be $MD5_EXP"
+fi
+echo >> $TS_OUTPUT
+
+ts_log "create loop device from image"
+DEVICE=$($TS_CMD_LOSETUP --show -f $IMAGE_PATH)
+ts_register_loop_device "$DEVICE"
+
+ts_log "check the image"
+ts_device_has "TYPE" "cramfs" $DEVICE
+[ "$?" == "0" ] || ts_die "Cannot find cramfs on $DEVICE"
+
+ts_log "mount the image"
+ts_mount "cramfs" -r -L $LABEL $TS_MOUNTPOINT
+
+# check it
+ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
+
+ts_cd "$TS_MOUNTPOINT"
+
+ts_log "list the image"
+export TZ='GMT-1'
+ls -laR --time-style=long-iso . | sed 's:\. : :g' >> $TS_OUTPUT
+echo >> $TS_OUTPUT
+
+ts_log "list checksums from new data"
+find . -type f -exec md5sum {} \; | sort >> $TS_OUTPUT
+echo >> $TS_OUTPUT
+
+ts_cd "$ORIGPWD"
+
+ts_log "umount the image"
+ts_finalize
+
diff --git a/tests/ts/cramfs/mkfs-endianness b/tests/ts/cramfs/mkfs-endianness
new file mode 100755
index 0000000..d10e1e1
--- /dev/null
+++ b/tests/ts/cramfs/mkfs-endianness
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="mkfs endianness"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKCRAMFS"
+ts_check_test_command "$TS_CMD_HEXDUMP"
+
+ts_skip_nonroot
+
+IMAGE_DATA="$TS_OUTDIR/${TS_TESTNAME}-data"
+IMAGE_CREATED="$TS_OUTDIR/${TS_TESTNAME}-cramfs.img" #Image created during the test and compared against the known images.
+
+umask 133
+
+test_image() {
+ local TO_ENDIANNESS="$1"; shift
+ ts_log "create $TO_ENDIANNESS endian"
+
+ $TS_CMD_MKCRAMFS -N "$TO_ENDIANNESS" -b 4096 "$IMAGE_DATA" \
+ "$IMAGE_CREATED" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ $TS_CMD_HEXDUMP -C $IMAGE_CREATED >> $TS_OUTPUT
+
+ rm "$IMAGE_CREATED"
+}
+
+#generate test data, must be owner root
+rm -rf "$IMAGE_DATA"
+mkdir -m 755 $IMAGE_DATA
+mkdir -m 755 $IMAGE_DATA/dirA
+mkdir -m 755 $IMAGE_DATA/dirA/dirB
+
+cp $TS_SELF/mkfs-endianness_testdata_a $IMAGE_DATA/dirA/dirB/a
+cp $TS_SELF/mkfs-endianness_testdata_b $IMAGE_DATA/dirA/dirB/b
+
+# sudo may use whatever group
+chgrp -R 0 $IMAGE_DATA
+
+#perform tests for both endians
+test_image "little"
+test_image "big"
+
+ts_finalize
+
diff --git a/tests/ts/cramfs/mkfs-endianness_testdata_a b/tests/ts/cramfs/mkfs-endianness_testdata_a
new file mode 100644
index 0000000..d6c57b7
--- /dev/null
+++ b/tests/ts/cramfs/mkfs-endianness_testdata_a
@@ -0,0 +1,8 @@
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs \ No newline at end of file
diff --git a/tests/ts/cramfs/mkfs-endianness_testdata_b b/tests/ts/cramfs/mkfs-endianness_testdata_b
new file mode 100644
index 0000000..30f9faf
--- /dev/null
+++ b/tests/ts/cramfs/mkfs-endianness_testdata_b
@@ -0,0 +1,217 @@
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 1234567890 Endianness check 1234567890 Endianness check
+Testing cramfs 123456789 \ No newline at end of file
diff --git a/tests/ts/dmesg/colors b/tests/ts/dmesg/colors
new file mode 100755
index 0000000..8028c48
--- /dev/null
+++ b/tests/ts/dmesg/colors
@@ -0,0 +1,29 @@
+#!/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="colors"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_DMESG"
+ts_inhibit_custom_colorscheme
+
+export TZ="GMT"
+export DMESG_TEST_BOOTIME="1234567890.123456"
+
+$TS_HELPER_DMESG --color=always -F $TS_SELF/input -x >> $TS_OUTPUT 2>/dev/null
+
+ts_finalize
diff --git a/tests/ts/dmesg/console-levels b/tests/ts/dmesg/console-levels
new file mode 100755
index 0000000..fc39cf0
--- /dev/null
+++ b/tests/ts/dmesg/console-levels
@@ -0,0 +1,36 @@
+#!/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="levels"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_DMESG"
+
+export TZ="GMT"
+export DMESG_TEST_BOOTIME="1234567890.123456"
+
+for I in {-1..8}; do
+ $TS_HELPER_DMESG -F $TS_SELF/input -l $I >> $TS_OUTPUT 2>/dev/null
+done
+
+$TS_HELPER_DMESG -F $TS_SELF/input -l err+ >> $TS_OUTPUT 2>/dev/null
+$TS_HELPER_DMESG -F $TS_SELF/input -l emerg+ >> $TS_OUTPUT 2>/dev/null
+$TS_HELPER_DMESG -F $TS_SELF/input -l +err >> $TS_OUTPUT 2>/dev/null
+$TS_HELPER_DMESG -F $TS_SELF/input -l +debug >> $TS_OUTPUT 2>/dev/null
+$TS_HELPER_DMESG -F $TS_SELF/input -l + 2>> $TS_OUTPUT >/dev/null
+
+ts_finalize
diff --git a/tests/ts/dmesg/decode b/tests/ts/dmesg/decode
new file mode 100755
index 0000000..673f2bb
--- /dev/null
+++ b/tests/ts/dmesg/decode
@@ -0,0 +1,28 @@
+#!/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="decode"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_DMESG"
+
+export TZ="GMT"
+export DMESG_TEST_BOOTIME="1234567890.123456"
+
+$TS_HELPER_DMESG -x -F $TS_SELF/input >> $TS_OUTPUT 2>/dev/null
+
+ts_finalize
diff --git a/tests/ts/dmesg/delta b/tests/ts/dmesg/delta
new file mode 100755
index 0000000..83d8629
--- /dev/null
+++ b/tests/ts/dmesg/delta
@@ -0,0 +1,28 @@
+#!/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="delta"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_DMESG"
+
+export TZ="GMT"
+export DMESG_TEST_BOOTIME="1234567890.123456"
+
+$TS_HELPER_DMESG -d -F $TS_SELF/input >> $TS_OUTPUT 2>/dev/null
+
+ts_finalize
diff --git a/tests/ts/dmesg/facilities b/tests/ts/dmesg/facilities
new file mode 100755
index 0000000..13dd6c6
--- /dev/null
+++ b/tests/ts/dmesg/facilities
@@ -0,0 +1,30 @@
+#!/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="facilities"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_DMESG"
+
+export TZ="GMT"
+export DMESG_TEST_BOOTIME="1234567890.123456"
+
+for I in {-1..12}; do
+ $TS_HELPER_DMESG -F $TS_SELF/input -f $I >> $TS_OUTPUT 2>/dev/null
+done
+
+ts_finalize
diff --git a/tests/ts/dmesg/indentation b/tests/ts/dmesg/indentation
new file mode 100755
index 0000000..a4f8e1c
--- /dev/null
+++ b/tests/ts/dmesg/indentation
@@ -0,0 +1,40 @@
+#!/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="indentation"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_DMESG"
+
+export TZ="GMT"
+export DMESG_TEST_BOOTIME="1234567890.123456"
+
+$TS_HELPER_DMESG -F $TS_SELF/newlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_DMESG -F $TS_SELF/newlines -x >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_DMESG --time-format=delta --file $TS_SELF/newlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_DMESG --time-format=notime --file $TS_SELF/newlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_DMESG --time-format=reltime --file $TS_SELF/newlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_DMESG --time-format=ctime --file $TS_SELF/newlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_DMESG --time-format=iso --file $TS_SELF/newlines >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/dmesg/input b/tests/ts/dmesg/input
new file mode 100644
index 0000000..98307df
--- /dev/null
+++ b/tests/ts/dmesg/input
@@ -0,0 +1,105 @@
+<0>[ 0.000000] example[0]
+<1>[ 1.000000] example[1]
+<2>[ 8.000000] example[2]
+<3>[ 27.000000] example[3]
+<4>[ 64.000000] example[4]
+<5>[ 125.000000] example[5]
+<6>[ 216.000000] example[6]
+<7>[ 343.000000] example[7]
+<8>[ 512.000000] example[8]
+<9>[ 729.000000] example[9]
+<10>[ 1000.000000] example[10]
+<11>[ 1331.000000] example[11]
+<12>[ 1728.000000] example[12]
+<13>[ 2197.000000] example[13]
+<14>[ 2744.000000] example[14]
+<15>[ 3375.000000] example[15]
+<16>[ 4096.000000] example[16]
+<17>[ 4913.000000] example[17]
+<18>[ 5832.000000] example[18]
+<19>[ 6859.000000] example[19]
+<20>[ 8000.000000] example[20]
+<21>[ 9261.000000] example[21]
+<22>[10648.000000] example[22]
+<23>[12167.000000] example[23]
+<24>[13824.000000] example[24]
+<25>[15625.000000] example[25]
+<26>[17576.000000] example[26]
+<27>[19683.000000] example[27]
+<28>[21952.000000] example[28]
+<29>[24389.000000] example[29]
+<30>[27000.000000] example[30]
+<31>[29791.000000] example[31]
+<32>[32768.000000] example[32]
+<33>[35937.000000] example[33]
+<34>[39304.000000] example[34]
+<35>[42875.000000] example[35]
+<36>[46656.000000] example[36]
+<37>[50653.000000] example[37]
+<38>[54872.000000] example[38]
+<39>[59319.000000] example[39]
+<40>[64000.000000] example[40]
+<41>[68921.000000] example[41]
+<42>[74088.000000] example[42]
+<43>[79507.000000] example[43]
+<44>[85184.000000] example[44]
+<45>[91125.000000] example[45]
+<46>[97336.000000] example[46]
+<47>[103823.000000] example[47]
+<48>[110592.000000] example[48]
+<49>[117649.000000] example[49]
+<50>[125000.000000] example[50]
+<51>[132651.000000] example[51]
+<52>[140608.000000] example[52]
+<53>[148877.000000] example[53]
+<54>[157464.000000] example[54]
+<55>[166375.000000] example[55]
+<56>[175616.000000] example[56]
+<57>[185193.000000] example[57]
+<58>[195112.000000] example[58]
+<59>[205379.000000] example[59]
+<60>[216000.000000] example[60]
+<61>[226981.000000] example[61]
+<62>[238328.000000] example[62]
+<63>[250047.000000] example[63]
+<64>[262144.000000] example[64]
+<65>[274625.000000] example[65]
+<66>[287496.000000] example[66]
+<67>[300763.000000] example[67]
+<68>[314432.000000] example[68]
+<69>[328509.000000] example[69]
+<70>[343000.000000] example[70]
+<71>[357911.000000] example[71]
+<72>[373248.000000] example[72]
+<73>[389017.000000] example[73]
+<74>[405224.000000] example[74]
+<75>[421875.000000] example[75]
+<76>[438976.000000] example[76]
+<77>[456533.000000] example[77]
+<78>[474552.000000] example[78]
+<79>[493039.000000] example[79]
+<80>[512000.000000] example[80]
+<81>[531441.000000] example[81]
+<82>[551368.000000] example[82]
+<83>[571787.000000] example[83]
+<84>[592704.000000] example[84]
+<85>[614125.000000] example[85]
+<86>[636056.000000] example[86]
+<87>[658503.000000] example[87]
+<88>[681472.000000] example[88]
+<89>[704969.000000] example[89]
+<90>[729000.000000] example[90]
+<91>[753571.000000] example[91]
+<92>[778688.000000] example[92]
+<93>[804357.000000] example[93]
+<94>[830584.000000] example[94]
+<95>[857375.000000] example[95]
+<96>[884736.000000] example[96]
+<97>[912673.000000] example[97]
+<98>[941192.000000] example[98]
+<99>[970299.000000] example[99]
+<100>[1000000.000000] example[100]
+<101>[1030301.000000] example[101]
+<102>[1061208.000000] example[102]
+<103>[1092727.000000] example[103]
+<104>[1124864.000000] example[104]
diff --git a/tests/ts/dmesg/limit b/tests/ts/dmesg/limit
new file mode 100755
index 0000000..f3f9643
--- /dev/null
+++ b/tests/ts/dmesg/limit
@@ -0,0 +1,29 @@
+#!/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="limit"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_DMESG"
+
+export TZ="GMT"
+export DMESG_TEST_BOOTIME="1234567890.123456"
+
+$TS_HELPER_DMESG --since @1234567890.124 --until @1234567991 -F $TS_SELF/input \
+ >> $TS_OUTPUT 2> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/dmesg/newlines b/tests/ts/dmesg/newlines
new file mode 100644
index 0000000..6b298c6
--- /dev/null
+++ b/tests/ts/dmesg/newlines
@@ -0,0 +1,5 @@
+<10>[ 1.000000] new
+line
+<20>[ 2.000000] two
+new
+lines
diff --git a/tests/ts/eject/umount b/tests/ts/eject/umount
new file mode 100755
index 0000000..838ee9c
--- /dev/null
+++ b/tests/ts/eject/umount
@@ -0,0 +1,127 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="umount"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_skip_nonroot
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_EJECT"
+ts_check_test_command "$TS_CMD_KILL"
+ts_check_test_command "$TS_CMD_MOUNT"
+
+ts_check_prog "mkfs.ext2"
+
+# scsi_debug could not eject for kernel >=3.19 and <4.4
+if x=$(echo "3.19" && uname -r && echo "4.4") \
+ && test "$x" = "$(echo "$x" | sort --version-sort)"
+then
+ ts_skip "3.19 <= $(uname -sr) < 4.4"
+fi
+
+#
+# Note that eject --force is required because scsi_debug is
+# not removable device.
+#
+
+# set global variable TS_DEVICE
+function init_device {
+ ts_scsi_debug_init dev_size_mb=100
+}
+
+function init_partitions {
+ local dev=$1
+
+ ts_log "Create partitions"
+ $TS_CMD_FDISK --noauto-pt $dev >> /dev/null 2>&1 <<EOF
+o
+n
+p
+1
+
++50M
+n
+p
+2
+
+
+p
+w
+EOF
+ udevadm settle
+ mkfs.ext2 -q ${dev}1
+ mkfs.ext2 -q ${dev}2
+ udevadm settle
+}
+
+function deinit_device {
+ ts_scsi_debug_rmmod
+}
+
+if [ "$TS_USE_SYSTEM_COMMANDS" != "yes" ]; then
+ # As the eject binary execl()s an uninstrumented /bin/umount binary, we need
+ # to explicitly $LD_PRELOAD the ASan's runtime DSO, otherwise ASan will complain.
+ # Since all three utilities used by this test (eject, fdisk, mount) are just
+ # libtool wrappers, let's check the kill binary instead, which should have
+ # the needed DSO information.
+ ASAN_RT_PATH="$(ts_get_asan_rt_path "$TS_CMD_KILL")"
+ [ -n "$ASAN_RT_PATH" ] && export LD_PRELOAD="$ASAN_RT_PATH:$LD_PRELOAD"
+fi
+
+ts_init_subtest "by-disk"
+init_device
+$TS_CMD_EJECT --force $TS_DEVICE && ts_log "Success"
+deinit_device
+ts_finalize_subtest
+
+
+ts_init_subtest "by-disk-mounted"
+init_device
+mkfs.ext2 -q -F $TS_DEVICE
+udevadm settle
+mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT $TS_DEVICE $TS_MOUNTPOINT
+udevadm settle
+$TS_CMD_EJECT --force $TS_DEVICE && ts_log "Success"
+deinit_device
+ts_finalize_subtest
+
+
+ts_init_subtest "by-disk-mounted-partition"
+init_device
+init_partitions $TS_DEVICE
+mkdir -p ${TS_MOUNTPOINT}1
+mkdir -p ${TS_MOUNTPOINT}2
+$TS_CMD_MOUNT ${TS_DEVICE}1 ${TS_MOUNTPOINT}1
+$TS_CMD_MOUNT ${TS_DEVICE}2 ${TS_MOUNTPOINT}2
+udevadm settle
+$TS_CMD_EJECT --force $TS_DEVICE && ts_log "Success"
+deinit_device
+ts_finalize_subtest
+
+
+ts_init_subtest "by-partition"
+init_device
+init_partitions $TS_DEVICE
+$TS_CMD_EJECT --force ${TS_DEVICE}1 && ts_log "Success"
+deinit_device
+ts_finalize_subtest
+
+
+ts_init_subtest "by-partition-mounted"
+init_device
+init_partitions $TS_DEVICE
+mkdir -p ${TS_MOUNTPOINT}1
+mkdir -p ${TS_MOUNTPOINT}2
+$TS_CMD_MOUNT ${TS_DEVICE}1 ${TS_MOUNTPOINT}1
+$TS_CMD_MOUNT ${TS_DEVICE}2 ${TS_MOUNTPOINT}2
+udevadm settle
+$TS_CMD_EJECT --force ${TS_DEVICE}1 && ts_log "Success"
+deinit_device
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
new file mode 100755
index 0000000..7c7eee5
--- /dev/null
+++ b/tests/ts/fadvise/drop
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="drop page caches related to a file"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FADVISE"
+ts_check_test_command "$TS_CMD_FINCORE"
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+ts_check_prog "dd"
+ts_check_prog "sleep"
+
+ts_cd "$TS_OUTDIR"
+
+FILE="ddtest"
+BS=4k
+COUNT=8
+
+FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")"
+if [[ "$FILE_FS" = "tmpfs" ]]; then
+ ts_skip "fincore does not work on tmpfs"
+fi
+
+create_file() {
+ dd if=/dev/zero of="$FILE" bs=$BS count=$COUNT conv=fsync >& /dev/null
+}
+
+{
+ create_file
+ "$TS_CMD_FINCORE" "$FILE"
+ echo
+
+ create_file
+ echo "whole file"
+ "$TS_CMD_FADVISE" "$FILE"
+ echo status: $?
+ "$TS_CMD_FINCORE" "$FILE"
+ echo
+
+ create_file
+ echo "offset: 8192"
+ "$TS_CMD_FADVISE" -o 8192 "$FILE"
+ echo status: $?
+ "$TS_CMD_FINCORE" "$FILE"
+ echo
+
+ create_file
+ echo "length: 16384"
+ "$TS_CMD_FADVISE" -l 16384 "$FILE"
+ echo status: $?
+ "$TS_CMD_FINCORE" "$FILE"
+ echo
+
+ create_file
+ echo "offset: 8192, length: 16384 fd: 42"
+ "$TS_CMD_FADVISE" -o 8192 -l 16384 --fd 42 42<"$FILE"
+ echo status: $?
+ "$TS_CMD_FINCORE" "$FILE"
+ echo
+
+ rm "$FILE"
+} >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
+
+ts_finalize
diff --git a/tests/ts/fdisk/align-512-4K b/tests/ts/fdisk/align-512-4K
new file mode 100755
index 0000000..d44c6df
--- /dev/null
+++ b/tests/ts/fdisk/align-512-4K
@@ -0,0 +1,79 @@
+#!/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.
+#
+
+
+#
+# Test alignment for 512/512 disk *with* topology -- aligned to optimal
+# I/O size (32KiB)
+#
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="align 512/4K"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3
+DEVNAME=$(basename $TS_DEVICE)
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+o
+n
+p
+1
+
++10M
+n
+p
+2
+
++10M
+n
+p
+3
+
++10M
+n
+e
+
+
+n
+
++5M
+n
+
++5M
+n
+
+
+p
+w
+q
+EOF
+
+udevadm settle
+ts_log "Alignment offsets:"
+cat /sys/block/${DEVNAME}/${DEVNAME}{1,2,3,4,5,6,7}/alignment_offset >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_fdisk_clean $TS_DEVICE
+
+ts_finalize
diff --git a/tests/ts/fdisk/align-512-4K-63 b/tests/ts/fdisk/align-512-4K-63
new file mode 100755
index 0000000..3d66899
--- /dev/null
+++ b/tests/ts/fdisk/align-512-4K-63
@@ -0,0 +1,80 @@
+#!/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.
+#
+
+
+#
+# Test alignment for 512/512 disk *with* topology -- aligned to optimal
+# I/O size (32KiB)
+#
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="align 512/4K +alignment_offset"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3 lowest_aligned=7
+DEVNAME=$(basename $TS_DEVICE)
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+o
+n
+p
+1
+
++10M
+n
+p
+2
+
++10M
+n
+p
+3
+
++10M
+n
+e
+
+
+n
+
++5M
+n
+
++5M
+n
+
+
+p
+w
+q
+EOF
+
+udevadm settle
+ts_log "Alignment offsets:"
+cat /sys/block/${DEVNAME}/${DEVNAME}{1,2,3,4,5,6,7}/alignment_offset >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+
+ts_fdisk_clean $TS_DEVICE
+
+ts_finalize
diff --git a/tests/ts/fdisk/align-512-4K-md b/tests/ts/fdisk/align-512-4K-md
new file mode 100755
index 0000000..1e0dd3c
--- /dev/null
+++ b/tests/ts/fdisk/align-512-4K-md
@@ -0,0 +1,104 @@
+#!/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.
+#
+
+
+#
+# Test alignment for 512/512 disk *with* topology -- aligned to optimal
+# I/O size (32KiB)
+#
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="align 512/4K +MD"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+
+ts_skip_nonroot
+ts_check_prog "mdadm"
+
+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1
+TS_KNOWN_FAIL="yes"
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3
+DEVNAME=$(basename $TS_DEVICE)
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+o
+n
+p
+1
+
++49150
+n
+p
+2
+
++49150
+p
+w
+q
+EOF
+
+udevadm settle
+ts_log "Alignment offsets:"
+cat /sys/block/${DEVNAME}/${DEVNAME}{1,2}/alignment_offset >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_lock "md"
+
+MD_DEVNAME=md8
+MD_DEVICE=/dev/${MD_DEVNAME}
+
+mdadm -q -S ${MD_DEVICE} &> /dev/null
+udevadm settle
+
+mdadm -q --create ${MD_DEVICE} --metadata=0.90 --chunk=64 \
+ --level=0 --raid-devices=2 ${TS_DEVICE}1 ${TS_DEVICE}2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+
+ts_log "Create partitions (MD)"
+$TS_CMD_FDISK ${MD_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+n
+p
+1
+
++10M
+n
+p
+2
+
++10M
+p
+w
+q
+EOF
+
+udevadm settle
+ts_log "Alignment offsets (MD):"
+cat /sys/block/${MD_DEVNAME}/${MD_DEVNAME}p{1,2}/alignment_offset >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+mdadm -q -S ${MD_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+udevadm settle
+ts_unlock "md"
+
+ts_fdisk_clean $TS_DEVICE
+ts_fdisk_clean $MD_DEVICE
+
+ts_finalize
diff --git a/tests/ts/fdisk/align-512-512 b/tests/ts/fdisk/align-512-512
new file mode 100755
index 0000000..e61110f
--- /dev/null
+++ b/tests/ts/fdisk/align-512-512
@@ -0,0 +1,73 @@
+#!/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.
+#
+
+#
+# Test default 1MiB (2048 sectors) alignment for 512/512 disk *without*
+# topology.
+#
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="align 512/512"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+
+ts_skip_nonroot
+ts_check_losetup
+
+ts_device_init 50
+DEVICE=$TS_LODEV
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+o
+n
+p
+1
+
++10M
+n
+p
+2
+
++10M
+n
+p
+3
+
++10M
+n
+e
+
+
+n
+
++5M
+n
+
++5M
+n
+
+
+p
+q
+EOF
+
+ts_fdisk_clean $DEVICE
+
+ts_finalize
diff --git a/tests/ts/fdisk/align-512-512-topology b/tests/ts/fdisk/align-512-512-topology
new file mode 100755
index 0000000..cdb7269
--- /dev/null
+++ b/tests/ts/fdisk/align-512-512-topology
@@ -0,0 +1,79 @@
+#!/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.
+#
+
+
+#
+# Test alignment for 512/512 disk *with* topology -- aligned to optimal
+# I/O size (32KiB)
+#
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="align 512/512 +topology"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512
+DEVNAME=$(basename $TS_DEVICE)
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+o
+n
+p
+1
+
++10M
+n
+p
+2
+
++10M
+n
+p
+3
+
++10M
+n
+e
+
+
+n
+
++5M
+n
+
++5M
+n
+
+
+p
+w
+q
+EOF
+
+udevadm settle
+ts_log "Alignment offsets:"
+cat /sys/block/${DEVNAME}/${DEVNAME}{1,2,3,4,5,6,7}/alignment_offset >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_fdisk_clean $TS_DEVICE
+
+ts_finalize
diff --git a/tests/ts/fdisk/bsd b/tests/ts/fdisk/bsd
new file mode 100755
index 0000000..8477f92
--- /dev/null
+++ b/tests/ts/fdisk/bsd
@@ -0,0 +1,141 @@
+#!/bin/bash
+#
+# This file is part of util-linux.
+#
+# Copyright (C) 2013 Karel Zak <kzak@redhat.com>
+#
+# 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="nested BSD"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_HEXDUMP"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+FDISK_CMD_CREATE_DOSLABEL="o\n" # create dos label
+FDISK_CMD_SETID="x\ni\n0x1\nr\n" # set non-random ID
+FDISK_CMD_WRITE_CLOSE="w\nq\n" # write to image
+FDISK_CMD_CREATE_PRIMARY1="n\np\n1\n\n+1M\n" # 1st primary partition of size 1MiB
+FDISK_CMD_CREATE_PRIMARY2="n\np\n2\n\n\n" # 2nd primary partition for whole of the disk
+FDISK_CMD_CHANGE_PART2TYPE="t\n2\na5\n" # change partition type FreeBSD
+
+FDISK_CMD_BSD_CREATE="b\ny\n" # create nested BSD PT
+FDISK_CMD_BSD_LIST="b\np\nr\nq\n" # list nested BSD PT and quit
+FDISK_CMD_BSD_CREATE_PART="b\nn\na\n\n+1M\n" # add BSD partition 'a', size 1MiB
+FDISK_CMD_BSD_PARTTYPE="b\nt\na\n7\n" # set partition 'a' to type 4.2BSD
+FDISK_CMD_BSD_LIST_TYPES="b\nl\nq\n" # list supported PT types and quit
+
+#set -x
+
+# BSD disklabel depends on endianness
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
+
+# and also on arch-specific offset (see include/pt-bsd.h)
+ARCH=$(uname -m)
+case $ARCH in
+ # see include/pt-bsd.h
+ *alpha* | *ppc* | *ia64* | *hppa* | *parisc* )
+ BSD_LABELSECTOR=0
+ BSD_LABELOFFSET=64
+ ;;
+ *)
+ BSD_LABELSECTOR=1
+ BSD_LABELOFFSET=0
+ ;;
+esac
+
+# and contains extra options for alpha
+BSD_EXTRA=""
+case $ARCH in
+ *alpha*)
+ BSD_EXTRA="_alpha"
+ ;;
+esac
+
+echo "BSD_LABELSECTOR=$BSD_LABELSECTOR" >> $TS_OUTPUT
+echo "BSD_LABELOFFSET=$BSD_LABELOFFSET" >> $TS_OUTPUT
+echo "BSD_EXTRA=$BSD_EXTRA" >> $TS_OUTPUT
+echo "BYTE_ORDER=$BYTE_ORDER" >> $TS_OUTPUT
+echo >> $TS_OUTPUT
+
+TS_EXPECTED+="_${BSD_LABELSECTOR}_${BSD_LABELOFFSET}${BSD_EXTRA}.${BYTE_ORDER}"
+
+function print_layout {
+ echo -ne "\n---layout----------\n" >> $TS_OUTPUT
+ $TS_CMD_FDISK -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+ echo -ne "-------------------\n\n" >> $TS_OUTPUT
+}
+
+function print_bsd_layout {
+ echo -ne "\n---layout----------\n" >> $TS_OUTPUT
+ echo -e "${FDISK_CMD_BSD_LIST}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+ echo -ne "-------------------\n\n" >> $TS_OUTPUT
+}
+
+ts_log "Initialize empty image"
+TEST_IMAGE_NAME=$(ts_image_init 10)
+$TS_CMD_HEXDUMP -C ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_log "Create new DOS partition table"
+echo -e "${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_SETID}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK --noauto-pt ${TEST_IMAGE_NAME} &> /dev/null
+$TS_CMD_HEXDUMP -C ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_layout
+
+ts_log "Create 1st primary partition"
+echo -e "${FDISK_CMD_CREATE_PRIMARY1}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+$TS_CMD_HEXDUMP -C ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_layout
+
+ts_log "Create 2nd primary partition"
+echo -e "${FDISK_CMD_CREATE_PRIMARY2}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+$TS_CMD_HEXDUMP -C ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_log "Set 2nd partition type"
+echo -e "${FDISK_CMD_CHANGE_PART2TYPE}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+$TS_CMD_HEXDUMP -C ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_layout
+
+ts_log "Create default BSD"
+echo -e "${FDISK_CMD_BSD_CREATE}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+$TS_CMD_HEXDUMP -C ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_bsd_layout
+
+echo -e "${FDISK_CMD_BSD_CREATE_PART}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+
+echo -e "${FDISK_CMD_BSD_PARTTYPE}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+$TS_CMD_HEXDUMP -C ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_bsd_layout
+
+echo -e "${FDISK_CMD_BSD_LIST_TYPES}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} | \
+ sed 's/Reading .*//g; s/Welcome to fdisk .*//' >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize
diff --git a/tests/ts/fdisk/gpt b/tests/ts/fdisk/gpt
new file mode 100755
index 0000000..d1c76da
--- /dev/null
+++ b/tests/ts/fdisk/gpt
@@ -0,0 +1,107 @@
+#!/bin/bash
+#
+# This file is part of util-linux.
+#
+# Copyright (C) 2013 Karel Zak <kzak@redhat.com>
+#
+# 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="GPT"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+
+FDISK_CMD_CREATE_GPTLABEL="g\n" # create GPT label
+FDISK_CMD_WRITE_CLOSE="w\nq\n" # write to image
+
+FDISK_CMD_CHANGE_TYPE_BY_NUM="t\n1\n1\n" # set 1st partition to EFI System
+ # set 5th partition to Linux swap
+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
+
+function print_layout {
+ echo -ne "\n---layout----------\n" >> $TS_OUTPUT
+ $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ echo -ne "-------------------\n\n" >> $TS_OUTPUT
+
+ ts_fdisk_clean ${TEST_IMAGE_NAME}
+}
+
+
+ts_init_subtest "empty-pt"
+ts_log "Initialize empty image"
+TEST_IMAGE_NAME=$(ts_image_init 10)
+
+ts_log "Create new GPT partition table"
+echo -e "${FDISK_CMD_CREATE_GPTLABEL}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK --noauto-pt ${TEST_IMAGE_NAME} &> /dev/null
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "create-partitions"
+for i in {1..8}; do
+ echo -e "n\n${i}\n\n+1M\n${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+done
+ts_finalize_subtest
+
+ts_init_subtest "change-type-by-number"
+echo -e "${FDISK_CMD_CHANGE_TYPE_BY_NUM}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "change-type-by-uuid"
+echo -e "${FDISK_CMD_CHANGE_TYPE_BY_UUID}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "delete-partition"
+echo -e "${FDISK_CMD_DELETE_PART}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "create-again-partition"
+echo -e "${FDISK_CMD_CREATE_PART}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "corrupt-primary-table"
+dd if=/dev/zero of=${TEST_IMAGE_NAME} bs=512 count=1 seek=1 conv=notrunc &> /dev/null
+echo -e "w\n" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "corrupt-backup-table"
+dd if=/dev/zero of=${TEST_IMAGE_NAME} bs=512 count=1 \
+ seek=$(( 1024 * 1024 * 10 / 512 - 1)) conv=notrunc &> /dev/null
+echo -e "w\n" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+
+print_layout
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/fdisk/gpt-resize b/tests/ts/fdisk/gpt-resize
new file mode 100755
index 0000000..198f38e
--- /dev/null
+++ b/tests/ts/fdisk/gpt-resize
@@ -0,0 +1,63 @@
+#!/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.
+#
+
+#
+# Test GPT Alternative-LBA and backup header update after device resize.
+#
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="gpt-resize"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_skip_nonroot
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_prog "dd"
+
+ts_check_losetup
+
+ts_device_init 10
+DEVICE=$TS_LODEV
+
+# create GPT with one partition
+echo ",," | $TS_CMD_SFDISK --no-reread --no-tell-kernel --label gpt $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+
+# enlarge the image
+IMAGE=$($TS_CMD_LOSETUP --output BACK-FILE --noheadings $DEVICE)
+dd if=/dev/zero of=${IMAGE} bs=1MiB count=10 conv=notrunc oflag=append &> /dev/null
+udevadm settle
+
+# update device size
+$TS_CMD_LOSETUP --set-capacity $DEVICE
+udevadm settle
+
+ts_log_both "----- fixing after resize: -----"
+
+# create another GPT partition on new free space (all default)
+echo -e 'n\n\n\n\nw\n' | $TS_CMD_FDISK $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+
+
+ts_log "----- list result: -----"
+
+$TS_CMD_FDISK --list $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_fdisk_clean $DEVICE
+ts_finalize
diff --git a/tests/ts/fdisk/id b/tests/ts/fdisk/id
new file mode 100755
index 0000000..57fbc60
--- /dev/null
+++ b/tests/ts/fdisk/id
@@ -0,0 +1,56 @@
+#!/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 - id"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+
+FDISK_CMD_ID1="x\ni\n0x1\nr\nw\n"
+FDISK_CMD_ID2="x\ni\n0x2\nr\nw\n"
+
+# Sparc uses SUN disk labels by default and thus has a different output
+ARCH=$(uname -m)
+case $ARCH in
+ *sparc* )
+ ARCH_EXT=".sparc"
+ ;;
+ *)
+ ARCH_EXT=""
+ ;;
+esac
+
+TS_EXPECTED+="${ARCH_EXT}"
+
+ts_log "Initialize empty image"
+TEST_IMAGE_NAME=$(ts_image_init 10)
+
+ts_init_subtest "create-mbr-with-id-0x1"
+TS_EXPECTED+="${ARCH_EXT}"
+echo -e "${FDISK_CMD_ID1}" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} | grep identifier >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "create-mbr-with-id-0x2"
+TS_EXPECTED+="${ARCH_EXT}"
+echo -e "${FDISK_CMD_ID2}" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} | grep identifier >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/fdisk/mbr-dos-mode b/tests/ts/fdisk/mbr-dos-mode
new file mode 100755
index 0000000..57d69fe
--- /dev/null
+++ b/tests/ts/fdisk/mbr-dos-mode
@@ -0,0 +1,145 @@
+#!/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 - dos mode"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_HELPER_MD5"
+
+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
+FDISK_CMD_CHANGE_PARTTYPE="t\nbf\n" # change partition type to "bf - solaris", this requires that there is only one partition to change
+FDISK_CMD_SET_ACTIVE="a\n1\n" # set first partition active
+FDISK_CMD_CREATE_EXTENDED="n\ne\n2\n\n+10\n" # create extended partition 2 of size 11 cylinders
+FDISK_CMD_CREATE_LOGICAL="n\nl\n\n+1\n" # create next logical partition of size 2 cyl
+FDISK_CMD_DELETE_LOGICALS="d\n6\nd\n5\nd\n6\n" # delete middle, head, tail, last partitions
+FDISK_CMD_DELETE_PRIMARY="d\n1\n" # delete first primary
+FDISK_CMD_DELETE_EXTENDED="d\n2\n" # delete second primary
+
+FDISK_OPTIONS="-C 1024 -c=dos -u=cylinders"
+
+function print_layout {
+ echo -ne "\n---layout----------\n" >> $TS_OUTPUT
+ $TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+ echo -ne "-------------------\n\n" >> $TS_OUTPUT
+
+ ts_fdisk_clean ${TEST_IMAGE_NAME}
+}
+
+#
+# Note that fdisk will enlarge the disk image (to 57MB) because the logical
+# partitions are out of the original range (10MB).
+#
+ts_init_subtest "empty-pt"
+TEST_IMAGE_NAME=$(ts_image_init 10)
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+echo -e "${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_INIT}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK --noauto-pt ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "create-primary-partition"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "set-partition-type"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "set-primary-par-active"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "re-create-primary-par"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "create-extended-par"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "create-logical-par"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "delete-logical-par"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "create-another-log-par"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "delete-primary-par"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "delete-extended-par"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/fdisk/mbr-nondos-mode b/tests/ts/fdisk/mbr-nondos-mode
new file mode 100755
index 0000000..4db2064
--- /dev/null
+++ b/tests/ts/fdisk/mbr-nondos-mode
@@ -0,0 +1,190 @@
+#!/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 - non-dos mode"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_HELPER_MD5"
+
+# cmd to changes system id to 0x1
+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_1PRIMARY="n\np\n\n\n+3M\n" # create primary partition of size 3MiB
+FDISK_CMD_CREATE_2PRIMARY="n\np\n\n\n+2M\n" # create primary partition of size 2MiB
+FDISK_CMD_SET_ACTIVE="a\n1\n" # set first partition active
+FDISK_CMD_CREATE_EXTENDED="n\ne\n\n\n\n" # create extended partition
+FDISK_CMD_CREATE_LOGICAL="n\nl\n\n+2M\n" # create next logical partition of size 10 sectors
+FDISK_CMD_DELETE_LOGICALS="d\n6\nd\n5\nd\n6\n" # delete middle, head, tail, last partitions
+FDISK_CMD_DELETE_1PRIMARY="d\n1\n" # delete first primary
+FDISK_CMD_DELETE_2PRIMARY="d\n2\n" # delete first primary
+FDISK_CMD_DELETE_EXTENDED="d\n3\n" # delete second primary
+
+# ignore architectures where MBR is not a default
+ARCH=$(uname -m)
+case $ARCH in
+ *sparc* )
+ ts_skip "unsupported"
+ ;;
+ *)
+ ;;
+esac
+
+function print_layout {
+ echo -ne "\n---layout----------\n" >> $TS_OUTPUT
+ $TS_CMD_FDISK -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+ echo -ne "-------------------\n\n" >> $TS_OUTPUT
+
+ ts_fdisk_clean ${TEST_IMAGE_NAME}
+}
+
+#set -x
+
+ts_init_subtest "empty-pt"
+ts_log "Initialize empty image"
+TEST_IMAGE_NAME=$(ts_image_init 20) # 20 MiB
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+# 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_CREATE_DOSLABEL}${FDISK_CMD_INIT}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK --noauto-pt ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "1st-primary"
+ts_log "Create 1st primary partition"
+echo -e "${FDISK_CMD_CREATE_1PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "1st-active"
+ts_log "Set primary partition active"
+echo -e "${FDISK_CMD_SET_ACTIVE}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "1st-primary-recreate"
+ts_log "Re-create 1st primary partition"
+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>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "2nd-primary"
+ts_log "Create 2nd primary partition"
+echo -e "${FDISK_CMD_CREATE_2PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "extended"
+ts_log "Create extended partition"
+echo -e "${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "logical"
+ts_log "Create logical partitions"
+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>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "logical-delete"
+ts_log "Delete logical partitions"
+echo -e "${FDISK_CMD_DELETE_LOGICALS}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "logical-recreate"
+ts_log "Create another logical partition"
+echo -e "${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "1st-primary-delete"
+ts_log "Delete primary partition"
+echo -e "${FDISK_CMD_DELETE_1PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "1nd-primary-delete"
+ts_log "Delete primary partition"
+echo -e "${FDISK_CMD_DELETE_2PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "extended-delete"
+ts_log "Delete extended partition"
+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>> $TS_ERRLOG
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "first-sector-at-end"
+ts_log "Create new DOS partition table (again)"
+echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_INIT}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ts_log "Create 1st primary at the end of device"
+echo -e "n\np\n1\n20000\n\n${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+print_layout
+
+ts_log "Create 2nd primary at the begin of device"
+echo -e "n\np\n2\n\n\n${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+print_layout
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/fdisk/mbr-sort b/tests/ts/fdisk/mbr-sort
new file mode 100755
index 0000000..6d0ec9e
--- /dev/null
+++ b/tests/ts/fdisk/mbr-sort
@@ -0,0 +1,83 @@
+#!/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 "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+
+# 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----------\n" >> $TS_OUTPUT
+ $TS_CMD_FDISK -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+ echo -ne "-------------------\n\n" >> $TS_OUTPUT
+
+ ts_fdisk_clean ${TEST_IMAGE_NAME}
+}
+
+#set -x
+
+ts_init_subtest "empty-pt"
+TEST_IMAGE_NAME=$(ts_image_init 20) # 20 MiB
+
+echo -e "${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK --noauto-pt ${TEST_IMAGE_NAME} &> /dev/null
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "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_finalize_subtest
+
+
+ts_init_subtest "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_finalize_subtest
+
+
+ts_init_subtest "fix-order"
+echo -e "${FDISK_CMD_EXPERT_SORT}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+
+print_layout
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/fdisk/oddinput b/tests/ts/fdisk/oddinput
new file mode 100755
index 0000000..9b55d75
--- /dev/null
+++ b/tests/ts/fdisk/oddinput
@@ -0,0 +1,53 @@
+#!/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="invalid input tests"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_HELPER_MD5"
+
+#set -x
+
+ts_log "---Initialize empty image"
+TEST_IMAGE_NAME=$(ts_image_init 10)
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+#
+# Note that since 2.23 the DOS-mode has effect only if there is a MBR on the device.
+#
+
+ts_log "---Empty image listing" # this should report empty partition table
+# TEST_IMAGE_NAME has absolute path, and is by definition different on each computer, we need to sed it away
+$TS_CMD_FDISK -c=dos -u=cylinders -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+sed -i -e "s/${TEST_IMAGE_NAME//\//\\/}/testimage/" $TS_OUTPUT $TS_ERRLOG
+
+#
+# Errors
+#
+ts_logerr "---Nonexistent file"
+$TS_CMD_FDISK -c=dos -u=cylinders -x _a_file_that_does_not_exist_ >> $TS_OUTPUT 2>> $TS_ERRLOG
+sed -i -e "s@$($TS_HELPER_STRERROR ENOENT)@ENOENT@" $TS_OUTPUT $TS_ERRLOG
+
+ts_logerr "---Too small file"
+echo "This file is too small" >> oddinput.toosmall
+$TS_CMD_FDISK -c=dos -u=cylinders -x oddinput.toosmall >> $TS_OUTPUT 2>> $TS_ERRLOG
+sed -i -e "s@$($TS_HELPER_STRERROR EINVAL)@EINVAL@" $TS_OUTPUT $TS_ERRLOG
+rm oddinput.toosmall
+ts_finalize
diff --git a/tests/ts/fdisk/sunlabel b/tests/ts/fdisk/sunlabel
new file mode 100755
index 0000000..ead0aac
--- /dev/null
+++ b/tests/ts/fdisk/sunlabel
@@ -0,0 +1,104 @@
+#!/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="sunlabel tests"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_HELPER_MD5"
+
+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\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 to the end of disk
+
+FDISK_OPTIONS="-H 1 -S 63 -u=cylinders"
+
+function print_layout {
+ $TS_CMD_FDISK ${FDISK_OPTIONS} -x ${TEST_IMAGE_NAME} >> $TS_OUTPUT
+ ts_fdisk_clean ${TEST_IMAGE_NAME}
+}
+
+#set -x
+
+ts_init_subtest "empty-sun-pt"
+TEST_IMAGE_NAME=$(ts_image_init 10)
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" \
+ | $TS_CMD_FDISK --noauto-pt ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+
+ts_init_subtest "create-first-partition"
+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>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "set-partition-sysid"
+echo -e "${FDISK_CMD_CHANGE_SYSID}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "set-first-par-readonly"
+echo -e "${FDISK_CMD_TOGGLE_READONLY}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "set-first-par-mountable"
+echo -e "${FDISK_CMD_TOGGLE_MOUNTABLE}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "create-second-partition"
+echo -e "${FDISK_CMD_CREATE_SECONDARY}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+print_layout
+ts_finalize_subtest
+
+ts_init_subtest "delete-all-partitions"
+echo -e "${FDISK_CMD_DELETEALL}${FDISK_CMD_WRITE_CLOSE}" | \
+ $TS_CMD_FDISK ${FDISK_OPTIONS} ${TEST_IMAGE_NAME} &> /dev/null
+ts_image_md5sum >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/fincore/count b/tests/ts/fincore/count
new file mode 100755
index 0000000..ba5f6cd
--- /dev/null
+++ b/tests/ts/fincore/count
@@ -0,0 +1,230 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="count file contents in core"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")"
+if [[ "$FS" = "tmpfs" ]]; then
+ ts_skip "fincore does not work on tmpfs"
+fi
+
+function footer
+{
+ echo "return value: $1"
+}
+
+function make_input_name
+{
+ header=$1
+ prefix=i_
+ echo ${prefix}$(sed -e "s/[^-+a-zA-Z0-9_]/_/g"<<<"$header")
+}
+
+function _dd
+{
+ local msg
+ local ret=0
+
+ msg=$(dd "$@" 2>&1)
+ ret=$?
+ if [ $ret != 0 ]; then
+ echo "failed: dd $@" >&2
+ echo "$msg" >&2
+ fi
+ return $ret
+}
+
+function check_dd_fs_feat
+{
+ local testf="$TS_OUTDIR/ddtest"
+ rm -f "$testf"
+ touch "$testf"
+
+ # NFS seems to fail for direct AND append
+ _dd if=/dev/zero of="$testf" bs=1k count=2 oflag=direct,append &>/dev/null \
+ || ts_skip "unsupported: dd oflag=direct,append"
+
+ # TODO: Should we check for sparse file support?
+
+ rm -f "$testf"
+}
+
+function run_dd_test
+{
+ header=$1
+ bs=$2
+ flags=$3
+
+ input=$(make_input_name "$header")
+ INPUT="${INPUT} ${input}"
+ rm -f "$input"
+
+ if [ "$bs" = 0 ]; then
+ touch $input
+ else
+ _dd if=/dev/zero of=$input count=1 bs=$bs $flags || return
+ fi
+
+ $TS_CMD_FINCORE --output $OUT_COLUMNS --bytes --noheadings $input
+
+ footer "$?"
+}
+
+function run_dd_dd_test
+{
+ header=$1
+ flags0=$2
+ flags1=$3
+
+ bs=$PAGE_SIZE
+
+ input=$(make_input_name "$header")
+ INPUT="${INPUT} ${input}"
+ rm -f "$input"
+
+ _dd if=/dev/zero of=$input count=1 bs=$bs $flags0 || return
+ _dd if=/dev/zero of=$input count=1 bs=$bs $flags1 || return
+
+ $TS_CMD_FINCORE --output $OUT_COLUMNS --bytes --noheadings $input
+
+ footer "$?"
+}
+
+
+PAGE_SIZE=$($TS_HELPER_SYSINFO pagesize)
+WINDOW_SIZE=$(( 32 * 1024 * PAGE_SIZE ))
+
+# we use PAGE_SIZE dependent output for a few systems
+if test -f "$TS_EXPECTED.$PAGE_SIZE"; then
+ TS_EXPECTED+=".$PAGE_SIZE"
+ TS_EXPECTED_ERR+=".$PAGE_SIZE"
+ OUT_COLUMNS="PAGES,SIZE,FILE"
+else
+ TS_EXPECTED+=".nosize"
+ OUT_COLUMNS="PAGES,FILE"
+fi
+
+
+ts_check_test_command "$TS_CMD_FINCORE"
+ts_cd "$TS_OUTDIR"
+
+check_dd_fs_feat
+
+INPUT=
+input=
+
+{
+ input=no_such_file
+ INPUT="${INPUT} ${input}"
+
+ ts_log_both "[ NO EXCITING FILE ]"
+ $TS_CMD_FINCORE --output $OUT_COLUMNS --bytes --noheadings $input
+ footer "$?"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ run_dd_test "EMPTY FILE" 0
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ run_dd_test "PAGESIZE -1 (incore)" $(( PAGE_SIZE - 1 ))
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ run_dd_test "JUST PAGESIZE(incore)" $(( PAGE_SIZE ))
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ run_dd_test "JUST PAGESIZE(directio)" $(( PAGE_SIZE )) "oflag=direct"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ run_dd_test "TWO PAGES(incore)" $(( 2 * PAGE_SIZE ))
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ run_dd_test "TWO PAGES(directio)" $(( 2 * PAGE_SIZE )) "oflag=direct"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ run_dd_dd_test "TWO PAGES(mixed directio/incore)" \
+ oflag=direct \
+ "oflag=append seek=1"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ run_dd_dd_test "TWO PAGES(mixed incore/directio)" \
+ "" \
+ "oflag=direct,append seek=1"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ hole_count=$(( WINDOW_SIZE / PAGE_SIZE - 2 ))
+ run_dd_dd_test "WINDOW SIZE(incore-sparse-incore)" \
+ "" \
+ "oflag=append seek=$hole_count"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ hole_count=$(( WINDOW_SIZE / PAGE_SIZE - 2 ))
+ run_dd_dd_test "WINDOW SIZE(directio-sparse-directio)" \
+ "oflag=direct" \
+ "oflag=append,direct seek=$hole_count"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ hole_count=$(( WINDOW_SIZE / PAGE_SIZE - 2 ))
+ run_dd_dd_test "WINDOW SIZE(incore-sparse-directio)" \
+ "" \
+ "oflag=append,direct seek=$hole_count"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ hole_count=$(( WINDOW_SIZE / PAGE_SIZE - 2 ))
+ run_dd_dd_test "WINDOW SIZE(directio-sparse-incore)" \
+ "oflag=direct" \
+ "oflag=append seek=$hole_count"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ hole_count=$(( WINDOW_SIZE / PAGE_SIZE - 1 ))
+ run_dd_dd_test "WINDOW SIZE + 1 page(incore-sparse-incore)" \
+ "" \
+ "oflag=append seek=$hole_count"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ hole_count=$(( WINDOW_SIZE / PAGE_SIZE - 1 ))
+ run_dd_dd_test "WINDOW SIZE + 1 page(directio-sparse-directio)" \
+ "oflag=direct" \
+ "oflag=append,direct seek=$hole_count"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ hole_count=$(( WINDOW_SIZE / PAGE_SIZE - 1 ))
+ run_dd_dd_test "WINDOW SIZE + 1 page(incore-sparse-directio)" \
+ "" \
+ "oflag=append,direct seek=$hole_count"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ hole_count=$(( WINDOW_SIZE / PAGE_SIZE - 1 ))
+ run_dd_dd_test "WINDOW SIZE + 1 page(directio-sparse-incore)" \
+ "oflag=direct" \
+ "oflag=append seek=$hole_count"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+{
+ ts_log_both "[ MULTIPLE FILES ]"
+ $TS_CMD_FINCORE --output $OUT_COLUMNS --bytes $INPUT
+ footer "$?"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+rm -f $INPUT
+ts_finalize
diff --git a/tests/ts/findmnt/files/mountinfo b/tests/ts/findmnt/files/mountinfo
new file mode 100644
index 0000000..ff1e664
--- /dev/null
+++ b/tests/ts/findmnt/files/mountinfo
@@ -0,0 +1,32 @@
+15 20 0:3 / /proc rw,relatime - proc /proc rw
+16 20 0:15 / /sys rw,relatime - sysfs /sys rw
+17 20 0:5 / /dev rw,relatime - devtmpfs udev rw,size=1983516k,nr_inodes=495879,mode=755
+18 17 0:10 / /dev/pts rw,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+19 17 0:16 / /dev/shm rw,relatime - tmpfs tmpfs rw
+20 1 8:4 / / rw,noatime - ext3 /dev/sda4 rw,errors=continue,user_xattr,acl,barrier=0,data=ordered
+21 16 0:17 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs tmpfs rw,mode=755
+22 21 0:18 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+23 21 0:19 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuset
+24 21 0:20 / /sys/fs/cgroup/ns rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,ns
+25 21 0:21 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpu
+26 21 0:22 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuacct
+27 21 0:23 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,memory
+28 21 0:24 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,devices
+29 21 0:25 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,freezer
+30 21 0:26 / /sys/fs/cgroup/net_cls rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,net_cls
+31 21 0:27 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,blkio
+32 16 0:28 / /sys/kernel/security rw,relatime - autofs systemd-1 rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+33 17 0:29 / /dev/hugepages rw,relatime - autofs systemd-1 rw,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+34 16 0:30 / /sys/kernel/debug rw,relatime - autofs systemd-1 rw,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+35 15 0:31 / /proc/sys/fs/binfmt_misc rw,relatime - autofs systemd-1 rw,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+36 17 0:32 / /dev/mqueue rw,relatime - autofs systemd-1 rw,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+37 15 0:14 / /proc/bus/usb rw,relatime - usbfs /proc/bus/usb rw
+38 33 0:33 / /dev/hugepages rw,relatime - hugetlbfs hugetlbfs rw
+39 36 0:12 / /dev/mqueue rw,relatime - mqueue mqueue rw
+40 20 8:6 / /boot rw,noatime - ext3 /dev/sda6 rw,errors=continue,barrier=0,data=ordered
+41 20 253:0 / /home/kzak rw,noatime - ext4 /dev/mapper/kzak-home rw,barrier=1,data=ordered
+42 35 0:34 / /proc/sys/fs/binfmt_misc rw,relatime - binfmt_misc none rw
+43 16 0:35 / /sys/fs/fuse/connections rw,relatime - fusectl fusectl rw
+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
diff --git a/tests/ts/findmnt/files/mountinfo-messy b/tests/ts/findmnt/files/mountinfo-messy
new file mode 100644
index 0000000..6e2ac9d
--- /dev/null
+++ b/tests/ts/findmnt/files/mountinfo-messy
@@ -0,0 +1,29 @@
+220 189 8:3 /arch / rw,relatime shared:50 - ext4 /dev/sda3 rw
+221 220 0:17 / /sys ro,nosuid,nodev,noexec,relatime shared:51 - sysfs sysfs rw
+222 220 0:52 / /dev rw,nosuid shared:52 - tmpfs tmpfs rw,mode=755
+223 222 0:53 / /dev/shm rw,nosuid,nodev shared:53 - tmpfs tmpfs rw
+224 222 0:56 / /dev/pts rw,nosuid,noexec,relatime shared:56 - devpts devpts rw,gid=5,mode=620,ptmxmode=666
+225 222 0:21 /5 /dev/console rw,nosuid,noexec,relatime shared:57 master:4 - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+226 220 0:54 / /run rw,nosuid,nodev shared:54 - tmpfs tmpfs rw,mode=755
+227 226 0:18 /systemd/nspawn/propagate/arch /run/systemd/nspawn/incoming ro,relatime master:11 - tmpfs run rw,mode=755
+228 220 0:55 / /tmp rw shared:55 - tmpfs tmpfs rw
+231 220 0:58 / /proc rw,nosuid,nodev,noexec,relatime shared:58 - proc proc rw
+232 231 0:58 /sys /proc/sys ro,nosuid,nodev,noexec,relatime shared:58 - proc proc rw
+233 231 0:58 /sysrq-trigger /proc/sysrq-trigger ro,nosuid,nodev,noexec,relatime shared:58 - proc proc rw
+93 221 0:59 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:59 - tmpfs tmpfs ro,mode=755
+94 93 0:29 / /sys/fs/cgroup/perf_event ro,nosuid,nodev,noexec,relatime shared:60 - cgroup cgroup rw,perf_event
+95 93 0:31 / /sys/fs/cgroup/net_cls ro,nosuid,nodev,noexec,relatime shared:61 - cgroup cgroup rw,net_cls
+96 93 0:30 / /sys/fs/cgroup/blkio ro,nosuid,nodev,noexec,relatime shared:62 - cgroup cgroup rw,blkio
+98 93 0:33 / /sys/fs/cgroup/memory ro,nosuid,nodev,noexec,relatime shared:63 - cgroup cgroup rw,memory
+99 93 0:32 / /sys/fs/cgroup/pids ro,nosuid,nodev,noexec,relatime shared:64 - cgroup cgroup rw,pids
+100 93 0:27 / /sys/fs/cgroup/cpuset ro,nosuid,nodev,noexec,relatime shared:65 - cgroup cgroup rw,cpuset
+101 93 0:25 / /sys/fs/cgroup/freezer ro,nosuid,nodev,noexec,relatime shared:66 - cgroup cgroup rw,freezer
+102 93 0:28 / /sys/fs/cgroup/cpu,cpuacct ro,nosuid,nodev,noexec,relatime shared:67 - cgroup cgroup rw,cpu,cpuacct
+103 93 0:26 / /sys/fs/cgroup/devices ro,nosuid,nodev,noexec,relatime shared:68 - cgroup cgroup rw,devices
+104 93 0:23 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:69 - cgroup cgroup rw,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
+105 232 0:54 /proc-sys-kernel-random-boot-id//deleted /proc/sys/kernel/random/boot_id ro,nosuid,nodev shared:54 - tmpfs tmpfs rw,mode=755
+106 231 0:54 /proc-sys-kernel-random-boot-id//deleted /proc/sys/kernel/random/boot_id rw,nosuid,nodev shared:54 - tmpfs tmpfs rw,mode=755
+107 231 0:54 /kmsg//deleted /proc/kmsg rw,nosuid,nodev shared:54 - tmpfs tmpfs rw,mode=755
+97 222 0:57 / /dev/mqueue rw,relatime shared:70 - mqueue mqueue rw
+108 222 0:60 / /dev/hugepages rw,relatime shared:71 - hugetlbfs hugetlbfs rw
+109 226 0:61 / /run/user/0 rw,nosuid,nodev,relatime shared:72 - tmpfs tmpfs rw,size=1634120k,mode=700
diff --git a/tests/ts/findmnt/files/mountinfo-nonroot b/tests/ts/findmnt/files/mountinfo-nonroot
new file mode 100644
index 0000000..87b421d
--- /dev/null
+++ b/tests/ts/findmnt/files/mountinfo-nonroot
@@ -0,0 +1,31 @@
+15 20 0:3 / /proc rw,relatime - proc /proc rw
+16 20 0:15 / /sys rw,relatime - sysfs /sys rw
+17 20 0:5 / /dev rw,relatime - devtmpfs udev rw,size=1983516k,nr_inodes=495879,mode=755
+18 17 0:10 / /dev/pts rw,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+19 17 0:16 / /dev/shm rw,relatime - tmpfs tmpfs rw
+21 16 0:17 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs tmpfs rw,mode=755
+22 21 0:18 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+23 21 0:19 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuset
+24 21 0:20 / /sys/fs/cgroup/ns rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,ns
+25 21 0:21 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpu
+26 21 0:22 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuacct
+27 21 0:23 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,memory
+28 21 0:24 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,devices
+29 21 0:25 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,freezer
+30 21 0:26 / /sys/fs/cgroup/net_cls rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,net_cls
+31 21 0:27 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,blkio
+32 16 0:28 / /sys/kernel/security rw,relatime - autofs systemd-1 rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+33 17 0:29 / /dev/hugepages rw,relatime - autofs systemd-1 rw,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+34 16 0:30 / /sys/kernel/debug rw,relatime - autofs systemd-1 rw,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+35 15 0:31 / /proc/sys/fs/binfmt_misc rw,relatime - autofs systemd-1 rw,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+36 17 0:32 / /dev/mqueue rw,relatime - autofs systemd-1 rw,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+37 15 0:14 / /proc/bus/usb rw,relatime - usbfs /proc/bus/usb rw
+38 33 0:33 / /dev/hugepages rw,relatime - hugetlbfs hugetlbfs rw
+39 36 0:12 / /dev/mqueue rw,relatime - mqueue mqueue rw
+40 20 8:6 / /boot rw,noatime - ext3 /dev/sda6 rw,errors=continue,barrier=0,data=ordered
+41 20 253:0 / /home/kzak rw,noatime - ext4 /dev/mapper/kzak-home rw,barrier=1,data=ordered
+42 35 0:34 / /proc/sys/fs/binfmt_misc rw,relatime - binfmt_misc none rw
+43 16 0:35 / /sys/fs/fuse/connections rw,relatime - fusectl fusectl rw
+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
diff --git a/tests/ts/findmnt/filter b/tests/ts/findmnt/filter
new file mode 100755
index 0000000..8b24292
--- /dev/null
+++ b/tests/ts/findmnt/filter
@@ -0,0 +1,79 @@
+#!/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="filter"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+ts_init_subtest "types"
+$TS_CMD_FINDMNT --types ext3 --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "types-multi"
+$TS_CMD_FINDMNT --types ext3,ext4, --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "types-neg"
+$TS_CMD_FINDMNT --types noext3,ext4, --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "options"
+$TS_CMD_FINDMNT --options relatime --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "options-name"
+$TS_CMD_FINDMNT --options fd --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "options-nameval"
+$TS_CMD_FINDMNT --options "fd=22" --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "options-nameval-neg"
+$TS_CMD_FINDMNT --options "nofd=22" --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "options-nameval-multi"
+$TS_CMD_FINDMNT --options "gid=5,mode=620,ptmxmode=000" --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "options-neg"
+$TS_CMD_FINDMNT --options norelatime --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "options-no"
+$TS_CMD_FINDMNT --options +noatime --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "options-no-multi"
+$TS_CMD_FINDMNT --options +nosuid,+nodev,blkio --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/findmnt/outputs b/tests/ts/findmnt/outputs
new file mode 100755
index 0000000..83c9134
--- /dev/null
+++ b/tests/ts/findmnt/outputs
@@ -0,0 +1,49 @@
+#!/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="outputs"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+
+ts_init_subtest "default"
+$TS_CMD_FINDMNT --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "kernel"
+$TS_CMD_FINDMNT --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "force-tree"
+$TS_CMD_FINDMNT --tree --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "submounts"
+$TS_CMD_FINDMNT /sys --submounts --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "messy-mountinfo"
+$TS_CMD_FINDMNT --tab-file "$TS_SELF/files/mountinfo-messy" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/findmnt/target b/tests/ts/findmnt/target
new file mode 100755
index 0000000..6b4136d
--- /dev/null
+++ b/tests/ts/findmnt/target
@@ -0,0 +1,35 @@
+#!/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="target"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+
+ts_init_subtest "root"
+$TS_CMD_FINDMNT --target "/" --kernel --tab-file "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+
+ts_init_subtest "non-root"
+$TS_CMD_FINDMNT --target "/" --kernel --tab-file "$TS_SELF/files/mountinfo-nonroot" &> $TS_OUTPUT
+echo rc=$? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/fsck/ismounted b/tests/ts/fsck/ismounted
new file mode 100755
index 0000000..477ac4b
--- /dev/null
+++ b/tests/ts/fsck/ismounted
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# Copyright (C) 2009 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="${0%/*}/../.."
+TS_DESC="is mounted"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_HELPER_ISMOUNTED"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+> $TS_OUTPUT
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+
+ts_device_has "TYPE" "ext2" $DEVICE || ts_die "Cannot find ext2 on $DEVICE"
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+$TS_CMD_MOUNT $DEVICE $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+# test by ismounted.c
+$TS_HELPER_ISMOUNTED $DEVICE | awk '{print $1}' >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE"
+
+ts_finalize
diff --git a/tests/ts/fuzzers/test_blkid_fuzz b/tests/ts/fuzzers/test_blkid_fuzz
new file mode 100755
index 0000000..7ce89bc
--- /dev/null
+++ b/tests/ts/fuzzers/test_blkid_fuzz
@@ -0,0 +1,29 @@
+#!/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="test_blkid_fuzz"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_BLKID_FUZZ"
+
+ASAN_RT_PATH="$(ts_get_asan_rt_path "$TS_HELPER_BLKID_FUZZ")"
+[ -n "$ASAN_RT_PATH" ] && export LD_PRELOAD="$ASAN_RT_PATH:$LD_PRELOAD"
+
+mkdir -p ${TS_OUTPUT}_workdir ${TS_SCRIPT}_files
+ts_run $TS_HELPER_BLKID_FUZZ ${TS_OUTPUT}_workdir ${TS_SCRIPT}_files -max_total_time=10 >$TS_OUTPUT 2>$TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53142 b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53142
new file mode 100644
index 0000000..b671bcd
--- /dev/null
+++ b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53142
Binary files differ
diff --git a/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53149 b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53149
new file mode 100644
index 0000000..f1c6c3c
--- /dev/null
+++ b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53149
Binary files differ
diff --git a/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53160 b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53160
new file mode 100644
index 0000000..b3586ec
--- /dev/null
+++ b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-53160
Binary files differ
diff --git a/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55282 b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55282
new file mode 100644
index 0000000..b4bb8d7
--- /dev/null
+++ b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55282
Binary files differ
diff --git a/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55291 b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55291
new file mode 100644
index 0000000..79e2fd0
--- /dev/null
+++ b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55291
Binary files differ
diff --git a/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55318 b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55318
new file mode 100644
index 0000000..36b07a9
--- /dev/null
+++ b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-55318
Binary files differ
diff --git a/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-62691 b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-62691
new file mode 100644
index 0000000..9d10ae3
--- /dev/null
+++ b/tests/ts/fuzzers/test_blkid_fuzz_files/oss-fuzz-62691
Binary files differ
diff --git a/tests/ts/fuzzers/test_fdisk_script_fuzz b/tests/ts/fuzzers/test_fdisk_script_fuzz
new file mode 100755
index 0000000..44f2d6a
--- /dev/null
+++ b/tests/ts/fuzzers/test_fdisk_script_fuzz
@@ -0,0 +1,29 @@
+#!/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="test_fdisk_script_fuzz"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_LIBFDISK_SCRIPT_FUZZ"
+
+ASAN_RT_PATH="$(ts_get_asan_rt_path "$TS_HELPER_LIBFDISK_SCRIPT_FUZZ")"
+[ -n "$ASAN_RT_PATH" ] && export LD_PRELOAD="$ASAN_RT_PATH:$LD_PRELOAD"
+
+mkdir -p ${TS_OUTPUT}_workdir
+ts_run $TS_HELPER_LIBFDISK_SCRIPT_FUZZ ${TS_OUTPUT}_workdir ${TS_SCRIPT}_files -max_total_time=10 >$TS_OUTPUT 2>$TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/fuzzers/test_fdisk_script_fuzz_files/crash-8ae1c667bed4b4b864f62e78cded81d5083177eb b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/crash-8ae1c667bed4b4b864f62e78cded81d5083177eb
new file mode 100644
index 0000000..66aafba
--- /dev/null
+++ b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/crash-8ae1c667bed4b4b864f62e78cded81d5083177eb
@@ -0,0 +1 @@
+Id=tÎ] \ No newline at end of file
diff --git a/tests/ts/fuzzers/test_fdisk_script_fuzz_files/crash-d216dfd17039a189c3858d78fbcf588695439b3b b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/crash-d216dfd17039a189c3858d78fbcf588695439b3b
new file mode 100644
index 0000000..5805924
--- /dev/null
+++ b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/crash-d216dfd17039a189c3858d78fbcf588695439b3b
@@ -0,0 +1 @@
+0z \ No newline at end of file
diff --git a/tests/ts/fuzzers/test_fdisk_script_fuzz_files/github-1015-1 b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/github-1015-1
new file mode 100644
index 0000000..1827bdf
--- /dev/null
+++ b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/github-1015-1
Binary files differ
diff --git a/tests/ts/fuzzers/test_fdisk_script_fuzz_files/github-1015-2 b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/github-1015-2
new file mode 100644
index 0000000..961ac8a
--- /dev/null
+++ b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/github-1015-2
@@ -0,0 +1,2 @@
+:=0M
+,
diff --git a/tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-24589 b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-24589
new file mode 100644
index 0000000..96d8c6c
--- /dev/null
+++ b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-24589
@@ -0,0 +1,2 @@
+device:ÿ
+- \ No newline at end of file
diff --git a/tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-24861 b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-24861
new file mode 100644
index 0000000..be8baa6
--- /dev/null
+++ b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-24861
@@ -0,0 +1 @@
+name=;name=ÿ \ No newline at end of file
diff --git a/tests/ts/fuzzers/test_fdisk_script_fuzz_files/parse_line_valcommas-use-of-uninitialized-value b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/parse_line_valcommas-use-of-uninitialized-value
new file mode 100644
index 0000000..cf4c8e4
--- /dev/null
+++ b/tests/ts/fuzzers/test_fdisk_script_fuzz_files/parse_line_valcommas-use-of-uninitialized-value
@@ -0,0 +1 @@
+,- \ No newline at end of file
diff --git a/tests/ts/fuzzers/test_last_fuzz b/tests/ts/fuzzers/test_last_fuzz
new file mode 100755
index 0000000..c121aba
--- /dev/null
+++ b/tests/ts/fuzzers/test_last_fuzz
@@ -0,0 +1,29 @@
+#!/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="test_last_fuzz"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_LAST_FUZZ"
+
+ASAN_RT_PATH="$(ts_get_asan_rt_path "$TS_HELPER_LAST_FUZZ")"
+[ -n "$ASAN_RT_PATH" ] && export LD_PRELOAD="$ASAN_RT_PATH:$LD_PRELOAD"
+
+mkdir -p ${TS_OUTPUT}_workdir
+ts_run $TS_HELPER_LAST_FUZZ ${TS_OUTPUT}_workdir ${TS_SCRIPT}_files -max_total_time=10 >$TS_OUTPUT 2>$TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/fuzzers/test_last_fuzz_files/github-1097 b/tests/ts/fuzzers/test_last_fuzz_files/github-1097
new file mode 100644
index 0000000..fbd7dbf
--- /dev/null
+++ b/tests/ts/fuzzers/test_last_fuzz_files/github-1097
Binary files differ
diff --git a/tests/ts/fuzzers/test_mount_fuzz b/tests/ts/fuzzers/test_mount_fuzz
new file mode 100755
index 0000000..3fcf599
--- /dev/null
+++ b/tests/ts/fuzzers/test_mount_fuzz
@@ -0,0 +1,29 @@
+#!/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="test_mount_fuzz"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_LIBMOUNT_FUZZ"
+
+ASAN_RT_PATH="$(ts_get_asan_rt_path "$TS_HELPER_LIBMOUNT_FUZZ")"
+[ -n "$ASAN_RT_PATH" ] && export LD_PRELOAD="$ASAN_RT_PATH:$LD_PRELOAD"
+
+mkdir -p ${TS_OUTPUT}_workdir
+ts_run $TS_HELPER_LIBMOUNT_FUZZ ${TS_OUTPUT}_workdir ${TS_SCRIPT}_files -max_total_time=10 >$TS_OUTPUT 2>$TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/fuzzers/test_mount_fuzz_files/oss-fuzz-23722 b/tests/ts/fuzzers/test_mount_fuzz_files/oss-fuzz-23722
new file mode 100644
index 0000000..f66c9cf
--- /dev/null
+++ b/tests/ts/fuzzers/test_mount_fuzz_files/oss-fuzz-23722
Binary files differ
diff --git a/tests/ts/getopt/basic b/tests/ts/getopt/basic
new file mode 100755
index 0000000..f73695f
--- /dev/null
+++ b/tests/ts/getopt/basic
@@ -0,0 +1,49 @@
+#!/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.
+
+# This test script is modified version of 'getopt-example.bash' example
+# file in misc/ directory.
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="basic"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_GETOPT"
+
+TEMP=$($TS_CMD_GETOPT -o ab:c:: --long a-long,b-long:,c-long:: -n 'example.bash' -- -a -b 1 -c2 --a-long --b-long 3 --c-long foo bar)
+
+if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+
+eval set -- "$TEMP"
+
+while true ; do
+ case "$1" in
+ -a|--a-long) echo "Option a"; shift ;;
+ -b|--b-long) echo "Option b, argument \`$2'"; shift 2 ;;
+ -c|--c-long)
+ case "$2" in
+ "") echo "Option c, no argument"; shift 2 ;;
+ *) echo "Option c, argument \`$2'"; shift 2 ;;
+ esac ;;
+ --) shift ; break ;;
+ *) echo "Internal error!"; break;;
+ esac
+done >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+echo "Remaining arguments:" >> $TS_OUTPUT 2>> $TS_ERRLOG
+for arg do echo '--> '"\`$arg'" >> $TS_OUTPUT 2>> $TS_ERRLOG; done
+
+ts_finalize
diff --git a/tests/ts/getopt/options b/tests/ts/getopt/options
new file mode 100755
index 0000000..b245b32
--- /dev/null
+++ b/tests/ts/getopt/options
@@ -0,0 +1,231 @@
+#!/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="options"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+ts_check_test_command "$TS_CMD_GETOPT"
+
+export LANG=C
+
+function gnu_getopt_clean() {
+ sed --in-place \
+ -e "s/: \(.*\) -- \(.\)$/: \1 -- '\2'/" \
+ -e "s/ ['\`]\(--[a-zA-Z0-9]\{1,\}\)'/ '\1'/g" \
+ -e "s/unrecognized option: \(.\)$/invalid option -- '\1'/" \
+ -e "s/option requires an argument: \(.\)$/option requires an argument -- '\1'/" \
+ -e "s/unrecognized option: \([^'-].\{1,\}\)$/unrecognized option '--\1'/" \
+ $TS_OUTPUT $TS_ERRLOG
+}
+
+ts_init_subtest alternative_option_clash
+$TS_CMD_GETOPT -a -o abcde -l abcde -- -a -ab -abc -ac >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest alternative_option_long
+$TS_CMD_GETOPT --alternative -o a -l one,two:,three::,four:: -- -a -one -two=MANDATORY -three=OPTIONAL >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest alternative_option_short
+$TS_CMD_GETOPT -a -o a -l one,two:,three::,four:: -- -a -one -two=MANDATORY -three=OPTIONAL >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest invalid_getopt_option
+$TS_CMD_GETOPT -b >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+sed -i '1,1s/.*\///' $TS_OUTPUT $TS_ERRLOG
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest invocation_model_one
+$TS_CMD_GETOPT abc:d::e::f::g: ARG0 -b ARG1 -d -eOPTIONAL1 -f NOT_OPTIONAL ARG2 -a -c -ISREQUIRED ARG3 -g "BECOMES THREE ARGUMENTS" >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest invocation_model_three_as_one
+$TS_CMD_GETOPT -o abc:d::e::f::g: -- ARG0 -b ARG1 -d -eOPTIONAL1 -f NOT_OPTIONAL ARG2 -a -c -ISREQUIRED ARG3 -g "BECOMES THREE ARGUMENTS" >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest invocation_model_two_as_one
+$TS_CMD_GETOPT -- abc:d::e::f::g: ARG0 -b ARG1 -d -eOPTIONAL1 -f NOT_OPTIONAL ARG2 -a -c -ISREQUIRED ARG3 -g "BECOMES THREE ARGUMENTS" >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest invocation_without_parameters
+$TS_CMD_GETOPT >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest long_option_ambiguous_1
+$TS_CMD_GETOPT -o a -l long1,long2 -- --long >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+sed -i -e '1,1s/.*\///' -e "1s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
+sed -i -e "1s/is ambiguous: long$/'--long' is ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest longopts
+$TS_CMD_GETOPT -o a -l long1,secondlong:,thirdlong::,abbreviation: -- --long1 EXTRA1 --thirdlong=ARGUMENT --secondlong=ARG --abbr ABBRARG -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest name_option_long
+$TS_CMD_GETOPT -n THIS_PROGRAM -o a -l long -- -b --long --whatever -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest name_option_short
+$TS_CMD_GETOPT --name THIS_PROGRAM -o a -l long -- -b --long --whatever -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest quiet_option_long
+$TS_CMD_GETOPT --quiet -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest quiet_option_short
+$TS_CMD_GETOPT -q -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest quiet_output_option_long
+$TS_CMD_GETOPT --quiet-output -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
+sed -i -e "3s/is ambiguous: long$/'--long' is ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest quiet_output_option_short
+$TS_CMD_GETOPT -Q -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
+sed -i "3s/is ambiguous: long$/'--long' is ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest same_long_short_options
+$TS_CMD_GETOPT -o a -l a -- -a --a >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest test_for_enhanced_getopt
+$TS_CMD_GETOPT -T >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest unknown_options
+$TS_CMD_GETOPT -o a -l long -- -b --long --whatever -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+sed -i '1,2s/.*\///' $TS_OUTPUT $TS_ERRLOG
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest unquoted_option_bash
+$TS_CMD_GETOPT -s bash -u -o a: -l long1: -- -a '$?!* ' --long \"\\\' 'More
+ than
+one
+line' >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest unquoted_option_tcsh
+$TS_CMD_GETOPT -s tcsh --unquoted -o a: -l long1: -- -a '$?!* ' --long \"\\\' 'More
+ than
+one
+line' >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest weird_quoting_bash
+$TS_CMD_GETOPT -s bash -o a: -l long1: -- -a '$?!* ' --long \"\\\' 'More
+ than
+one
+line' >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest weird_quoting_tcsh
+$TS_CMD_GETOPT --shell tcsh -o a: -l long1: -- -a '$?!* ' --long \"\\\' 'More
+ than
+one
+line' >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+gnu_getopt_clean
+ts_finalize_subtest
+
+ts_init_subtest compatible
+$TS_CMD_GETOPT >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+GETOPT_COMPATIBLE='' $TS_CMD_GETOPT >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+sed -i '1,1s/.*\///' $TS_OUTPUT $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest sh
+$TS_CMD_GETOPT --shell=sh -o ab:c:: --long a-long,b-long:,c-long:: -n 'example.sh' -- -a -b 1 -c2 --a-long --b-long 3 --c-long foo bar >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest csh
+$TS_CMD_GETOPT --shell=csh -o ab:c:: --long a-long,b-long:,c-long:: -n 'example.csh' -- -a -b 1 -c2 --a-long --b-long 3 --c-long foo bar >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest no-arguments
+$TS_CMD_GETOPT >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+sed -i '1,1s/.*\///' $TS_OUTPUT $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest posix_correctly
+$TS_CMD_GETOPT -o +ab:c:: --long a-long,b-long:,c-long:: -n 'example' -- -a -b 1 -c2 --a-long --b-long 3 --c-long foo bar xyxxy --a-long >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+POSIXLY_CORRECT='' $TS_CMD_GETOPT -o ab:c:: --long a-long,b-long:,c-long:: -n 'example' -- -a -b 1 -c2 --a-long --b-long 3 --c-long foo bar xyxxy --a-long >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest non-option
+$TS_CMD_GETOPT -o +a:b: -- -a x y -b z w >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_GETOPT -o a:b: -- -a x y -b z w >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_GETOPT -o -a:b: -- -a x y -b z w >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit value: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/hardlink/options b/tests/ts/hardlink/options
new file mode 100755
index 0000000..1000714
--- /dev/null
+++ b/tests/ts/hardlink/options
@@ -0,0 +1,107 @@
+#!/bin/bash
+#
+# Copyright (C) 2018 Ruediger Meier <ruediger.meier@ga-group.nl>
+#
+# 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="options"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_HARDLINK"
+ts_check_prog xz
+ts_check_prog tar
+ts_check_prog wc
+
+SRCDIR="$TS_OUTDIR/testdir1"
+
+create_srcdir()
+{
+ rm -rf "$SRCDIR"
+ tar -C "$TS_OUTDIR" -xJf "$TS_SELF/testdir1.tar.xz"
+}
+
+show_srcdir()
+{
+ find "$SRCDIR" -type f -printf "%P\t%n\t%s\t%Ts\t%m\n" | sort
+}
+
+summary_clean()
+{
+ sed -i \
+ -e 's/^Duration:.*/Duration: [Redacted]/' \
+ -e 's/^Method:.*/Method: [Redacted]/' \
+ -e 's/^Compared:.*files/Compared: [Redacted] files/' \
+ $TS_OUTPUT
+}
+
+create_srcdir
+
+ts_init_subtest "orig" # just list original dir
+show_srcdir >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "dryrun"
+$TS_CMD_HARDLINK --quiet --dry-run "$SRCDIR" >> $TS_OUTPUT 2>> $TS_ERRLOG
+show_srcdir >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "nargs"
+$TS_CMD_HARDLINK --quiet "$SRCDIR"/dir-1/sdir-1 "$SRCDIR"/file-?-{1,2} >> $TS_OUTPUT 2>> $TS_ERRLOG
+show_srcdir >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+# cases without and with -x support
+tmp=$($TS_CMD_HARDLINK --quiet --exclude pattern "$SRCDIR"/dir-1/sdir-2 2>&1)
+if test $? -ne 0; then
+ ts_init_subtest "noregex"
+ printf "%s\n" "$tmp" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+else
+ ts_init_subtest "regex-escapes"
+ $TS_CMD_HARDLINK --quiet --exclude '.*z-"§\$%&\(\)=\?\*\+$' "$SRCDIR" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ show_srcdir >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+fi
+
+ts_init_subtest "content"
+$TS_CMD_HARDLINK --quiet --content "$SRCDIR" >> $TS_OUTPUT 2>> $TS_ERRLOG
+# When using -c we need to cheat with sed because it's not deterministic which
+# file (i.e. which timestamp and perms) wins. TODO at least the choice of the
+# permissions should be sensitive by default and/or controllable by the user.
+show_srcdir | sed 's/\(1540236\).*/\1xxx\tperm/' >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "maximum-size-8191"
+create_srcdir
+echo "Number of test files: $(find "$SRCDIR" -type f | wc -l)" >> $TS_OUTPUT
+$TS_CMD_HARDLINK --maximum-size 8191 "$SRCDIR" >> $TS_OUTPUT 2>> $TS_ERRLOG
+summary_clean
+show_srcdir >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "maximum-size-8192"
+create_srcdir
+echo "Number of test files: $(find "$SRCDIR" -type f | wc -l)" >> $TS_OUTPUT
+$TS_CMD_HARDLINK --maximum-size 8192 "$SRCDIR" >> $TS_OUTPUT 2>> $TS_ERRLOG
+summary_clean
+show_srcdir >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+rm -rf "$SRCDIR"
+ts_finalize
diff --git a/tests/ts/hardlink/testdir1.tar.xz b/tests/ts/hardlink/testdir1.tar.xz
new file mode 100644
index 0000000..b9bc245
--- /dev/null
+++ b/tests/ts/hardlink/testdir1.tar.xz
Binary files differ
diff --git a/tests/ts/hexdump/files/ascii.in b/tests/ts/hexdump/files/ascii.in
new file mode 100644
index 0000000..4c2598b
--- /dev/null
+++ b/tests/ts/hexdump/files/ascii.in
Binary files differ
diff --git a/tests/ts/hexdump/format-strings b/tests/ts/hexdump/format-strings
new file mode 100755
index 0000000..9f055ba
--- /dev/null
+++ b/tests/ts/hexdump/format-strings
@@ -0,0 +1,69 @@
+#!/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="format-strings"
+FILES="$TS_TOPDIR/ts/hexdump/files"
+#sample input consists of hexdump-ed results of the following py3script:
+#for i in range(256):
+# print(chr(i), end= ' ')
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_HEXDUMP"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+# on big endian systems some of the subtests have different expected output
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
+BE_EXT=$(test "$BYTE_ORDER" = "BE" && echo ".BE")
+
+#885314
+ts_init_subtest "empty-format"
+TS_EXPECTED+=$BE_EXT
+INPUT=$(printf \\1)
+$TS_CMD_HEXDUMP -n1 -ve '2 "" "%x"' <<< $INPUT >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_CMD_HEXDUMP -n1 -ve '4 "%x"' -e '2 ""' <<< $INPUT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+#basic formats
+ts_init_subtest "1b_octal"
+$TS_CMD_HEXDUMP -b $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "1b_char"
+$TS_CMD_HEXDUMP -c $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "canon"
+$TS_CMD_HEXDUMP -C $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "2b_dec"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP -d $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "2b_octal"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP -o $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "2b_hex"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP -x $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/hexdump/highlighting b/tests/ts/hexdump/highlighting
new file mode 100755
index 0000000..cb94615
--- /dev/null
+++ b/tests/ts/hexdump/highlighting
@@ -0,0 +1,267 @@
+#!/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="highlighting"
+FILES="$TS_TOPDIR/ts/hexdump/files"
+OPTS="--color=always"
+ADDRFMT='-e "%07.7_Ax\n"'
+#sample input consists of hexdump-ed results of the following py3script:
+#for i in range(256):
+# print(chr(i), end= ' ')
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_HEXDUMP"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+# on big endian systems some of the subtests have different expected output
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
+BE_EXT=$(test "$BYTE_ORDER" = "BE" && echo ".BE")
+
+#
+# basic formats /w some highlighting tweaks
+#
+
+# highlight 'A' and 'a'
+ts_init_subtest "1b_octal-1"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%03o_L[red:A,red:a] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# highlight bytes with the value of 0x41 (A) and 0x61 (a)
+ts_init_subtest "1b_octal-2"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%03o_L[red:0x41,red:0x61] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# highlight the bytes at offsets 130 and 194 (decimal)
+ts_init_subtest "1b_octal-3"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%03o_L[red@130,red@194] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# highlight the byte at offset 194 if it's value is 0x61 (a)
+# and the byte at offset 130 if it's value is A (0x41)
+ts_init_subtest "1b_octal-4"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%03o_L[red:A@130,red:0x61@194] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# highlight the byte at offset 194 if it's value is 0x61 (a)
+# and the byte at offset 130 if it's value is C (0x41) (false)
+ts_init_subtest "1b_octal-5"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%03o_L[red:C@130,red:0x61@194] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# highlight a range longer than the byte count of %o
+ts_init_subtest "1b_octal-6"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%03o_L[red@193-194] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# highlight bytes with the value of 0101 (A) and 0141 (a)
+ts_init_subtest "1b_octal-7"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%03o_L[red:0101,red:0141] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# highlight bytes with the value of 0101 (A), 0x61 (a), or if the character is a caret
+ts_init_subtest "1b_octal-8"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%03o_L[red:0101,blue:0x61,green:^] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# highlight bytes with the value of 0101 (A), 0x61 (a), or if the character at 196 is not 'c'
+ts_init_subtest "1b_octal-9"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%03o_L[red:0101,blue:0x61,!green:c@196] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+#color the addresses red and the characters in UTIL-LINUX green
+ts_init_subtest "1b_char-1"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax_L[red] " 16/1 "%3_c_L[green:-,green:I,green:L,green:N,green:T,green:U,green:X] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+#color the address 0xe0 red
+ts_init_subtest "1b_char-2"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax_L[red:0xe0] " 16/1 "%3_c " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+#highlight ':' and '@'
+ts_init_subtest "1b_char-3"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 16/1 "%3_c_L[red::@116,red:@@128] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color last address gray, the null byte blue, the spaces brown(-ish) and the text cyan
+ts_init_subtest "canon-1"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS \
+ -e '"%08.8_Ax_L[gray]\n"' \
+ -e '"%08.8_ax " 8/1 "%02x_L[blue:0x0,brown:0x20] " " " 8/1 "%02x_L[brown:0x20] " ' \
+ -e '" |" 16/1 "%_p_L[cyan]" "|\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color last address gray - if it's 0x280 or blue if it's 0x380
+# color A/a hex dumps blue and A/a in text green
+ts_init_subtest "canon-2"
+$TS_CMD_HEXDUMP $OPTS \
+ -e '"%08.8_Ax_L[blue:0x380,red:0x280]\n"' \
+ -e '"%08.8_ax " 8/1 "%02x_L[blue:A,blue:a] " " " 8/1 "%02x_L[blue:A,blue:a] " ' \
+ -e '" |" 16/1 "%_p_L[green:A,green:a]" "|\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color the current print unit if one of the bytes it prints is at offset 100 (0x64)
+ts_init_subtest "2b_dec-1"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/2 " %05u_L[red@100] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color the current print unit if of the bytes it prints are at offsets 98 and 99
+ts_init_subtest "2b_dec-2"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/2 " %05u_L[red@98-99] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color the current print unit if some or all of the bytes it prints are at offsets 98 and 99
+ts_init_subtest "2b_dec-3"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/2 " %05u_L[red@97-99] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color the current print unit if it prints "A " at 130-131
+ts_init_subtest "2b_dec-4"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/2 " %05u_L[red:A @130-131] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color the current print unit if it doesn't print "B " at 130-131
+ts_init_subtest "2b_dec-5"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/2 " %05u_L[!red:B @130-131] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# specify a string shorter than the range - error
+ts_init_subtest "2b_dec-6"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/2 " %05u_L[red:A@130-131] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# specify a negative-length range
+ts_init_subtest "2b_dec-7"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/2 " %05u_L[red:A@131-130] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color the current print unit if of the bytes it prints are at offsets 98-102 (multiple print units)
+ts_init_subtest "2b_dec-8"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/2 " %05u_L[red@98-102] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color the current print unit if some or all of the bytes it prints are at offsets 97 and 99 (true)
+ts_init_subtest "4b_dec-1"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/4 " %05u_L[red@97-99] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# color the current print unit if some or all of the bytes it prints are at offsets 96-99
+ts_init_subtest "4b_dec-2"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/4 " %05u_L[red@96-99] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
+# look for @@@@
+ts_init_subtest "4b_dec-3"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/4 " %05u_L[red:@@@@] " "\n"' \
+ &> $TS_OUTPUT <<< "@@@@"
+ts_finalize_subtest
+
+# look for @@@@ at 0-3
+ts_init_subtest "4b_dec-4"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/4 " %05u_L[red:@@@@@0-3] " "\n"' \
+ &> $TS_OUTPUT <<< "@@@@"
+ts_finalize_subtest
+
+# look for @@@ at 0-3 (wrong byte count error)
+ts_init_subtest "4b_dec-5"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/4 " %05u_L[red:@@@@0-3] " "\n"' \
+ &> $TS_OUTPUT <<< "@@@@"
+ts_finalize_subtest
+
+# look for @@@ at 1-3 - in the format boundaries - correct
+ts_init_subtest "4b_dec-6"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/4 " %05u_L[red:@@@@1-3] " "\n"' \
+ &> $TS_OUTPUT <<< "@@@@"
+ts_finalize_subtest
+
+# look for @@@ at 2-4 - correct range length, however steps over 2 print units - no colors
+ts_init_subtest "4b_dec-7"
+TS_EXPECTED+=$BE_EXT
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/4 " %05u_L[red:@@@@2-4] " "\n"' \
+ &> $TS_OUTPUT <<< "@@@@"
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/hwclock/show b/tests/ts/hwclock/show
new file mode 100755
index 0000000..d8cdc8e
--- /dev/null
+++ b/tests/ts/hwclock/show
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2023 Thomas Weißschuh <thomas@t-8ch.de>
+#
+# 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="show"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_HWCLOCK"
+
+ts_skip_nonroot
+ts_skip_qemu_user
+ts_skip_docker
+
+# RTC interrupts are sometimes broken on GitHub Actions
+if ts_is_virt "microsoft"; then
+ TS_KNOWN_FAIL="yes"
+fi
+
+"$TS_CMD_HWCLOCK" --show > /dev/null 2> "$TS_ERRLOG" || ts_die
+
+ts_finalize
diff --git a/tests/ts/hwclock/systohc b/tests/ts/hwclock/systohc
new file mode 100755
index 0000000..fbd67ee
--- /dev/null
+++ b/tests/ts/hwclock/systohc
@@ -0,0 +1,103 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="system to hw"
+NTP_SERVER="0.fedora.pool.ntp.org"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_HWCLOCK"
+
+ts_skip_nonroot
+if [ "$TRAVIS_DIST" == "precise" ]; then
+ ts_skip "https://github.com/util-linux/util-linux/issues/1082"
+fi
+if [ "$GITHUB_ACTIONS" == "true" ]; then
+ ts_skip "virtual machine"
+fi
+
+ts_check_prog "bc"
+ts_check_prog "sntp"
+
+function get_offset_sys_ntp
+{
+ local ip="$@"
+ local out
+
+ # using hostname instead of IP could give us more than one offset
+ out=$(sntp --timeout 1 "$ip") || return 1
+
+ # sed must deliver a signed float or empty string for sure
+ out=$(echo "$out" | \
+ sed -n 's/.* \(\(+\|-\)[0-9]\{1,\}\.[0-9]\{1,\}\).*/\1/1p')
+
+ [ -n "$out" ] || return 1
+ echo "$out"
+}
+
+function check_diff_offset
+{
+ local a=${1#+}
+ local b=${2#+}
+ local max="$3"
+ local tmp
+
+ tmp=$(echo "$a - $b" | bc | tr -d '-')
+ echo "$tmp"
+
+ tmp=$(echo "$tmp < $max" | bc)
+ [ $tmp -eq 1 ]
+}
+
+
+# we need fixed ntp IP to get comparable offsets
+NTP_IP=$(ts_resolve_host "$NTP_SERVER") \
+ || ts_skip "can't resolve hostname $NTP_SERVER"
+
+OFFSET_A=$(get_offset_sys_ntp "$NTP_IP") \
+ || ts_skip "can't get ntp offset 1st, $NTP_IP"
+OFFSET_B=$(get_offset_sys_ntp "$NTP_IP") \
+ || ts_skip "can't get ntp offset 2nd, $NTP_IP"
+
+diff=$(check_diff_offset $OFFSET_A $OFFSET_B 0.02) \
+ || ts_skip "unreliable ntp or sys clock offsets: $NTP_IP $OFFSET_A $OFFSET_B +/-$diff"
+
+# hwclock --show should work if we have a hw clock
+tmp=$($TS_CMD_HWCLOCK --show 2>&1)
+if [ $? != "0" ]; then
+ echo "$tmp" | grep -q "Cannot access the Hardware Clock via" \
+ && ts_skip "no hardware clock found"
+ ts_failed "hwclock --show"
+fi
+
+# call hwclock
+for i in `seq 1 10`; do
+ # only *skip* on failure for now
+ $TS_CMD_HWCLOCK --systohc || ts_skip "hwclock --systohc failed, $i"
+ $TS_CMD_HWCLOCK --hctosys || ts_skip "hwclock --hctosys failed, $i"
+done
+
+OFFSET_C=$(get_offset_sys_ntp "$NTP_IP") \
+ || ts_skip "can't get ntp offset 3rd, $NTP_IP"
+
+diff=$(check_diff_offset "$OFFSET_B" "$OFFSET_C" 1.0) \
+ || ts_failed "offsets $NTP_IP: $OFFSET_B $OFFSET_C +/-$diff"
+
+ts_ok "offsets $NTP_IP: $OFFSET_B $OFFSET_C +/-$diff"
diff --git a/tests/ts/ipcs/functions.sh b/tests/ts/ipcs/functions.sh
new file mode 100644
index 0000000..e9b437e
--- /dev/null
+++ b/tests/ts/ipcs/functions.sh
@@ -0,0 +1,114 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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.
+#
+
+test -f /proc/sys/kernel/shmall || ts_skip "no /proc"
+
+PAGE_SIZE=$($TS_HELPER_SYSINFO pagesize)
+
+# kernel files
+IPCS_PROCFILES=(
+ /proc/sys/kernel/shmmni
+ /proc/sys/kernel/shmall
+ /proc/sys/kernel/shmmax
+)
+
+# raw data converted to ipcs-like format
+# shmmni = same
+# shmall = from pages to KBytes
+# shmmax = from bytes to KBytes
+#
+IPCS_KERNEL_CMD=(
+ "cat /proc/sys/kernel/shmmni"
+ "echo \$(cat /proc/sys/kernel/shmall) / 1024 \* $PAGE_SIZE | bc -l | sed 's/\..*//'"
+ "echo \$(cat /proc/sys/kernel/shmmax) / 1024 | bc -l | sed 's/\..*//'"
+)
+
+# data from the ipcs command
+IPCS_CMD=(
+ "$TS_CMD_IPCS -m -l | awk '/max number of segments/ { print \$6 }'"
+ "$TS_CMD_IPCS -m -l | awk '/max total shared memory/ { print \$7 }'"
+ "$TS_CMD_IPCS -m -l | awk '/max seg size/ { print \$6 }'"
+)
+
+
+# The linux kernel accepts ULONG_MAX, but this value is same like ULLONG_MAX on
+# 64-bit archs. So the ipcs command has to always overflow on 64-bit archs when
+# shmall (=num of pages!) is same or almost same like ULONG_MAX. This is reason
+# why we for the test uses 32-bit limits on all archs.
+#
+# (Don't worry that 64-bit ULONG_MAX makes ipcs useless ...
+# ... it's a problem for admins who want to use 75557863725TB of RAM for shm)
+#
+IPCS_LIMITS=(
+ 32768
+ $($TS_HELPER_SYSINFO ULONG_MAX32)
+ $($TS_HELPER_SYSINFO ULONG_MAX32)
+)
+
+# list of indexes = 0..(sizeof Array - 1)
+IPCS_IDX=$(seq 0 $(( ${#IPCS_PROCFILES[*]} - 1 )))
+
+UINT64_MAX=$($TS_HELPER_SYSINFO UINT64_MAX)
+
+# checker
+function ipcs_limits_check {
+ for i in $IPCS_IDX; do
+
+ echo -n ${IPCS_PROCFILES[$i]}
+
+ a=$(eval ${IPCS_KERNEL_CMD[$i]})
+ b=$(eval ${IPCS_CMD[$i]})
+
+ # follow the way how ipcs handles u64 overflow
+ max_kbytes=$(bc <<< "$UINT64_MAX - ($UINT64_MAX % ($PAGE_SIZE / 1024))")
+
+ #echo
+ #echo "kernel kbytes: $a"
+ #echo "lsipc kbytes: $b"
+ #echo "max kbytes: $max_kbytes"
+ #echo
+
+ if [ $(bc <<<"$a > $max_kbytes") -eq 1 ]; then
+ a=$max_kbytes
+ fi
+
+ if [ x"$a" == x"$b" ]; then
+ echo " OK"
+ else
+ echo " kernel=$a, ipcs=$b"
+ fi
+ done
+}
+
+# Read 'ipcmk' output, such as 'Shared memory id: 22839299' and
+# write the message to two files: (1) something what one can
+# compare as test output, and (2) id which ipcrm later will use
+# for deletion.
+ipcmk_output_handler() {
+ awk -v text=$1 -v num=$2 '
+ function isnum(x) {
+ return(x == x + 0)
+ }
+ {
+ if (isnum($NF)) {
+ print $NF >> num
+ $NF="<was_number>"
+ }
+ print $0 >> text
+ }'
+}
diff --git a/tests/ts/ipcs/headers b/tests/ts/ipcs/headers
new file mode 100755
index 0000000..2796f4b
--- /dev/null
+++ b/tests/ts/ipcs/headers
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="headers"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_IPCS"
+
+ts_init_subtest "shm-headers"
+$TS_CMD_IPCS -m -t | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -m -p | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -m -c | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -m -l | grep "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -m -u | grep "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "mesg-headers"
+$TS_CMD_IPCS -q -t | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -q -p | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -q -c | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -q -l | grep "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -q -u | grep "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "sem-headers"
+$TS_CMD_IPCS -s -t | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -s -p | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -s -c | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -s -l | grep "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -s -u | grep "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "all-headers"
+$TS_CMD_IPCS -a | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_CMD_IPCS -a -t | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -a -p | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -a -c | grep -A1 "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -a -l | grep "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IPCS -a -u | grep "^---" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/ipcs/limits b/tests/ts/ipcs/limits
new file mode 100755
index 0000000..22add86
--- /dev/null
+++ b/tests/ts/ipcs/limits
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="limits overflow"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_IPCS"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+ts_skip_nonroot
+ts_check_prog "bc"
+
+. "$TS_SELF"/functions.sh
+
+ts_lock "ipcslimits"
+
+ts_log "load original values"
+for i in $IPCS_IDX; do
+ SHM_ORG[$i]=$(cat ${IPCS_PROCFILES[$i]})
+done >> $TS_OUTPUT
+
+ts_log "maximize kernel setting"
+for i in $IPCS_IDX; do
+ echo ${IPCS_LIMITS[$i]} >> ${IPCS_PROCFILES[$i]}
+done >> $TS_OUTPUT
+
+ts_log "check for difference between kernel and IPC"
+ipcs_limits_check >> $TS_OUTPUT
+
+ts_log "write original values to kernel"
+for i in $IPCS_IDX; do
+ echo ${SHM_ORG[$i]} >> ${IPCS_PROCFILES[$i]}
+done >> $TS_OUTPUT
+
+ts_finalize
+
diff --git a/tests/ts/ipcs/limits2 b/tests/ts/ipcs/limits2
new file mode 100755
index 0000000..6da8880
--- /dev/null
+++ b/tests/ts/ipcs/limits2
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="basic limits"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_IPCS"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+ts_check_prog "bc"
+
+. "$TS_SELF"/functions.sh
+
+ts_lock "ipcslimits"
+
+ts_log "check for difference between kernel and IPC"
+ipcs_limits_check >> $TS_OUTPUT
+
+ts_finalize
+
diff --git a/tests/ts/ipcs/mk-rm-msg b/tests/ts/ipcs/mk-rm-msg
new file mode 100755
index 0000000..c588a0d
--- /dev/null
+++ b/tests/ts/ipcs/mk-rm-msg
@@ -0,0 +1,44 @@
+#!/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="mk-rm-msg"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_IPCS"
+ts_check_test_command "$TS_CMD_IPCMK"
+ts_check_test_command "$TS_CMD_IPCRM"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+. "$TS_SELF"/functions.sh
+
+rm -f $TS_OUTDIR/id-msg
+$TS_CMD_IPCMK -Q 2>>$TS_OUTPUT | ipcmk_output_handler $TS_OUTPUT $TS_OUTDIR/id-msg
+$TS_CMD_IPCS -q -i "$(cat $TS_OUTDIR/id-msg)" |\
+ grep -c "^Message Queue msqid=$(cat $TS_OUTDIR/id-msg)$" >>$TS_OUTPUT
+$TS_CMD_IPCRM -q $(cat $TS_OUTDIR/id-msg) >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+rm -f $TS_OUTDIR/id-msg
+$TS_CMD_IPCMK -Q 2>>$TS_OUTPUT | ipcmk_output_handler $TS_OUTPUT $TS_OUTDIR/id-msg
+$TS_CMD_IPCRM -Q "$(
+ $TS_CMD_IPCS -q |
+ awk -v id=$(cat $TS_OUTDIR/id-msg) '{if ($2 == id){print $1}}' |
+ uniq
+)" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+rm -f $TS_OUTDIR/id-msg
+
+ts_finalize
diff --git a/tests/ts/ipcs/mk-rm-sem b/tests/ts/ipcs/mk-rm-sem
new file mode 100755
index 0000000..beccee4
--- /dev/null
+++ b/tests/ts/ipcs/mk-rm-sem
@@ -0,0 +1,44 @@
+#!/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="mk-rm-sem"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_IPCS"
+ts_check_test_command "$TS_CMD_IPCMK"
+ts_check_test_command "$TS_CMD_IPCRM"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+. "$TS_SELF"/functions.sh
+
+rm -f $TS_OUTDIR/id-sem
+$TS_CMD_IPCMK -S 1 2>>$TS_OUTPUT | ipcmk_output_handler $TS_OUTPUT $TS_OUTDIR/id-sem
+$TS_CMD_IPCS -s -i "$(cat $TS_OUTDIR/id-sem)" | grep "^nsems" >>$TS_OUTPUT
+$TS_CMD_IPCRM -s $(cat $TS_OUTDIR/id-sem) >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+rm -f $TS_OUTDIR/id-sem
+$TS_CMD_IPCMK -S 2 2>>$TS_OUTPUT | ipcmk_output_handler $TS_OUTPUT $TS_OUTDIR/id-sem
+$TS_CMD_IPCS -s -i "$(cat $TS_OUTDIR/id-sem)" | grep "^nsems" >>$TS_OUTPUT
+$TS_CMD_IPCRM -S "$(
+ $TS_CMD_IPCS -s |
+ awk -v id=$(cat $TS_OUTDIR/id-sem) '{if ($2 == id){print $1}}' |
+ uniq
+)" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+rm -f $TS_OUTDIR/id-sem
+
+ts_finalize
diff --git a/tests/ts/ipcs/mk-rm-shm b/tests/ts/ipcs/mk-rm-shm
new file mode 100755
index 0000000..81f40cf
--- /dev/null
+++ b/tests/ts/ipcs/mk-rm-shm
@@ -0,0 +1,44 @@
+#!/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="mk-rm-shm"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_IPCS"
+ts_check_test_command "$TS_CMD_IPCMK"
+ts_check_test_command "$TS_CMD_IPCRM"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+. "$TS_SELF"/functions.sh
+
+rm -f $TS_OUTDIR/id-shm
+$TS_CMD_IPCMK -M 1 2>>$TS_OUTPUT | ipcmk_output_handler $TS_OUTPUT $TS_OUTDIR/id-shm
+$TS_CMD_IPCS -m -i "$(cat $TS_OUTDIR/id-shm)" | sed -n '/^bytes/s/\t.*//p' >>$TS_OUTPUT
+$TS_CMD_IPCRM -m $(cat $TS_OUTDIR/id-shm) >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f $TS_OUTDIR/id-shm
+
+$TS_CMD_IPCMK -M 12 2>>$TS_OUTPUT | ipcmk_output_handler $TS_OUTPUT $TS_OUTDIR/id-shm
+$TS_CMD_IPCS -m -i "$(cat $TS_OUTDIR/id-shm)" | sed -n '/^bytes/s/\t.*//p' >>$TS_OUTPUT
+$TS_CMD_IPCRM -M "$(
+ $TS_CMD_IPCS -m |
+ awk -v id=$(cat $TS_OUTDIR/id-shm) '{if ($2 == id){print $1}}' |
+ uniq
+)" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+rm -f $TS_OUTDIR/id-shm
+
+ts_finalize
diff --git a/tests/ts/isosize/print-size b/tests/ts/isosize/print-size
new file mode 100755
index 0000000..33e0b3b
--- /dev/null
+++ b/tests/ts/isosize/print-size
@@ -0,0 +1,37 @@
+#!/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="print-size"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_ISOSIZE"
+
+gzip -cd $TS_SELF/sample.iso.gz >| $TS_OUTDIR/sample.iso
+
+ts_init_subtest "default_output"
+$TS_CMD_ISOSIZE $TS_OUTDIR/sample.iso >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "sector_output"
+$TS_CMD_ISOSIZE --sectors $TS_OUTDIR/sample.iso >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "divisor_output"
+$TS_CMD_ISOSIZE --divisor=9 $TS_OUTDIR/sample.iso >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/isosize/sample.iso.gz b/tests/ts/isosize/sample.iso.gz
new file mode 100644
index 0000000..17937a2
--- /dev/null
+++ b/tests/ts/isosize/sample.iso.gz
Binary files differ
diff --git a/tests/ts/kill/all_processes b/tests/ts/kill/all_processes
new file mode 100755
index 0000000..b228077
--- /dev/null
+++ b/tests/ts/kill/all_processes
@@ -0,0 +1,66 @@
+#!/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="all_processes"
+
+. "$TS_TOPDIR/functions.sh"
+ts_init "$*"
+
+ts_skip_nonroot
+
+# make sure we do not use shell built-in command
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
+ TS_CMD_KILL="$(which kill)"
+fi
+
+ts_check_test_command "$TS_CMD_KILL"
+ts_check_test_command "$TS_HELPER_SIGRECEIVE"
+
+. "$TS_SELF/kill_functions.sh"
+
+HELPER_SYMLINK="$(mktemp "${TS_OUTDIR}/alXXXXXXXXXXXXX")"
+ln -sf "$TS_HELPER_SIGRECEIVE" "$HELPER_SYMLINK"
+
+"$HELPER_SYMLINK" -s "$TS_TESTUSER" >> $TS_OUTPUT 2>> $TS_ERRLOG &
+TEST_PID=$!
+
+check_test_sigreceive $TEST_PID
+[ $? -eq 1 ] || echo "${HELPER_SYMLINK##*/} helper did not start" >> "$TS_OUTPUT"
+
+
+ts_log_both "test 1"
+"$TS_CMD_KILL" ${HELPER_SYMLINK##*/} >> $TS_OUTPUT 2>> $TS_ERRLOG
+if [ $? -ne 1 ]; then
+ echo "kill did not return 1" >> "$TS_OUTPUT"
+fi
+
+ts_log_both "test 2"
+"$TS_CMD_KILL" -a ${HELPER_SYMLINK##*/} >> $TS_OUTPUT 2>> $TS_ERRLOG
+if [ $? -ne 0 ]; then
+ echo "kill did not return 0" >> "$TS_OUTPUT"
+fi
+wait $TEST_PID
+
+ts_log_both "test 3"
+"$TS_CMD_KILL" -a -p ${HELPER_SYMLINK##*/} >> $TS_OUTPUT 2>> $TS_ERRLOG
+if [ $? -ne 1 ]; then
+ echo "kill -a -p did not return 1" >> "$TS_OUTPUT"
+fi
+
+sed -i "s/${HELPER_SYMLINK##*/}/${TS_HELPER_SIGRECEIVE##*/}/" $TS_OUTPUT $TS_ERRLOG
+
+rm -f "$HELPER_SYMLINK"
+
+ts_finalize
diff --git a/tests/ts/kill/kill_functions.sh b/tests/ts/kill/kill_functions.sh
new file mode 100644
index 0000000..4ace3d9
--- /dev/null
+++ b/tests/ts/kill/kill_functions.sh
@@ -0,0 +1,29 @@
+# kill tests, or command, will not when /proc is missing.
+test -d /proc || ts_skip "/proc not available"
+
+# The test_sigreceive is ready when signal process mask contains SIGHUP
+function check_test_sigreceive {
+ local rc=0
+ local pid=$1
+
+ for i in 0.01 0.1 1 1 1 1; do
+ if [ ! -f /proc/$pid/status ]; then
+ # The /proc exists, but not status file. Because the
+ # process already started it is unlikely the file would
+ # appear after any amount of waiting. Try to sleep for
+ # moment and hopefully test_sigreceive is ready to be
+ # killed.
+ echo "kill_functions.sh: /proc/$pid/status: No such file or directory"
+ sleep 2
+ rc=1
+ break
+ fi
+ sigmask=$((16#$( awk '/SigCgt/ { print $2}' /proc/$pid/status) ))
+ if [ $(( $sigmask & 1 )) == 1 ]; then
+ rc=1
+ break
+ fi
+ sleep $i
+ done
+ return $rc
+}
diff --git a/tests/ts/kill/name_to_number b/tests/ts/kill/name_to_number
new file mode 100755
index 0000000..955d861
--- /dev/null
+++ b/tests/ts/kill/name_to_number
@@ -0,0 +1,75 @@
+#!/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="name_to_number"
+
+. "$TS_TOPDIR/functions.sh"
+ts_init "$*"
+
+# make sure we do not use shell built-in command
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
+ TS_CMD_KILL="$(which kill)"
+fi
+
+ts_check_test_command "$TS_CMD_KILL"
+ts_check_test_command "$TS_HELPER_SIGRECEIVE"
+
+# SIGRTMAX-0 and SIGRTMAX-1 are not usable under QEMU
+ts_skip_qemu_user
+
+. "$TS_SELF/kill_functions.sh"
+
+all_ok=true
+
+HELPER_SYMLINK="$(mktemp "${TS_OUTDIR}/naXXXXXXXXXXXXX")"
+ln -sf "$TS_HELPER_SIGRECEIVE" "$HELPER_SYMLINK"
+
+for SIG in $($TS_CMD_KILL -L); do
+ if [ "x${SIG//[0-9]/}" = "x" ]; then
+ EXPECTED=$SIG
+ continue
+ fi
+ if [ "$TS_ENABLE_ASAN" == "yes" ] && [ "x$SIG" = "xSEGV" ]; then
+ continue
+ fi
+ if [ "x$SIG" = "xSTOP" ] || [ "x$SIG" = "xKILL" ]; then
+ continue
+ fi
+ if [ "x$SIG" = "xRTMIN" ]; then
+ SIG="$SIG+0"
+ fi
+ if [ "x$SIG" = "xRTMAX" ]; then
+ SIG="$SIG-0"
+ fi
+
+ "$HELPER_SYMLINK" >> $TS_OUTPUT 2>> $TS_ERRLOG &
+ TEST_PID=$!
+ check_test_sigreceive $TEST_PID
+ [ $? -eq 1 ] || echo "${HELPER_SYMLINK##*/} helper did not start" >> "$TS_OUTPUT"
+
+ "$TS_CMD_KILL" -$SIG ${HELPER_SYMLINK##*/} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ wait $TEST_PID
+ if [ $? -ne $EXPECTED ]; then
+ echo "$SIG returned $? while $EXPECTED was expected" >> "$TS_OUTPUT"
+ all_ok=false
+ fi
+done
+
+if $all_ok; then
+ echo 'all ok' >> "$TS_OUTPUT"
+fi
+rm -f "$HELPER_SYMLINK"
+
+ts_finalize
diff --git a/tests/ts/kill/options b/tests/ts/kill/options
new file mode 100755
index 0000000..10653a5
--- /dev/null
+++ b/tests/ts/kill/options
@@ -0,0 +1,68 @@
+#!/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="options"
+
+. "$TS_TOPDIR/functions.sh"
+ts_init "$*"
+
+# make sure we do not use shell built-in command
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
+ TS_CMD_KILL="$(which kill)"
+fi
+
+ts_check_test_command "$TS_CMD_KILL"
+ts_check_test_command "$TS_HELPER_SIGRECEIVE"
+
+. "$TS_SELF/kill_functions.sh"
+
+all_ok=true
+
+HELPER_SYMLINK="$(mktemp "${TS_OUTDIR}/opXXXXXXXXXXXXX")"
+ln -sf "$TS_HELPER_SIGRECEIVE" "$HELPER_SYMLINK"
+
+try_option()
+{
+ "$HELPER_SYMLINK" >> $TS_OUTPUT 2>> $TS_ERRLOG &
+ TEST_PID=$!
+ check_test_sigreceive $TEST_PID
+ [ $? -eq 1 ] || echo "${HELPER_SYMLINK##*/} helper did not start" >> "$TS_OUTPUT"
+
+ "$TS_CMD_KILL" "$@" $TEST_PID >> $TS_OUTPUT 2>> $TS_ERRLOG
+ if [ $? -ne 0 ]; then
+ echo "kill $@ did not work" >> "$TS_OUTPUT"
+ all_ok=false
+ fi
+ wait $TEST_PID
+ if [ $? -ne 1 ]; then
+ echo "wait $TEST_PID for $@ did not work" >> "$TS_OUTPUT"
+ all_ok=false
+ fi
+}
+
+try_option -s 1
+try_option --signal 1
+try_option --signal HUP
+try_option --signal SIGHUP
+try_option -1
+try_option -HUP
+try_option -SIGHUP
+
+if $all_ok; then
+ echo 'all ok' >> "$TS_OUTPUT"
+fi
+rm -f "$HELPER_SYMLINK"
+
+ts_finalize
diff --git a/tests/ts/kill/print_pid b/tests/ts/kill/print_pid
new file mode 100755
index 0000000..6e2db37
--- /dev/null
+++ b/tests/ts/kill/print_pid
@@ -0,0 +1,63 @@
+#!/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="print_pid"
+
+. "$TS_TOPDIR/functions.sh"
+ts_init "$*"
+
+# make sure we do not use shell built-in command
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
+ TS_CMD_KILL="$(which kill)"
+fi
+
+ts_check_test_command "$TS_CMD_KILL"
+ts_check_test_command "$TS_HELPER_SIGRECEIVE"
+
+. "$TS_SELF/kill_functions.sh"
+
+all_ok=true
+
+HELPER_SYMLINK="$(mktemp "${TS_OUTDIR}/prXXXXXXXXXXXXX")"
+ln -sf "$TS_HELPER_SIGRECEIVE" "$HELPER_SYMLINK"
+
+"$HELPER_SYMLINK" >> $TS_OUTPUT 2>> $TS_ERRLOG &
+TEST_PID=$!
+check_test_sigreceive $TEST_PID
+[ $? -eq 1 ] || echo "${HELPER_SYMLINK##*/} helper did not start" >> "$TS_OUTPUT"
+
+KILL_PID=$("$TS_CMD_KILL" -p ${HELPER_SYMLINK##*/} 2>> $TS_OUTPUT 2>> $TS_ERRLOG)
+if [ $? -ne 0 ]; then
+ echo "kill -p did not work" >> "$TS_OUTPUT"
+ all_ok=false
+fi
+if [ "x$TEST_PID" != "x$KILL_PID" ]; then
+ echo "jobs -p $TEST_PID != kill -p $KILL_PID" >> "$TS_OUTPUT"
+ all_ok=false
+fi
+
+"$TS_CMD_KILL" -1 $TEST_PID
+wait $TEST_PID
+if [ $? -ne 1 ]; then
+ echo "wait $TEST_PID returned ${?}" >> "$TS_OUTPUT"
+ all_ok=false
+fi
+
+if $all_ok; then
+ echo 'all ok' >> "$TS_OUTPUT"
+fi
+rm -f "$HELPER_SYMLINK"
+
+ts_finalize
diff --git a/tests/ts/kill/queue b/tests/ts/kill/queue
new file mode 100755
index 0000000..6c9e9ef
--- /dev/null
+++ b/tests/ts/kill/queue
@@ -0,0 +1,58 @@
+#!/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="queue"
+
+. "$TS_TOPDIR/functions.sh"
+ts_init "$*"
+
+# make sure we do not use shell built-in command
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
+ TS_CMD_KILL="$(which kill)"
+fi
+
+ts_check_test_command "$TS_CMD_KILL"
+ts_check_test_command "$TS_HELPER_SIGRECEIVE"
+
+. "$TS_SELF/kill_functions.sh"
+
+all_ok=true
+
+HELPER_SYMLINK="$(mktemp "${TS_OUTDIR}/quXXXXXXXXXXXXX")"
+ln -sf "$TS_HELPER_SIGRECEIVE" "$HELPER_SYMLINK"
+
+"$HELPER_SYMLINK" >> $TS_OUTPUT 2>> $TS_ERRLOG &
+TEST_PID=$!
+check_test_sigreceive $TEST_PID
+[ $? -eq 1 ] || echo "${HELPER_SYMLINK##*/} helper did not start" >> "$TS_OUTPUT"
+
+"$TS_CMD_KILL" -1 --queue 42 $TEST_PID >> $TS_OUTPUT 2>> $TS_ERRLOG
+if [ $? -ne 0 ]; then
+ echo "kill --queue 42 failed" >> "$TS_OUTPUT"
+ all_ok=false
+fi
+wait $TEST_PID
+if [ $? -ne 42 ]; then
+ echo "wait $TEST_PID returned $? instead of 42" >> "$TS_OUTPUT"
+ all_ok=false
+fi
+
+if $all_ok; then
+ echo 'all ok' >> "$TS_OUTPUT"
+fi
+
+rm -f "$HELPER_SYMLINK"
+
+ts_finalize
diff --git a/tests/ts/lib/procfs b/tests/ts/lib/procfs
new file mode 100755
index 0000000..998aa39
--- /dev/null
+++ b/tests/ts/lib/procfs
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Thomas Weißschuh <thomas@t-8ch.de>
+#
+# 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="procfs library"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_PROCFS"
+
+test_data="$TS_SELF/procfs-data"
+test_cmd() {
+ "$TS_HELPER_PROCFS" --prefix "$test_data" "$@" \
+ 2>> "$TS_ERRLOG" \
+ | sed -e 's/ UID: .*/ UID: [redacted]/' \
+ >> "$TS_OUTPUT"
+}
+
+ts_init_subtest "one-process"
+
+test_cmd --one 1
+test_cmd --one 2
+test_cmd --one 3
+
+ts_finalize_subtest
+
+
+ts_init_subtest "stat-nth"
+
+test_cmd --stat-nth 1 1
+test_cmd --stat-nth 1 2
+test_cmd --stat-nth 1 3
+test_cmd --stat-nth 1 4
+
+test_cmd --stat-nth 2 1
+test_cmd --stat-nth 2 4
+
+test_cmd --stat-nth 3 1
+test_cmd --stat-nth 3 4
+
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/lib/procfs-data/proc/1/cmdline b/tests/ts/lib/procfs-data/proc/1/cmdline
new file mode 100644
index 0000000..2baeb31
--- /dev/null
+++ b/tests/ts/lib/procfs-data/proc/1/cmdline
Binary files differ
diff --git a/tests/ts/lib/procfs-data/proc/1/comm b/tests/ts/lib/procfs-data/proc/1/comm
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/tests/ts/lib/procfs-data/proc/1/comm
@@ -0,0 +1 @@
+test
diff --git a/tests/ts/lib/procfs-data/proc/1/stat b/tests/ts/lib/procfs-data/proc/1/stat
new file mode 100644
index 0000000..35cb1bd
--- /dev/null
+++ b/tests/ts/lib/procfs-data/proc/1/stat
@@ -0,0 +1 @@
+373850 (test) S 373752 373850 373752 34835 373850 4194304 83 0 0 0 0 0 0 0 20 0 1 0 6164479 2543616 320 18446744073709551615 94138801930240 94138801930657 140720370008720 0 0 0 0 0 0 1 0 0 17 1 0 0 0 0 0 94138801941968 94138801942568 94138832138240 140720370011239 140720370011246 140720370011246 140720370012145 0
diff --git a/tests/ts/lib/procfs-data/proc/2/cmdline b/tests/ts/lib/procfs-data/proc/2/cmdline
new file mode 100644
index 0000000..5ca4218
--- /dev/null
+++ b/tests/ts/lib/procfs-data/proc/2/cmdline
Binary files differ
diff --git a/tests/ts/lib/procfs-data/proc/2/comm b/tests/ts/lib/procfs-data/proc/2/comm
new file mode 100644
index 0000000..3bd1f0e
--- /dev/null
+++ b/tests/ts/lib/procfs-data/proc/2/comm
@@ -0,0 +1,2 @@
+foo
+bar
diff --git a/tests/ts/lib/procfs-data/proc/2/stat b/tests/ts/lib/procfs-data/proc/2/stat
new file mode 100644
index 0000000..250e579
--- /dev/null
+++ b/tests/ts/lib/procfs-data/proc/2/stat
@@ -0,0 +1,2 @@
+1583 (foo
+bar) S 1165 1583 1165 34818 1583 4194304 82 0 0 0 0 0 0 0 20 0 1 0 17487 2543616 215 18446744073709551615 93858497511424 93858497511841 140729173273328 0 0 0 0 0 0 1 0 0 17 0 0 0 0 0 0 93858497523152 93858497523752 93858527924224 140729173281886 140729173281896 140729173281896 140729173282798 0
diff --git a/tests/ts/lib/procfs-data/proc/3/cmdline b/tests/ts/lib/procfs-data/proc/3/cmdline
new file mode 100644
index 0000000..4840b32
--- /dev/null
+++ b/tests/ts/lib/procfs-data/proc/3/cmdline
Binary files differ
diff --git a/tests/ts/lib/procfs-data/proc/3/comm b/tests/ts/lib/procfs-data/proc/3/comm
new file mode 100644
index 0000000..57bf5bb
--- /dev/null
+++ b/tests/ts/lib/procfs-data/proc/3/comm
@@ -0,0 +1 @@
+foo )bar
diff --git a/tests/ts/lib/procfs-data/proc/3/stat b/tests/ts/lib/procfs-data/proc/3/stat
new file mode 100644
index 0000000..4b5f575
--- /dev/null
+++ b/tests/ts/lib/procfs-data/proc/3/stat
@@ -0,0 +1 @@
+4102 (foo )bar) S 1165 4102 1165 34818 4102 4194304 80 0 0 0 0 0 0 0 20 0 1 0 61909 2543616 215 18446744073709551615 94697631760384 94697631760801 140728832669632 0 0 0 0 0 0 1 0 0 17 0 0 0 0 0 0 94697631772112 94697631772712 94697662554112 140728832670811 140728832670822 140728832670822 140728832671725 0
diff --git a/tests/ts/lib/timeutils b/tests/ts/lib/timeutils
new file mode 100755
index 0000000..13ec68b
--- /dev/null
+++ b/tests/ts/lib/timeutils
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023 Thomas Weißschuh <thomas@t-8ch.de>
+#
+# This file may be distributed under the terms of the
+# GNU Lesser General Public License.
+#
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="timeutils library"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_TIMEUTILS"
+
+ts_init_subtest "timestamp"
+
+"$TS_HELPER_TIMEUTILS" --unittest-timestamp 2> "$TS_ERRLOG"
+
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/libfdisk/gpt b/tests/ts/libfdisk/gpt
new file mode 100755
index 0000000..b401929
--- /dev/null
+++ b/tests/ts/libfdisk/gpt
@@ -0,0 +1,65 @@
+#!/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="GPT"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBFDISK_GPT"
+ts_check_test_command "$TESTPROG"
+ts_check_test_command "$TS_CMD_SFDISK"
+
+TEST_IMAGE_NAME=$(ts_image_init 10)
+
+ts_init_subtest "all-defaults"
+$TS_CMD_SFDISK --unit S ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+label: gpt
+label-id: b181c399-4711-4c52-8b65-9e764541218d
+
+size=5M, attrs="RequiredPartition,48"
+attrs="52,53,62"
+EOF
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+TEST_IMAGE_NAME=$(ts_image_init 10)
+
+ts_init_subtest "all-defaults-with-typo"
+$TS_CMD_SFDISK --unit S ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+label: gpt
+label-id: b181c399-4711-4c52-8b65-9e764541218d
+
+size=5M, attrs="RequiredPartiton,48"
+attrs="52,53,62"
+EOF
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+ts_init_subtest "getattr"
+ts_run $TESTPROG --getattr ${TEST_IMAGE_NAME} 1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_run $TESTPROG --getattr ${TEST_IMAGE_NAME} 2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "setattr"
+ts_run $TESTPROG --setattr ${TEST_IMAGE_NAME} 1 0xff00000000000000 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_run $TESTPROG --setattr ${TEST_IMAGE_NAME} 2 0x4 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --part-attrs ${TEST_IMAGE_NAME} 1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --part-attrs ${TEST_IMAGE_NAME} 2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/libfdisk/mkpart b/tests/ts/libfdisk/mkpart
new file mode 100755
index 0000000..6038f26
--- /dev/null
+++ b/tests/ts/libfdisk/mkpart
@@ -0,0 +1,66 @@
+#!/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.
+#
+# Create partition in non-interactive mode.
+#
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="mkpart"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBFDISK_MKPART"
+ts_check_test_command "$TESTPROG"
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_CMD_WIPEFS"
+
+TEST_IMAGE_NAME=$(ts_image_init 15)
+
+ts_init_subtest "mbr"
+$TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \
+ 1M 1M 1M - >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+ts_init_subtest "mbr-logic"
+$TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \
+ 1M 1M 1M - 1M 1M ->> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+ts_init_subtest "mbr-nopartno"
+$TESTPROG --nopartno --label mbr --device ${TEST_IMAGE_NAME} \
+ 1M 1M 1M - 1M 1M ->> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+ts_init_subtest "gpt"
+$TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \
+ 1M 1M 1M 1M 1M 1M - >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/libfdisk/mkpart-full b/tests/ts/libfdisk/mkpart-full
new file mode 100755
index 0000000..4c026ce
--- /dev/null
+++ b/tests/ts/libfdisk/mkpart-full
@@ -0,0 +1,225 @@
+#!/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.
+#
+#
+# Create partition in non-interactive mode; like mkpart, but partition is fully
+# specifuied by partno, start and size.
+#
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="mkpart-full"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBFDISK_MKPART_FULLSPEC"
+ts_check_test_command "$TESTPROG"
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_CMD_WIPEFS"
+
+TEST_IMAGE_NAME=$(ts_image_init 15)
+
+ts_init_subtest "mbr-primary"
+ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,4096,2048 \
+ 3,6144,2048 \
+ 4,8192,22528 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+
+ts_init_subtest "mbr-primary-nopartno"
+ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} -- \
+ -,2048,2048 \
+ -,4096,2048 \
+ -,6144,2048 \
+ -,8192,22528 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+## no extended but partno > 4 requested
+ts_init_subtest "mbr-err-primary"
+ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,4096,2048 \
+ 7,6144,2048 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+## no extended but partno > 4 requested
+ts_init_subtest "mbr-err-nospace"
+ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,4096,2048 \
+ 3,4096,2048 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+
+ts_init_subtest "mbr-logical"
+ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,4096,2048 \
+ 3,6144,2048 \
+ 4,8192,22528 \
+ 5,10240,2048 \
+ 6,14336,2048 \
+ 7,18432,12288 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+ts_init_subtest "mbr-nopartno"
+ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} -- \
+ -,2048,2048 \
+ -,4096,2048 \
+ -,6144,2048 \
+ -,8192,22528 \
+ -,10240,2048 \
+ -,14336,2048 \
+ -,18432,12288 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+### 6th partition (logical) out of extended
+ts_init_subtest "mbr-err-logical"
+ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,4096,2048 \
+ 3,6144,2048 \
+ 4,8192,22528 \
+ 5,10240,2048 \
+ 6,4096,2048 \
+ 7,18432,12288 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+ts_init_subtest "mbr-space-gap"
+ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,6144,2048 \
+ 3,8192,2048 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+ts_init_subtest "gpt"
+ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,4096,2048 \
+ 3,6144,2048 \
+ 4,8192,2048 \
+ 5,10240,2048 \
+ 6,12288,2048 \
+ 7,14336,2048 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+ts_init_subtest "gpt-nopartno"
+ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} -- \
+ -,2048,2048 \
+ -,4096,2048 \
+ -,6144,2048 \
+ -,8192,2048 \
+ -,10240,2048 \
+ -,12288,2048 \
+ -,14336,2048 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+### 4th partition overlap 4th and 5th
+ts_init_subtest "gpt-err-overlap"
+ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,4096,2048 \
+ 3,6144,2048 \
+ 4,5000,2048 \
+ 5,10240,2048 \
+ 6,12288,2048 \
+ 7,14336,2048 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+ts_init_subtest "gpt-partno-gap"
+ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,4096,2048 \
+ 4,6144,2048 \
+ 5,8192,2048 \
+ 7,10240,2048 \
+ 8,12288,2048 \
+ 9,14336,2048 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+$TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null
+
+ts_init_subtest "gpt-space-gap"
+ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \
+ 1,2048,2048 \
+ 2,6144,2048 \
+ 3,8192,2048 \
+ 4,12288,2048 \
+ 5,14336,2048 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean ${TEST_IMAGE_NAME}
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/libmount/context b/tests/ts/libmount/context
new file mode 100755
index 0000000..a5d2e81
--- /dev/null
+++ b/tests/ts/libmount/context
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="context"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_UUIDGEN"
+
+ts_skip_nonroot
+ts_check_prog "mkfs.ext2"
+ts_check_prog "mkfs.ext4"
+
+TESTPROG="$TS_HELPER_LIBMOUNT_CONTEXT"
+LABEL=libmount-test
+UUID=$($TS_CMD_UUIDGEN)
+
+MOUNTPOINT="$TS_MOUNTPOINT"
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+
+ts_log "Init device"
+$TS_CMD_UMOUNT $MOUNTPOINT &> /dev/null
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=100
+DEVNAME=$(basename $TS_DEVICE)
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} &> /dev/null <<EOF
+o
+n
+p
+1
+
+
+w
+q
+EOF
+
+DEVICE="${TS_DEVICE}1"
+
+udevadm settle
+
+grep -q " $DEVNAME\$" /proc/partitions
+if [ $? -ne 0 ]; then
+ ts_skip "no partition!"
+fi
+
+ts_log "Create filesystem"
+mkfs.ext4 -L "$LABEL" -U "$UUID" $DEVICE &> /dev/null
+
+ts_log "Do tests..."
+
+function is_mounted {
+ ts_is_mounted "$1"
+ return $?
+}
+
+
+udevadm settle
+ts_device_has "TYPE" "ext4" $DEVICE || ts_die "Cannot find ext2 on $DEVICE"
+
+
+ts_init_subtest "mount-by-devname"
+mkdir -p $MOUNTPOINT &> /dev/null
+ts_run $TESTPROG --mount $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "umount-by-devname"
+ts_run $TESTPROG --umount $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "mount-by-label"
+mkdir -p $MOUNTPOINT &> /dev/null
+ts_run $TESTPROG --mount LABEL="$LABEL" $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "umount-by-mountpoint"
+ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "mount-by-uuid"
+mkdir -p $MOUNTPOINT &> /dev/null
+ts_run $TESTPROG --mount UUID="$UUID" $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+sleep 1
+ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+sleep 1
+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "mount-flags"
+mkdir -p $MOUNTPOINT &> /dev/null
+ts_run $TESTPROG --mount -o ro,noexec,nosuid,strictatime $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT --kernel --mountpoint $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_run $TESTPROG --mount -o remount,rw $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT --kernel --mountpoint $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+# Test that the atime option works after the migration to use the new kernel mount APIs.
+ts_run $TESTPROG --mount -o atime $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT --kernel --mountpoint $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize_subtest
+
+ts_init_subtest "mount-loopdev"
+mkdir -p $MOUNTPOINT &> /dev/null
+img=$(ts_image_init)
+mkfs.ext2 -F $img &> /dev/null
+udevadm settle
+
+ts_run $TESTPROG --mount -o loop $img $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $MOUNTPOINT || echo "$MOUNTPOINT not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $MOUNTPOINT && echo "$MOUNTPOINT still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+# deprecated (x-* mount option maintained in userspace (e.g. utab)
+ts_init_subtest "x-permanent"
+TS_NOEXIST="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-noex"
+[ -d $TS_NOEXIST ] && rmdir $TS_NOEXIST
+
+$TS_CMD_MOUNT -o x-mount.mkdir --bind $MOUNTPOINT $TS_NOEXIST >> $TS_OUTPUT 2>> $TS_ERRLOG &&
+ echo "successfully mounted" >> $TS_OUTPUT
+ts_finalize_subtest
+
+$TS_CMD_UMOUNT $TS_NOEXIST
+rmdir $TS_NOEXIST
+
+
+# X-* comment
+ts_init_subtest "X-comment"
+TS_NOEXIST="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-noex"
+[ -d $TS_NOEXIST ] && rmdir $TS_NOEXIST
+
+$TS_CMD_MOUNT -o X-mount.mkdir --bind $MOUNTPOINT $TS_NOEXIST >> $TS_OUTPUT 2>> $TS_ERRLOG &&
+ echo "successfully mounted" >> $TS_OUTPUT
+ts_finalize_subtest
+
+$TS_CMD_UMOUNT $TS_NOEXIST
+rmdir $TS_NOEXIST
+
+ts_log "...done."
+ts_finalize
diff --git a/tests/ts/libmount/context-py b/tests/ts/libmount/context-py
new file mode 100755
index 0000000..53a211c
--- /dev/null
+++ b/tests/ts/libmount/context-py
@@ -0,0 +1,152 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="context-py"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_UUIDGEN"
+
+ts_skip_nonroot
+ts_check_prog "mkfs.ext2"
+ts_check_prog "mkfs.ext4"
+
+ts_init_py libmount
+
+if [ "$TS_ENABLE_ASAN" == "yes" -o "$TS_ENABLE_UBSAN" == "yes" ]; then
+ TS_KNOWN_FAIL="yes"
+fi
+
+TESTPROG="$TS_HELPER_PYLIBMOUNT_CONTEXT"
+[ -x $TESTPROG ] || ts_die "test script missing"
+
+PYDBG="$PYTHON -m pdb"
+LABEL=libmount-test
+UUID=$($TS_CMD_UUIDGEN)
+MOUNTPOINT="$TS_MOUNTPOINT"
+TS_NOEXIST="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-noex"
+[ -d $TS_NOEXIST ] && rmdir $TS_NOEXIST
+
+ts_log "Init device"
+$TS_CMD_UMOUNT $MOUNTPOINT &> /dev/null
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=100
+DEVNAME=$(basename $TS_DEVICE)
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} &> /dev/null <<EOF
+o
+n
+p
+1
+
+
+w
+q
+EOF
+
+DEVICE="${TS_DEVICE}1"
+
+udevadm settle
+
+grep -q " $DEVNAME\$" /proc/partitions
+if [ $? -ne 0 ]; then
+ ts_skip "no partition!"
+fi
+
+ts_log "Create filesystem"
+mkfs.ext4 -L "$LABEL" -U "$UUID" $DEVICE &> /dev/null
+
+ts_log "Do tests..."
+
+function is_mounted {
+ ts_is_mounted "$1"
+ return $?
+}
+
+
+udevadm settle
+ts_device_has "TYPE" "ext4" $DEVICE || ts_die "Cannot find ext2 on $DEVICE"
+
+
+ts_init_subtest "mount-by-devname"
+mkdir -p $MOUNTPOINT &> /dev/null
+$PYTHON $TESTPROG --mount $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "umount-by-devname"
+$PYTHON $TESTPROG --umount $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "mount-by-label"
+mkdir -p $MOUNTPOINT &> /dev/null
+$PYTHON $TESTPROG --mount LABEL="$LABEL" $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "umount-by-mountpoint"
+$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "mount-by-uuid"
+mkdir -p $MOUNTPOINT &> /dev/null
+$PYTHON $TESTPROG --mount UUID="$UUID" $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+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>> $TS_ERRLOG
+$TS_CMD_FINDMNT --kernel $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$PYTHON $TESTPROG --mount -o remount,rw $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT --kernel $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "mount-loopdev"
+mkdir -p $MOUNTPOINT &> /dev/null
+img=$(ts_image_init)
+mkfs.ext2 -F $img &> /dev/null
+udevadm settle
+
+$PYTHON $TESTPROG --mount -o loop $img $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $MOUNTPOINT || echo "$MOUNTPOINT not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+is_mounted $MOUNTPOINT && echo "$MOUNTPOINT still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "x-mount.mkdir"
+$TS_CMD_MOUNT -o x-mount.mkdir --bind $MOUNTPOINT $TS_NOEXIST >> $TS_OUTPUT 2>> $TS_ERRLOG &&
+ echo "successfully mounted" >> $TS_OUTPUT
+ts_finalize_subtest
+
+
+$TS_CMD_UMOUNT $TS_NOEXIST
+rmdir $TS_NOEXIST
+
+ts_log "...done."
+ts_finalize
diff --git a/tests/ts/libmount/context-utab b/tests/ts/libmount/context-utab
new file mode 100755
index 0000000..c67017c
--- /dev/null
+++ b/tests/ts/libmount/context-utab
@@ -0,0 +1,129 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="context (utab)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+#ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_WIPEFS"
+ts_check_test_command "$TS_CMD_UUIDGEN"
+
+ts_skip_nonroot
+ts_check_prog "mkfs.ext4"
+
+TESTPROG="$TS_HELPER_LIBMOUNT_CONTEXT"
+LABEL=libmount-test
+UUID=$($TS_CMD_UUIDGEN)
+MOUNTPOINT="$TS_MOUNTPOINT"
+
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=257
+DEVNAME=$(basename $TS_DEVICE)
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} &> /dev/null <<EOF
+o
+n
+p
+1
+
+
+w
+q
+EOF
+
+DEVICE="${TS_DEVICE}1"
+
+udevadm settle
+
+grep -q " $DEVNAME\$" /proc/partitions
+if [ $? -ne 0 ]; then
+ ts_skip "no partition!"
+fi
+
+ts_log "Create filesystem"
+mkfs.ext4 -L "$LABEL" -U "$UUID" $DEVICE &> /dev/null
+
+ts_log "Do tests..."
+
+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
+ts_run $TESTPROG --mount $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted "$DEVICE" || \
+ echo "(by device) cannot find $DEVICE in /proc/mounts" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "umount-by-devname"
+ts_run $TESTPROG --umount $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted "$DEVICE" &&
+ echo "umount (device) failed: found $DEVICE in /proc/mounts" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "mount-uhelper"
+mkdir -p $MOUNTPOINT &> /dev/null
+ts_run $TESTPROG --mount -o uhelper=foo,rw LABEL="$LABEL" $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" || \
+ echo "(by label) cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "umount"
+ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" && \
+ echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+if type "mkfs.btrfs" &>/dev/null && mkfs.btrfs --version &>/dev/null; then
+ $TS_CMD_WIPEFS -a $DEVICE &> /dev/null
+ #ts_log "Create filesystem [btrfs]"
+ mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null
+ udevadm settle
+
+ $TS_CMD_MOUNT -t btrfs $DEVICE $MOUNTPOINT &> /dev/null
+ btrfs subvolume create $MOUNTPOINT/sub &> /dev/null
+ $TS_CMD_UMOUNT $MOUNTPOINT &> /dev/null
+
+ udevadm settle
+
+ ts_init_subtest "mount-uhelper-subvol"
+ mkdir -p $MOUNTPOINT &> /dev/null
+ ts_run $TESTPROG --mount -o uhelper=foo,rw,subvol=sub $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" || \
+ echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+
+ # Don't temporary write btrfs mount options to the test output,
+ # the options depend on kernel version (since 4.2 it contains
+ # subvol= and subvolid=).
+ #
+ #ts_log "All mount options (btrfs subvolume + utab) ---"
+ #$TS_CMD_FINDMNT --mtab --mountpoint $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>> $TS_ERRLOG
+ #ts_log "---"
+
+ ts_init_subtest "umount-subvol"
+ ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" && \
+ echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+fi
+
+ts_log "...done."
+ts_finalize
diff --git a/tests/ts/libmount/context-utab-py b/tests/ts/libmount/context-utab-py
new file mode 100755
index 0000000..59c9e49
--- /dev/null
+++ b/tests/ts/libmount/context-utab-py
@@ -0,0 +1,134 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="context-py (utab)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_WIPEFS"
+ts_check_test_command "$TS_CMD_UUIDGEN"
+
+ts_skip_nonroot
+ts_check_prog "mkfs.ext4"
+
+ts_init_py libmount
+
+if [ "$TS_ENABLE_ASAN" == "yes" -o "$TS_ENABLE_UBSAN" == "yes" ]; then
+ TS_KNOWN_FAIL="yes"
+fi
+
+TESTPROG="$TS_HELPER_PYLIBMOUNT_CONTEXT"
+[ -x $TESTPROG ] || ts_die "test script missing"
+
+LABEL=libmount-test
+UUID=$($TS_CMD_UUIDGEN)
+MOUNTPOINT="$TS_MOUNTPOINT"
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=257
+DEVNAME=$(basename $TS_DEVICE)
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} &> /dev/null <<EOF
+o
+n
+p
+1
+
+
+w
+q
+EOF
+
+DEVICE="${TS_DEVICE}1"
+
+udevadm settle
+
+grep -q " $DEVNAME\$" /proc/partitions
+if [ $? -ne 0 ]; then
+ ts_skip "no partition!"
+fi
+
+ts_log "Create filesystem"
+mkfs.ext4 -L "$LABEL" -U "$UUID" $DEVICE &> /dev/null
+
+ts_log "Do tests..."
+
+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>> $TS_ERRLOG
+ts_is_mounted "$DEVICE" || \
+ echo "(by device) cannot find $DEVICE in /proc/mounts" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "umount-by-devname"
+$PYTHON $TESTPROG --umount $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted "$DEVICE" &&
+ echo "umount (device) failed: found $DEVICE in /proc/mounts" >> $TS_OUTPUT 2>> $TS_ERRLOG
+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>> $TS_ERRLOG
+grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" || \
+ echo "(by label) cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "umount"
+$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" && \
+ echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+if type "mkfs.btrfs" &>/dev/null && mkfs.btrfs --version &>/dev/null; then
+ $TS_CMD_WIPEFS -a $DEVICE &> /dev/null
+ #ts_log "Create filesystem [btrfs]"
+ mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null
+ udevadm settle
+
+ $TS_CMD_MOUNT -t btrfs $DEVICE $MOUNTPOINT &> /dev/null
+ btrfs subvolume create $MOUNTPOINT/sub &> /dev/null
+ $TS_CMD_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>> $TS_ERRLOG
+ grep -q "SRC=$DEVICE\b" "$LIBMOUNT_UTAB" || \
+ echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+
+ # Don't temporary write btrfs mount options to the test output,
+ # the options depend on kernel version (since 4.2 it contains
+ # subvol= and subvolid=).
+ #
+ #ts_log "All mount options (btrfs subvolume + utab) ---"
+ #$TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>> $TS_ERRLOG
+ #ts_log "---"
+
+ ts_init_subtest "umount-subvol"
+ $PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ grep -q $DEVICE $LIBMOUNT_UTAB && \
+ echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+fi
+
+ts_log "...done."
+ts_finalize
diff --git a/tests/ts/libmount/debug b/tests/ts/libmount/debug
new file mode 100755
index 0000000..e98d922
--- /dev/null
+++ b/tests/ts/libmount/debug
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Copyright (C) 2014 Ondrej Oprala <ooprala@redhat.com
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="debugging"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBMOUNT_DEBUG"
+
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+
+# CACHE | LOCKS
+ts_init_subtest "set-from-code"
+ts_run $TESTPROG 20 2>&1 | grep -o '0x.*' &> $TS_OUTPUT
+ts_finalize_subtest
+
+# CACHE | LOCKS
+ts_init_subtest "set-from-env-str"
+LIBMOUNT_DEBUG=cache,locks ts_run $TESTPROG 2>&1 | grep -o '0x.*' &> $TS_OUTPUT
+ts_finalize_subtest
+
+# CACHE | LOCKS
+ts_init_subtest "set-from-env-int"
+LIBMOUNT_DEBUG=20 ts_run $TESTPROG 2>&1 | grep -o '0x.*' &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/libmount/files/fstab b/tests/ts/libmount/files/fstab
new file mode 100644
index 0000000..a8f73bc
--- /dev/null
+++ b/tests/ts/libmount/files/fstab
@@ -0,0 +1,14 @@
+UUID=d3a8f783-df75-4dc8-9163-975a891052c0 / ext3 noatime,defaults 1 1
+UUID=fef7ccb3-821c-4de8-88dc-71472be5946f /boot ext3 noatime,defaults 1 2
+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
diff --git a/tests/ts/libmount/files/fstab.broken b/tests/ts/libmount/files/fstab.broken
new file mode 100644
index 0000000..c79f026
--- /dev/null
+++ b/tests/ts/libmount/files/fstab.broken
@@ -0,0 +1,14 @@
+bug
+UUID=d3a8f783-df75-4dc8-9163-975a891052c0 / ext3 noatime,defaults 1 1
+UUID=fef7ccb3-821c-4de8-88dc-71472be5946f /boot ext3 noatime,defaults 1 2
+ 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
+ sysfs /sys sysfs defaults 0 0
+this is broken line with unexpected number of fields
+proc /proc proc defaults 0 0
+# this is comment
+/dev/mapper/foo /home/foo ext4 noatime,defaults 1
+
+foo.com:/mnt/share /mnt/remote nfs noauto
+//bar.com/gogogo /mnt/gogogo cifs user=SRGROUP/baby,noauto
diff --git a/tests/ts/libmount/files/fstab.comment b/tests/ts/libmount/files/fstab.comment
new file mode 100644
index 0000000..656e663
--- /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/kernel_cmdline b/tests/ts/libmount/files/kernel_cmdline
new file mode 100644
index 0000000..37a0c89
--- /dev/null
+++ b/tests/ts/libmount/files/kernel_cmdline
@@ -0,0 +1 @@
+rd.md=0 rd.lvm=0 rd.dm=0 KEYTABLE=us root=UUID=33230ae2-1093-4353-824c-f7ca09a2a882 rd.luks=0 SYSFONT=latarcyrheb-sun16 ro LANG=en_US.UTF-8 selinux=0
diff --git a/tests/ts/libmount/files/mountinfo b/tests/ts/libmount/files/mountinfo
new file mode 100644
index 0000000..2b01740
--- /dev/null
+++ b/tests/ts/libmount/files/mountinfo
@@ -0,0 +1,33 @@
+15 20 0:3 / /proc rw,relatime - proc /proc rw
+16 20 0:15 / /sys rw,relatime - sysfs /sys rw
+17 20 0:5 / /dev rw,relatime - devtmpfs udev rw,size=1983516k,nr_inodes=495879,mode=755
+18 17 0:10 / /dev/pts rw,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+19 17 0:16 / /dev/shm rw,relatime - tmpfs tmpfs rw
+20 1 8:4 / / rw,noatime - ext3 /dev/sda4 rw,errors=continue,user_xattr,acl,barrier=0,data=ordered
+21 16 0:17 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs tmpfs rw,mode=755
+22 21 0:18 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+23 21 0:19 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuset
+24 21 0:20 / /sys/fs/cgroup/ns rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,ns
+25 21 0:21 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpu
+26 21 0:22 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuacct
+27 21 0:23 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,memory
+28 21 0:24 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,devices
+29 21 0:25 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,freezer
+30 21 0:26 / /sys/fs/cgroup/net_cls rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,net_cls
+31 21 0:27 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,blkio
+32 16 0:28 / /sys/kernel/security rw,relatime - autofs systemd-1 rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+33 17 0:29 / /dev/hugepages rw,relatime - autofs systemd-1 rw,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+34 16 0:30 / /sys/kernel/debug rw,relatime - autofs systemd-1 rw,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+35 15 0:31 / /proc/sys/fs/binfmt_misc rw,relatime - autofs systemd-1 rw,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+36 17 0:32 / /dev/mqueue rw,relatime - autofs systemd-1 rw,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+37 15 0:14 / /proc/bus/usb rw,relatime - usbfs /proc/bus/usb rw
+38 33 0:33 / /dev/hugepages rw,relatime - hugetlbfs hugetlbfs rw
+39 36 0:12 / /dev/mqueue rw,relatime - mqueue mqueue rw
+40 20 8:6 / /boot rw,noatime - ext3 /dev/sda6 rw,errors=continue,barrier=0,data=ordered
+41 20 253:0 / /home/kzak rw,noatime - ext4 /dev/mapper/kzak-home rw,barrier=1,data=ordered
+42 35 0:34 / /proc/sys/fs/binfmt_misc rw,relatime - binfmt_misc none rw
+43 16 0:35 / /sys/fs/fuse/connections rw,relatime - fusectl fusectl rw
+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
+49 20 0:56 / /mnt/test/foo bar rw,relatime shared:323 - tmpfs tmpfs rw
diff --git a/tests/ts/libmount/files/mountinfo_mv b/tests/ts/libmount/files/mountinfo_mv
new file mode 100644
index 0000000..3d55aff
--- /dev/null
+++ b/tests/ts/libmount/files/mountinfo_mv
@@ -0,0 +1,32 @@
+15 20 0:3 / /proc rw,relatime - proc /proc rw
+16 20 0:15 / /sys rw,relatime - sysfs /sys rw
+17 20 0:5 / /dev rw,relatime - devtmpfs udev rw,size=1983516k,nr_inodes=495879,mode=755
+18 17 0:10 / /dev/pts rw,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+19 17 0:16 / /dev/shm rw,relatime - tmpfs tmpfs rw
+20 1 8:4 / / rw,noatime - ext3 /dev/sda4 rw,errors=continue,user_xattr,acl,barrier=0,data=ordered
+21 16 0:17 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs tmpfs rw,mode=755
+22 21 0:18 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+23 21 0:19 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuset
+24 21 0:20 / /sys/fs/cgroup/ns rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,ns
+25 21 0:21 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpu
+26 21 0:22 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuacct
+27 21 0:23 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,memory
+28 21 0:24 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,devices
+29 21 0:25 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,freezer
+30 21 0:26 / /sys/fs/cgroup/net_cls rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,net_cls
+31 21 0:27 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,blkio
+32 16 0:28 / /sys/kernel/security rw,relatime - autofs systemd-1 rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+33 17 0:29 / /dev/hugepages rw,relatime - autofs systemd-1 rw,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+34 16 0:30 / /sys/kernel/debug rw,relatime - autofs systemd-1 rw,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+35 15 0:31 / /proc/sys/fs/binfmt_misc rw,relatime - autofs systemd-1 rw,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+36 17 0:32 / /dev/mqueue rw,relatime - autofs systemd-1 rw,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+37 15 0:14 / /proc/bus/usb rw,relatime - usbfs /proc/bus/usb rw
+38 33 0:33 / /dev/hugepages rw,relatime - hugetlbfs hugetlbfs rw
+39 36 0:12 / /dev/mqueue rw,relatime - mqueue mqueue rw
+40 20 8:6 / /boot rw,noatime - ext3 /dev/sda6 rw,errors=continue,barrier=0,data=ordered
+41 20 253:0 / /home/kzak rw,noatime - ext4 /dev/mapper/kzak-home rw,barrier=1,data=ordered
+42 35 0:34 / /proc/sys/fs/binfmt_misc rw,relatime - binfmt_misc none rw
+43 16 0:35 / /sys/fs/fuse/connections rw,relatime - fusectl fusectl rw
+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/music 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
diff --git a/tests/ts/libmount/files/mountinfo_nosrc b/tests/ts/libmount/files/mountinfo_nosrc
new file mode 100644
index 0000000..1ef7cf0
--- /dev/null
+++ b/tests/ts/libmount/files/mountinfo_nosrc
@@ -0,0 +1,7 @@
+15 20 0:3 / /proc rw,relatime - proc /proc rw
+16 20 0:15 / /sys rw,relatime - sysfs /sys rw
+17 20 0:5 / /dev rw,relatime - devtmpfs udev rw,size=1983516k,nr_inodes=495879,mode=755
+18 17 0:10 / /dev/pts rw,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+19 17 0:16 / /dev/shm rw,relatime - tmpfs tmpfs rw
+20 1 8:4 / / rw,noatime - ext3 /dev/sda4 rw,errors=continue,user_xattr,acl,barrier=0,data=ordered
+21 20 0:53 / /mnt/test rw,relatime shared:212 - tmpfs rw
diff --git a/tests/ts/libmount/files/mountinfo_re b/tests/ts/libmount/files/mountinfo_re
new file mode 100644
index 0000000..df379fa
--- /dev/null
+++ b/tests/ts/libmount/files/mountinfo_re
@@ -0,0 +1,32 @@
+15 20 0:3 / /proc rw,relatime - proc /proc rw
+16 20 0:15 / /sys rw,relatime - sysfs /sys rw
+17 20 0:5 / /dev rw,relatime - devtmpfs udev rw,size=1983516k,nr_inodes=495879,mode=755
+18 17 0:10 / /dev/pts rw,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+19 17 0:16 / /dev/shm rw,relatime - tmpfs tmpfs rw
+20 1 8:4 / / rw,noatime - ext3 /dev/sda4 rw,errors=continue,user_xattr,acl,barrier=0,data=ordered
+21 16 0:17 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs tmpfs rw,mode=755
+22 21 0:18 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+23 21 0:19 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuset
+24 21 0:20 / /sys/fs/cgroup/ns rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,ns
+25 21 0:21 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpu
+26 21 0:22 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuacct
+27 21 0:23 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,memory
+28 21 0:24 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,devices
+29 21 0:25 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,freezer
+30 21 0:26 / /sys/fs/cgroup/net_cls rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,net_cls
+31 21 0:27 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,blkio
+32 16 0:28 / /sys/kernel/security rw,relatime - autofs systemd-1 rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+33 17 0:29 / /dev/hugepages rw,relatime - autofs systemd-1 rw,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+34 16 0:30 / /sys/kernel/debug rw,relatime - autofs systemd-1 rw,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+35 15 0:31 / /proc/sys/fs/binfmt_misc rw,relatime - autofs systemd-1 rw,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+36 17 0:32 / /dev/mqueue rw,relatime - autofs systemd-1 rw,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+37 15 0:14 / /proc/bus/usb rw,relatime - usbfs /proc/bus/usb rw
+38 33 0:33 / /dev/hugepages rw,relatime - hugetlbfs hugetlbfs rw
+39 36 0:12 / /dev/mqueue rw,relatime - mqueue mqueue rw
+40 20 8:6 / /boot rw,noatime - ext3 /dev/sda6 rw,errors=continue,barrier=0,data=ordered
+41 20 253:0 / /home/kzak ro,noatime - ext4 /dev/mapper/kzak-home rw,barrier=1,data=ordered
+42 35 0:34 / /proc/sys/fs/binfmt_misc rw,relatime - binfmt_misc none rw
+43 16 0:35 / /sys/fs/fuse/connections rw,relatime - fusectl fusectl rw
+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/ ro,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
diff --git a/tests/ts/libmount/files/mountinfo_u b/tests/ts/libmount/files/mountinfo_u
new file mode 100644
index 0000000..a3dde97
--- /dev/null
+++ b/tests/ts/libmount/files/mountinfo_u
@@ -0,0 +1,31 @@
+15 20 0:3 / /proc rw,relatime - proc /proc rw
+16 20 0:15 / /sys rw,relatime - sysfs /sys rw
+17 20 0:5 / /dev rw,relatime - devtmpfs udev rw,size=1983516k,nr_inodes=495879,mode=755
+18 17 0:10 / /dev/pts rw,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
+19 17 0:16 / /dev/shm rw,relatime - tmpfs tmpfs rw
+20 1 8:4 / / rw,noatime - ext3 /dev/sda4 rw,errors=continue,user_xattr,acl,barrier=0,data=ordered
+21 16 0:17 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs tmpfs rw,mode=755
+22 21 0:18 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
+23 21 0:19 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuset
+24 21 0:20 / /sys/fs/cgroup/ns rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,ns
+25 21 0:21 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpu
+26 21 0:22 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuacct
+27 21 0:23 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,memory
+28 21 0:24 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,devices
+29 21 0:25 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,freezer
+30 21 0:26 / /sys/fs/cgroup/net_cls rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,net_cls
+31 21 0:27 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,blkio
+32 16 0:28 / /sys/kernel/security rw,relatime - autofs systemd-1 rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+33 17 0:29 / /dev/hugepages rw,relatime - autofs systemd-1 rw,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+34 16 0:30 / /sys/kernel/debug rw,relatime - autofs systemd-1 rw,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+35 15 0:31 / /proc/sys/fs/binfmt_misc rw,relatime - autofs systemd-1 rw,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+36 17 0:32 / /dev/mqueue rw,relatime - autofs systemd-1 rw,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
+37 15 0:14 / /proc/bus/usb rw,relatime - usbfs /proc/bus/usb rw
+38 33 0:33 / /dev/hugepages rw,relatime - hugetlbfs hugetlbfs rw
+39 36 0:12 / /dev/mqueue rw,relatime - mqueue mqueue rw
+40 20 8:6 / /boot rw,noatime - ext3 /dev/sda6 rw,errors=continue,barrier=0,data=ordered
+42 35 0:34 / /proc/sys/fs/binfmt_misc rw,relatime - binfmt_misc none rw
+43 16 0:35 / /sys/fs/fuse/connections rw,relatime - fusectl fusectl rw
+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
diff --git a/tests/ts/libmount/files/mtab b/tests/ts/libmount/files/mtab
new file mode 100644
index 0000000..93bc90e
--- /dev/null
+++ b/tests/ts/libmount/files/mtab
@@ -0,0 +1,12 @@
+/dev/sda4 / ext3 rw,noatime 0 0
+proc /proc proc rw 0 0
+sysfs /sys sysfs rw 0 0
+devpts /dev/pts devpts rw,gid=5,mode=620 0 0
+tmpfs /dev/shm tmpfs rw 0 0
+/dev/sda6 /boot ext3 rw,noatime 0 0
+/dev/mapper/kzak-home /home/kzak ext4 rw,noatime 0 0
+none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
+fusectl /sys/fs/fuse/connections fusectl rw 0 0
+gvfs-fuse-daemon /home/kzak/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=kzak 0 0
+sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
+none /var/tmp/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011/\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011 overlay rw,relatime,lowerdir=lower,upperdir=upper,workdir=work 0 0
diff --git a/tests/ts/libmount/files/swaps b/tests/ts/libmount/files/swaps
new file mode 100644
index 0000000..13ce933
--- /dev/null
+++ b/tests/ts/libmount/files/swaps
@@ -0,0 +1,4 @@
+Filename Type Size Used Priority
+/dev/dm-2 partition 8151036 2283436 -2
+/some/swapfile file 111 111 0
+/some/swapfile2\040(deleted) file 111 111 0
diff --git a/tests/ts/libmount/lock b/tests/ts/libmount/lock
new file mode 100755
index 0000000..e1d046b
--- /dev/null
+++ b/tests/ts/libmount/lock
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="lock"
+
+TS_OPTIONAL="yes"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBMOUNT_LOCK"
+
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+
+#
+# Be careful with number of processes. Don't forget that there is time limit
+# when the mount waits on the mtab lock. If you define too much processes some
+# of them will fail with timeout.
+#
+# Note: the original version (< 2.13) of util-linux is completely useless for
+# this test (maximum for this old version is NLOOPS=10 and NPROCESSES=5 (2-way
+# 2GHz machine)). It has terrible performance due a bad timeouts implementation
+# in lock_mtab().
+#
+NLOOPS=1000
+NPROCESSES=50
+
+
+> $TS_OUTPUT.debug
+echo 0 > $TS_OUTPUT
+SYNCTIME=$(( $(date +%s) + 5 ))
+
+for id in $(seq 0 $(( $NPROCESSES - 1 ))); do
+ ts_run $TESTPROG --lock --synctime $SYNCTIME $TS_OUTPUT $NLOOPS >> $TS_OUTPUT.debug 2>&1 &
+done
+
+wait
+
+ts_finalize
diff --git a/tests/ts/libmount/loop b/tests/ts/libmount/loop
new file mode 100755
index 0000000..db807bd
--- /dev/null
+++ b/tests/ts/libmount/loop
@@ -0,0 +1,152 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2016 Stanislav Brabec <sbrabec@suse.cz>
+#
+# 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="losetup-loop"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_test_command "$TS_CMD_LOSETUP"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+function verify_mount_dev {
+ local dev=$1
+ local mp=$2
+ local dev_mounted=$($TS_CMD_FINDMNT -no SOURCE --mountpoint "$mp")
+
+ if test "$dev" != "$dev_mounted" ; then
+ echo "Mounted incorrect device: have '$dev_mounted', want '$dev'" >&2
+ return 1
+ fi
+}
+
+#
+# file-* tests: Backing file is a regular file
+#
+BACKFILE=$(ts_image_init 10)
+
+mkfs.ext2 -F $BACKFILE &> /dev/null || ts_die "Cannot make ext2 on $BACKFILE"
+
+# All tests are separated by "udevadm settle" because loop device exists some time after
+# "losetup -d". This device confuses some tests. And find-race-condition, tests,
+# whether re-use of this device works.
+udevadm settle
+
+ts_init_subtest "file"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT "$BACKFILE" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_log "Success"
+ts_finalize_subtest
+
+ts_init_subtest "file-o-loop"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -oloop "$BACKFILE" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_log "Success"
+ts_finalize_subtest
+
+ts_init_subtest "dev-loop"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show $BACKFILE 2>> $TS_OUTPUT )
+$TS_CMD_MOUNT $LODEV "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+verify_mount_dev "$LODEV" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_LOSETUP --detach $LODEV >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_log "Success"
+ts_finalize_subtest
+
+ts_init_subtest "o-loop-val"
+if [ "$TS_PARALLEL" = "yes" ]; then
+ # There is a race in $LODEV is usage
+ ts_skip_subtest "no-reentrant"
+else
+ [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+ LODEV=$( $TS_CMD_LOSETUP --find 2>> $TS_OUTPUT )
+ $TS_CMD_MOUNT -oloop=$LODEV "$BACKFILE" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ verify_mount_dev "$LODEV" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ $TS_CMD_UMOUNT "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ udevadm settle
+ ts_log "Success"
+ ts_finalize_subtest
+fi
+
+ts_init_subtest "reuse"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show "$BACKFILE" 2>> $TS_OUTPUT )
+$TS_CMD_MOUNT "$BACKFILE" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+verify_mount_dev "$LODEV" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_LOSETUP --detach $LODEV >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_log "Success"
+ts_finalize_subtest
+
+ts_init_subtest "conflict"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=1000 "$BACKFILE" 2>> $TS_OUTPUT )
+$TS_CMD_MOUNT "$BACKFILE" "$TS_MOUNTPOINT" 2>&1 \
+ | sed 's/:.*:/: <target>/; s/for .*/for <source>/' > $TS_OUTPUT
+$TS_CMD_LOSETUP --detach $LODEV >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_log "Success"
+ts_finalize_subtest
+
+ts_init_subtest "o-loop-val-initialized"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+LODEV=$( $TS_CMD_LOSETUP --show -f "$BACKFILE" 2>>$TS_OUTPUT)
+$TS_CMD_MOUNT -oloop=$LODEV "$BACKFILE" "$TS_MOUNTPOINT" 2>&1 \
+ | sed 's/:.*:/: <target>/; s/for .*/for <source>/' > $TS_OUTPUT
+$TS_CMD_LOSETUP --detach $LODEV >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_log "Success"
+ts_finalize_subtest
+
+ts_init_subtest "o-loop-val-conflict"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+cp "$BACKFILE" "$BACKFILE"-2
+LODEV=$( $TS_CMD_LOSETUP --show -f "$BACKFILE"-2 2>> $TS_OUTPUT)
+$TS_CMD_MOUNT -oloop=$LODEV "$BACKFILE" "$TS_MOUNTPOINT" 2>&1 \
+ | sed 's/:.*:/: <target>/; s/for .*/for <source>/' > $TS_OUTPUT
+$TS_CMD_LOSETUP --detach $LODEV >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm "$BACKFILE"-2
+udevadm settle
+ts_log "Success"
+ts_finalize_subtest
+
+ts_init_subtest "explicit-rw"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -o rw "$BACKFILE" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT -no FS-OPTIONS --mountpoint "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_log "Success"
+ts_finalize_subtest
+
+ts_log "Success"
+ts_finalize
diff --git a/tests/ts/libmount/loop-overlay b/tests/ts/libmount/loop-overlay
new file mode 100755
index 0000000..257ce8a
--- /dev/null
+++ b/tests/ts/libmount/loop-overlay
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2016 Stanislav Brabec <sbrabec@suse.cz>
+#
+# 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="loop overlay"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LOSETUP"
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+ts_check_prog "dd"
+ts_check_prog "stat"
+
+IMG=$(ts_image_init 5)
+
+mkfs.ext2 -F "$IMG" &> /dev/null || ts_die "Cannot make extn on $IMG"
+OFFSET=$(stat -c %s "$IMG")
+
+dd if="$IMG" of="$IMG" oflag=append bs=1024k count=5 conv=notrunc &>/dev/null
+
+[ -d "$TS_MOUNTPOINT-1" ] || mkdir -p $TS_MOUNTPOINT-1
+[ -d "$TS_MOUNTPOINT-2" ] || mkdir -p $TS_MOUNTPOINT-2
+
+echo "second should fail" >>$TS_OUTPUT
+$TS_CMD_MOUNT -oloop "$IMG" "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" 2>&1 \
+ | sed 's/:.*:/: <target>/; s/for .*/for <source>/' >> $TS_OUTPUT
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+echo "should succeed" >>$TS_OUTPUT
+$TS_CMD_MOUNT -oloop,sizelimit=$OFFSET "$IMG" "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT-2" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+echo "both should fail" >>$TS_OUTPUT
+LOOPDEV=$($TS_CMD_LOSETUP --show -f --offset 1 --sizelimit $OFFSET "$IMG")
+$TS_CMD_MOUNT -oloop,sizelimit=$OFFSET "$IMG" "$TS_MOUNTPOINT-1" 2>&1 \
+ | sed 's/:.*:/: <target>/; s/for .*/for <source>/' >> $TS_OUTPUT
+$TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" 2>&1 \
+ | sed 's/:.*:/: <target>/; s/for .*/for <source>/' >> $TS_OUTPUT
+$TS_CMD_LOSETUP --detach $LOOPDEV
+
+ts_log "Success"
+ts_finalize
diff --git a/tests/ts/libmount/optstr b/tests/ts/libmount/optstr
new file mode 100755
index 0000000..26d9b73
--- /dev/null
+++ b/tests/ts/libmount/optstr
@@ -0,0 +1,160 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="options string"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBMOUNT_OPTSTR"
+
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+
+ts_init_subtest "append"
+ts_run $TESTPROG --append "aaa,bbb=BBB,context=\"foo,bar,gogo\",ccc" "ddd" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "append-value"
+ts_run $TESTPROG --append "aaa,bbb=BBB,ccc" "ddd" "DDD" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "append-empty-value"
+ts_run $TESTPROG --append "aaa,bbb=BBB,ccc" "ddd" "" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "prepend"
+ts_run $TESTPROG --prepend "aaa,bbb=BBB,ccc" "ddd" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "prepend-value"
+ts_run $TESTPROG --prepend "aaa,bbb=BBB,ccc" "ddd" "DDD" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "prepend-empty-value"
+ts_run $TESTPROG --prepend "aaa,bbb=BBB,ccc" "ddd" "" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "set-remove"
+ts_run $TESTPROG --set "aaa,bbb=BBB,ccc" "bbb" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "set-small"
+ts_run $TESTPROG --set "aaa,bbb=BBB,ccc" "bbb" "X" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "set-large"
+ts_run $TESTPROG --set "aaa,bbb=BBB,ccc" "bbb" "XXX-YYY-ZZZ" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "set-empty"
+ts_run $TESTPROG --set "aaa,bbb=BBB,ccc" "bbb" "" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "set-new"
+ts_run $TESTPROG --set "aaa,bbb=BBB,ccc" "aaa" "XXX" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "set-new-empty"
+ts_run $TESTPROG --set "aaa,bbb=BBB,ccc" "aaa" "" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "set-new-end"
+ts_run $TESTPROG --set "aaa,bbb=BBB,ccc" "ccc" "XXX" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "set-new-end-empty"
+ts_run $TESTPROG --set "aaa,bbb=BBB,ccc" "ccc" "" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "get"
+ts_run $TESTPROG --get "aaa,bbb=BBB,ccc" "aaa" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "get-value"
+ts_run $TESTPROG --get "aaa,bbb=BBB,ccc" "bbb" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "remove"
+ts_run $TESTPROG --remove "aaa,bbb=BBB,ccc" "aaa" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "remove-quoted"
+ts_run $TESTPROG --remove "aaa,context=\"foo,bar,gogo\",bbb=BBB,ccc" "context" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "remove-value"
+ts_run $TESTPROG --remove "aaa,bbb=BBB,ccc" "bbb" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "remove-empty-value"
+ts_run $TESTPROG --remove "aaa,bbb=,ccc" "bbb" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "split"
+ts_run $TESTPROG --split "aaa,bbb=BBB,ccc,x-bar,x-foo=foodata,user=kzak,noexec,nosuid,loop=/dev/loop0" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "flags"
+ts_run $TESTPROG --flags "aaa,bbb=BBB,x-foo,ccc,user=kzak,nodev,noexec,nosuid,loop=/dev/loop0" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "apply-linux"
+# Use kernel mount options man (--linux), add noatime, remove noexec and nosuid,
+# and keep unknown(e.g. user=kzak)
+ts_run $TESTPROG --apply --linux "user=kzak,noexec,nosuid" 0x400 &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "apply-user"
+# Use userspace options map (--user), add user and nofail, remove loop,
+# and keep unknown (e.g. noexec, nosuid)
+ts_run $TESTPROG --apply --user "noexec,nosuid,loop=/dev/looop0" 0x408 &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "apply-user-small-x"
+# Use userspace options map (--user), remove X-* and loop=, keep unknown 'something' and
+# keep by flags specified x-*
+ts_run $TESTPROG --apply --user \
+ "something,loop=/dev/looop0,x-gvfs-hide,x-gdu.hide,x-canary,X-foo" 0x00002000 &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "apply-user-large-X"
+# Use userspace options map (--user), remove x-* and loop=, keep unknown 'something' and
+# keep by flags specified X-*
+ts_run $TESTPROG --apply --user \
+ "something,loop=/dev/looop0,x-gvfs-hide,x-gdu.hide,x-canary,X-foo,X-bar" 0x00020000 &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "apply-user-Xx"
+# Use userspace options map (--user), remove loop=, keep unknown 'something' and
+# keep by flags specified X-* and x-*, add by flag specified nofail
+ts_run $TESTPROG --apply --user \
+ "something,loop=/dev/looop0,x-gvfs-hide,x-gdu.hide,x-canary,X-foo,X-bar" 0x00022400 &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "deduplicate"
+ts_run $TESTPROG --dedup bbb,ccc,AAA,xxx,AAA=a,AAA=bbb,ddd,AAA=ccc,fff=eee AAA &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "deduplicate-empty"
+ts_run $TESTPROG --dedup bbb,ccc,AAA,xxx,AAA=a,AAA=bbb,ddd,AAA=,fff=eee AAA &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "match"
+ts_run $TESTPROG --match "xxx,yyy,zzz" "nozzz" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "xxx,yyy,zzz" "xxx,noeee" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "bar,zzz" "nofoo" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "nofoo,bar" "nofoo" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "nofoo,bar" "+nofoo" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "bar,zzz" "+nofoo" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "bar,zzz" "" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "bar,zzz" "+" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "" "" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "" "foo" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "" "nofoo" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "" "no,foo" &>> $TS_OUTPUT
+ts_run $TESTPROG --match "no" "+no" &>> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/libmount/tabdiff b/tests/ts/libmount/tabdiff
new file mode 100755
index 0000000..2f9acb9
--- /dev/null
+++ b/tests/ts/libmount/tabdiff
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# Copyright (C) 2011 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="table diffs"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBMOUNT_TABDIFF"
+
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+
+ts_init_subtest "mount"
+ts_run $TESTPROG --diff $TS_SELF/files/mountinfo_u $TS_SELF/files/mountinfo &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "umount"
+ts_run $TESTPROG --diff $TS_SELF/files/mountinfo $TS_SELF/files/mountinfo_u &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "remount"
+ts_run $TESTPROG --diff $TS_SELF/files/mountinfo $TS_SELF/files/mountinfo_re &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "move"
+ts_run $TESTPROG --diff $TS_SELF/files/mountinfo $TS_SELF/files/mountinfo_mv &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/libmount/tabfiles b/tests/ts/libmount/tabfiles
new file mode 100755
index 0000000..1de740e
--- /dev/null
+++ b/tests/ts/libmount/tabfiles
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="tab files"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBMOUNT_TAB"
+
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+
+ts_init_subtest "parse-fstab"
+ts_run $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_run $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_run $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"
+ts_run $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"
+ts_run $TESTPROG --parse "$TS_SELF/files/mountinfo" &> $TS_OUTPUT
+sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "parse-mountinfo-nosrc"
+ts_run $TESTPROG --parse "$TS_SELF/files/mountinfo_nosrc" &> $TS_OUTPUT
+sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "parse-swaps"
+ts_run $TESTPROG --parse "$TS_SELF/files/swaps" &> $TS_OUTPUT
+sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "copy"
+ts_run $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"
+ts_run $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"
+ts_run $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"
+ts_run $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"
+ts_run $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"
+ts_run $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_init_subtest "find-fs"
+ts_run $TESTPROG --find-fs "$TS_SELF/files/mountinfo" /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-py b/tests/ts/libmount/tabfiles-py
new file mode 100755
index 0000000..ba89ddf
--- /dev/null
+++ b/tests/ts/libmount/tabfiles-py
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="tab files-py"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_init_py libmount
+
+if [ "$TS_ENABLE_ASAN" == "yes" -o "$TS_ENABLE_UBSAN" == "yes" ]; then
+ TS_KNOWN_FAIL="yes"
+fi
+
+PYDBG="$PYTHON -m pdb"
+TESTPROG="$TS_HELPER_PYLIBMOUNT_TAB"
+[ -x $TESTPROG ] || ts_die "test script missing"
+
+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 b/tests/ts/libmount/tabfiles-tags
new file mode 100755
index 0000000..cc48429
--- /dev/null
+++ b/tests/ts/libmount/tabfiles-tags
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="tags"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_skip_nonroot
+
+if [ "$TS_ENABLE_ASAN" == "yes" ]; then
+ TS_KNOWN_FAIL="yes"
+fi
+
+TESTPROG="$TS_HELPER_LIBMOUNT_TAB"
+
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+ts_check_prog "mkfs.ext2"
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512
+LABEL="testLibmount"
+UUID="de1bc6e9-34ab-4151-a1d7-900042eee8d9"
+
+#
+# Create filesystem
+#
+mkfs.ext2 -F -L $LABEL $TS_DEVICE -U $UUID &> /dev/null || ts_die "Cannot make ext2 on $TS_DEVICE"
+ts_device_has "LABEL" "$LABEL" "$TS_DEVICE" || ts_die "Cannot find LABEL '$LABEL' on $TS_DEVICE"
+ts_device_has "UUID" "$UUID" "$TS_DEVICE" || ts_die "Cannot find $UUID on $TS_DEVICE"
+
+FSTAB="$TS_OUTDIR/fstab"
+
+#
+# Label in fstab
+#
+echo "LABEL=$LABEL /mnt/mountpoint auto defaults" > $FSTAB
+ts_udevadm_settle "$TS_DEVICE" "LABEL" "UUID"
+
+ts_init_subtest "fstab-label2uuid"
+ts_run $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"
+ts_run $TESTPROG --find-forward $FSTAB source $TS_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
+ts_run $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
+ts_run $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
+ts_run $TESTPROG --find-forward $FSTAB source $TS_DEVICE &> $TS_OUTPUT
+sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
+ts_finalize_subtest
+
+#
+# Add devname
+#
+echo "$TS_DEVICE /mnt/mountpoint3 auto defaults" >> $FSTAB
+
+ts_init_subtest "fstab-dev"
+# has to return /mnt/mountpoint3
+ts_run $TESTPROG --find-forward $FSTAB source $TS_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
+
+ts_finalize
diff --git a/tests/ts/libmount/tabfiles-tags-py b/tests/ts/libmount/tabfiles-tags-py
new file mode 100755
index 0000000..5c5c7c3
--- /dev/null
+++ b/tests/ts/libmount/tabfiles-tags-py
@@ -0,0 +1,90 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="tags-py"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_skip_nonroot
+
+ts_init_py libmount
+
+if [ "$TS_ENABLE_ASAN" == "yes" -o "$TS_ENABLE_UBSAN" == "yes" ]; then
+ TS_KNOWN_FAIL="yes"
+fi
+
+TESTPROG="$TS_HELPER_PYLIBMOUNT_TAB"
+[ -x $TESTPROG ] || ts_die "test script missing"
+
+ts_check_prog "mkfs.ext2"
+
+PYDBG="$PYTHON -m pdb"
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512
+LABEL="testLibmount"
+UUID="de1bc6e9-34ab-4151-a1d7-900042eee8d9"
+
+#
+# Create filesystem
+#
+mkfs.ext2 -F -L $LABEL $TS_DEVICE -U $UUID &> /dev/null || ts_die "Cannot make ext2 on $TS_DEVICE"
+ts_device_has "LABEL" "$LABEL" "$TS_DEVICE" || ts_die "Cannot find LABEL '$LABEL' on $TS_DEVICE"
+ts_device_has "UUID" "$UUID" "$TS_DEVICE" || ts_die "Cannot find $UUID on $TS_DEVICE"
+
+FSTAB="$TS_OUTDIR/fstab"
+
+#
+# Label in fstab
+#
+echo "LABEL=$LABEL /mnt/mountpoint auto defaults" > $FSTAB
+ts_udevadm_settle "$DEVICE" "LABEL" "UUID"
+
+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 $TS_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 $TS_DEVICE &> $TS_OUTPUT
+sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
+ts_finalize_subtest
+
+#
+# Add devname
+#
+echo "$TS_DEVICE /mnt/mountpoint3 auto defaults" >> $FSTAB
+
+ts_init_subtest "fstab-dev"
+# has to return /mnt/mountpoint3
+$PYTHON $TESTPROG --find-forward $FSTAB source $TS_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
+
+ts_finalize
diff --git a/tests/ts/libmount/update b/tests/ts/libmount/update
new file mode 100755
index 0000000..ba93e0b
--- /dev/null
+++ b/tests/ts/libmount/update
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="tab update"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_skip_nonroot
+
+TESTPROG="$TS_HELPER_LIBMOUNT_UPDATE"
+
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+
+# IMPORTANT notes:
+#
+# - the $TS_OUTPUT variable is between ts_init_subtest and ts_finalize_subtest
+# redefined to subtest specific namespace -- it means that $TS_OUTPUT is a
+# different file within a subtest.
+#
+# - all this test uses global $TS_OUTPUT.mountinfo
+
+#
+# utab
+#
+export LIBMOUNT_UTAB=$TS_OUTPUT.utab
+rm -f $LIBMOUNT_UTAB
+> $LIBMOUNT_UTAB
+
+ts_init_subtest "utab-mount"
+ts_run $TESTPROG --add /dev/sda1 /mnt/foo ext3 "rw,bbb,ccc,fff=FFF,ddd,noexec"
+ts_run $TESTPROG --add /dev/sdb1 /mnt/bar ext3 "ro,user"
+ts_run $TESTPROG --add /dev/sda2 /mnt/xyz ext3 "rw,loop=/dev/loop0,uhelper=hal"
+ts_run $TESTPROG --add none /proc proc "rw,user"
+cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
+ts_finalize_subtest # checks the utab
+
+ts_init_subtest "utab-move"
+ts_run $TESTPROG --move /mnt/bar /mnt/newbar
+ts_run $TESTPROG --move /mnt/xyz /mnt/newxyz
+cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
+ts_finalize_subtest # checks the utab
+
+ts_init_subtest "utab-remount"
+ts_run $TESTPROG --remount /mnt/newbar "ro,noatime"
+ts_run $TESTPROG --remount /mnt/newxyz "rw,user"
+cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
+ts_finalize_subtest # checks the utab
+
+ts_init_subtest "utab-umount"
+ts_run $TESTPROG --remove /mnt/newbar
+ts_run $TESTPROG --remove /proc
+cp $LIBMOUNT_UTAB $TS_OUTPUT # save the utab aside
+ts_finalize_subtest # checks the utab
+
+#
+# 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_run $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 0000000..bfb8441
--- /dev/null
+++ b/tests/ts/libmount/update-py
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="tab update-py"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_init_py libmount
+ts_skip_nonroot
+
+if [ "$TS_ENABLE_ASAN" == "yes" -o "$TS_ENABLE_UBSAN" == "yes" ]; then
+ TS_KNOWN_FAIL="yes"
+fi
+
+TESTPROG="$TS_HELPER_PYLIBMOUNT_UPDATE"
+[ -x $TESTPROG ] || ts_die "test script missing"
+
+#
+# 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" >/dev/null 2>&1
+cp $LIBMOUNT_FSTAB $TS_OUTPUT # save the fstab aside
+ts_finalize_subtest #checks the fstab
+
+ts_finalize
diff --git a/tests/ts/libmount/utils b/tests/ts/libmount/utils
new file mode 100755
index 0000000..1fed2a7
--- /dev/null
+++ b/tests/ts/libmount/utils
@@ -0,0 +1,84 @@
+#!/bin/bash
+
+# Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="utils"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBMOUNT_UTILS"
+
+[ -x $TESTPROG ] || ts_skip "test not compiled"
+
+ts_init_subtest "match-fstype"
+ts_run $TESTPROG --match-fstype ext3 "ext2,ext3,cifs" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "match-fstype-neg"
+ts_run $TESTPROG --match-fstype cifs "ext2,ext3,nocifs" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "match-fstype-neg2"
+ts_run $TESTPROG --match-fstype cifs "noext2,ext3,cifs" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "match-options"
+ts_run $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ccc" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "match-options-list"
+ts_run $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ccc,aaa,ddd" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "match-options-neg"
+ts_run $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "noxxx" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "match-options-neg-list"
+ts_run $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "ddd,noaaa" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "match-options-neg-list2"
+ts_run $TESTPROG --match-options "aaa,bbb=BBB,ccc,ddd" "noxxx,ccc,aaa" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "starts-with"
+ts_run $TESTPROG --starts-with "AAAbbbCCC" "AAA" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "ends-with"
+ts_run $TESTPROG --ends-with "AAAbbbCCC" "CCC" &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "mountpoint"
+if [ -d /proc ]; then
+ ts_run $TESTPROG --mountpoint /proc &> $TS_OUTPUT
+ ts_finalize_subtest
+else
+ ts_skip_subtest "no /proc"
+fi
+
+ts_init_subtest "mountpoint-subdir"
+if [ -d /proc/sys/kernel ]; then
+ ts_run $TESTPROG --mountpoint /proc/sys/kernel &> $TS_OUTPUT
+ ts_finalize_subtest
+else
+ ts_skip_subtest "no /proc"
+fi
+
+ts_init_subtest "mountpoint-root"
+ts_run $TESTPROG --mountpoint / &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "kernel-cmdline"
+export LIBMOUNT_KERNEL_CMDLINE="$TS_SELF/files/kernel_cmdline"
+ts_run $TESTPROG --kernel-cmdline selinux= >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_run $TESTPROG --kernel-cmdline selinux >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_run $TESTPROG --kernel-cmdline ro >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_run $TESTPROG --kernel-cmdline ro= >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_run $TESTPROG --kernel-cmdline root= >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/libsmartcols/files/col-hidden b/tests/ts/libsmartcols/files/col-hidden
new file mode 100644
index 0000000..83182a8
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-hidden
@@ -0,0 +1,3 @@
+FOO
+0
+hidden
diff --git a/tests/ts/libsmartcols/files/col-id b/tests/ts/libsmartcols/files/col-id
new file mode 100644
index 0000000..0188f42
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-id
@@ -0,0 +1,3 @@
+ID
+0
+right
diff --git a/tests/ts/libsmartcols/files/col-name b/tests/ts/libsmartcols/files/col-name
new file mode 100644
index 0000000..0a98f29
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-name
@@ -0,0 +1,3 @@
+NAME
+0
+none
diff --git a/tests/ts/libsmartcols/files/col-noextremes b/tests/ts/libsmartcols/files/col-noextremes
new file mode 100644
index 0000000..715edce
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-noextremes
@@ -0,0 +1,3 @@
+NOEXTREME
+0
+noextremes
diff --git a/tests/ts/libsmartcols/files/col-number b/tests/ts/libsmartcols/files/col-number
new file mode 100644
index 0000000..34a70e4
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-number
@@ -0,0 +1,3 @@
+NUM
+0
+right
diff --git a/tests/ts/libsmartcols/files/col-parent b/tests/ts/libsmartcols/files/col-parent
new file mode 100644
index 0000000..86fe08c
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-parent
@@ -0,0 +1,3 @@
+PARENT
+0
+right
diff --git a/tests/ts/libsmartcols/files/col-strict b/tests/ts/libsmartcols/files/col-strict
new file mode 100644
index 0000000..62bb96b
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-strict
@@ -0,0 +1,3 @@
+STRICT
+20
+strictwidth,right
diff --git a/tests/ts/libsmartcols/files/col-string b/tests/ts/libsmartcols/files/col-string
new file mode 100644
index 0000000..7e2904b
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-string
@@ -0,0 +1,3 @@
+STRINGS
+0
+none
diff --git a/tests/ts/libsmartcols/files/col-tree b/tests/ts/libsmartcols/files/col-tree
new file mode 100644
index 0000000..5076880
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-tree
@@ -0,0 +1,3 @@
+TREE
+0
+tree
diff --git a/tests/ts/libsmartcols/files/col-trunc b/tests/ts/libsmartcols/files/col-trunc
new file mode 100644
index 0000000..2887b43
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-trunc
@@ -0,0 +1,3 @@
+TRUNC
+0
+trunc
diff --git a/tests/ts/libsmartcols/files/col-wrap b/tests/ts/libsmartcols/files/col-wrap
new file mode 100644
index 0000000..dc4ca34
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-wrap
@@ -0,0 +1,3 @@
+WRAP
+0
+wrap
diff --git a/tests/ts/libsmartcols/files/col-wrapnl b/tests/ts/libsmartcols/files/col-wrapnl
new file mode 100644
index 0000000..0a18fd1
--- /dev/null
+++ b/tests/ts/libsmartcols/files/col-wrapnl
@@ -0,0 +1,3 @@
+WRAPNL
+0
+wrapnl
diff --git a/tests/ts/libsmartcols/files/data-id b/tests/ts/libsmartcols/files/data-id
new file mode 100644
index 0000000..f00c965
--- /dev/null
+++ b/tests/ts/libsmartcols/files/data-id
@@ -0,0 +1,10 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
diff --git a/tests/ts/libsmartcols/files/data-number b/tests/ts/libsmartcols/files/data-number
new file mode 100644
index 0000000..562d750
--- /dev/null
+++ b/tests/ts/libsmartcols/files/data-number
@@ -0,0 +1,10 @@
+0
+100
+21
+3
+411
+5111
+678993321
+7666666
+8765
+987456
diff --git a/tests/ts/libsmartcols/files/data-number-tiny b/tests/ts/libsmartcols/files/data-number-tiny
new file mode 100644
index 0000000..8b1acc1
--- /dev/null
+++ b/tests/ts/libsmartcols/files/data-number-tiny
@@ -0,0 +1,10 @@
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
diff --git a/tests/ts/libsmartcols/files/data-parent b/tests/ts/libsmartcols/files/data-parent
new file mode 100644
index 0000000..aa50716
--- /dev/null
+++ b/tests/ts/libsmartcols/files/data-parent
@@ -0,0 +1,10 @@
+0
+1
+1
+1
+2
+2
+3
+7
+8
+7
diff --git a/tests/ts/libsmartcols/files/data-string b/tests/ts/libsmartcols/files/data-string
new file mode 100644
index 0000000..dff6e9c
--- /dev/null
+++ b/tests/ts/libsmartcols/files/data-string
@@ -0,0 +1,10 @@
+aaaa
+bbb
+ccccc
+dddddd
+ee
+ffff
+gggggg
+hhh
+iiiiii
+jj
diff --git a/tests/ts/libsmartcols/files/data-string-empty b/tests/ts/libsmartcols/files/data-string-empty
new file mode 100644
index 0000000..1f8ad34
--- /dev/null
+++ b/tests/ts/libsmartcols/files/data-string-empty
@@ -0,0 +1,10 @@
+aaaa
+bbb
+ccccc
+dddddd
+ee
+
+gggggg
+hhh
+iiiiii
+jj
diff --git a/tests/ts/libsmartcols/files/data-string-extreme b/tests/ts/libsmartcols/files/data-string-extreme
new file mode 100644
index 0000000..6fb395d
--- /dev/null
+++ b/tests/ts/libsmartcols/files/data-string-extreme
@@ -0,0 +1,10 @@
+qqqqqqX
+ddddddddX
+ffffffffffffffffffffffffffffffffffX
+sssX
+ddX
+jjjjjX
+mmmmmmmX
+llllllllllX
+yyyyyyX
+pppppX
diff --git a/tests/ts/libsmartcols/files/data-string-long b/tests/ts/libsmartcols/files/data-string-long
new file mode 100644
index 0000000..1b5683a
--- /dev/null
+++ b/tests/ts/libsmartcols/files/data-string-long
@@ -0,0 +1,10 @@
+qqqqqqqqqqqqqqqqqX
+dddddddddddddX
+ffffffffffffffffffffffffffffffffffffffffX
+ssssssssssX
+ddddddddddddddddddddddddddX
+jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjX
+mmmmmmmmmmmmmmmmmmmX
+lllllllllllllllllllllllllllllllllllllX
+yyyyyyyyyyyyyyyyyyyyyyyyyyyyX
+pppppppppX
diff --git a/tests/ts/libsmartcols/files/data-string-nl b/tests/ts/libsmartcols/files/data-string-nl
new file mode 100644
index 0000000..7822e57
--- /dev/null
+++ b/tests/ts/libsmartcols/files/data-string-nl
@@ -0,0 +1,10 @@
+aaa
+bbbbb
+cccc\nCCCC
+dddddddd\nDDDD\nDD
+hello\nbaby
+aaa\nbbb\nccc\nddd
+eee
+fffff
+g\nhhhhh
+ppppppppp
diff --git a/tests/ts/libsmartcols/fromfile b/tests/ts/libsmartcols/fromfile
new file mode 100755
index 0000000..45b8471
--- /dev/null
+++ b/tests/ts/libsmartcols/fromfile
@@ -0,0 +1,286 @@
+#!/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="fromfile"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBSMARTCOLS_FROMFILE"
+ts_check_test_command "$TESTPROG"
+
+ts_init_subtest "tree"
+ts_run $TESTPROG --nlines 10 \
+ --tree-id-column 1 \
+ --tree-parent-column 2 \
+ --column $TS_SELF/files/col-tree \
+ --column $TS_SELF/files/col-id \
+ --column $TS_SELF/files/col-parent \
+ --column $TS_SELF/files/col-string \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-id \
+ $TS_SELF/files/data-parent \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "tree-json"
+ts_run $TESTPROG --nlines 10 --json \
+ --tree-id-column 1 \
+ --tree-parent-column 2 \
+ --column $TS_SELF/files/col-tree \
+ --column $TS_SELF/files/col-id \
+ --column $TS_SELF/files/col-parent \
+ --column $TS_SELF/files/col-string \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-id \
+ $TS_SELF/files/data-parent \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "tree-middle"
+ts_run $TESTPROG --nlines 10 \
+ --tree-id-column 0 \
+ --tree-parent-column 1 \
+ --column $TS_SELF/files/col-id \
+ --column $TS_SELF/files/col-parent \
+ --column $TS_SELF/files/col-tree \
+ --column $TS_SELF/files/col-string \
+ $TS_SELF/files/data-id \
+ $TS_SELF/files/data-parent \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "tree-end"
+ts_run $TESTPROG --nlines 10 \
+ --tree-id-column 0 \
+ --tree-parent-column 1 \
+ --column $TS_SELF/files/col-id \
+ --column $TS_SELF/files/col-parent \
+ --column $TS_SELF/files/col-string \
+ --column $TS_SELF/files/col-tree \
+ $TS_SELF/files/data-id \
+ $TS_SELF/files/data-parent \
+ $TS_SELF/files/data-string-long \
+ $TS_SELF/files/data-string \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "trunc"
+ts_run $TESTPROG --nlines 10 --width 40 \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-trunc \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "right"
+ts_run $TESTPROG --nlines 10 \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-string \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "right-maxout"
+ts_run $TESTPROG --nlines 10 --maxout --width 80\
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "padding-default"
+export LIBSMARTCOLS_DEBUG_PADDING=on
+ts_run $TESTPROG --nlines 10 --width 80 \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-string \
+ --column $TS_SELF/files/col-string \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-empty \
+ $TS_SELF/files/data-string-empty \
+ >> $TS_OUTPUT 2> /dev/null
+ts_finalize_subtest
+
+ts_init_subtest "padding-maxout"
+export LIBSMARTCOLS_DEBUG_PADDING=on
+ts_run $TESTPROG --nlines 10 --width 80 \
+ --maxout \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-string \
+ --column $TS_SELF/files/col-string \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-empty \
+ $TS_SELF/files/data-string-empty \
+ >> $TS_OUTPUT 2> /dev/null
+ts_finalize_subtest
+
+ts_init_subtest "padding-minout"
+export LIBSMARTCOLS_DEBUG_PADDING=on
+ts_run $TESTPROG --nlines 10 --width 80 \
+ --minout \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-string \
+ --column $TS_SELF/files/col-string \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-empty \
+ $TS_SELF/files/data-string-empty \
+ >> $TS_OUTPUT 2> /dev/null
+ts_finalize_subtest
+
+unset LIBSMARTCOLS_DEBUG_PADDING
+
+ts_init_subtest "strictwidth"
+ts_run $TESTPROG --nlines 10 \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-strict \
+ --column $TS_SELF/files/col-number \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number-tiny \
+ $TS_SELF/files/data-number \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "noextremes"
+ts_run $TESTPROG --nlines 10 --width 45 \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-noextremes \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-string-extreme \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "hidden"
+ts_run $TESTPROG --nlines 10 \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-hidden \
+ --column $TS_SELF/files/col-number \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-string-long \
+ $TS_SELF/files/data-number \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "wrap"
+ts_run $TESTPROG --nlines 10 --width 40 \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-wrap \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "wrap-tree"
+ts_run $TESTPROG --nlines 10 --width 45 \
+ --tree-id-column 1 \
+ --tree-parent-column 2 \
+ --column $TS_SELF/files/col-tree \
+ --column $TS_SELF/files/col-id \
+ --column $TS_SELF/files/col-parent \
+ --column $TS_SELF/files/col-wrap \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-id \
+ $TS_SELF/files/data-parent \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "wrapnl"
+ts_run $TESTPROG --nlines 10 \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-wrapnl \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-nl \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "wrapnl-tree"
+ts_run $TESTPROG --nlines 10 \
+ --tree-id-column 1 \
+ --tree-parent-column 2 \
+ --column $TS_SELF/files/col-tree \
+ --column $TS_SELF/files/col-id \
+ --column $TS_SELF/files/col-parent \
+ --column $TS_SELF/files/col-wrapnl \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-id \
+ $TS_SELF/files/data-parent \
+ $TS_SELF/files/data-string-nl \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "raw"
+ts_run $TESTPROG --nlines 10 --raw \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-trunc \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "export"
+ts_run $TESTPROG --nlines 10 --export \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-trunc \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "column-separator"
+ts_run $TESTPROG --nlines 10 --colsep \| \
+ --column $TS_SELF/files/col-name \
+ --column $TS_SELF/files/col-number \
+ --column $TS_SELF/files/col-trunc \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-number \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_log "...done."
+ts_finalize
diff --git a/tests/ts/libsmartcols/title b/tests/ts/libsmartcols/title
new file mode 100755
index 0000000..5a1c178
--- /dev/null
+++ b/tests/ts/libsmartcols/title
@@ -0,0 +1,28 @@
+#!/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="title"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+TESTPROG="$TS_HELPER_LIBSMARTCOLS_TITLE"
+ts_check_test_command "$TESTPROG"
+
+ts_run $TESTPROG --width 80 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/logger/errors b/tests/ts/logger/errors
new file mode 100755
index 0000000..f6d0d7b
--- /dev/null
+++ b/tests/ts/logger/errors
@@ -0,0 +1,116 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2015 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="errors"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_LOGGER"
+ts_check_prog "socat"
+ts_check_prog "mktemp"
+
+export TZ="GMT"
+export LOGGER_TEST_TIMEOFDAY="1234567890.123456"
+export LOGGER_TEST_HOSTNAME="test-hostname"
+export LOGGER_TEST_GETPID="98765"
+
+DEVLOG="$(mktemp "/tmp/ultest-$TS_COMPONENT-$TS_TESTNAME-XXXXXX")" \
+ || ts_die "mktemp failed"
+SOCKIN="${TS_OUTDIR}/${TS_TESTNAME}_socketin"
+ts_init_socket_to_file $DEVLOG $SOCKIN
+SOCAT_PID="$!"
+
+function logger_fun {
+ # logger without --no-act to write all data to the socket
+ echo "socket data, ${TS_SUBNAME}:" |socat -u - UNIX-CONNECT:$DEVLOG
+ $TS_HELPER_LOGGER -u $DEVLOG --stderr "$@" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ echo "ret: $?" >> "$TS_OUTPUT"
+ echo |socat -u - UNIX-CONNECT:$DEVLOG
+}
+
+function logger_printf {
+ # logger without --no-act to write all data to the socket
+ local fmt="$1"
+ shift
+ echo "socket data, ${TS_SUBNAME}:" |socat -u - UNIX-CONNECT:$DEVLOG
+ printf "$fmt" | $TS_HELPER_LOGGER -u $DEVLOG --stderr "$@" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ echo "ret: $?" >> "$TS_OUTPUT"
+ echo |socat -u - UNIX-CONNECT:$DEVLOG
+}
+
+ts_init_subtest "kern_priority"
+logger_fun -t "prio" -p kern.emerg "message"
+ts_finalize_subtest
+
+ts_init_subtest "kern_priority_numeric"
+logger_fun -t "prio" -p 0 "message"
+ts_finalize_subtest
+
+ts_init_subtest "invalid_prio"
+logger_fun -t "prio" -p 8 "message"
+ts_finalize_subtest
+
+# should truncate
+ts_init_subtest "rfc5424_exceed_size"
+logger_fun -t "rfc5424_exceed_size" --rfc5424 --size 3 "abcd"
+ts_finalize_subtest
+
+ts_init_subtest "id_with_space"
+logger_fun -t "id_with_space" --id="A B" "message"
+logger_fun -t "rfc5424_id_with_space" --rfc5424 --id="A B" "message"
+logger_fun -t "id_with_space" --id="1 23" "message"
+logger_fun -t "id_with_leading space" --id=" 123" "message"
+logger_fun -t "id_with_trailing space" --id="123 " "message"
+
+ts_finalize_subtest
+
+# should not fail
+ts_init_subtest "tag_with_space"
+logger_fun -t "A B" "tag_with_space"
+logger_fun -t "A B" --rfc5424 "tag_with_space_rfc5424"
+ts_finalize_subtest
+
+ts_init_subtest "tcp"
+logger_fun --tcp -t "tcp" "message"
+ts_finalize_subtest
+
+ts_init_subtest "multi-line"
+logger_printf "AAA\nBBB\nCCC\n" -t "multi"
+ts_finalize_subtest
+
+ts_init_subtest "rfc5424_msgid_with_space"
+logger_fun -t "rfc5424_msgid_with_space" --rfc5424 --msgid="A B" "message"
+ts_finalize_subtest
+
+ts_init_subtest "invalid_socket"
+logger_fun -u /bad/boy -t "invalid_socket" "message"
+ts_finalize_subtest
+
+ts_init_subtest "check_socket"
+ts_log "Check written socket data of all subtests."
+sleep 1
+kill $SOCAT_PID
+wait $SOCAT_PID &>/dev/null
+cat "$SOCKIN" >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f "$DEVLOG" "$SOCKIN"
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/logger/formats b/tests/ts/logger/formats
new file mode 100755
index 0000000..0c46b69
--- /dev/null
+++ b/tests/ts/logger/formats
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2015 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="formats"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_LOGGER"
+
+export TZ="GMT"
+export LOGGER_TEST_TIMEOFDAY="1234567890.123456"
+export LOGGER_TEST_HOSTNAME="test-hostname"
+export LOGGER_TEST_GETPID="98765"
+
+DEVLOG="$(mktemp "/tmp/ultest-$TS_COMPONENT-$TS_TESTNAME-XXXXXX")" \
+ || ts_die "mktemp failed"
+SOCKIN="${TS_OUTDIR}/${TS_TESTNAME}_socketin"
+ts_init_socket_to_file $DEVLOG $SOCKIN
+SOCAT_PID="$!"
+
+function logger_fun {
+ $TS_HELPER_LOGGER -u $DEVLOG --stderr --no-act "$@" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ echo "ret: $?" >> "$TS_ERRLOG" # keep all in stderr
+}
+
+ts_init_subtest "rfc3164"
+logger_fun -t "rfc3164" --rfc3164 "message"
+ts_finalize_subtest
+
+ts_init_subtest "rfc5424_simple"
+logger_fun -t "rfc5424" --rfc5424 "message"
+ts_finalize_subtest
+
+ts_init_subtest "rfc5424_notime"
+logger_fun -t "rfc5424" --rfc5424=notime "message"
+ts_finalize_subtest
+
+ts_init_subtest "rfc5424_nohost"
+logger_fun -t "rfc5424" --rfc5424=nohost "message"
+ts_finalize_subtest
+
+ts_init_subtest "rfc5424_msgid"
+logger_fun -t "rfc5424" --rfc5424 --msgid "MSGID" "message"
+ts_finalize_subtest
+
+ts_init_subtest "octet_counting"
+logger_fun -t "octen" --octet-count "message"
+ts_finalize_subtest
+
+ts_init_subtest "priorities"
+for facility in auth authpriv cron daemon ftp lpr mail news syslog user uucp local{0..7}; do
+ for level in emerg alert crit err warning notice info debug; do
+ logger_fun -t "prio" -p "$facility.$level" "$facility.$level"
+ done
+done
+ts_finalize_subtest
+
+ts_init_subtest "check_socket"
+# Check written socket data of all subtests
+sleep 1
+kill $SOCAT_PID
+wait $SOCAT_PID &>/dev/null
+cat "$SOCKIN" >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f "$DEVLOG" "$SOCKIN"
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/logger/journald b/tests/ts/logger/journald
new file mode 100755
index 0000000..abed3e7
--- /dev/null
+++ b/tests/ts/logger/journald
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2015 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="journald"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_LOGGER"
+
+if ! $TS_HELPER_LOGGER --help | grep -q journald; then
+ ts_skip "unsupported"
+fi
+
+printf "%s\n%s\n%s\n" MESSAGE_ID=b8f74e14bc714bfc8040a5106dc9376a MESSAGE="a b c 1 2 3" |
+$TS_HELPER_LOGGER -u /bad/boy --no-act --journald --stderr >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "ret: $?" >> $TS_ERRLOG # keep it on stderr too
+ts_finalize
diff --git a/tests/ts/logger/options b/tests/ts/logger/options
new file mode 100755
index 0000000..c5a4c36
--- /dev/null
+++ b/tests/ts/logger/options
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2015 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="options"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_LOGGER"
+
+# Create --file option input files.
+echo {a..c}{1..5} > $TS_OUTDIR/input_simple
+echo {a..c}{1..5} > $TS_OUTDIR/input_empty_line
+echo "" >> $TS_OUTDIR/input_empty_line
+echo {5..1}{c..1} >> $TS_OUTDIR/input_empty_line
+echo "<66>" prio_prefix > $TS_OUTDIR/input_prio_prefix
+
+# bash 4 might not be available, use go-around hash
+tests_array=(
+ "simple:test"
+ "log_pid:-i test"
+ "log_pid_long:--id test"
+ "log_pid_define:--id=12345 test"
+ "log_pid_no_arg:-is test"
+ "input_file_simple:-f $TS_OUTDIR/input_simple"
+ "input_file_empty_line:-f $TS_OUTDIR/input_empty_line"
+ "input_file_skip_empty:--file $TS_OUTDIR/input_empty_line -e"
+ "input_file_prio_prefix:--file $TS_OUTDIR/input_prio_prefix --skip-empty --prio-prefix"
+)
+
+export TZ="GMT"
+export LOGGER_TEST_TIMEOFDAY="1234567890.123456"
+export LOGGER_TEST_HOSTNAME="test-hostname"
+export LOGGER_TEST_GETPID="98765"
+
+DEVLOG="$(mktemp "/tmp/ultest-$TS_COMPONENT-$TS_TESTNAME-XXXXXX")" \
+ || ts_die "mktemp failed"
+SOCKIN="${TS_OUTDIR}/${TS_TESTNAME}_socketin"
+ts_init_socket_to_file $DEVLOG $SOCKIN
+SOCAT_PID="$!"
+
+function logger_fun {
+ $TS_HELPER_LOGGER -u $DEVLOG --stderr --no-act "$@" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ echo "ret: $?" >> "$TS_ERRLOG" # keep all on stderr
+}
+
+for i in "${tests_array[@]}"; do
+ name="${i%%:*}"
+ options="${i##*:}"
+
+ ts_init_subtest "$name"
+ logger_fun -t "test_tag" $options
+ ts_finalize_subtest
+done
+
+ts_init_subtest "check_socket"
+# Check written socket data of all subtests
+sleep 1
+kill $SOCAT_PID
+wait $SOCAT_PID &>/dev/null
+cat "$SOCKIN" >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f "$DEVLOG" "$SOCKIN"
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/login/islocal b/tests/ts/login/islocal
new file mode 100755
index 0000000..013999e
--- /dev/null
+++ b/tests/ts/login/islocal
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2008 James Youngman <jay@gnu.org>
+#
+# 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="islocal"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_ISLOCAL"
+
+$TS_HELPER_ISLOCAL "$TS_SELF/islocal.data" root nobody "" youngman youngman2 \
+ abcdefghx nobo long rot al malformed \
+ nonl znobody >> $TS_OUTPUT
+ts_finalize
diff --git a/tests/ts/login/islocal.data b/tests/ts/login/islocal.data
new file mode 100644
index 0000000..916a8a9
--- /dev/null
+++ b/tests/ts/login/islocal.data
@@ -0,0 +1,10 @@
+root:x:0:0:root:/root:/bin/bash
+sys:x:3:3:sys:/dev:/bin/sh
+orac:x:33:33:sys:/dev:/bin/youngman
+long:x:4:4:foo:/home/loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonnnggg:/bin/sh
+al:x:5:5:fnord:/dev:/bin/sh
+abcdefgh:x:6:3:fnord:/dev:/bin/sh
+malformed
+
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+nonl:x:65532:65532:no newline:/:/bin/false
diff --git a/tests/ts/login/logindefs b/tests/ts/login/logindefs
new file mode 100755
index 0000000..2ab9ce4
--- /dev/null
+++ b/tests/ts/login/logindefs
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# Copyright (C) 2011 Karel Zak <kzak@redhat.com>
+#
+# This file is part of util-linux.
+#
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="defs"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_LOGINDEFS"
+
+# list all items
+$TS_HELPER_LOGINDEFS "$TS_SELF/logindefs.data" | sed 's:'$TS_SELF'/::g' >> $TS_OUTPUT
+
+# search
+$TS_HELPER_LOGINDEFS "$TS_SELF/logindefs.data" str STRING >> $TS_OUTPUT
+$TS_HELPER_LOGINDEFS "$TS_SELF/logindefs.data" num NUMBER >> $TS_OUTPUT
+$TS_HELPER_LOGINDEFS "$TS_SELF/logindefs.data" bool BOOLEAN >> $TS_OUTPUT
+$TS_HELPER_LOGINDEFS "$TS_SELF/logindefs.data" str EMPTY >> $TS_OUTPUT
+
+$TS_HELPER_LOGINDEFS "$TS_SELF/logindefs.data" str UNKNOWN >> $TS_OUTPUT
+
+ts_finalize
diff --git a/tests/ts/login/logindefs.data b/tests/ts/login/logindefs.data
new file mode 100644
index 0000000..b899ff7
--- /dev/null
+++ b/tests/ts/login/logindefs.data
@@ -0,0 +1,16 @@
+#
+# this is /etc/login.defs sample
+#
+
+HELLO_WORLD "hello world!"
+STRING this_is_string # another comment
+NUMBER 123456
+BOOLEAN yEs
+
+CRAZY1 = "this is crazy format"
+CRAZY2=fooBar
+CRAZY3 FoooBaaar
+
+EMPTY
+
+END "the is end"
diff --git a/tests/ts/look/separator b/tests/ts/look/separator
new file mode 100755
index 0000000..d32a343
--- /dev/null
+++ b/tests/ts/look/separator
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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.
+#
+
+#
+# WARNING: the look command expects that the /usr/share/dict/words uses
+# directory order!
+#
+# for example:
+#
+# cat words.raw | grep -E --invert-match "'s$" | \
+# grep -E "^[[:alnum:]'&!,./-]+$" | \
+# sort --ignore-case --dictionary-order | \
+# uniq > words
+#
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="separator"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LOOK"
+
+$TS_CMD_LOOK apple-pie $TS_TOPDIR/ts/look/words >> $TS_OUTPUT
+ts_finalize
+
diff --git a/tests/ts/look/words b/tests/ts/look/words
new file mode 100644
index 0000000..b67ba9a
--- /dev/null
+++ b/tests/ts/look/words
@@ -0,0 +1,3 @@
+apple
+apple-pie
+oranges
diff --git a/tests/ts/losetup/losetup b/tests/ts/losetup/losetup
new file mode 100755
index 0000000..9bae618
--- /dev/null
+++ b/tests/ts/losetup/losetup
@@ -0,0 +1,86 @@
+#!/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="${0%/*}/../.."
+TS_DESC="losetup"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LOSETUP"
+ts_check_test_command "$TS_CMD_LSBLK"
+
+# Before checking for loop support we would need to test if losetup -f works at
+# all. At least we do a simple executable test for now.
+$TS_CMD_LOSETUP --version >/dev/null 2>$TS_OUTPUT || ts_failed
+$TS_CMD_LOSETUP --unknownopt >>$TS_OUTPUT 2>/dev/null && ts_failed
+test -s $TS_OUTPUT && ts_failed
+
+ts_skip_nonroot
+ts_check_losetup
+
+. "$TS_SELF/losetup_functions.sh"
+
+#
+# file-* tests: Backing file is a regular file
+#
+BACKFILE=$(ts_image_init 10)
+
+ts_init_subtest "file-show"
+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
+
+udevadm settle
+
+ts_finalize
diff --git a/tests/ts/losetup/losetup-blkdev b/tests/ts/losetup/losetup-blkdev
new file mode 100755
index 0000000..93eb732
--- /dev/null
+++ b/tests/ts/losetup/losetup-blkdev
@@ -0,0 +1,81 @@
+#!/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="${0%/*}/../.."
+TS_DESC="losetup-blkdev"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LOSETUP"
+ts_check_test_command "$TS_CMD_LSBLK"
+
+ts_skip_nonroot
+ts_check_losetup
+
+. "$TS_SELF/losetup_functions.sh"
+
+#
+# Backing file is a block device
+#
+ts_scsi_debug_init dev_size_mb=11
+BACKFILE="$TS_DEVICE"
+
+ts_init_subtest "show"
+LODEV=$( $TS_CMD_LOSETUP --find --show $BACKFILE )
+if [ -z "$LODEV" ]; then
+ ts_log "Failed to create loop device"
+fi
+lo_print $LODEV >> $TS_OUTPUT
+udevadm settle
+$TS_CMD_LOSETUP -d $LODEV
+ts_finalize_subtest
+
+ts_init_subtest "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
+udevadm settle
+$TS_CMD_LOSETUP -d $LODEV
+ts_finalize_subtest
+
+
+ts_init_subtest "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
+udevadm settle
+$TS_CMD_LOSETUP -d $LODEV
+ts_finalize_subtest
+
+
+ts_init_subtest "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
+udevadm settle
+$TS_CMD_LOSETUP -d $LODEV
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/losetup/losetup-loop b/tests/ts/losetup/losetup-loop
new file mode 100755
index 0000000..d6ba902
--- /dev/null
+++ b/tests/ts/losetup/losetup-loop
@@ -0,0 +1,247 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2016 Stanislav Brabec <sbrabec@suse.cz>
+#
+# 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="losetup-loop"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LOSETUP"
+ts_check_test_command "$TS_CMD_LSBLK"
+
+ts_skip_nonroot
+ts_check_losetup
+
+. "$TS_SELF/losetup_functions.sh"
+
+#
+# Backing file is a block device
+#
+ts_scsi_debug_init dev_size_mb=11
+BACKFILE="$TS_DEVICE"
+
+# All tests are separated by "udevadm settle" because loop device exists some time after
+# "losetup -d". This device confuses some tests. And find-race-condition, tests,
+# whether re-use of this device works.
+
+ts_init_subtest "find-race-condition"
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show $BACKFILE )
+$TS_CMD_LOSETUP -d "$LODEV"
+# The loop device may or may not exist here because no "udevadm settle".
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show $BACKFILE )
+udevadm settle
+dd if=/dev/zero of="$LODEV" count=1 bs=1 >/dev/null 2>&1
+$TS_CMD_LOSETUP --list | grep -q "$LODEV\b"
+ts_log $?
+udevadm settle
+$TS_CMD_LOSETUP -d "$LODEV" >/dev/null 2>&1
+ts_log "Success"
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "find-re-use"
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show $BACKFILE )
+if [ -z "$LODEV" ]; then
+ ts_log "Failed to create loop device"
+fi
+LODEVR=$( $TS_CMD_LOSETUP --find --nooverlap --show $BACKFILE )
+if [ -z "$LODEVR" ]; then
+ ts_log "Failed to create loop device"
+fi
+udevadm settle
+if test "$LODEV" = "$LODEVR" ; then
+ echo "equal" >>$TS_OUTPUT
+else
+ echo "different" >>$TS_OUTPUT
+ if test -n "$LODEVR" ; then
+ $TS_CMD_LOSETUP -d "$LODEVR"
+ fi
+fi
+$TS_CMD_LOSETUP -d "$LODEV"
+ts_log "Success"
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "find-no-re-use"
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=0 --sizelimit=1MiB $BACKFILE )
+if [ -z "$LODEV" ]; then
+ ts_log "Failed to create loop device"
+fi
+LODEVR=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=1MiB --sizelimit=1MiB $BACKFILE )
+if [ -z "$LODEVR" ]; then
+ ts_log "Failed to create loop device"
+fi
+udevadm settle
+if test "$LODEV" = "$LODEVR" ; then
+ echo "equal" >>$TS_OUTPUT
+else
+ echo "different" >>$TS_OUTPUT
+ if test -n "$LODEVR" ; then
+ $TS_CMD_LOSETUP -d "$LODEVR"
+ fi
+fi
+$TS_CMD_LOSETUP -d "$LODEV"
+ts_log "Success"
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "find-conflict"
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=1MiB --sizelimit=2MiB $BACKFILE )
+if [ -z "$LODEV" ]; then
+ ts_log "Failed to create loop device"
+fi
+LODEVR=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=2MiB --sizelimit=2MiB $BACKFILE >/dev/null 2>&1 )
+if [ -z "$LODEVR" ]; then
+ ts_log "Failed to create loop device"
+fi
+udevadm settle
+if test "$LODEV" = "$LODEVR" ; then
+ echo "equal" >>$TS_OUTPUT
+else
+ echo "different" >>$TS_OUTPUT
+ if test -n "$LODEVR" ; then
+ $TS_CMD_LOSETUP -d "$LODEVR"
+ fi
+fi
+$TS_CMD_LOSETUP -d "$LODEV"
+ts_log "Success"
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "find-conflict-no-sizelimit"
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=1MiB $BACKFILE )
+if [ -z "$LODEV" ]; then
+ ts_log "Failed to create loop device"
+fi
+LODEVR=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=2MiB --sizelimit=2MiB $BACKFILE >/dev/null 2>&1 )
+if [ -z "$LODEVR" ]; then
+ ts_log "Failed to create loop device"
+fi
+udevadm settle
+if test "$LODEV" = "$LODEVR" ; then
+ echo "equal" >>$TS_OUTPUT
+else
+ echo "different" >>$TS_OUTPUT
+ if test -n "$LODEVR" ; then
+ $TS_CMD_LOSETUP -d "$LODEVR"
+ fi
+fi
+$TS_CMD_LOSETUP -d "$LODEV"
+ts_log "Success"
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "find-conflict-readonly"
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show --read-only $BACKFILE )
+if [ -z "$LODEV" ]; then
+ ts_log "Failed to create loop device"
+fi
+LODEVR=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=2MiB --sizelimit=2MiB $BACKFILE >/dev/null 2>&1 )
+if [ -z "$LODEVR" ]; then
+ ts_log "Failed to create loop device"
+fi
+udevadm settle
+if test "$LODEV" = "$LODEVR" ; then
+ echo "equal" >>$TS_OUTPUT
+else
+ echo "different" >>$TS_OUTPUT
+ if test -n "$LODEVR" ; then
+ $TS_CMD_LOSETUP -d "$LODEVR"
+ fi
+fi
+$TS_CMD_LOSETUP -d "$LODEV"
+$TS_CMD_LOSETUP -d "$LODEVR" >/dev/null 2>&1
+ts_log "Success"
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "find-ok-no-sizelimit"
+LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=1MiB --sizelimit=1MiB $BACKFILE )
+if [ -z "$LODEV" ]; then
+ ts_log "Failed to create loop device"
+fi
+LODEVR=$( $TS_CMD_LOSETUP --find --nooverlap --show --offset=2MiB $BACKFILE )
+if [ -z "$LODEVR" ]; then
+ ts_log "Failed to create loop device"
+fi
+udevadm settle
+if test "$LODEV" = "$LODEVR" ; then
+ echo "equal" >>$TS_OUTPUT
+else
+ echo "different" >>$TS_OUTPUT
+ if test -n "$LODEVR" ; then
+ $TS_CMD_LOSETUP -d "$LODEVR"
+ fi
+fi
+$TS_CMD_LOSETUP -d "$LODEV"
+ts_log "Success"
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "plain-conflict"
+if [ "$TS_PARALLEL" = "yes" ]; then
+ # There is a race in $LODEV is usage
+ ts_skip_subtest "no-reentrant"
+else
+ LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show $BACKFILE )
+ if [ -z "$LODEV" ]; then
+ ts_log "Failed to create loop device"
+ fi
+ LODEVR=$( $TS_CMD_LOSETUP --find )
+ $TS_CMD_LOSETUP --nooverlap "$LODEVR" $BACKFILE >/dev/null 2>&1
+ ts_log $?
+ udevadm settle
+ $TS_CMD_LOSETUP -d "$LODEV"
+ $TS_CMD_LOSETUP -d "$LODEVR" >/dev/null 2>&1
+ ts_log "Success"
+ ts_finalize_subtest
+fi
+
+udevadm settle
+
+ts_init_subtest "plain-readonly"
+if [ "$TS_PARALLEL" = "yes" ]; then
+ # There is a race in $LODEV is usage
+ ts_skip_subtest "no-reentrant"
+else
+ LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show --read-only $BACKFILE )
+ if [ -z "$LODEV" ]; then
+ ts_log "Failed to create loop device"
+ fi
+ LODEVR=$( $TS_CMD_LOSETUP --find )
+ $TS_CMD_LOSETUP --nooverlap "$LODEVR" $BACKFILE >/dev/null 2>&1
+ ts_log $?
+ udevadm settle
+ $TS_CMD_LOSETUP -d "$LODEV"
+ $TS_CMD_LOSETUP -d "$LODEVR" >/dev/null 2>&1
+ ts_log "Success"
+ ts_finalize_subtest
+fi
+
+udevadm settle
+
+ts_log "Success"
+ts_finalize
diff --git a/tests/ts/losetup/losetup_functions.sh b/tests/ts/losetup/losetup_functions.sh
new file mode 100644
index 0000000..d17c82a
--- /dev/null
+++ b/tests/ts/losetup/losetup_functions.sh
@@ -0,0 +1,7 @@
+
+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 )"
+}
diff --git a/tests/ts/lsblk/README b/tests/ts/lsblk/README
new file mode 100644
index 0000000..6f93710
--- /dev/null
+++ b/tests/ts/lsblk/README
@@ -0,0 +1,19 @@
+
+Howto add new lsblk test:
+
+* run mk-input.sh <testname>
+
+* copy testname.tar.xz file to tests/ts/lsblk/dumps
+
+* copy lsblk-* files from the tarball to tests/expected/lsblk/
+
+* run ./tests/run.sh lsblk
+
+* git add tests/ts/lsblk/testname.tar.xz
+ git add tests/expected/lsblk/lsblk-testname*
+
+
+Note that we do not use directly lsblk-* from the tarball. It's better to keep
+copy of the files in the tests/expected/lsblk/, because output formatting may
+be different in the current version. The version in the tarball is just initial
+hint only.
diff --git a/tests/ts/lsblk/dumps/simple-lvm.tar.xz b/tests/ts/lsblk/dumps/simple-lvm.tar.xz
new file mode 100644
index 0000000..b0c8c34
--- /dev/null
+++ b/tests/ts/lsblk/dumps/simple-lvm.tar.xz
Binary files differ
diff --git a/tests/ts/lsblk/dumps/simple-nvme.tar.xz b/tests/ts/lsblk/dumps/simple-nvme.tar.xz
new file mode 100644
index 0000000..47229b3
--- /dev/null
+++ b/tests/ts/lsblk/dumps/simple-nvme.tar.xz
Binary files differ
diff --git a/tests/ts/lsblk/lsblk b/tests/ts/lsblk/lsblk
new file mode 100755
index 0000000..926f62d
--- /dev/null
+++ b/tests/ts/lsblk/lsblk
@@ -0,0 +1,56 @@
+#!/bin/bash
+#
+# Copyright (C) 2018 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 3 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+TS_TOPDIR="${0%/*}/../.."
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSBLK"
+ts_check_prog xz
+ts_check_prog tar
+
+for dump in $(ls $TS_SELF/dumps/*.tar.xz | sort); do
+ name=$(basename $dump .tar.xz)
+ dumpdir="$TS_OUTDIR/dumps"
+
+ mkdir -p $dumpdir
+ tar -C $dumpdir --xz -xf $dump
+
+ #
+ # Read *.cols from the tarball, but the expected output is not used
+ # from the tarball due to changes in lsblk fomatting etc. We keep up to
+ # date version in tests/expected/lsblk.
+ #
+ for cols_file in $(ls $dumpdir/$name/*.cols | sort); do
+ subname=$(basename $cols_file .cols)
+ subtestname="${name}-${subname}"
+
+ ts_init_subtest $subtestname
+ cols=$(cat $cols_file)
+ ${TS_CMD_LSBLK} --sysroot "${dumpdir}/${name}" \
+ --output $cols \
+ >> ${TS_OUTPUT} 2>> $TS_ERRLOG
+
+ ts_finalize_subtest
+ done
+done
+
+ts_finalize
+
diff --git a/tests/ts/lsblk/mk-input.sh b/tests/ts/lsblk/mk-input.sh
new file mode 100755
index 0000000..2bbd9e3
--- /dev/null
+++ b/tests/ts/lsblk/mk-input.sh
@@ -0,0 +1,124 @@
+#!/bin/bash
+#
+# Copyright (C) 2018 Karel Zak <kzak@redhat.com>
+#
+# This script makes a copy of relevant files from /sys and /proc.
+# The files are useful for lsblk(1) regression tests.
+#
+progname=$(basename $0)
+
+if [ -z "$1" ]; then
+ echo -e "\nusage: $progname <testname>\n"
+ exit 1
+fi
+
+TS_DUMP="$1"
+TS_NAME=$(basename ${TS_DUMP})
+TS_TARBALL="$TS_DUMP.tar.xz"
+TS_CMD_LSBLK=${TS_CMD_LSBLK:-"lsblk"}
+
+#
+# procfs
+#
+mkdir -p $TS_DUMP/proc
+mkdir -p $TS_DUMP/proc/self
+cp /proc/self/mountinfo ${TS_DUMP}/proc/self
+cp /proc/swaps ${TS_DUMP}/proc/swaps
+cp /proc/version ${TS_DUMP}/proc/version
+
+
+#
+# sysfs
+#
+mkdir -p $TS_DUMP/sys/{block,dev/block}
+cp --no-dereference /sys/dev/block/* ${TS_DUMP}/sys/dev/block
+cp --no-dereference /sys/block/* ${TS_DUMP}/sys/block
+
+DEVS=$(find /sys/dev/block/ -type l)
+for x in ${DEVS}; do
+ DEV="/sys/dev/block/$(readlink $x)"
+
+ mkdir -p ${TS_DUMP}/${DEV}
+
+ # attributes
+ for f in $(find ${DEV} -type f -not -path '*/trace/*' -not -path '*/uevent'); do
+ if [ ! -f ${TS_DUMP}/${f} ]; then
+ SUB=$(dirname $f)
+ mkdir -p ${TS_DUMP}/${SUB}
+ cp $f ${TS_DUMP}/$f 2> /dev/null
+ fi
+ done
+
+ # symlinks (slave, holders, etc.)
+ for f in $(find ${DEV} -type l -not -path '*/subsystem' -not -path '*/bdi'); do
+ if [ ! -f ${TS_DUMP}/${f} ]; then
+ SUB=$(dirname $f)
+ mkdir -p ${TS_DUMP}/${SUB}
+ cp --no-dereference $f ${TS_DUMP}/$f
+ fi
+ done
+
+ # device/ files
+ if [ -d ${DEV}/device/ ]; then
+ for f in $(find ${DEV}/device/ -maxdepth 1 -type f -not -path '*/uevent'); do
+ if [ ! -f ${TS_DUMP}/${f} ]; then
+ SUB=$(dirname $f)
+ cp $f ${TS_DUMP}/$f 2> /dev/null
+ fi
+ done
+ fi
+
+done
+
+#
+# udev a lsblk specific
+#
+mkdir -p $TS_DUMP/dev
+DEVS=$(lsblk --noheadings --output PATH)
+for d in $DEVS; do
+
+ # udev
+ udevadm info --query=property $d > $TS_DUMP/$d
+
+ # lsblk
+ echo "OWNER=$($TS_CMD_LSBLK --noheadings --nodeps --output OWNER $d)" >> $TS_DUMP/$d
+ echo "GROUP=$($TS_CMD_LSBLK --noheadings --nodeps --output GROUP $d)" >> $TS_DUMP/$d
+ echo "MODE=$($TS_CMD_LSBLK --noheadings --nodeps --output MODE $d)" >> $TS_DUMP/$d
+done
+
+function mk_output {
+ local cols="NAME,${2}"
+ local subname="$1"
+
+ echo "$cols" > ${TS_DUMP}/${subname}.cols
+ $TS_CMD_LSBLK -o ${cols} > ${TS_DUMP}/lsblk-${TS_NAME}-${subname}
+}
+
+
+LANG="POSIX"
+LANGUAGE="POSIX"
+LC_ALL="POSIX"
+CHARSET="UTF-8"
+
+export LANG LANGUAGE LC_ALL CHARSET
+
+#
+# lsblk info
+#
+$TS_CMD_LSBLK -V &> ${TS_DUMP}/version
+
+mk_output basic KNAME,MAJ:MIN,RM,SIZE,TYPE,MOUNTPOINT
+mk_output vendor MODEL,VENDOR,REV
+mk_output state RO,RM,HOTPLUG,RAND,STATE,ROTA,TYPE,PKNAME,SCHED
+mk_output rw RA,WSAME
+mk_output topo SIZE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,RQ-SIZE
+mk_output discard DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO
+mk_output zone ZONED
+
+
+tar --xz -cvf ${TS_TARBALL} $TS_DUMP
+rm -rf $TS_DUMP
+
+echo -e "\nPlease, send ${TS_TARBALL} to util-linux upstream. Thanks!\n"
+
+
diff --git a/tests/ts/lscpu/dumps/armv7.tar.gz b/tests/ts/lscpu/dumps/armv7.tar.gz
new file mode 100644
index 0000000..67a2c66
--- /dev/null
+++ b/tests/ts/lscpu/dumps/armv7.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/loongarch-loongson_3a5000_hv.tar.gz b/tests/ts/lscpu/dumps/loongarch-loongson_3a5000_hv.tar.gz
new file mode 100644
index 0000000..ee29d80
--- /dev/null
+++ b/tests/ts/lscpu/dumps/loongarch-loongson_3a5000_hv.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/ppc-qemu.tar.gz b/tests/ts/lscpu/dumps/ppc-qemu.tar.gz
new file mode 100644
index 0000000..a428271
--- /dev/null
+++ b/tests/ts/lscpu/dumps/ppc-qemu.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/ppc64-POWER7-64cpu.tar.gz b/tests/ts/lscpu/dumps/ppc64-POWER7-64cpu.tar.gz
new file mode 100644
index 0000000..ea8b79a
--- /dev/null
+++ b/tests/ts/lscpu/dumps/ppc64-POWER7-64cpu.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/ppc64-POWER7.tar.gz b/tests/ts/lscpu/dumps/ppc64-POWER7.tar.gz
new file mode 100644
index 0000000..c8fcc23
--- /dev/null
+++ b/tests/ts/lscpu/dumps/ppc64-POWER7.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/rv64-linux.tar.gz b/tests/ts/lscpu/dumps/rv64-linux.tar.gz
new file mode 100644
index 0000000..e108d85
--- /dev/null
+++ b/tests/ts/lscpu/dumps/rv64-linux.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/s390-kvm.tar.gz b/tests/ts/lscpu/dumps/s390-kvm.tar.gz
new file mode 100644
index 0000000..340f7ea
--- /dev/null
+++ b/tests/ts/lscpu/dumps/s390-kvm.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/s390-lpar-drawer.tar.gz b/tests/ts/lscpu/dumps/s390-lpar-drawer.tar.gz
new file mode 100644
index 0000000..ca1bc96
--- /dev/null
+++ b/tests/ts/lscpu/dumps/s390-lpar-drawer.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/s390-lpar.tar.gz b/tests/ts/lscpu/dumps/s390-lpar.tar.gz
new file mode 100644
index 0000000..59aea6a
--- /dev/null
+++ b/tests/ts/lscpu/dumps/s390-lpar.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/s390-nested-virt.tar.gz b/tests/ts/lscpu/dumps/s390-nested-virt.tar.gz
new file mode 100644
index 0000000..7992699
--- /dev/null
+++ b/tests/ts/lscpu/dumps/s390-nested-virt.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/s390-zvm.tar.gz b/tests/ts/lscpu/dumps/s390-zvm.tar.gz
new file mode 100644
index 0000000..b13594d
--- /dev/null
+++ b/tests/ts/lscpu/dumps/s390-zvm.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/sparc64.tar.gz b/tests/ts/lscpu/dumps/sparc64.tar.gz
new file mode 100644
index 0000000..7edfba8
--- /dev/null
+++ b/tests/ts/lscpu/dumps/sparc64.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/vbox-win.tar.gz b/tests/ts/lscpu/dumps/vbox-win.tar.gz
new file mode 100644
index 0000000..e8204fe
--- /dev/null
+++ b/tests/ts/lscpu/dumps/vbox-win.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/vmware_fpe.tar.gz b/tests/ts/lscpu/dumps/vmware_fpe.tar.gz
new file mode 100644
index 0000000..1fc6aed
--- /dev/null
+++ b/tests/ts/lscpu/dumps/vmware_fpe.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/x86_64-64cpu-linux6.2.tar.gz b/tests/ts/lscpu/dumps/x86_64-64cpu-linux6.2.tar.gz
new file mode 100644
index 0000000..05d0aa6
--- /dev/null
+++ b/tests/ts/lscpu/dumps/x86_64-64cpu-linux6.2.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/x86_64-64cpu.tar.gz b/tests/ts/lscpu/dumps/x86_64-64cpu.tar.gz
new file mode 100644
index 0000000..4d7516e
--- /dev/null
+++ b/tests/ts/lscpu/dumps/x86_64-64cpu.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/x86_64-dell_e4310.tar.gz b/tests/ts/lscpu/dumps/x86_64-dell_e4310.tar.gz
new file mode 100644
index 0000000..2988cbc
--- /dev/null
+++ b/tests/ts/lscpu/dumps/x86_64-dell_e4310.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/dumps/x86_64-epyc_7451.tar.gz b/tests/ts/lscpu/dumps/x86_64-epyc_7451.tar.gz
new file mode 100644
index 0000000..cb7cbd9
--- /dev/null
+++ b/tests/ts/lscpu/dumps/x86_64-epyc_7451.tar.gz
Binary files differ
diff --git a/tests/ts/lscpu/lscpu b/tests/ts/lscpu/lscpu
new file mode 100755
index 0000000..03249c3
--- /dev/null
+++ b/tests/ts/lscpu/lscpu
@@ -0,0 +1,61 @@
+#!/bin/bash
+#
+# Copyright (C) 2008 Cai Qian <qcai@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 3 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+TS_TOPDIR="${0%/*}/../.."
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_prog "tar"
+ts_check_prog "gzip"
+ts_check_test_command "$TS_CMD_LSCPU"
+
+for dump in $(ls $TS_SELF/dumps/*.tar.gz | sort); do
+ name=$(basename $dump .tar.gz)
+ dumpdir="$TS_OUTDIR/dumps"
+
+ ts_init_subtest $name
+ mkdir -p $dumpdir
+
+ tar -C $dumpdir -zxf $dump
+
+ # Architecture information is not applicable with -s.
+ "${TS_CMD_LSCPU}" -s "${dumpdir}/${name}" | \
+ grep -v "Architecture" >> ${TS_OUTPUT} 2>> $TS_ERRLOG
+
+ echo >>"${TS_OUTPUT}"
+
+ "${TS_CMD_LSCPU}" -p -s "${dumpdir}/${name}" \
+ >> ${TS_OUTPUT} 2>> $TS_ERRLOG
+
+ echo >>"${TS_OUTPUT}"
+
+ "${TS_CMD_LSCPU}" -p -y -s "${dumpdir}/${name}" \
+ >> ${TS_OUTPUT} 2>> $TS_ERRLOG
+
+ if [[ ! -e "${dumpdir}/${name}/sys/kernel/cpu_byteorder" ]]; then
+ # LE/BE depends on binary if we can't read it from the dump
+ sed -i -e '/Byte Order:.*/d' $TS_OUTPUT
+ fi
+
+ ts_finalize_subtest
+done
+
+ts_finalize
+
diff --git a/tests/ts/lscpu/mk-input.sh b/tests/ts/lscpu/mk-input.sh
new file mode 100755
index 0000000..a19bad3
--- /dev/null
+++ b/tests/ts/lscpu/mk-input.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# Copyright (C) 2008-2009 Karel Zak <kzak@redhat.com>
+#
+# This script makes a copy of relevant files from /sys and /proc.
+# The files are useful for lscpu(1) regression tests.
+#
+progname=$(basename $0)
+
+if [ -z "$1" ]; then
+ echo -e "\nusage: $progname <testname>\n"
+ exit 1
+fi
+
+TS_NAME="$1"
+TS_DUMP="$TS_NAME"
+CP="cp -r --parents"
+
+mkdir -p $TS_DUMP/{proc,sys}
+
+$CP /proc/cpuinfo $TS_DUMP
+
+mkdir -p $TS_DUMP/proc/bus/pci
+$CP /proc/bus/pci/devices $TS_DUMP
+
+if [ -d "/proc/xen" ]; then
+ mkdir -p $TS_DUMP/proc/xen
+ if [ -f "/proc/xen/capabilities" ]; then
+ $CP /proc/xen/capabilities $TS_DUMP
+ fi
+fi
+
+if [ -e "/proc/sysinfo" ]; then
+ $CP /proc/sysinfo $TS_DUMP
+fi
+
+$CP /sys/devices/system/cpu/* $TS_DUMP
+$CP /sys/devices/system/node/*/cpumap $TS_DUMP
+
+if [ -e "/sys/kernel/cpu_byteorder" ]; then
+ $CP /sys/kernel/cpu_byteorder $TS_DUMP
+fi
+
+
+tar zcvf $TS_NAME.tar.gz $TS_DUMP
+rm -rf $TS_DUMP
+
+
diff --git a/tests/ts/lsfd/column-ainodeclass b/tests/ts/lsfd/column-ainodeclass
new file mode 100755
index 0000000..6391c48
--- /dev/null
+++ b/tests/ts/lsfd/column-ainodeclass
@@ -0,0 +1,52 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="ainodeclass column"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/lsfd-functions.bash"
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR="(FD == 3)"
+
+for C in pidfd inotify; do
+ ts_init_subtest $C
+ {
+ coproc MKFDS { "$TS_HELPER_MKFDS" $C $FD ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n -o ASSOC,STTYPE,AINODECLASS -p "${PID}" -Q "${EXPR}"
+ echo "$C"':ASSOC,STTYPE,AINODECLASS': $?
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+ } > "$TS_OUTPUT" 2>&1
+ if [ "$C-$?" == "pidfd-$ENOSYS" ]; then
+ ts_skip_subtest "pidfd_open(2) is not available"
+ continue
+ fi
+ ts_finalize_subtest
+done
+
+ts_finalize
diff --git a/tests/ts/lsfd/column-kthread b/tests/ts/lsfd/column-kthread
new file mode 100755
index 0000000..0b093e9
--- /dev/null
+++ b/tests/ts/lsfd/column-kthread
@@ -0,0 +1,41 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="kthread column"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_skip_nonroot
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_prog "ps"
+
+[ "$(ps --no-headers -o comm 1)" = 'systemd' ] || ts_skip "pid 1 is not systemd"
+[ "$(ps --no-headers -o comm 2)" = 'kthreadd' ] || ts_skip "pid 2 is not kthreadd"
+
+ts_cd "$TS_OUTDIR"
+
+{
+ "$TS_CMD_LSFD" -o COMMAND,PID,USER,MODE,TYPE,NAME,KTHREAD \
+ -Q '(PID < 3) and ((ASSOC == "cwd") or (ASSOC == "rtd"))'
+ echo $?
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
+
+
diff --git a/tests/ts/lsfd/column-name b/tests/ts/lsfd/column-name
new file mode 100755
index 0000000..5dc491a
--- /dev/null
+++ b/tests/ts/lsfd/column-name
@@ -0,0 +1,74 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="NAME and KNAME column"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/lsfd-functions.bash"
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_prog "sed"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR="(FD == 3)"
+
+make_state_connected()
+{
+ if [ "$1" = "socketpair" ]; then
+ lsfd_make_state_connected
+ else
+ cat
+ fi
+}
+
+for C in ro-regular-file pidfd socketpair; do
+ ts_init_subtest $C
+ {
+ coproc MKFDS {
+ argv=()
+ case $C in
+ socketpair)
+ argv[0]="$((FD + 1))"
+ argv[1]="socktype=DGRAM"
+ esac
+ "$TS_HELPER_MKFDS" $C $FD "${argv[@]}"
+ }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n -o ASSOC,KNAME,NAME -p "${PID}" -Q "${EXPR}" | {
+ # Replace the unpredictable an inode number for the socket
+ # with "INODENUM".
+ sed -e 's/\[[0-9]\+\]/[INODENUM]/g' | make_state_connected $C
+ }
+ echo "$C"':ASSOC,KNAME,NAME': ${PIPESTATUS[0]}
+
+ kill -CONT "${PID}"
+ fi
+ } > "$TS_OUTPUT" 2>&1
+ wait "${MKFDS_PID}"
+ if [ "$C-$?" == "pidfd-$ENOSYS" ]; then
+ ts_skip_subtest "pidfd_open(2) is not available"
+ continue
+ fi
+ ts_finalize_subtest
+done
+
+ts_finalize
diff --git a/tests/ts/lsfd/column-type b/tests/ts/lsfd/column-type
new file mode 100755
index 0000000..cf6175e
--- /dev/null
+++ b/tests/ts/lsfd/column-type
@@ -0,0 +1,60 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="TYPE and STTYPE column"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/lsfd-functions.bash"
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR="(FD == 3)"
+
+for C in ro-regular-file pidfd inotify socketpair; do
+ ts_init_subtest $C
+ {
+ coproc MKFDS {
+ argv=()
+ case $C in
+ socketpair)
+ argv[0]="$((FD + 1))"
+ argv[1]="socktype=DGRAM"
+ esac
+ "$TS_HELPER_MKFDS" $C $FD "${argv[@]}"
+ }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n -o ASSOC,STTYPE,TYPE -p "${PID}" -Q "${EXPR}"
+ echo "$C"':ASSOC,STTYPE,TYPE': $?
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+ } > "$TS_OUTPUT" 2>&1
+ if [ "$C-$?" == "pidfd-$ENOSYS" ]; then
+ ts_skip_subtest "pidfd_open(2) is not available"
+ continue
+ fi
+ ts_finalize_subtest
+done
+
+ts_finalize
diff --git a/tests/ts/lsfd/lsfd-functions.bash b/tests/ts/lsfd/lsfd-functions.bash
new file mode 100644
index 0000000..d9a3595
--- /dev/null
+++ b/tests/ts/lsfd/lsfd-functions.bash
@@ -0,0 +1,85 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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.
+#
+
+# The exit-status used in a test target.
+readonly ENOSYS=17
+readonly EPERM=18
+readonly ENOPROTOOPT=19
+readonly EPROTONOSUPPORT=20
+readonly EACCESS=21
+
+function lsfd_wait_for_pausing {
+ ts_check_prog "sleep"
+
+ local PID=$1
+ until [[ $(ps --no-headers -ostat "${PID}") =~ S.* ]]; do
+ sleep 1
+ done
+}
+
+function lsfd_compare_dev {
+ local LSFD=$1
+ local FILE=$2
+ local EXPR=$3
+
+ ts_check_prog "grep"
+ ts_check_prog "expr"
+ ts_check_prog "stat"
+
+ local DEV=$("${LSFD}" --raw -n -o DEV -Q "${EXPR}")
+ echo 'DEV[RUN]:' $?
+ local MAJ=${DEV%:*}
+ local MIN=${DEV#*:}
+ local DEVNUM=$(( ( MAJ << 8 ) + MIN ))
+ local STAT_DEVNUM=$(stat -c "%d" "$FILE")
+ echo 'STAT[RUN]:' $?
+ if [ "${DEVNUM}" == "${STAT_DEVNUM}" ]; then
+ echo 'DEVNUM[STR]:' 0
+ else
+ echo 'DEVNUM[STR]:' 1
+ # Print more information for debugging
+ echo 'DEV:' "${DEV}"
+ echo 'MAJ:MIN' "${MAJ}:${MIN}"
+ echo 'DEVNUM:' "${DEVNUM}"
+ echo 'STAT_DEVNUM:' "${STAT_DEVNUM}"
+ fi
+}
+
+lsfd_strip_type_stream()
+{
+ # lsfd changes the output of NAME column for a unix stream socket
+ # whether the kernel reports it is a "UNIX-STREAM" socket or a
+ # "UNIX" socket. For "UNIX", lsfd appends "type=stream" to the
+ # NAME column. Let's delete the appended string before comparing.
+ sed -e 's/ type=stream//'
+}
+
+lsfd_make_state_connected()
+{
+ # Newer kernels report the states of unix dgram sockets created by
+ # sockerpair(2) are "connected" via /proc/net/unix though Older
+ # kernels report "unconnected".
+ #
+ # Newer kernels report the states of unix dgram sockets already
+ # connect(2)'ed are "connected", too.
+ #
+ # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=83301b5367a98c17ec0d76c7bc0ccdc3c7e7ad6d
+ #
+ # This rewriting adjusts the output of lsfd running on older kernels
+ # to that on newer kernels.
+ sed -e 's/state=unconnected/state=connected/'
+}
diff --git a/tests/ts/lsfd/mkfds-directory b/tests/ts/lsfd/mkfds-directory
new file mode 100755
index 0000000..ef769c9
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-directory
@@ -0,0 +1,109 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="directory"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_check_prog "stat"
+ts_check_prog "id"
+ts_check_prog "sed"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR=
+DIR=/
+
+mntflag=$(findmnt -n -o OPTIONS -T $DIR)
+noatime=
+case "${mntflag}" in
+ *noatime*)
+ noatime=1
+esac
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" directory $FD dir=$DIR; }
+ if read -u ${MKFDS[0]} PID; then
+ EXPR='(PID == '"${PID}"') and (FD == '"$FD"')'
+ ${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "${EXPR}" | {
+ #
+ # Normalize the output:
+ #
+ # See https://github.com/util-linux/util-linux/issues/1511#issuecomment-1029968595
+ # It seems that syscalls opening a directory on mips64 GNU/Linux take the
+ # O_LARGEFILE flag.
+ #
+ sed -e 's/largefile,\|,largefile//'
+ } | {
+ #
+ # Normalize the output:
+ #
+ # See https://github.com/util-linux/util-linux/issues/1709#issuecomment-1156333293
+ # If the file system where the target directory ($DIR) is mounted with
+ # "noatime" flag, Linux kernel may set O_NOATIME to the fd associated with $DIR.
+ #
+ if [ "$noatime" = 1 ]; then
+ sed -e 's/noatime,\|,noatime//'
+ else
+ cat
+ fi
+ }
+ echo 'ASSOC,MODE,TYPE,FLAGS,NAME': $?
+
+ LSFD_PID=$(${TS_CMD_LSFD} --raw -n -o PID -Q "${EXPR}")
+ echo 'PID[RUN]:' $?
+ [ "${LSFD_PID}" == "${PID}" ]
+ echo 'PID[STR]:' $?
+
+ LSFD_INODE=$(${TS_CMD_LSFD} --raw -n -o INODE -Q "${EXPR}")
+ echo 'INODE[RUN]:' $?
+ [ "${LSFD_INODE}" == "$(stat -c %i /)" ]
+ echo 'INODE[STR]:' $?
+
+ LSFD_UID=$(${TS_CMD_LSFD} --raw -n -o UID -Q "${EXPR}")
+ echo 'UID[RUN]:' $?
+ [ "${LSFD_UID}" == $(id -u) ]
+ echo 'UID[STR]:' $?
+
+ LSFD_USER=$(${TS_CMD_LSFD} --raw -n -o USER -Q "${EXPR}")
+ echo 'USER[RUN]:' $?
+ [ "${LSFD_USER}" == $(id -u -n) ]
+ echo 'USER[STR]:' $?
+
+ LSFD_NLINK=$(${TS_CMD_LSFD} --raw -n -o NLINK -Q "${EXPR}")
+ echo 'NLINK[RUN]:' $?
+ if [ "${LSFD_NLINK}" == $(stat -c %h /) ]; then
+ echo 'NLINK[STR]:' 0
+ else
+ echo 'NLINK[STR]:' 1
+ echo 'LSFD_NLINK:' "${LSFD_NLINK}"
+ echo 'stat reports:' "$(stat -c %h /)"
+ fi
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-mapped-packet-socket b/tests/ts/lsfd/mkfds-mapped-packet-socket
new file mode 100755
index 0000000..a1fb68f
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-mapped-packet-socket
@@ -0,0 +1,65 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="mmap'ed AF_PACKET socket"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_skip_nonroot
+ts_skip_docker
+
+. "$TS_SELF"/lsfd-functions.bash
+
+ts_check_test_command "$TS_CMD_LSFD"
+
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR=
+INTERFACE=lo
+SOCKTYPE=
+ERR=
+
+for SOCKTYPE in RAW DGRAM; do
+ coproc MKFDS { "$TS_HELPER_MKFDS" mapped-packet-socket $FD \
+ interface=${INTERFACE} socktype=${SOCKTYPE}; }
+ if read -u ${MKFDS[0]} PID; then
+ EXPR='(ASSOC == "shm") and (STTYPE == "SOCK") and (MODE == "-w-")'
+ ${TS_CMD_LSFD} -p "$PID" -n -o SOCK.PROTONAME -Q "${EXPR}"
+ echo 'SOCK.PROTONAME': $?
+
+ EXPR="(FD == $FD)"
+ ${TS_CMD_LSFD} -p "$PID" -n -o NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL -Q "${EXPR}"
+ echo 'NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL': $?
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+ ERR=$?
+ if [ $ERR != 0 ]; then
+ break
+ fi
+done > $TS_OUTPUT 2>&1
+
+if [[ "$ERR" == "$ENOPROTOOPT" ]]; then
+ ts_skip "packet socket doesn't support attaching a buffer on this platform"
+fi
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-netlink-groups b/tests/ts/lsfd/mkfds-netlink-groups
new file mode 100755
index 0000000..896b50c
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-netlink-groups
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+# Copyright (C) 2023 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="NETLINK sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_skip_nonroot
+
+. "$TS_SELF"/lsfd-functions.bash
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR='(TYPE == "NETLINK") and (FD == 3)'
+NETLINK_PROTOCOL=4
+NETLINK_LPORT=
+NETLINK_GROUPS=5
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" netlink $FD protocol=$NETLINK_PROTOCOL groups=$NETLINK_GROUPS; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,NETLINK.PROTOCOL,NETLINK.GROUPS \
+ -p "${PID}" -Q "${EXPR}" | sed -e "s/lport=${PID}/lport=/g"
+ echo 'ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,NETLINK.PROTOCOL,NETLINK.GROUPS': ${PIPESTATUS[0]}
+ NETLINK_LPORT=$(${TS_CMD_LSFD} --raw -n -o NETLINK.LPORT -p "${PID}" -Q "${EXPR}")
+ if [ "${NETLINK_LPORT}" == "${PID}" ]; then
+ echo 'LPORT: OK'
+ else
+ printf "LPORT: FAILED (PID: %d != NETLINK.LPORT: %d)\n" "${PID}" "${NETLINK_LPORT}"
+ fi
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+} > "$TS_OUTPUT" 2>&1
+
+if [[ $? == "$EPROTONOSUPPORT" ]]; then
+ ts_skip "It seems that this platform doesn't support making a netlink socket"
+fi
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-netlink-protocol b/tests/ts/lsfd/mkfds-netlink-protocol
new file mode 100755
index 0000000..c1a5ffc
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-netlink-protocol
@@ -0,0 +1,58 @@
+#!/bin/bash
+#
+# Copyright (C) 2023 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="NETLINK sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF"/lsfd-functions.bash
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR='(TYPE == "NETLINK") and (FD == 3)'
+NETLINK_PROTOCOL=4
+NETLINK_LPORT=
+NETLINK_GROUPS=5
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" netlink $FD protocol=$NETLINK_PROTOCOL; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,NETLINK.PROTOCOL,NETLINK.GROUPS \
+ -p "${PID}" -Q "${EXPR}" | sed -e "s/lport=${PID}/lport=/g"
+ echo 'ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,NETLINK.PROTOCOL': ${PIPESTATUS[0]}
+ NETLINK_LPORT=$(${TS_CMD_LSFD} --raw -n -o NETLINK.LPORT -p "${PID}" -Q "${EXPR}")
+ if [ "${NETLINK_LPORT}" == "${PID}" ]; then
+ echo 'LPORT: OK'
+ else
+ printf "LPORT: FAILED (PID: %d != NETLINK.LPORT: %d)\n" "${PID}" "${NETLINK_LPORT}"
+ fi
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+} > "$TS_OUTPUT" 2>&1
+
+if [[ $? == "$EPROTONOSUPPORT" ]]; then
+ ts_skip "It seems that this platform doesn't support making a netlink socket"
+fi
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-netns b/tests/ts/lsfd/mkfds-netns
new file mode 100755
index 0000000..cd110f6
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-netns
@@ -0,0 +1,72 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="netns associated with a fd"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_skip_nonroot
+ts_skip_docker
+
+. "$TS_SELF/lsfd-functions.bash"
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+NAME_FD=
+NAME_NS=
+INO_FD=
+INO_NS=
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" netns "$FD"; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ "${TS_CMD_LSFD}" -n -oNS.TYPE -p "${PID}" -Q "(FD == $FD)"
+ NAME_FD=$("${TS_CMD_LSFD}" -n -oNS.NAME -p "${PID}" -Q "(FD == $FD)")
+ NAME_NS=$("${TS_CMD_LSFD}" -n -oNS.NAME -p "${PID}" -Q '(ASSOC == "net")')
+ INO_FD=$( "${TS_CMD_LSFD}" -n -oINODE -p "${PID}" -Q "(FD == $FD)")
+ INO_NS=$( "${TS_CMD_LSFD}" -n -oINODE -p "${PID}" -Q '(ASSOC == "net")')
+
+ if [[ "$NAME_FD" = "$NAME_NS" ]]; then
+ echo "NAME_FD" == "NAME_NS": $?
+ else
+ echo "NAME_FD: $NAME_FD" == "NAME_NS: $NAME_NS": $?
+ fi
+
+ if [[ "$NAME_FD" = "net:[$INO_FD]" ]]; then
+ echo "NAME_FD" == "net:[INO_FD]": $?
+ else
+ echo "NAME_FD: $NAME_FD" == "net:[INO_FD: $INO_FD]": $?
+ fi
+
+ if [[ "$NAME_FD" = "net:[$INO_NS]" ]]; then
+ echo "NAME_FD" == "net:[INO_NS]": $?
+ else
+ echo "NAME_FD: $NAME_FD" == "net:[INO_NS: $INO_NS]": $?
+ fi
+
+ kill -CONT ${PID}
+ fi
+ wait "${MKFDS_PID}"
+} > "$TS_OUTPUT" 2>&1
+if [ "$?" == "$ENOSYS" ]; then
+ ts_skip "ioctl(fd, SIOCGSKNS) is not available"
+fi
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-pidfd b/tests/ts/lsfd/mkfds-pidfd
new file mode 100755
index 0000000..aad693f
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-pidfd
@@ -0,0 +1,51 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="pidfd"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/lsfd-functions.bash"
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_prog "ps"
+
+ts_cd "$TS_OUTDIR"
+
+[ "$(ps --no-headers -o comm 1)" = 'systemd' ] || ts_skip "pid 1 is not systemd"
+
+PID=
+FD=3
+TARGET=1
+EXPR="(PID != ${TARGET}) and (FD == 3) and (PIDFD.PID == ${TARGET})"
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" pidfd $FD target-pid=${TARGET} ; }
+ if read -u ${MKFDS[0]} PID; then
+ ${TS_CMD_LSFD} -n -o ASSOC,STTYPE,SOURCE,NAME,PIDFD.COMM,PIDFD.PID -p "${PID}" -p ${TARGET} -Q "${EXPR}"
+ echo 'ASSOC,STTYPE,SOURCE,NAME,PIDFD.COMM,PIDFD.PID': $?
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+} > $TS_OUTPUT 2>&1
+if [ "$?" == "$ENOSYS" ]; then
+ ts_skip "pidfd_open(2) is not available"
+fi
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-ping b/tests/ts/lsfd/mkfds-ping
new file mode 100755
index 0000000..c2ca049
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-ping
@@ -0,0 +1,142 @@
+#!/bin/bash
+#
+# Copyright (C) 2023 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="PING and PINGv6 sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_skip_nonroot
+
+. "$TS_SELF"/lsfd-functions.bash
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_prog "id"
+
+ts_check_native_byteorder
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR=(
+ '(TYPE == "PING") and (FD == 3)'
+ '(TYPE == "PINGv6") and (FD == 3)'
+)
+FACTORY=(
+ ping
+ ping6
+)
+TYPE=(
+ 'PING'
+ 'PINGv6'
+)
+COLNS=(
+ INET
+ INET6
+)
+ID=9999
+
+range_check()
+{
+ local v=$1
+ local min=$2
+ local max=$3
+
+ [[ $min -le $v && $v -le $max ]]
+ return $?
+}
+
+ping_group_range_check()
+{
+ local g
+ local group_min group_max
+
+ if ! read group_min group_max < /proc/sys/net/ipv4/ping_group_range; then
+ # We can say nothing. Just allow to go ahead.
+ return 0
+ fi
+
+ if [[ -z "$group_min" || -z "$group_max" ]]; then
+ # We can say nothing. Just allow to go ahead.
+ return 0
+ fi
+
+ for g in $(id -G); do
+ if range_check "$g" "$group_min" "$group_max"; then
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+ERRMSG=
+for i in 0 1; do
+ ERRMSG=$("$TS_HELPER_MKFDS" -c -q "${FACTORY[$i]}" 3 id=$ID 2>&1)
+ ERR="$?"
+ if [[ "$ERR" == "$EACCESS" ]]; then
+ case "$ERRMSG" in
+ *bind*)
+ MSG="making ${TYPE[$i]} socket with specifying id is not allowed (blocked by SELinux?)"
+ ;;
+ *socket*)
+ if ! ping_group_range_check; then
+ MSG="the group(s) ($(id -G)) of the process is not in the expected range"
+ MSG+=" [$(cat /proc/sys/net/ipv4/ping_group_range)])"
+ else
+ MSG="$ERRMSG"
+ fi
+ ;;
+ *)
+ MSG="$ERRMSG"
+ ;;
+ esac
+ ts_skip "${MSG}"
+ elif [[ "$ERR" != 0 ]]; then
+ ts_skip "making ${TYPE[$i]} socket is failed ($ERR: $ERRMSG)"
+ fi
+done
+
+for i in 0 1; do
+ ts_init_subtest "${FACTORY[$i]}"
+ {
+ coproc MKFDS { "$TS_HELPER_MKFDS" "${FACTORY[$i]}" $FD id=$ID; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,${COLNS[$i]}.LADDR,${COLNS[$i]}.RADDR,PING.ID \
+ -p "${PID}" -Q "${EXPR[$i]}"
+ echo "ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,${COLNS[$i]}.LADDR,${COLNS[$i]}.RADDR,PING.ID": $?
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" "${FACTORY[$i]}" $FD id=$ID connect=0; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,${COLNS[$i]}.LADDR,${COLNS[$i]}.RADDR,PING.ID \
+ -p "${PID}" -Q "${EXPR[$i]}"
+ echo "ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,${COLNS[$i]}.LADDR,${COLNS[$i]}.RADDR,PING.ID": $?
+ kill -CONT "${PID}"
+ fi
+ } > "$TS_OUTPUT" 2>&1
+ wait "${MKFDS_PID}"
+ ts_finalize_subtest
+done
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-pipe-no-fork b/tests/ts/lsfd/mkfds-pipe-no-fork
new file mode 100755
index 0000000..e28aa9d
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-pipe-no-fork
@@ -0,0 +1,124 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="pipe, no fork"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_check_prog "stat"
+ts_check_prog "readlink"
+
+ts_cd "$TS_OUTDIR"
+
+pipe_name()
+{
+ readlink /proc/$1/fd/$2
+}
+
+pipe_inode()
+{
+ stat -L -c %i /proc/$1/fd/$2
+}
+
+PID=
+FD0=3
+FD1=4
+EXPR=
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" pipe-no-fork $FD0 $FD1 nonblock=-w rdup=$((FD0 + 2)) wdup=$((FD1 + 2)); }
+ if read -u ${MKFDS[0]} PID; then
+ EXPR='(PID == '"${PID}"') and ((FD == '"$FD0"') or (FD =='"$FD1"'))'
+ ${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,SOURCE,FLAGS -Q "${EXPR}"
+ echo 'ASSOC,MODE,TYPE,SOURCE,FLAGS': $?
+
+ LSFD_PIDS=$(${TS_CMD_LSFD} --raw -n -o PID -Q "${EXPR}")
+ echo 'PID[RUN]:' $?
+ [ "${LSFD_PIDS}" == "$(printf '%d\n%d' ${PID} ${PID})" ]
+ echo 'PID[STR]:' $?
+
+ LSFD_NAMES=$(${TS_CMD_LSFD} --raw -n -o NAME -Q "${EXPR}")
+ echo 'NAMES[RUN]:' $?
+ [ "${LSFD_NAMES}" == "$(printf '%s\n%s' $(pipe_name $PID $FD0) $(pipe_name $PID $FD1))" ]
+ echo 'NAMES[STR]:' $?
+
+ LSFD_INODES=$(${TS_CMD_LSFD} --raw -n -o INODE -Q "${EXPR}")
+ echo 'INODES[RUN]:' $?
+ [ "${LSFD_INODES}" == "$(printf '%d\n%d' $(pipe_inode $PID $FD0) $(pipe_inode $PID $FD1))" ]
+ echo 'INODES[STR]:' $?
+
+ LSFD_ENDPOINTS=$(${TS_CMD_LSFD} --raw -n -o ASSOC,ENDPOINTS -Q "${EXPR}")
+ echo 'ENDPOINTS[RUN]:' $?
+ mkfds=${TS_HELPER_MKFDS##*/}
+
+ line0=$(printf '%d ' $FD0)
+ line0+=$(printf '%d,%s,%d%c%c' $PID $mkfds $FD1 - w)
+ line0+='\x0a'
+ line0+=$(printf '%d,%s,%d%c%c' $PID $mkfds $((FD0 + 2)) r -)
+ line0+='\x0a'
+ line0+=$(printf '%d,%s,%d%c%c' $PID $mkfds $((FD1 + 2)) - w)
+
+ line1=$(printf '%d ' $FD1)
+ line1+=$(printf '%d,%s,%d%c%c' $PID $mkfds $FD0 r -)
+ line1+='\x0a'
+ line1+=$(printf '%d,%s,%d%c%c' $PID $mkfds $((FD0 + 2)) r -)
+ line1+='\x0a'
+ line1+=$(printf '%d,%s,%d%c%c' $PID $mkfds $((FD1 + 2)) - w)
+
+ expected=$(printf '%s\n%s' "${line0}" "${line1}")
+ if [ "${LSFD_ENDPOINTS}" == "${expected}" ]; then
+ echo 'ENDPOINTS[STR]:' $?
+ else
+ echo "lsfd output:"
+ echo "${LSFD_ENDPOINTS}"
+ echo "expectation:"
+ echo "${expected}"
+ fi
+
+ EXPR='(PID == '"${PID}"') and (FD == '"$FD0"')'
+ LSFD_ENDPOINTS_JSON=$(${TS_CMD_LSFD} -J --raw -n -o ASSOC,ENDPOINTS -Q "${EXPR}")
+ echo 'ASSOC,ENDPOINTS (JSON)': $?
+ EXPECTED_LSFD_ENDPOINTS_JSON=$(cat<<EOF
+{
+ "lsfd": [
+ {
+ "assoc": "$FD0",
+ "endpoints": [
+ "$PID,test_mkfds,${FD1}-w", "$PID,test_mkfds,$((FD0 + 2))r-", "$PID,test_mkfds,$((FD1 + 2))-w"
+ ]
+ }
+ ]
+}
+EOF
+ )
+ if [[ "$EXPECTED_LSFD_ENDPOINTS_JSON" == "${LSFD_ENDPOINTS_JSON}" ]]; then
+ echo EXPECTED_LSFD_ENDPOINTS_JSON == LSFD_ENDPOINTS_JSON
+ else
+ echo LSFD_ENDPOINTS_JSON: "${LSFD_ENDPOINTS_JSON}"
+ echo EXPECTED_LSFD_ENDPOINTS_JSON: "${EXPECTED_LSFD_ENDPOINTS_JSON}"
+ fi
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-raw b/tests/ts/lsfd/mkfds-raw
new file mode 100755
index 0000000..0260ba1
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-raw
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# Copyright (C) 2023 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="RAW sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_skip_nonroot
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_native_byteorder
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR='(TYPE == "RAW") and (FD == 3)'
+PROTOCOL=5
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" raw $FD protocol=$PROTOCOL; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET.LADDR,INET.RADDR,RAW.PROTOCOL \
+ -p "${PID}" -Q "${EXPR}"
+ echo 'ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET.LADDR,INET.RADDR,RAW.PROTOCOL': $?
+ kill -CONT "${PID}"
+ fi
+
+ wait "${MKFDS_PID}"
+} > "$TS_OUTPUT" 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-raw6 b/tests/ts/lsfd/mkfds-raw6
new file mode 100755
index 0000000..0b82fff
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-raw6
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Copyright (C) 2023 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="RAW6 sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_skip_nonroot
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_native_byteorder
+ts_skip_docker
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR='(TYPE == "RAWv6") and (FD == 3)'
+PROTOCOL=5
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" raw6 $FD protocol=$PROTOCOL; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET6.LADDR,INET6.RADDR,RAW.PROTOCOL \
+ -p "${PID}" -Q "${EXPR}"
+ echo 'ASSOC,TYPE,NAME,SOCK.STATE,SOCK.TYPE,INET6.LADDR,INET6.RADDR,RAW.PROTOCOL': $?
+ kill -CONT "${PID}"
+ fi
+
+ wait "${MKFDS_PID}"
+} > "$TS_OUTPUT" 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-ro-block-device b/tests/ts/lsfd/mkfds-ro-block-device
new file mode 100755
index 0000000..ad5a492
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-ro-block-device
@@ -0,0 +1,80 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="block device with O_RDONLY"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_skip_nonroot
+ts_skip_docker
+
+# losetup cannot find an unused loop device.
+ts_skip_qemu_user
+
+. "$TS_SELF"/lsfd-functions.bash
+
+ts_check_test_command "$TS_CMD_LSFD"
+
+ts_check_test_command "$TS_CMD_LOSETUP"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+ts_device_init
+LSFD_LOOP_BDEV=$TS_LODEV
+LSFD_LOOP_BDEV_BASENAME=${LSFD_LOOP_BDEV##*/}
+LSFD_LOOP_BDEV_NUM=${LSFD_LOOP_BDEV_BASENAME#loop}
+
+PID=
+FD=3
+EXPR=
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" ro-block-device $FD blkdev=${LSFD_LOOP_BDEV}; }
+ if read -u ${MKFDS[0]} PID; then
+ EXPR='(PID == '"${PID}"') and (FD == '"$FD"')'
+ ${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,POS,BLKDRV,DEVTYPE -Q "${EXPR}"
+ echo 'ASSOC,MODE,TYPE,,POS,,BLKDRV,DEVTYPE': $?
+
+ LSFD_NAME=$(${TS_CMD_LSFD} --raw -n -o NAME -Q "${EXPR}")
+ echo 'NAME[RUN]:' $?
+ [ "${LSFD_NAME}" == "${LSFD_LOOP_BDEV}" ]
+ echo 'NAME[STR]:' $?
+
+ LSFD_SOURCE=$(${TS_CMD_LSFD} --raw -n -o SOURCE -Q "${EXPR}")
+ echo 'SOURCE[RUN]:' $?
+ [ "${LSFD_SOURCE}" == "${LSFD_LOOP_BDEV_BASENAME}" ]
+ echo 'SOURCE[STR]:' $?
+
+ LSFD_MAJ_MIN=$(${TS_CMD_LSFD} --raw -n -o MAJ:MIN -Q "${EXPR}")
+ echo 'MAJ_MIN[RUN]:' $?
+ [ "${LSFD_MAJ_MIN}" == 7:"${LSFD_LOOP_BDEV_NUM}" ]
+ echo 'MAJ_MIN[STR]:' $?
+
+ LSFD_RDEV=$(${TS_CMD_LSFD} --raw -n -o RDEV -Q "${EXPR}")
+ echo 'RDEV[RUN]:' $?
+ [ "${LSFD_RDEV}" == 7:"${LSFD_LOOP_BDEV_NUM}" ]
+ echo 'RDEV[STR]:' $?
+
+ lsfd_compare_dev "${TS_CMD_LSFD}" "${LSFD_LOOP_BDEV}" "${EXPR}"
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-ro-regular-file b/tests/ts/lsfd/mkfds-ro-regular-file
new file mode 100755
index 0000000..a2c4c26
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-ro-regular-file
@@ -0,0 +1,78 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="read-only regular file"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF"/lsfd-functions.bash
+
+ts_check_test_command "$TS_CMD_LSFD"
+
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_check_prog "stat"
+ts_check_prog "id"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR=
+
+{
+ target=/etc/passwd
+ coproc MKFDS { "$TS_HELPER_MKFDS" --comm ABC ro-regular-file $FD offset=1 file=$target; }
+ if read -u ${MKFDS[0]} PID; then
+ EXPR='(PID == '"${PID}"') and (FD == '"$FD"')'
+ ${TS_CMD_LSFD} -n -o COMMAND,ASSOC,MODE,TYPE,NAME,POS -Q "${EXPR}"
+ echo 'COMMAND,ASSOC,MODE,TYPE,NAME,POS': $?
+
+ LSFD_PID=$(${TS_CMD_LSFD} --raw -n -o PID -Q "${EXPR}")
+ echo 'PID[RUN]:' $?
+ [ "${LSFD_PID}" == "${PID}" ]
+ echo 'PID[STR]:' $?
+
+ LSFD_INODE=$(${TS_CMD_LSFD} --raw -n -o INODE -Q "${EXPR}")
+ echo 'INODE[RUN]:' $?
+ [ "${LSFD_INODE}" == "$(stat -c %i $target)" ]
+ echo 'INODE[STR]:' $?
+
+ LSFD_UID=$(${TS_CMD_LSFD} --raw -n -o UID -Q "${EXPR}")
+ echo 'UID[RUN]:' $?
+ [ "${LSFD_UID}" == $(id -u) ]
+ echo 'UID[STR]:' $?
+
+ LSFD_USER=$(${TS_CMD_LSFD} --raw -n -o USER -Q "${EXPR}")
+ echo 'USER[RUN]:' $?
+ [ "${LSFD_USER}" == $(id -u -n) ]
+ echo 'USER[STR]:' $?
+
+ LSFD_SIZE=$(${TS_CMD_LSFD} --raw -n -o SIZE -Q "${EXPR}")
+ echo 'SIZE[RUN]:' $?
+ [ "${LSFD_SIZE}" == $(stat -c %s $target) ]
+ echo 'SIZE[STR]:' $?
+
+ lsfd_compare_dev "${TS_CMD_LSFD}" $target "${EXPR}"
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-rw-character-device b/tests/ts/lsfd/mkfds-rw-character-device
new file mode 100755
index 0000000..85dd29c
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-rw-character-device
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="character device with O_RDWR"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF"/lsfd-functions.bash
+
+ts_check_test_command "$TS_CMD_LSFD"
+
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR=
+
+{
+ target=/dev/zero
+ coproc MKFDS { "$TS_HELPER_MKFDS" rw-character-device $FD chrdev=$target; }
+ if read -u ${MKFDS[0]} PID; then
+ EXPR='(PID == '"${PID}"') and (FD == '"$FD"')'
+ ${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,NAME,SOURCE,POS,MAJ:MIN,CHRDRV,DEVTYPE,RDEV -Q "${EXPR}"
+ echo 'ASSOC,MODE,TYPE,NAME,SOURCE,POS,MAJ:MIN,CHRDRV,DEVTYPE,RDEV': $?
+
+ lsfd_compare_dev "${TS_CMD_LSFD}" $target "${EXPR}"
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-socketpair b/tests/ts/lsfd/mkfds-socketpair
new file mode 100755
index 0000000..3ffd088
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-socketpair
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="AF_UNIX socket pair created with socketpair(2)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSFD"
+
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_check_prog "sed"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD0=3
+FD1=4
+EXPR=
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" socketpair $FD0 $FD1 socktype=DGRAM; }
+ if read -u ${MKFDS[0]} PID; then
+ EXPR='(PID == '"${PID}"') and ((FD == '"$FD0"') or (FD == '"$FD1"'))'
+ ${TS_CMD_LSFD} -n -o ASSOC,MODE,STTYPE,SOURCE,SOCK.PROTONAME -Q "${EXPR}" | sed -e 's/UNIX-DGRAM/UNIX/'
+ echo 'ASSOC,MODE,STTYPE,SOURCE,SOCK.PROTONAME': ${PIPESTATUS[0]}
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-symlink b/tests/ts/lsfd/mkfds-symlink
new file mode 100755
index 0000000..4825645
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-symlink
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="symbolic link itself opened with O_PATH"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSFD"
+
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FD=3
+EXPR=
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" symlink $FD path=/dev/stdin; }
+ if read -u ${MKFDS[0]} PID; then
+ EXPR='(PID == '"${PID}"') and (FD == '"$FD"')'
+ ${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,NAME,FLAGS -Q "${EXPR}"
+ echo 'ASSOC,MODE,TYPE,NAME,FLAGS': $?
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-tcp b/tests/ts/lsfd/mkfds-tcp
new file mode 100755
index 0000000..e531a7b
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-tcp
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="TCP sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_native_byteorder
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FDS=3
+FDC=4
+FDA=5
+EXPR='(TYPE == "TCP") and (FD >= 3) and (FD <= 5)'
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" tcp $FDS $FDC $FDA \
+ server-port=34567 \
+ client-port=23456 ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,TCP.LADDR,TCP.LPORT,TCP.RADDR,TCP.RPORT \
+ -p "${PID}" -Q "${EXPR}"
+ echo 'ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,TCP.LADDR,TCP.LPORT,TCP.RADDR,TCP.RPORT': $?
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+} > "$TS_OUTPUT" 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-tcp6 b/tests/ts/lsfd/mkfds-tcp6
new file mode 100755
index 0000000..7368bfa
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-tcp6
@@ -0,0 +1,51 @@
+#!/bin/bash
+#
+# Copyright (C) 2023 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="TCP6 sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_native_byteorder
+ts_skip_docker
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FDS=3
+FDC=4
+FDA=5
+EXPR='(TYPE == "TCPv6") and (FD >= 3) and (FD <= 5)'
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" tcp6 $FDS $FDC $FDA \
+ server-port=34567 \
+ client-port=23456 ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,TCP.LADDR,TCP.LPORT,TCP.RADDR,TCP.RPORT \
+ -p "${PID}" -Q "${EXPR}"
+ echo 'ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,TCP.LADDR,TCP.LPORT,TCP.RADDR,TCP.RPORT': $?
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+} > "$TS_OUTPUT" 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-udp b/tests/ts/lsfd/mkfds-udp
new file mode 100755
index 0000000..e6e1f1c
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-udp
@@ -0,0 +1,138 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="UDP and UDP-Lite sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_native_byteorder
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FDS=3
+FDC=4
+EXPR=(
+ '(TYPE == "UDP") and (FD >= 3) and (FD <= 4)'
+ '(TYPE == "UDP-Lite") and (FD >= 3) and (FD <= 4)'
+)
+EXPR_server=(
+ '(TYPE == "UDP") and (FD == 3)'
+ '(TYPE == "UDP-Lite") and (FD == 3)'
+)
+EXPR_client=(
+ '(TYPE == "UDP") and (FD == 4)'
+ '(TYPE == "UDP-Lite") and (FD == 4)'
+)
+COLNS=(
+ 'UDP'
+ 'UDPLite'
+)
+NAME=
+LADDR=
+LPORT=
+
+for lite in 0 1; do
+ coproc MKFDS { "$TS_HELPER_MKFDS" udp $FDS $FDC \
+ server-port=34567 \
+ client-port=23456 \
+ lite=$lite; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT \
+ -p "${PID}" -Q "${EXPR[$lite]}"
+ echo "ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT": $?
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" udp $FDS $FDC \
+ server-port=34567 \
+ client-port=23456 \
+ server-do-bind=no \
+ lite=$lite; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT \
+ -p "${PID}" -Q "${EXPR_server[$lite]}"
+ echo "ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT": $?
+
+ NAME=$(${TS_CMD_LSFD} -n \
+ --raw \
+ -o NAME \
+ -p "${PID}" -Q "${EXPR_server[$lite]}")
+ if [[ "$NAME" =~ ^socket:\[[[:digit:]]+\]$ ]]; then
+ echo "NAME pattern match: OK"
+ else
+ echo "NAME pattern match: FAILED (NAME=$NAME)"
+ fi
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" udp $FDS $FDC \
+ server-port=34567 \
+ client-port=23456 \
+ client-do-bind=no \
+ lite=$lite; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT \
+ -p "${PID}" -Q "${EXPR_client[$lite]}"
+ echo "ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT": $?
+
+ LADDR=$(${TS_CMD_LSFD} -n \
+ --raw \
+ -o ${COLNS[$lite]}.LADDR \
+ -p "${PID}" -Q "${EXPR_client[$lite]}")
+ LPORT=$(${TS_CMD_LSFD} -n \
+ --raw \
+ -o ${COLNS[$lite]}.LPORT \
+ -p "${PID}" -Q "${EXPR_client[$lite]}")
+
+ if [[ 127.0.0.1:$LPORT == ${LADDR} ]]; then
+ echo "LADDR/LPORT pattern match: OK"
+ else
+ echo "LADDR/LPORT pattern match: FAILED (LADDR=$LADDR, LPORT=$LPORT)"
+ fi
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" udp $FDS $FDC \
+ server-port=34567 \
+ client-port=23456 \
+ client-do-connect=no \
+ lite=$lite; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT \
+ -p "${PID}" -Q "${EXPR[$lite]}"
+ echo 'ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET.LADDR,INET.RADDR,UDP.LADDR,UDP.LPORT,UDP.RADDR,UDP.RPORT': $?
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+done > "$TS_OUTPUT" 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-udp6 b/tests/ts/lsfd/mkfds-udp6
new file mode 100755
index 0000000..75381ba
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-udp6
@@ -0,0 +1,139 @@
+#!/bin/bash
+#
+# Copyright (C) 2023 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="UDP6 and UDPLITEv6 sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_native_byteorder
+ts_skip_docker
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FDS=3
+FDC=4
+EXPR=(
+ '(TYPE == "UDPv6") and (FD >= 3) and (FD <= 4)'
+ '(TYPE == "UDPLITEv6") and (FD >= 3) and (FD <= 4)'
+)
+EXPR_server=(
+ '(TYPE == "UDPv6") and (FD == 3)'
+ '(TYPE == "UDPLITEv6") and (FD == 3)'
+)
+EXPR_client=(
+ '(TYPE == "UDPv6") and (FD == 4)'
+ '(TYPE == "UDPLITEv6") and (FD == 4)'
+)
+COLNS=(
+ 'UDP'
+ 'UDPLite'
+ )
+NAME=
+LADDR=
+LPORT=
+
+for lite in 0 1; do
+ coproc MKFDS { "$TS_HELPER_MKFDS" udp6 $FDS $FDC \
+ server-port=34567 \
+ client-port=23456 \
+ lite=$lite; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT \
+ -p "${PID}" -Q "${EXPR[$lite]}"
+ echo "ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT": $?
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" udp6 $FDS $FDC \
+ server-port=34567 \
+ client-port=23456 \
+ server-do-bind=no \
+ lite=$lite; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT \
+ -p "${PID}" -Q "${EXPR_server[$lite]}"
+ echo "ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT": $?
+
+ NAME=$(${TS_CMD_LSFD} -n \
+ --raw \
+ -o NAME \
+ -p "${PID}" -Q "${EXPR_server[$lite]}")
+ if [[ "$NAME" =~ ^socket:\[[[:digit:]]+\]$ ]]; then
+ echo "NAME pattern match: OK"
+ else
+ echo "NAME pattern match: FAILED (NAME=$NAME)"
+ fi
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" udp6 $FDS $FDC \
+ server-port=34567 \
+ client-port=23456 \
+ client-do-bind=no \
+ lite=$lite; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT \
+ -p "${PID}" -Q "${EXPR_client[$lite]}"
+ echo "ASSOC,TYPE,STTYPE,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT": $?
+
+ LADDR=$(${TS_CMD_LSFD} -n \
+ --raw \
+ -o ${COLNS[$lite]}.LADDR \
+ -p "${PID}" -Q "${EXPR_client[$lite]}")
+ LPORT=$(${TS_CMD_LSFD} -n \
+ --raw \
+ -o ${COLNS[$lite]}.LPORT \
+ -p "${PID}" -Q "${EXPR_client[$lite]}")
+
+ if [[ '[::1]':$LPORT == "${LADDR}" ]]; then
+ echo "LADDR/LPORT pattern match: OK"
+ else
+ echo "LADDR/LPORT pattern match: FAILED (LADDR=$LADDR, LPORT=$LPORT)"
+ fi
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" udp6 $FDS $FDC \
+ server-port=34567 \
+ client-port=23456 \
+ client-do-connect=no \
+ lite=$lite; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT \
+ -p "${PID}" -Q "${EXPR[$lite]}"
+ echo "ASSOC,TYPE,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,INET6.LADDR,INET6.RADDR,${COLNS[$lite]}.LADDR,${COLNS[$lite]}.LPORT,${COLNS[$lite]}.RADDR,${COLNS[$lite]}.RPORT": $?
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+done > "$TS_OUTPUT" 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-unix-dgram b/tests/ts/lsfd/mkfds-unix-dgram
new file mode 100755
index 0000000..c8b40eb
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-unix-dgram
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="UNIX dgram sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/lsfd-functions.bash"
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FDS=3
+FDC=4
+EXPR='(TYPE == "UNIX") and ((FD == 3) or (FD == 4))'
+
+make_state_connected()
+{
+ # The first one is for rewriting NAME column.
+ # The second one is for rewriting STATE column.
+ lsfd_make_state_connected | sed -e 's/unconnected/ connected/'
+}
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" unix-dgram $FDS $FDC \
+ path=test_mkfds-unix-dgram ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \
+ -p "${PID}" -Q "${EXPR}" | make_state_connected
+ echo 'ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': ${PIPESTATUS[0]}
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" unix-dgram $FDS $FDC \
+ path=test_mkfds-unix-dgram \
+ abstract=true ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \
+ -p "${PID}" -Q "${EXPR}" | make_state_connected
+ echo 'ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': $?
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+} > "$TS_OUTPUT" 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-unix-in-netns b/tests/ts/lsfd/mkfds-unix-in-netns
new file mode 100755
index 0000000..cfca087
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-unix-in-netns
@@ -0,0 +1,109 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="UNIX sockets made in a differenct net namespace"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_skip_nonroot
+
+. "$TS_SELF/lsfd-functions.bash"
+
+ts_check_test_command "$TS_CMD_LSFD"
+
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FDSELFNS=3
+FDALTNS=4
+FDSOCK=5
+
+EXPR='((TYPE == "UNIX") or (TYPE == "UNIX-STREAM")) and (FD == 5)'
+
+compare_net_namespaces()
+{
+ local type=$1
+ local pid=$2
+ local altns_inode
+ local sock_netns
+
+ altns_inode=$(${TS_CMD_LSFD} -n -o INODE -p "${pid}" -Q '(FD == 4)')
+ sock_netns=$(${TS_CMD_LSFD} -n -o SOCK.NETNS -p "${pid}" -Q '(FD == 5)')
+
+ if [[ "${altns_inode}" == "${sock_netns}" ]]; then
+ echo "the netns for the $type socket is extracted as expectedly"
+ else
+ echo "the netns for the $type socket is not extracted well"
+ echo "altns_inode=${altns_inode}"
+ echo "sock_netns=${sock_netns}"
+ fi
+}
+
+strip_type_stream()
+{
+ if [ "$1" = stream ]; then
+ lsfd_strip_type_stream
+ else
+ cat
+ fi
+}
+
+for t in stream dgram seqpacket; do
+ ts_init_subtest "$t"
+ {
+ coproc MKFDS { "$TS_HELPER_MKFDS" unix-in-netns $FDSELFNS $FDALTNS $FDSOCK \
+ path=test_mkfds-unix-$t-ns \
+ type=$t ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \
+ -p "${PID}" -Q "${EXPR}" | strip_type_stream $t
+ echo 'ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': ${PIPESTATUS[0]}
+
+ compare_net_namespaces "$t" "${PID}"
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" unix-in-netns $FDSELFNS $FDALTNS $FDSOCK \
+ path=test_mkfds-unix-$t-ns \
+ abstract=true \
+ type=$t ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \
+ -p "${PID}" -Q "${EXPR}" | strip_type_stream $t
+ echo 'ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': ${PIPESTATUS[0]}
+
+ compare_net_namespaces "abstract $t" "${PID}"
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+ } > "$TS_OUTPUT" 2>&1
+ if [ "$?" == "$EPERM" ]; then
+ ts_skip_subtest "unshare(2) is not permitted on this platform"
+ continue
+ fi
+ ts_finalize_subtest
+done
+
+
+ts_finalize
diff --git a/tests/ts/lsfd/mkfds-unix-stream b/tests/ts/lsfd/mkfds-unix-stream
new file mode 100755
index 0000000..fe08e72
--- /dev/null
+++ b/tests/ts/lsfd/mkfds-unix-stream
@@ -0,0 +1,98 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="UNIX stream sockets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/lsfd-functions.bash"
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+PID=
+FDS=3
+FDC=4
+FDA=5
+EXPR='(((TYPE == "UNIX-STREAM") or (TYPE == "UNIX")) and (FD >= 3) and (FD <= 5))'
+
+{
+ for t in stream seqpacket; do
+ # TYPE is not tested here; AF_UNIX+SOCK_STREAM socket type was changed from "UNIX"
+ # to "UNIX-STREAM" at a time in Linux kernel development history.
+ coproc MKFDS { "$TS_HELPER_MKFDS" unix-stream $FDS $FDC $FDA \
+ path=test_mkfds-unix-${t} \
+ type=$t ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \
+ -p "${PID}" -Q "${EXPR}" | lsfd_strip_type_stream
+ echo 'ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': ${PIPESTATUS[0]}
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" unix-stream $FDS $FDC $FDA \
+ path=test_mkfds-unix-${t}-abs \
+ abstract=true ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \
+ -p "${PID}" -Q "${EXPR}" | lsfd_strip_type_stream
+ echo '(abs) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': ${PIPESTATUS[0]}
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" unix-stream $FDS $FDC $FDA \
+ path=test_mkfds-unix-${t}-shutdown \
+ server-shutdown=3 \
+ client-shutdown=3 \
+ type=$t ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \
+ -p "${PID}" -Q "${EXPR}" | lsfd_strip_type_stream
+ echo '(shutdown) ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': ${PIPESTATUS[0]}
+ # Surprisingly, the socket status doesn't change at all.
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ coproc MKFDS { "$TS_HELPER_MKFDS" unix-stream $FDS $FDC $FDA \
+ path="test_mkfds-unix with spaces ${t}" \
+ type=$t ; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ ${TS_CMD_LSFD} -n \
+ -o ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH \
+ -p "${PID}" -Q "${EXPR}" | lsfd_strip_type_stream
+ echo 'ASSOC,STTYPE,NAME,SOCK.STATE,SOCK.TYPE,SOCK.LISTENING,UNIX.PATH': ${PIPESTATUS[0]}
+
+ kill -CONT "${PID}"
+ fi
+ wait "${MKFDS_PID}"
+
+ done
+} > "$TS_OUTPUT" 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/option-filter-broken-exp b/tests/ts/lsfd/option-filter-broken-exp
new file mode 100755
index 0000000..bedf439
--- /dev/null
+++ b/tests/ts/lsfd/option-filter-broken-exp
@@ -0,0 +1,36 @@
+#!/bin/bash
+#
+# Copyright (C) 2022 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="passing broken expressions to -Q option"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSFD"
+
+ts_cd "$TS_OUTDIR"
+
+{
+ $TS_CMD_LSFD -Q ''
+ $TS_CMD_LSFD -Q '('
+ $TS_CMD_LSFD -Q ')'
+ $TS_CMD_LSFD -Q '(FD == 1)garbage'
+ $TS_CMD_LSFD -Q 'FD'
+ $TS_CMD_LSFD -Q 'NOSUCHCOLUMN'
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/option-inet b/tests/ts/lsfd/option-inet
new file mode 100755
index 0000000..011a9b3
--- /dev/null
+++ b/tests/ts/lsfd/option-inet
@@ -0,0 +1,98 @@
+#!/bin/bash
+#
+# Copyright (C) 2023 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="--inet option"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_skip_qemu_user
+ts_skip_docker
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+
+ts_cd "$TS_OUTDIR"
+
+{
+ "$TS_HELPER_MKFDS" -q tcp 3 4 5 server-port=34567 client-port=23456 &
+ PID0=$!
+
+ "$TS_HELPER_MKFDS" -q tcp6 3 4 5 server-port=34567 client-port=23456 &
+ PID1=$!
+
+ "$TS_HELPER_MKFDS" -q ro-regular-file 3 file=/etc/passwd &
+ PID2=$!
+
+ "$TS_HELPER_MKFDS" -q udp 3 4 server-port=34567 client-port=23456 server-do-bind=1 client-do-bind=1 client-do-connect=1&
+ PID3=$!
+
+ "$TS_HELPER_MKFDS" -q udp6 3 4 lite=1 server-port=34567 client-port=23456 server-do-bind=1 client-do-bind=1 client-do-connect=1&
+ PID4=$!
+
+ OPT='--inet'
+ echo "# $OPT"
+ ${TS_CMD_LSFD} -n \
+ $OPT \
+ -o ASSOC,TYPE,NAME \
+ -Q "(PID == $PID0) or (PID == $PID1) or (PID == $PID2) or (PID == $PID3) or (PID == $PID4)"
+
+ OPT='--inet=4'
+ echo "# $OPT"
+ ${TS_CMD_LSFD} -n \
+ $OPT \
+ -o ASSOC,TYPE,NAME \
+ -Q "(PID == $PID0) or (PID == $PID1) or (PID == $PID2) or (PID == $PID3) or (PID == $PID4)"
+
+ OPT='--inet=6'
+ echo "# $OPT"
+ ${TS_CMD_LSFD} -n \
+ $OPT \
+ -o ASSOC,TYPE,NAME \
+ -Q "(PID == $PID0) or (PID == $PID1) or (PID == $PID2) or (PID == $PID3) or (PID == $PID4)"
+
+ OPT='-i'
+ echo "# $OPT"
+ ${TS_CMD_LSFD} -n \
+ $OPT \
+ -o ASSOC,TYPE,NAME \
+ -Q "(PID == $PID0) or (PID == $PID1) or (PID == $PID2) or (PID == $PID3) or (PID == $PID4)"
+
+ OPT='-i4'
+ echo "# $OPT"
+ ${TS_CMD_LSFD} -n \
+ $OPT \
+ -o ASSOC,TYPE,NAME \
+ -Q "(PID == $PID0) or (PID == $PID1) or (PID == $PID2) or (PID == $PID3) or (PID == $PID4)"
+
+ OPT='-i6'
+ echo "# $OPT"
+ ${TS_CMD_LSFD} -n \
+ $OPT \
+ -o ASSOC,TYPE,NAME \
+ -Q "(PID == $PID0) or (PID == $PID1) or (PID == $PID2) or (PID == $PID3) or (PID == $PID4)"
+
+ kill -CONT "${PID0}"
+ wait "${PID0}"
+
+ kill -CONT "${PID1}"
+ wait "${PID1}"
+
+ kill -CONT "${PID2}"
+ wait "${PID2}"
+} > "$TS_OUTPUT" 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/option-pid b/tests/ts/lsfd/option-pid
new file mode 100755
index 0000000..0ea4353
--- /dev/null
+++ b/tests/ts/lsfd/option-pid
@@ -0,0 +1,80 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="--pid option"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+ts_skip_nonroot
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_prog "ps"
+
+ts_cd "$TS_OUTDIR"
+
+[ "$(ps --no-headers -o comm 1)" = 'systemd' ] || ts_skip "pid 1 is not systemd"
+
+PID=
+FD=3
+EXPR=
+QOUT=
+POUT=
+
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" ro-regular-file $FD file=/etc/group; }
+ if read -u ${MKFDS[0]} PID; then
+ EXPR='((PID == '"${PID}"') or (PID == 1)) and (FD == '"$FD"')'
+ QOUT=$(${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "${EXPR}")
+ echo "QOUT:" $?
+
+ POUT=$(${TS_CMD_LSFD} --pid="1 $PID" -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "(FD == $FD)")
+ echo "POUT[--pid=1 PID]:" $?
+ [ "${QOUT}" = "${POUT}" ]
+ echo "EQ[--pid=1 PID]:" $?
+
+ POUT=$(${TS_CMD_LSFD} --pid="$PID 1" -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "(FD == $FD)")
+ echo "POUT[--pid=PID 1]:" $?
+ [ "${QOUT}" = "${POUT}" ]
+ echo "EQ[--pid=PID 1]:" $?
+
+ POUT=$(${TS_CMD_LSFD} --pid="1,$PID" -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "(FD == $FD)")
+ echo "POUT[--pid=1,PID]:" $?
+ [ "${QOUT}" = "${POUT}" ]
+ echo "EQ[--pid=1,PID]:" $?
+
+ POUT=$(${TS_CMD_LSFD} --pid="$PID,1" -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "(FD == $FD)")
+ echo "POUT[--pid=PID,1]:" $?
+ [ "${QOUT}" = "${POUT}" ]
+ echo "EQ[--pid=PID,1]:" $?
+
+ POUT=$(${TS_CMD_LSFD} -p 1 --pid="$PID" -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "(FD == $FD)")
+ echo "POUT[-p 1 --pid=PID]:" $?
+ [ "${QOUT}" = "${POUT}" ]
+ echo "EQ[-p 1 --pid=PID]:" $?
+
+ POUT=$(${TS_CMD_LSFD} -p "$PID" --pid=1 -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "(FD == $FD)")
+ echo "POUT[-p PID --pid=1]:" $?
+ [ "${QOUT}" = "${POUT}" ]
+ echo "EQ[-p PID --pid=1]:" $?
+
+ kill -CONT ${PID}
+ fi
+ wait ${MKFDS_PID}
+} > $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/lsfd/option-summary b/tests/ts/lsfd/option-summary
new file mode 100755
index 0000000..64bf54b
--- /dev/null
+++ b/tests/ts/lsfd/option-summary
@@ -0,0 +1,62 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="--summary option"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF"/lsfd-functions.bash
+
+ts_check_test_command "$TS_CMD_LSFD"
+ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_prog "ps"
+
+ts_cd "$TS_OUTDIR"
+
+FD=3
+F_GROUP=/etc/group
+F_PASSWD=/etc/passwd
+PIDS=
+PID=
+
+for i in {1..10}; do
+ "$TS_HELPER_MKFDS" -q ro-regular-file $FD file=$F_GROUP &
+ PID=$!
+ PIDS="${PIDS} ${PID} "
+ lsfd_wait_for_pausing "${PID}"
+done
+
+for i in {1..3}; do
+ "$TS_HELPER_MKFDS" -q ro-regular-file $FD file=$F_PASSWD &
+ PID=$!
+ PIDS="${PIDS} ${PID} "
+ lsfd_wait_for_pausing "${PID}"
+done
+
+${TS_CMD_LSFD} -n --summary=only \
+ --pid="${PIDS}" \
+ --counter=GROUP:'(NAME == "/etc/group")' \
+ --counter=PASSWD:'(NAME == "/etc/passwd")' \
+ --counter=PROC:'(ASSOC == "exe")' \
+ > $TS_OUTPUT 2>&1
+
+for PID in ${PIDS}; do
+ kill -CONT "${PID}"
+done
+
+ts_finalize
diff --git a/tests/ts/lsmem/dumps/s390-zvm-6g.tar.bz2 b/tests/ts/lsmem/dumps/s390-zvm-6g.tar.bz2
new file mode 100644
index 0000000..b4dab8e
--- /dev/null
+++ b/tests/ts/lsmem/dumps/s390-zvm-6g.tar.bz2
Binary files differ
diff --git a/tests/ts/lsmem/dumps/x86_64-16g.tar.bz2 b/tests/ts/lsmem/dumps/x86_64-16g.tar.bz2
new file mode 100644
index 0000000..ebcf6e7
--- /dev/null
+++ b/tests/ts/lsmem/dumps/x86_64-16g.tar.bz2
Binary files differ
diff --git a/tests/ts/lsmem/lsmem b/tests/ts/lsmem/lsmem
new file mode 100755
index 0000000..7dce0f2
--- /dev/null
+++ b/tests/ts/lsmem/lsmem
@@ -0,0 +1,60 @@
+#!/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 3 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+TS_TOPDIR="${0%/*}/../.."
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSMEM"
+ts_check_prog "tar"
+ts_check_prog "bzip2"
+
+LSCOLUMNS="RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE"
+
+
+function do_lsmem {
+ local opts="$*"
+
+ echo -e "\n---\n" >>${TS_OUTPUT}
+ echo "\$ lsmem $opts" >>${TS_OUTPUT}
+ ${TS_CMD_LSMEM} $opts --sysroot "${dumpdir}/${name}" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+}
+
+for dump in $(ls $TS_SELF/dumps/*.tar.bz2 | sort); do
+ name=$(basename $dump .tar.bz2)
+ dumpdir="$TS_OUTDIR/dumps"
+
+ ts_init_subtest $name
+ mkdir -p $dumpdir
+
+ tar -C $dumpdir -jxf $dump
+
+ do_lsmem --split=STATE,REMOVABLE
+ do_lsmem --output RANGE,SIZE --split none
+ do_lsmem --output RANGE,SIZE,STATE --split STATE
+ do_lsmem --all --output $LSCOLUMNS
+ do_lsmem --raw --output $LSCOLUMNS --split $LSCOLUMNS
+ do_lsmem --json --output $LSCOLUMNS --split $LSCOLUMNS
+ do_lsmem -o +ZONES
+ do_lsmem
+
+ ts_finalize_subtest
+done
+
+ts_finalize
diff --git a/tests/ts/lsmem/mk-input.sh b/tests/ts/lsmem/mk-input.sh
new file mode 100755
index 0000000..bbdfff0
--- /dev/null
+++ b/tests/ts/lsmem/mk-input.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# This script makes a copy of relevant files from /sys.
+# The files are useful for lsmem(1) regression tests.
+#
+progname=$(basename $0)
+
+if [ -z "$1" ]; then
+ echo -e "\nusage: $progname <testname>\n"
+ exit 1
+fi
+
+TS_NAME="$1"
+TS_DUMP="$TS_NAME"
+CP="cp -r --parent"
+
+mkdir -p $TS_DUMP/sys/devices/system
+
+$CP /sys/devices/system/memory $TS_DUMP
+
+tar jcvf $TS_NAME.tar.bz2 $TS_DUMP
+rm -rf $TS_DUMP
diff --git a/tests/ts/lsns/ioctl_ns b/tests/ts/lsns/ioctl_ns
new file mode 100755
index 0000000..6f306d5
--- /dev/null
+++ b/tests/ts/lsns/ioctl_ns
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+# Copyright (C) 2021 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="ownership and hierarchy"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+# ts_skip_nonroot
+grep -q '#define HAVE_LINUX_NSFS_H' ${top_builddir}/config.h || ts_skip "no ioctl_ns support"
+
+[ -r /proc/self/ns/user ] || ts_skip "no USER namespace kernel support"
+[ -r /proc/self/ns/pid ] || ts_skip "no PID namespace kernel support"
+
+ts_check_test_command "$TS_CMD_LSNS"
+ts_check_test_command "$TS_CMD_UNSHARE"
+ts_check_prog "stat"
+ts_check_prog "mkfifo"
+ts_check_prog "touch"
+ts_check_prog "uniq"
+
+"$TS_CMD_LSNS" > /dev/null 2>&1
+if [ $? -eq 2 ]; then
+ ts_skip "ioctl not supported"
+fi
+
+$TS_CMD_UNSHARE --user --pid --mount-proc --fork true &> /dev/null || ts_skip "no namespace support"
+
+ts_cd "$TS_OUTDIR"
+
+# The parent process receives namespaces ids via FIFO_DATA from bash
+# run by unshare. The parent can wait till the bash process provides
+# data.
+FIFO_DATA=$TS_OUTDIR/FIFO_DATA-HIERARCHY
+
+# The bash process run by unshare waits with this fifo till the parent
+# process exits. As a result, namespaecs referred by the bash
+# process can be alive till the parent process exits.
+FIFO_WAIT=$TS_OUTDIR/FIFO_WAIT-HIERARCHY
+
+function cleanup {
+ rm -f $FIFO_DATA
+ rm -f $FIFO_WAIT
+}
+
+function init {
+ cleanup
+ mkfifo $FIFO_DATA
+ mkfifo $FIFO_WAIT
+}
+
+init
+(
+ exec 4> $FIFO_WAIT
+ my_userns=$(stat -c %i -L /proc/self/ns/user)
+ my_pidns=$(stat -c %i -L /proc/self/ns/pid)
+ read child_userns < $FIFO_DATA
+ read child_pidns < $FIFO_DATA
+
+ expected="$child_userns $my_userns $my_userns"
+ actual=$("$TS_CMD_LSNS" -t user -n -o NS,PNS,ONS "$child_userns" | uniq)
+ test "$expected" = "$actual"
+ RESULT=$?
+ if [ $RESULT -ne 0 ]; then
+ echo
+ echo userns expected: "$expected"
+ echo userns actual: "$actual"
+ cleanup
+ exit $RESULT
+ fi
+
+ expected="$child_pidns $my_pidns $child_userns"
+ actual=$("$TS_CMD_LSNS" -t pid -n -o NS,PNS,ONS "$child_pidns" | uniq)
+ test "$expected" = "$actual"
+ RESULT=$?
+ if [ $RESULT -ne 0 ]; then
+ echo
+ echo pidns expected: "$expected"
+ echo pidns actual: "$actual"
+ cleanup
+ fi
+ exit $RESULT
+) &
+mainpid=$!
+(
+ exec 4< $FIFO_WAIT
+ $TS_CMD_UNSHARE --user --pid --mount-proc --fork bash -s > $FIFO_DATA <<'EOF'
+ stat -c %i -L /proc/self/ns/user
+ stat -c %i -L /proc/self/ns/pid
+ # Wait till FIFO_WAIT is clsoed.
+ read -u 4
+EOF
+) &
+subpid=$!
+
+wait $subpid
+wait $mainpid
+
+RESULT=$?
+echo $RESULT >> $TS_OUTPUT
+
+cleanup
+ts_finalize
diff --git a/tests/ts/lsns/netnsid b/tests/ts/lsns/netnsid
new file mode 100755
index 0000000..80ccd9b
--- /dev/null
+++ b/tests/ts/lsns/netnsid
@@ -0,0 +1,97 @@
+#!/bin/bash
+#
+# Copyright (C) 2017 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="NETNSID compare to ip-link"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LSNS"
+ts_check_prog "ip"
+ts_check_prog "dd"
+ts_check_prog "mkfifo"
+ts_check_prog "sed"
+ts_skip_nonroot
+
+grep -q '#define HAVE_LINUX_NET_NAMESPACE_H' ${top_builddir}/config.h || ts_skip "no netns support"
+ts_cd "$TS_OUTDIR"
+
+vetha=lsns-vetha
+vethb=lsns-vethb
+NS=LSNS-TEST-NETNSID-NS
+FIFO=$TS_OUTDIR/FIFO-NETNSID
+NULL=/dev/null
+LOG=/dev/null #/root/foo.log
+
+function cleanup {
+ ip link delete $vetha 2> $NULL || :
+ ip netns delete $NS 2> $NULL || :
+ rm -f $FIFO
+}
+
+echo "==Cleanup" >> $LOG
+cleanup
+
+echo "==Create FIFO" >> $LOG
+mkfifo $FIFO
+
+echo "==Netns ADD" >> $LOG
+if ip netns add $NS &&
+ ip link add name $vetha type veth peer name $vethb &&
+ ip link set $vethb netns $NS &&
+ ! (ip -o link show dev $vetha 2>&1 >$NULL | grep 'Cannot talk to rtnetlink' > $NULL); then
+ echo "===Netns EXEC" >> $LOG
+ ip netns exec $NS dd if=$FIFO bs=1 count=2 of=$NULL 2> $NULL &
+ PID=$!
+ echo "====PID=$PID" >> $LOG
+else
+ cleanup
+ ts_skip "failed to initialize"
+fi
+{
+ echo "==Write to FIFO" >> $LOG
+ dd if=/dev/zero bs=1 count=1 2> $NULL
+ {
+ echo "===IP output" >> $LOG
+ ip -o link show dev $vetha >> $LOG
+
+ IP_ID=$(ip -o link show dev $vetha | sed -ne 's/.* *link-netnsid *\([0-9]*\)/\1/p')
+ echo "====ip show: IP_ID=$IP_ID" >> $LOG
+
+ if [ "x$IP_ID" = "x" ]; then
+ echo "===IP output list id" >> $LOG
+ ip netns list-id >> $LOG
+
+ IP_ID=$(ip netns list-id | awk "/name: $NS/ { print \$2 }")
+ echo "====ip list-id: IP_ID=$IP_ID" >> $LOG
+ fi
+
+ echo "===LSNS output" >> $LOG
+ $TS_CMD_LSNS -o+NETNSID,NSFS --type net >> $LOG
+
+ LSNS_ID=$($TS_CMD_LSNS -n -o NETNSID --type net --task $PID | { read VAL; echo $VAL; } )
+ echo "===LSNS_ID=$LSNS_ID" >> $LOG
+ }
+ dd if=/dev/zero bs=1 count=1 2> $NULL
+} > $FIFO
+
+test "$IP_ID" = "$LSNS_ID"
+echo $? >> $TS_OUTPUT
+
+cleanup
+ts_finalize
diff --git a/tests/ts/lsns/nsfs b/tests/ts/lsns/nsfs
new file mode 100755
index 0000000..caa81dc
--- /dev/null
+++ b/tests/ts/lsns/nsfs
@@ -0,0 +1,95 @@
+#!/bin/bash
+#
+# Copyright (C) 2017 Masatake YAMATO <yamato@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="${0%/*}/../.."
+TS_DESC="NSFS for ip-netns-add"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_skip_nonroot
+
+ts_check_enotty
+ts_check_test_command "$TS_CMD_LSNS"
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_prog "ip"
+ts_check_prog "dd"
+ts_check_prog "touch"
+ts_check_prog "mkfifo"
+ts_check_prog "sed"
+
+grep -q '#define HAVE_LINUX_NET_NAMESPACE_H' ${top_builddir}/config.h || ts_skip "no netns support"
+
+ts_cd "$TS_OUTDIR"
+
+NAME1=ABC
+NAME2=XYZ
+PATH1=/run/netns/$NAME1
+PATH2=$TS_OUTDIR/$NAME2
+FIFO=$TS_OUTDIR/FIFO-NSFS
+NULL=/dev/null
+
+function cleanup {
+ rm -f $FIFO
+ $TS_CMD_UMOUNT $PATH2 2> /dev/null || :
+ rm -f $PATH2
+ ip netns delete $NAME1 2> /dev/null || :
+}
+
+cleanup
+mkfifo $FIFO
+
+if ip netns add $NAME1 &&
+ touch ${PATH2} &&
+ $TS_CMD_MOUNT -o bind ${PATH1} ${PATH2}; then
+ ip netns exec $NAME1 dd if=$FIFO bs=1 count=2 of=$NULL 2> $NULL &
+ PID=$!
+else
+ cleanup
+ ts_skip "failed to initialize"
+fi
+{
+ dd if=/dev/zero bs=1 count=1 2> $NULL
+ LSNS_FULL=$($TS_CMD_LSNS --type net)
+ NSFS_NAMES_MLINES=$($TS_CMD_LSNS -n -o NSFS --type net --task $PID | { while read VAL; do echo $VAL; done; } )
+ NSFS_NAMES_1LINE=$($TS_CMD_LSNS -n -o NSFS --nowrap --type net --task $PID | { while read VAL; do echo $VAL; done; } )
+ dd if=/dev/zero bs=1 count=1 2> $NULL
+} > $FIFO
+
+test "$NSFS_NAMES_MLINES" = "$PATH1
+$PATH2" && test "$NSFS_NAMES_1LINE" = "$PATH1,$PATH2"
+
+RESULT=$?
+echo $RESULT >> $TS_OUTPUT
+
+if [ $RESULT -ne 0 ]; then
+ echo
+ echo "**Full-report**"
+ echo "$LSNS_FULL"
+ echo "**Paths**"
+ echo "PATH1: $PATH1"
+ echo "PATH2: $PATH2"
+ echo "**Multi-line:**"
+ echo "$NSFS_NAMES_MLINES"
+ echo "**One-line:**"
+ echo "$NSFS_NAMES_1LINE"
+ echo "****"
+fi
+
+cleanup
+ts_finalize
diff --git a/tests/ts/md5/data b/tests/ts/md5/data
new file mode 100644
index 0000000..1eed05a
--- /dev/null
+++ b/tests/ts/md5/data
@@ -0,0 +1,7 @@
+
+abc
+qazxswedc
+1qazxsw23edc
+a a a a a a a a a a
+KUWIOJDNWQKLFDHQUWEDAYCNAUIWSYDUQUICBSKLBCLUWIGDF
+EASC6545642432132SDECSESCEACSJKDWIOUDOIWIDOQPWUDQWIOSNXCSASCA
diff --git a/tests/ts/md5/md5 b/tests/ts/md5/md5
new file mode 100755
index 0000000..3c89b73
--- /dev/null
+++ b/tests/ts/md5/md5
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2009 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="${0%/*}/../.."
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_MD5"
+
+cat $TS_SELF/data | while read data
+do
+ echo -n $data | $TS_HELPER_MD5 >> $TS_OUTPUT
+done
+
+ts_finalize
+
diff --git a/tests/ts/minix/broken-root b/tests/ts/minix/broken-root
new file mode 100644
index 0000000..37ee84e
--- /dev/null
+++ b/tests/ts/minix/broken-root
Binary files differ
diff --git a/tests/ts/minix/debian.bug.773892 b/tests/ts/minix/debian.bug.773892
new file mode 100644
index 0000000..db97848
--- /dev/null
+++ b/tests/ts/minix/debian.bug.773892
Binary files differ
diff --git a/tests/ts/minix/fsck b/tests/ts/minix/fsck
new file mode 100755
index 0000000..9d4aa0d
--- /dev/null
+++ b/tests/ts/minix/fsck
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+# Copyright (C) 2009 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="${0%/*}/../.."
+TS_DESC="mkfs fsck"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKMINIX"
+ts_check_test_command "$TS_CMD_FSCKMINIX"
+
+mkfs_and_fsck_minix() {
+ local ret
+ ts_log "#####################################"
+ ts_log_both "$ mkfs.minix $1 image"
+ $TS_CMD_MKMINIX $1 $img >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ret=$?
+ echo "return mkfs: $ret" >> $TS_OUTPUT
+ test $ret = 0 || return $ret
+
+ ts_log_both "$ fsck.minix -lavsf image"
+ $TS_CMD_FSCKMINIX -lavsf $img >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ret=$?
+ echo "return fsck: $ret" >> $TS_OUTPUT
+ return $ret
+}
+
+img=$(ts_image_init)
+
+# TODO looping over arbitrary badblock files (-l bad) gives a lot segfaults
+for ver in "" "-1" "-2" "-3"; do
+for n in "" "-n 14" "-n 30" "-n 60"; do
+ mkfs_and_fsck_minix "$ver $n"
+done
+done
+
+rm -f $img
+
+# escape "@" with "\@" in $img. This way sed correctly
+# replaces paths containing "@" characters
+sed -i "s@${img//\@/\\\@}@image@g" $TS_OUTPUT
+
+
+ts_finalize
+
diff --git a/tests/ts/minix/fsck-images b/tests/ts/minix/fsck-images
new file mode 100755
index 0000000..17d7704
--- /dev/null
+++ b/tests/ts/minix/fsck-images
@@ -0,0 +1,90 @@
+#!/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="fsck images"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+# inode contains UID and GID, use always UID=0 to get the same checksum
+# TODO any mkfs should use UID=0 per default (custom uid optionally) like mk2fs
+ts_skip_nonroot
+
+ts_check_test_command "$TS_CMD_FSCKMINIX"
+ts_check_test_command "$TS_HELPER_MKFS_MINIX"
+ts_check_test_command "$TS_CMD_HEXDUMP"
+
+# on big endian systems some of the subtests have different expected output
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
+BE_EXT=$(test "$BYTE_ORDER" = "BE" && echo ".BE")
+
+export MKFS_MINIX_TEST_SECOND_SINCE_EPOCH='1438460212'
+
+check_minix_fs_type() {
+ ts_init_subtest $1
+ TS_EXPECTED+=$BE_EXT
+ img=${TS_OUTPUT}.img
+ dd if=/dev/zero bs=1024 count=16 of=$img >/dev/null 2>&1
+ $TS_HELPER_MKFS_MINIX $2 $img >> $TS_OUTPUT 2>> $TS_ERRLOG
+ echo "mkfs return value: $?" >> $TS_OUTPUT
+ $TS_CMD_FSCKMINIX $img >> $TS_OUTPUT 2>> $TS_ERRLOG
+ echo "fsck return value: $?" >> $TS_OUTPUT
+ $TS_CMD_HEXDUMP -C $img >> $TS_OUTPUT 2>> $TS_ERRLOG
+ rm -f $img
+ ts_finalize_subtest
+}
+
+check_minix_fs_type 'v1c14' '-1 -n 14'
+check_minix_fs_type 'v1c30' '-1 -n 30'
+check_minix_fs_type 'v2c14' '-2 -n 14'
+check_minix_fs_type 'v2c30' '-2 -n 30'
+check_minix_fs_type 'v3c60' '-3 -n 60'
+
+bad="$TS_OUTDIR/${TS_TESTNAME}.badlist"
+# TODO seems that mkfs produces non-sense if badblocks are greater than device.
+echo -e "8\n9" > $bad
+
+# NOTE, -c with -l ignores -l.
+check_minix_fs_type 'check-blocks' "-l $bad -c"
+check_minix_fs_type 'badblocks' "-l $bad"
+
+rm -f $bad
+
+# no more big endian tests below
+if test "$BYTE_ORDER" = "BE"; then
+ ts_finalize
+fi
+
+# NOTE this seems odd: a 2nd fsck run would again modify the FS
+ts_init_subtest "auto-fix"
+img=${TS_OUTPUT}.img
+cp "$TS_SELF/broken-root" $img
+$TS_CMD_FSCKMINIX -sav $img >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "fsck reports changed and uncorrected: $?" >> $TS_OUTPUT
+$TS_CMD_HEXDUMP -C $img >> $TS_OUTPUT 2>> $TS_ERRLOG
+sed -i 's/Filesystem on .* is dirty/Filesystem auto-fix is dirty/' $TS_OUTPUT $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "bug.773892"
+"$TS_CMD_FSCKMINIX" -f "$TS_SELF/debian.bug.773892" 2>&1 >/dev/null
+echo "fsck reports uncorrected: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "broken-root"
+"$TS_CMD_FSCKMINIX" "$TS_SELF/broken-root" >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "fsck reports uncorrected: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/minix/mkfs b/tests/ts/minix/mkfs
new file mode 100755
index 0000000..e5ee596
--- /dev/null
+++ b/tests/ts/minix/mkfs
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# Copyright (C) 2009 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="${0%/*}/../.."
+TS_DESC="mkfs mount"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKMINIX"
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_skip_nonroot
+
+ts_scsi_debug_init dev_size_mb=10 num_parts=1
+dev=${TS_DEVICE}1
+
+# hotfix, wait for partition to appear (slow on Debian 7/linux-3.2)
+test -b $dev || sleep 1
+
+mkfs_and_mount_minix() {
+ ts_init_subtest $1
+ ts_log "create minix fs $2"
+ $TS_CMD_MKMINIX $2 $dev >> $TS_OUTPUT 2>> $TS_ERRLOG
+ echo "mkfs return value: $?" >> $TS_OUTPUT
+ udevadm settle
+ [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+ ts_mount "minix" $dev $TS_MOUNTPOINT
+ ts_is_mounted $dev || ts_die "Cannot find $dev in /proc/mounts"
+ ts_log "umount the image"
+ udevadm settle
+ $TS_CMD_UMOUNT $dev
+ ts_finalize_subtest
+}
+
+mkfs_and_mount_minix 'v1c14' '-1 -n 14'
+mkfs_and_mount_minix 'v1c30' '-1 -n 30'
+mkfs_and_mount_minix 'v2c14' '-2 -n 14'
+mkfs_and_mount_minix 'v2c30' '-2 -n 30'
+mkfs_and_mount_minix 'v2i65535' '-2 -i 65535'
+mkfs_and_mount_minix 'v3c60' '-3 -n 60'
+
+ts_finalize
+
diff --git a/tests/ts/misc/fallocate b/tests/ts/misc/fallocate
new file mode 100755
index 0000000..07efd98
--- /dev/null
+++ b/tests/ts/misc/fallocate
@@ -0,0 +1,39 @@
+#!/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="fallocate"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FALLOCATE"
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+IMAGE=${TS_OUTDIR}/${TS_TESTNAME}.file
+rm -f $IMAGE
+
+if $TS_CMD_FALLOCATE -o 128 -l 256 $IMAGE >> $TS_OUTPUT 2>> $TS_ERRLOG; then
+ stat -c "%s" $IMAGE >> $TS_OUTPUT 2>> $TS_ERRLOG
+else
+ # fs type of $TS_OUTDIR, could be used to skip this test early
+ fs_type=$(${TS_CMD_FINDMNT} -n -o FSTYPE -T ${TS_OUTDIR})
+
+ grep -qi "fallocate: fallocate failed:.*not supported" $TS_ERRLOG \
+ && ts_skip "'${fs_type}' not supported"
+fi
+
+rm -f $IMAGE
+
+ts_finalize
diff --git a/tests/ts/misc/flock b/tests/ts/misc/flock
new file mode 100755
index 0000000..0c6ac0b
--- /dev/null
+++ b/tests/ts/misc/flock
@@ -0,0 +1,124 @@
+#!/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="flock"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FLOCK"
+ts_check_prog "pgrep"
+ts_check_prog "timeout"
+
+
+function do_lock {
+ local opts="$1"
+ local expected_rc="$2"
+ local mesg="$3"
+
+ $TS_CMD_FLOCK $1 $TS_OUTDIR/lockfile \
+ echo "$mesg" \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ local rc="$?"
+
+ if [ "$rc" == "$expected_rc" ]; then
+ ts_log "Success"
+ else
+ ts_log "Failed [rc=$rc]"
+ fi
+}
+
+# general lock
+GEN_OUTPUT="$TS_OUTPUT"
+START=$(date '+%s')
+# running flock in background is not the best usage example
+$TS_CMD_FLOCK --shared $TS_OUTDIR/lockfile \
+ bash -c 'echo "Locking"; sleep 3; echo "Unlocking"' \
+ > $GEN_OUTPUT 2>&1 &
+pid=$!
+
+# check for running background process
+if [ "$pid" -le "0" ] || ! kill -s 0 "$pid" &>/dev/null; then
+ ts_die "unable to run flock"
+fi
+# the lock should be established when flock has a child
+timeout 1s bash -c "while ! pgrep -P $pid >/dev/null; do sleep 0.1 ;done" \
+ || ts_die "timeout waiting for flock child"
+
+ts_init_subtest "non-block"
+do_lock "--nonblock --conflict-exit-code 123" 123 "You will never see this!"
+ts_finalize_subtest
+
+
+ts_init_subtest "no-fork"
+do_lock "--no-fork --nonblock --conflict-exit-code 123" 123 "You will never see this!"
+ts_finalize_subtest
+
+
+ts_init_subtest "shared"
+do_lock "--shared" 0 "Have shared lock"
+ts_finalize_subtest
+
+
+# this is the same as non-block test (exclusive lock is the default), but here
+# we explicitly specify --exclusive on command line
+ts_init_subtest "exclusive"
+do_lock "--nonblock --exclusive --conflict-exit-code 123" 123 "You will never see this!"
+ts_finalize_subtest
+
+
+ts_init_subtest "fd"
+cd "$TS_OUTDIR"
+rm 4 2> /dev/null
+exec 4<>$TS_OUTDIR/lockfile || ts_log "Could not open lockfile"
+$TS_CMD_FLOCK --nonblock --exclusive --conflict-exit-code 123 4 \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+rc="$?"
+
+if [ "$rc" == "123" ]; then
+ ts_log "Success"
+else
+ ts_log "Failed [rc=$rc]"
+fi
+[ -f 4 ] && ts_log "fd file should not exist"
+ts_finalize_subtest
+
+
+ts_init_subtest "timeout"
+do_lock "--timeout 5 --conflict-exit-code 5" 0 "After timeout."
+END=$(date '+%s')
+ts_finalize_subtest
+
+
+# expected is 3 seconds (see "sleep 3" for the general lock), but we should not
+# rely on exact number due to scheduler, machine load, etc. Let's check for
+# inmterval <3,5>.
+#
+ts_init_subtest "time-check"
+TIMEDIFF=$(( $END - $START ))
+if [ $TIMEDIFF -lt 3 ]; then
+ ts_log "general lock failed [$TIMEDIFF sec]"
+elif [ $TIMEDIFF -gt 5 ]; then
+ ts_log "wait too long [$TIMEDIFF sec]"
+else
+ ts_log "success"
+fi
+ts_finalize_subtest "diff ${TIMEDIFF} sec"
+
+
+echo "Unlocked" >> $GEN_OUTPUT
+ts_finalize
diff --git a/tests/ts/misc/ionice b/tests/ts/misc/ionice
new file mode 100755
index 0000000..0114979
--- /dev/null
+++ b/tests/ts/misc/ionice
@@ -0,0 +1,30 @@
+#!/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="ionice"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_IONICE"
+
+$TS_CMD_IONICE -p $$ -n 0 -c 0 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IONICE -p $$ -n 3 -c 7 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IONICE -p $$ -n 4 -c 7 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IONICE -p $$ -n 1 -c 8 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IONICE -n 3 ls /etc/passwd >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_IONICE -p $$ >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/misc/line b/tests/ts/misc/line
new file mode 100755
index 0000000..97a415c
--- /dev/null
+++ b/tests/ts/misc/line
@@ -0,0 +1,65 @@
+#!/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="line"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LINE"
+ts_check_test_command "$TS_CMD_HEXDUMP"
+
+ts_init_subtest 'one-call'
+printf "a\nb\n" |
+ $TS_CMD_LINE >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "ret: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest 'two-calls'
+printf "1\n2\n" |
+ ($TS_CMD_LINE && $TS_CMD_LINE) >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "ret: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest 'text-without-eol'
+printf "abc" |
+ $TS_CMD_LINE >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "ret: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest 'empty-input'
+printf "" |
+ $TS_CMD_LINE >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "ret: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest 'wait-for-eof'
+(printf "xyz" && cat </dev/null) |
+ $TS_CMD_LINE >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "ret: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest 'empty-input-wait-for-eof'
+$TS_CMD_LINE </dev/null >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "ret: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest 'large-line'
+dd if=/dev/zero bs=1k count=1k 2>/dev/null |
+ $TS_CMD_LINE line | $TS_CMD_HEXDUMP -C >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "ret: $?" >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/misc/mbsencode b/tests/ts/misc/mbsencode
new file mode 100755
index 0000000..39f9510
--- /dev/null
+++ b/tests/ts/misc/mbsencode
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2018 Vaclav Dolezal <vdolezal@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="${0%/*}/../.."
+TS_DESC="mbsencode"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command $TS_HELPER_MBSENCODE
+
+# These test may fail on some machines (locales, other libc...)
+TS_KNOWN_FAIL="yes"
+
+STRINGS=(
+# ASCII
+ $'foo\tbar baz'
+ '\\foo.local\bar'
+ '\\foo.local\xbar'
+
+# UNICODE
+ 'über'
+ $'c\xcc\x8ca\xcc\x81rka' # 'c\u030Ca\u0301rka'
+ 'МоÑкваÌ'
+ '北京'
+ $'\xc2\x83' # U+0083
+
+# INVALID UNICODE
+ $'\xff'
+ $'\xe8\xe1\xf9\xa7'
+)
+
+if grep -q '^#define HAVE_WIDECHAR' ${top_builddir}/config.h ;then
+ HAVE_WIDECHAR=true
+else
+ HAVE_WIDECHAR=false
+fi
+
+ts_init_subtest "safe-ascii"
+$TS_HELPER_MBSENCODE --safe "${STRINGS[@]}" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "invalid-ascii"
+if [ "$HAVE_WIDECHAR" = true ]; then
+ $TS_HELPER_MBSENCODE --invalid "${STRINGS[@]}" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+else
+ ts_skip_subtest 'No widechar support'
+fi
+
+ts_init_subtest "safe-utf8"
+if [ "$HAVE_WIDECHAR" = true ]; then
+ LC_ALL=C.UTF-8 \
+ $TS_HELPER_MBSENCODE --safe "${STRINGS[@]}" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+else
+ ts_skip_subtest 'No widechar support'
+fi
+
+ts_init_subtest "invalid-utf8"
+if [ "$HAVE_WIDECHAR" = true ]; then
+ LC_ALL=C.UTF-8 \
+ $TS_HELPER_MBSENCODE --invalid "${STRINGS[@]}" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+else
+ ts_skip_subtest 'No widechar support'
+fi
+
+ts_finalize
+
diff --git a/tests/ts/misc/mcookie b/tests/ts/misc/mcookie
new file mode 100755
index 0000000..a8c54f3
--- /dev/null
+++ b/tests/ts/misc/mcookie
@@ -0,0 +1,28 @@
+#!/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="mcookie"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MCOOKIE"
+
+$TS_CMD_MCOOKIE -f /etc/services |
+ # The sed will convert only 32 characters long hexadecimal string
+ # to expected string, but nothing else.
+ sed 's/^[0-9a-f]\{32\}$/the string meets expecations/' >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/misc/mountpoint b/tests/ts/misc/mountpoint
new file mode 100755
index 0000000..19e6cfc
--- /dev/null
+++ b/tests/ts/misc/mountpoint
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="mountpoint"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNTPOINT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+# / is not always a mountpoint (chroots etc.), so check if it is and otherwise
+# fallback to the first available mountpoint.
+FIRST_MOUNTPOINT=$($TS_CMD_FINDMNT -no TARGET / || $TS_CMD_FINDMNT -fno TARGET)
+
+[ -z "$FIRST_MOUNTPOINT" ] && ts_skip "no mountpoint found for symlink tests"
+
+ln -s $FIRST_MOUNTPOINT ./symlink-to-mountpoint
+
+ts_init_subtest "default"
+$TS_CMD_MOUNTPOINT ./symlink-to-mountpoint >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo $? >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "nofollow"
+$TS_CMD_MOUNTPOINT --nofollow ./symlink-to-mountpoint >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo $? >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "mutually-exclusive"
+$TS_CMD_MOUNTPOINT --devno --nofollow / >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo $? >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+rm -f ./symlink-to-mountpoint
+ts_finalize
diff --git a/tests/ts/misc/pipesz b/tests/ts/misc/pipesz
new file mode 100755
index 0000000..e3c31f6
--- /dev/null
+++ b/tests/ts/misc/pipesz
@@ -0,0 +1,80 @@
+#!/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="pipesz"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_PIPESZ"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+set -o pipefail
+
+DEFAULT_PIPE_SIZE=$(($($TS_HELPER_SYSINFO pagesize) * 16))
+
+ts_init_subtest "set-fd-bad"
+$TS_CMD_PIPESZ --check --set 4096 --fd 42 >> $TS_OUTPUT 2>> $TS_ERRLOG
+[[ $? -eq 0 ]] && ts_logerr "expected failure"
+ts_finalize_subtest
+
+ts_init_subtest "set-fd"
+echo -n | $TS_CMD_PIPESZ --check --set 4096 --stdin >> $TS_OUTPUT 2>> $TS_ERRLOG
+[[ $? -ne 0 ]] && ts_logerr "expected success"
+ts_finalize_subtest
+
+ts_init_subtest "set-file-bad"
+$TS_CMD_PIPESZ --check --set 4096 --file "/dev/null" >> $TS_OUTPUT 2>> $TS_ERRLOG
+[[ $? -eq 0 ]] && ts_logerr "expected failure"
+ts_finalize_subtest
+
+ts_init_subtest "set-file"
+echo -n | $TS_CMD_PIPESZ --check --set 4096 --file "/dev/stdin" >> $TS_OUTPUT 2>> $TS_ERRLOG
+[[ $? -ne 0 ]] && ts_logerr "expected success"
+ts_finalize_subtest
+
+ts_init_subtest "get-fd-bad"
+$TS_CMD_PIPESZ --check --get --fd 42 >> $TS_OUTPUT 2>> $TS_ERRLOG
+[[ $? -eq 0 ]] && ts_logerr "expected failure"
+ts_finalize_subtest
+
+ts_init_subtest "get-fd"
+echo -n | $TS_CMD_PIPESZ --check --get --stdin 2>> $TS_ERRLOG | sed "s/$DEFAULT_PIPE_SIZE/DEFAULT_PIPE_SIZE/g" >> $TS_OUTPUT
+[[ $? -ne 0 ]] && ts_logerr "expected success"
+ts_finalize_subtest
+
+ts_init_subtest "get-file-bad"
+$TS_CMD_PIPESZ --check --get --file "/dev/null" >> $TS_OUTPUT 2>> $TS_ERRLOG
+[[ $? -eq 0 ]] && ts_logerr "expected failure"
+ts_finalize_subtest
+
+ts_init_subtest "get-file"
+echo -n | $TS_CMD_PIPESZ --check --get --file "/dev/stdin" 2>> $TS_ERRLOG | sed "s/$DEFAULT_PIPE_SIZE/DEFAULT_PIPE_SIZE/g" >> $TS_OUTPUT
+[[ $? -ne 0 ]] && ts_logerr "expected success"
+ts_finalize_subtest
+
+ts_init_subtest "pipe-max-size"
+echo -n | $TS_CMD_PIPESZ --check --stdin >> $TS_OUTPUT 2>> $TS_ERRLOG
+[[ $? -ne 0 ]] && ts_logerr "expected success"
+ts_finalize_subtest
+
+ts_init_subtest "exec"
+echo this_should_be_output_by_cat | $TS_CMD_PIPESZ --check --stdin cat >> $TS_OUTPUT 2>> $TS_ERRLOG
+[[ $? -ne 0 ]] && ts_logerr "expected success"
+ts_finalize_subtest
+
+set +o pipefail
+
+ts_finalize
diff --git a/tests/ts/misc/rev b/tests/ts/misc/rev
new file mode 100755
index 0000000..b13f79c
--- /dev/null
+++ b/tests/ts/misc/rev
@@ -0,0 +1,34 @@
+#!/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="rev"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_REV"
+ts_check_test_command "$TS_HELPER_MD5"
+
+for I in {0..512}; do printf "%s " {a..z}; done | "$TS_HELPER_MD5" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+for I in {0..512}; do printf "%s " {a..z}; done | \
+ $TS_CMD_REV | "$TS_HELPER_MD5" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+printf "abc\n123" | $TS_CMD_REV >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo >> $TS_OUTPUT
+printf "abc\000123" | $TS_CMD_REV -0 | tr '\0' '|' >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo >> $TS_OUTPUT
+
+ts_finalize
diff --git a/tests/ts/misc/setarch b/tests/ts/misc/setarch
new file mode 100755
index 0000000..e7b6ff3
--- /dev/null
+++ b/tests/ts/misc/setarch
@@ -0,0 +1,109 @@
+#!/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="setarch"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SETARCH"
+ts_skip_docker
+
+ARCH=$(uname -m)
+
+ts_init_subtest options
+ts_log_both "###### unknown arch"
+$TS_CMD_SETARCH qubit -v echo "success" >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit: $?" >>$TS_OUTPUT
+
+ts_log_both "###### unknown command"
+$TS_CMD_SETARCH $ARCH -v /das/gibs/nicht >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "exit: $?" >>$TS_OUTPUT
+
+echo "###### noop uname -a" >>$TS_OUTPUT
+uname_a=$(uname -srm)
+$TS_CMD_SETARCH $ARCH -v uname -srm >> $TS_OUTPUT 2>> $TS_ERRLOG
+sed -i "$ s@${uname_a}@uname -a unchanged@" $TS_OUTPUT
+
+echo "###### almost all options" >>$TS_OUTPUT
+$TS_CMD_SETARCH $ARCH -vRFZLXBIST3 echo "success" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest uname26
+finmsg="" # for debugging 2.6 issues
+
+echo "###### --uname-2.6 echo" >>$TS_OUTPUT
+$TS_CMD_SETARCH $ARCH -v --uname-2.6 echo "2.6 worked" >> $TS_OUTPUT 2>&1
+if [ $? -eq 0 ]; then
+ expected='^2.6 worked$'
+else
+ # this may happen after execvp - gets written to stderr
+ expected="^FATAL: kernel too old$"
+ finmsg+=" echo"
+fi
+sed -i "$ s/$expected/2.6 works or kernel too old/" $TS_OUTPUT
+
+echo "###### --uname-2.6 true, non-verbose" >>$TS_OUTPUT
+$TS_CMD_SETARCH $ARCH --uname-2.6 true >> $TS_OUTPUT 2>&1
+if [ $? -eq 0 ]; then
+ echo "2.6 works or kernel too old" >> $TS_OUTPUT
+else
+ # this may happen after execvp - gets written to stderr
+ expected="^FATAL: kernel too old$"
+ sed -i "$ s/$expected/2.6 works or kernel too old/" $TS_OUTPUT
+ finmsg+=" true"
+fi
+
+if [ -n "$finmsg" ]; then
+ finmsg=$(echo unsupported --uname-2.6: $finmsg)
+else
+ uname26_seems_supported=yes
+fi
+ts_finalize_subtest "$finmsg"
+
+
+# conditional subtest
+if [ "$uname26_seems_supported" = "yes" ]; then
+ts_init_subtest uname26-version
+ tmp=$($TS_CMD_SETARCH $ARCH --uname-2.6 uname -r)
+ if echo "$tmp" | grep -q "^2\.6\."; then
+ echo "kernel version changed to 2.6" >> $TS_OUTPUT
+ else
+ echo "uname26 failed" >> $TS_OUTPUT
+ echo "original kernel: $(uname -r)" >> $TS_OUTPUT
+ echo "uname26 kernel: $tmp" >> $TS_OUTPUT
+ fi
+ts_finalize_subtest
+fi # conditional subtest
+
+ts_init_subtest show
+echo "###### --show" >>$TS_OUTPUT
+
+show() {
+ echo -n "$1: " >> $TS_OUTPUT
+ $TS_CMD_SETARCH --show=$1 >> $TS_OUTPUT 2> $TS_ERRLOG
+}
+
+show 0x00000000
+show 0x00800000
+show 0x00880000
+show 0x00000008
+show 0x08000008
+show 0x000040ff
+
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/misc/setsid b/tests/ts/misc/setsid
new file mode 100755
index 0000000..9f04717
--- /dev/null
+++ b/tests/ts/misc/setsid
@@ -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="${0%/*}/../.."
+TS_DESC="setsid"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SETSID"
+
+$TS_CMD_SETSID echo "success" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/misc/strtosize b/tests/ts/misc/strtosize
new file mode 100755
index 0000000..e6233d5
--- /dev/null
+++ b/tests/ts/misc/strtosize
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2010 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="${0%/*}/../.."
+TS_DESC="strtosize"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_STRUTILS"
+
+$TS_HELPER_STRUTILS --size -1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 0 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 123 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 18446744073709551615 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_STRUTILS --size 1K >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1KiB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1M >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1MiB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1G >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1GiB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1T >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1TiB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1P >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1PiB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1E >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1EiB >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_STRUTILS --size 1KB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1MB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1GB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1TB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1PB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 1EB >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_STRUTILS --size "" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size " " >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size " 1" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size "1 " >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_HELPER_STRUTILS --size 0x0a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 0xff00 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_HELPER_STRUTILS --size 0x80000000 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
+
diff --git a/tests/ts/misc/swaplabel b/tests/ts/misc/swaplabel
new file mode 100755
index 0000000..9db7d2b
--- /dev/null
+++ b/tests/ts/misc/swaplabel
@@ -0,0 +1,69 @@
+#!/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="swaplabel"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKSWAP"
+ts_check_test_command "$TS_CMD_SWAPLABEL"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+# fallocate does not work on most file systems
+function fallocate_or_skip()
+{
+ $TS_CMD_FALLOCATE -x -l $1 $2 2>/dev/null || \
+ truncate -s $1 $2 || \
+ ts_skip "no way to create test image"
+}
+
+IMAGE=${TS_OUTDIR}/${TS_TESTNAME}.file
+
+PAGE_SIZE=$($TS_HELPER_SYSINFO pagesize)
+PAGE_SIZE_KB=$(( $PAGE_SIZE / 1024 ))
+MIN_SWAP_SIZE=$(( 10 * $PAGE_SIZE ))
+MIN_SWAP_SIZE_KB=$(( MIN_SWAP_SIZE / 1024 ))
+
+rm -f $IMAGE
+fallocate_or_skip $(( $MIN_SWAP_SIZE - 1 )) $IMAGE
+$TS_CMD_MKSWAP \
+ --label 1234567890abcdef \
+ --uuid 12345678-abcd-abcd-abcd-1234567890ab \
+ $IMAGE >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+sed -i -e "s/ $MIN_SWAP_SIZE_KB KiB/ 10 pages/" \
+ -e "s:$IMAGE:<swapfile>:g" \
+ -e "s/insecure permissions [0-9]*/insecure permissions <perm>/g" \
+ $TS_OUTPUT $TS_ERRLOG
+
+rm -f $IMAGE
+fallocate_or_skip $MIN_SWAP_SIZE $IMAGE
+$TS_CMD_MKSWAP \
+ --label 1234567890abcdef \
+ --uuid 12345678-abcd-abcd-abcd-1234567890ab \
+ $IMAGE >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+sed -i -e "s/ $(( $MIN_SWAP_SIZE_KB - $PAGE_SIZE_KB )) KiB/ 9 pages/" \
+ -e "s/($(( $MIN_SWAP_SIZE - $PAGE_SIZE )) bytes)/(9xPGSZ bytes)/" \
+ -e "s:$IMAGE:<swapfile>:g" \
+ -e "s/insecure permissions [0-9]*/insecure permissions <perm>/g" \
+ $TS_OUTPUT $TS_ERRLOG
+
+$TS_CMD_SWAPLABEL $IMAGE >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+#rm -f $IMAGE
+
+ts_finalize
diff --git a/tests/ts/misc/waitpid b/tests/ts/misc/waitpid
new file mode 100755
index 0000000..ae5ab6f
--- /dev/null
+++ b/tests/ts/misc/waitpid
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# Copyright (C) 2022 Thomas Weißschuh <thomas@t-8ch.de>
+#
+# 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="waitpid"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_WAITPID"
+
+ts_init_subtest normal
+
+(sleep 0.2; echo 1 >> "$TS_OUTPUT") &
+BG1="$!"
+
+(sleep 0.1; echo 2 >> "$TS_OUTPUT") &
+BG2="$!"
+
+echo 3 >> "$TS_OUTPUT"
+"$TS_CMD_WAITPID" "$BG1" "$BG2"
+ts_skip_exitcode_not_supported
+
+echo 4 >> "$TS_OUTPUT"
+
+ts_finalize_subtest
+
+ts_init_subtest timeout
+"$TS_CMD_WAITPID" -v -t 0.1 1 >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
+echo $? >> "$TS_OUTPUT"
+ts_finalize_subtest
+
+ts_init_subtest exited
+"$TS_CMD_WAITPID" -e 2147483647 >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
+echo $? >> "$TS_ERRLOG"
+ts_finalize_subtest
+
+ts_init_subtest count
+(sleep 0.2; echo 1 >> "$TS_OUTPUT") &
+BG1="$!"
+
+"$TS_CMD_WAITPID" -c 1 1 "$BG1" >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
+echo $? >> "$TS_ERRLOG"
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/misc/whereis b/tests/ts/misc/whereis
new file mode 100755
index 0000000..a799be0
--- /dev/null
+++ b/tests/ts/misc/whereis
@@ -0,0 +1,50 @@
+#!/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="whereis"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_WHEREIS"
+
+BIN_DIR="$(mktemp -d "${TS_OUTDIR}/binXXXXXXXXXXXXX")"
+MAN_DIR="$(mktemp -d "${TS_OUTDIR}/manXXXXXXXXXXXXX")"
+touch "$BIN_DIR/fsck"
+touch "$MAN_DIR/fsck.8.zst"
+touch "$BIN_DIR/fsck.ext4"
+touch "$MAN_DIR/fsck.ext4.8.zst"
+touch "$BIN_DIR/fsck.minix"
+touch "$BIN_DIR/python"
+touch "$MAN_DIR/python.1.gz"
+touch "$BIN_DIR/python3"
+touch "$MAN_DIR/python3.1"
+touch "$BIN_DIR/python3.8"
+touch "$BIN_DIR/python3.8-config"
+touch "$MAN_DIR/python3.8.1"
+
+for COMMAND in fsck fsck.ext4 python python3 python3.8
+do
+ COUNT=$($TS_CMD_WHEREIS -B $BIN_DIR -M $MAN_DIR -f $COMMAND | wc -w)
+ if [ $COUNT -eq 3 ]; then
+ echo "$COMMAND success" >> $TS_OUTPUT
+ else
+ echo "$COMMAND failure" >> $TS_OUTPUT
+ fi
+done
+
+rm -rf "$BIN_DIR" "$MAN_DIR"
+
+ts_finalize
diff --git a/tests/ts/mkswap/BE-4096.img.xz b/tests/ts/mkswap/BE-4096.img.xz
new file mode 100644
index 0000000..97bb3a2
--- /dev/null
+++ b/tests/ts/mkswap/BE-4096.img.xz
Binary files differ
diff --git a/tests/ts/mkswap/BE-8192.img.xz b/tests/ts/mkswap/BE-8192.img.xz
new file mode 100644
index 0000000..ffb671d
--- /dev/null
+++ b/tests/ts/mkswap/BE-8192.img.xz
Binary files differ
diff --git a/tests/ts/mkswap/LE-4096.img.xz b/tests/ts/mkswap/LE-4096.img.xz
new file mode 100644
index 0000000..ad33ce0
--- /dev/null
+++ b/tests/ts/mkswap/LE-4096.img.xz
Binary files differ
diff --git a/tests/ts/mkswap/LE-8192.img.xz b/tests/ts/mkswap/LE-8192.img.xz
new file mode 100644
index 0000000..b3187fb
--- /dev/null
+++ b/tests/ts/mkswap/LE-8192.img.xz
Binary files differ
diff --git a/tests/ts/mkswap/mkswap b/tests/ts/mkswap/mkswap
new file mode 100755
index 0000000..fa4856b
--- /dev/null
+++ b/tests/ts/mkswap/mkswap
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2022 Thomas Weißschuh <thomas@t-8ch.de>
+#
+# 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="mkswap"
+
+. "$TS_TOPDIR"/functions.sh
+
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKSWAP"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+ts_check_prog "xz"
+ts_check_prog "cmp"
+
+UUID=4c08e1cd-3c82-46bf-a55b-0c3270d6dfeb
+
+for PAGESIZE in 4096 8192; do
+ for ENDIANNESS in native little big; do
+ case "$ENDIANNESS" in
+ native) BYTE_ORDER="$("$TS_HELPER_SYSINFO" byte-order)";;
+ little) BYTE_ORDER=LE;;
+ big) BYTE_ORDER=BE;;
+ esac
+
+ if [ "$ENDIANNESS" == "native" ]; then
+ name="NATIVE-${PAGESIZE}"
+ else
+ name="${BYTE_ORDER}-${PAGESIZE}"
+ fi
+ outimg="$TS_OUTDIR/${BYTE_ORDER}-${PAGESIZE}.img"
+ origimg="$TS_OUTDIR/${BYTE_ORDER}-${PAGESIZE}.img.orig"
+
+ ts_init_subtest $name
+
+ rm -f "$outimg"
+ truncate -s $(( PAGESIZE * 10 )) "$outimg" > $TS_ERRLOG 2>&1
+
+ "$TS_CMD_MKSWAP" -q -L label -U "$UUID" -e "$ENDIANNESS" -p "$PAGESIZE" "$outimg" \
+ > "$TS_OUTPUT" 2>/dev/null \
+ || ts_log "mkswap failed"
+ xz -dc "$TS_SELF/${BYTE_ORDER}-${PAGESIZE}.img.xz" > "$origimg"
+
+ cmp "$origimg" "$outimg" > "$TS_ERRLOG" 2>&1
+
+ ts_finalize_subtest
+ done
+done
+
+ts_finalize
diff --git a/tests/ts/more/regexp b/tests/ts/more/regexp
new file mode 100755
index 0000000..c6feeee
--- /dev/null
+++ b/tests/ts/more/regexp
@@ -0,0 +1,27 @@
+#!/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="regexp"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_MORE"
+
+export TERM=linux
+printf "abba\nbar\nfoo\nxyzzy\n" |
+ $TS_HELPER_MORE +/foo >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/more/squeeze b/tests/ts/more/squeeze
new file mode 100755
index 0000000..9099b02
--- /dev/null
+++ b/tests/ts/more/squeeze
@@ -0,0 +1,26 @@
+#!/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="squeeze"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_MORE"
+
+printf "a\n\n\nb\n" |
+ $TS_HELPER_MORE -s >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/mount/complex b/tests/ts/mount/complex
new file mode 100755
index 0000000..9aa6222
--- /dev/null
+++ b/tests/ts/mount/complex
@@ -0,0 +1,106 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2022 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.
+#
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="complex"
+
+. $TS_TOPDIR/functions.sh
+ts_init "$*"
+
+ts_skip_nonroot
+ts_skip_qemu_user
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_losetup
+
+$TS_CMD_MOUNT --version | grep -q 'fd-based' || ts_skip "no fd-based API"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_udevadm_settle "$DEVICE"
+
+ROOT_MOUNTPOINT="$TS_MOUNTPOINT"
+A_MOUNTPOINT="${ROOT_MOUNTPOINT}/A"
+B_MOUNTPOINT="${ROOT_MOUNTPOINT}/B"
+
+[ -d "$ROOT_MOUNTPOINT" ] || mkdir -p $ROOT_MOUNTPOINT
+[ -d "$A_MOUNTPOINT" ] || mkdir -p $A_MOUNTPOINT
+[ -d "$B_MOUNTPOINT" ] || mkdir -p $B_MOUNTPOINT
+
+## create a private directory
+ts_init_subtest "init"
+$TS_CMD_MOUNT --bind --make-private $ROOT_MOUNTPOINT $ROOT_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT -nr --mountpoint $ROOT_MOUNTPOINT -o PROPAGATION | grep -q private \
+ || ts_log "Cannot find private $ROOT_MOUNTPOINT"
+ts_finalize_subtest
+
+
+## mount the device
+ts_init_subtest "rw-mount"
+$TS_CMD_MOUNT -orw $DEVICE $A_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+ts_finalize_subtest
+
+
+## move device and set it read-only for VFS (FS is still rw)
+ts_init_subtest "ro-move"
+$TS_CMD_MOUNT --move -o ro $A_MOUNTPOINT $B_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+findmnt -nr -o VFS-OPTIONS --mountpoint $B_MOUNTPOINT | grep -q 'ro' \
+ || ts_log "Cannot find ro VFS"
+findmnt -nr -o FS-OPTIONS --mountpoint $B_MOUNTPOINT | grep -q 'rw' \
+ || ts_log "Cannot find rw FS"
+ts_finalize_subtest
+
+
+## remount to set FS to read-only (VFS is still ro)
+ts_init_subtest "ro-remount"
+$TS_CMD_MOUNT -oremount,ro,noexec $B_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+findmnt -nr -o VFS-OPTIONS --mountpoint $B_MOUNTPOINT | grep -q 'ro' \
+ || ts_log "Cannot find ro VFS"
+findmnt -nr -o FS-OPTIONS --mountpoint $B_MOUNTPOINT | grep -q 'ro' \
+ || ts_log "Cannot find ro FS"
+ts_finalize_subtest
+
+
+## remount to set FS and VFS to read-write
+ts_init_subtest "rw-remount"
+$TS_CMD_MOUNT -oremount,rw $B_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+findmnt -nr -o VFS-OPTIONS --mountpoint $B_MOUNTPOINT | grep -q 'rw' \
+ || ts_log "Cannot find rw VFS"
+findmnt -nr -o FS-OPTIONS --mountpoint $B_MOUNTPOINT | grep -q 'rw' \
+ || ts_log "Cannot find rw FS"
+ts_finalize_subtest
+
+
+## bind as read-only (VFS), set shared propagation,
+## and remove noexec (but keep FS rw)
+ts_init_subtest "ro-shared-bind"
+$TS_CMD_MOUNT --make-shared --bind -oro,exec $B_MOUNTPOINT $A_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+findmnt -nr -o VFS-OPTIONS --mountpoint $A_MOUNTPOINT | grep -q 'ro' \
+ || ts_log "Cannot find ro VFS"
+findmnt -nr -o FS-OPTIONS --mountpoint $A_MOUNTPOINT | grep -q 'rw' \
+ || ts_log "Cannot find rw FS"
+findmnt -nr -o PROPAGATION --mountpoint $A_MOUNTPOINT | grep -q 'shared' \
+ || ts_log "Cannot find shared flag"
+findmnt -nr -o VFS-OPTIONS --mountpoint $A_MOUNTPOINT | grep -q 'noexec' \
+ && ts_log "Found noexec flag"
+ts_finalize_subtest
+
+
+## cleanup
+$TS_CMD_UMOUNT $A_MOUNTPOINT &> /dev/null
+$TS_CMD_UMOUNT $B_MOUNTPOINT &> /dev/null
+$TS_CMD_UMOUNT $ROOT_MOUNTPOINT &> /dev/null
+
+ts_finalize
diff --git a/tests/ts/mount/devname b/tests/ts/mount/devname
new file mode 100755
index 0000000..fcfa926
--- /dev/null
+++ b/tests/ts/mount/devname
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by devname"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+MTAB_FILE="/proc/mounts"
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+
+ts_device_has "TYPE" "ext2" $DEVICE || ts_die "Cannot find ext2 on $DEVICE"
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+$TS_CMD_MOUNT $DEVICE $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
+
+grep -q "\(^\| \)$DEVICE " $MTAB_FILE ||
+ echo "mount failed: cannot find $DEVICE in $MTAB_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE"
+
+grep -q "\(^\| \)$DEVICE " $MTAB_FILE &&
+ echo "umount failed: found $DEVICE in $MTAB_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/dm-verity b/tests/ts/mount/dm-verity
new file mode 100755
index 0000000..dc8689d
--- /dev/null
+++ b/tests/ts/mount/dm-verity
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2021 Vojtech Eichler <veichler@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="${0%/*}/../.."
+TS_DESC="dm-verity support"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+VERITY_OUTPUT="$TS_OUTPUT.log"
+HASH_DEVICE="$TS_OUTDIR/dm-verity.hash"
+SQUASHFS="$TS_OUTDIR/dm-verity.img"
+VERITY_DEVICE="test_dm_verity"
+VERITY_DEVICE_ABS="/dev/mapper/$VERITY_DEVICE"
+ROOT_HASH_FILE="$TS_OUTDIR/root_hash_file.hash"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_prog "mksquashfs"
+ts_check_prog "veritysetup"
+
+grep -q '#define HAVE_CRYPTSETUP' ${top_builddir}/config.h || ts_skip "no dm-verity support"
+
+# Make a squashfs and prepare verity device out of it
+mksquashfs $TS_SELF $SQUASHFS &>/dev/null || ts_skip "error: mksquashfs on $TS_SELF"
+veritysetup format $SQUASHFS $HASH_DEVICE > $VERITY_OUTPUT || ts_skip "cannot format $SQUASHFS"
+
+# Extract root hash out of veritysetup output
+HASH=$(cat $VERITY_OUTPUT | awk '/Root hash:/ { print $3 }') || ts_die "error: extract hash"
+echo $HASH > $ROOT_HASH_FILE
+# Activate verity data device
+veritysetup create $VERITY_DEVICE $SQUASHFS $HASH_DEVICE $HASH || ts_skip "cannot activate verity device"
+
+
+ts_init_subtest "roothash"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -o verity.hashdevice=$HASH_DEVICE,verity.roothash=$HASH,verity.hashoffset=0 \
+ $VERITY_DEVICE_ABS \
+ $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT -l $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "roothashfile"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -o verity.hashdevice=$HASH_DEVICE,verity.roothashfile=$ROOT_HASH_FILE \
+ $VERITY_DEVICE_ABS \
+ $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT -l $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+# Cleanup
+dmsetup remove -f $VERITY_DEVICE
+
+ts_finalize
diff --git a/tests/ts/mount/fallback b/tests/ts/mount/fallback
new file mode 100755
index 0000000..e2a1de7
--- /dev/null
+++ b/tests/ts/mount/fallback
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="fstab-fallback"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_test_command "$TS_CMD_LOSETUP"
+ts_check_enosys_syscalls open_tree fsopen mount_setattr
+
+ts_skip_nonroot
+
+test_mount_fallback() {
+ ts_init_subtest "$1"
+
+ MY_SOURCE="${TS_MOUNTPOINT}-src"
+
+ mkdir -p "$MY_SOURCE"
+ mkdir -p "$TS_MOUNTPOINT"
+
+ "$TS_HELPER_ENOSYS" $2 -- "$TS_CMD_MOUNT" --bind "$MY_SOURCE" "$TS_MOUNTPOINT" \
+ >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
+ [ "$?" = "0" ] || ts_log "error: mount $TS_MOUNTPOINT"
+
+ "$TS_CMD_FINDMNT" --mountpoint "$TS_MOUNTPOINT" &> /dev/null
+ [ $? -eq 0 ] || ts_die "Not found target (mount failed?)"
+
+ "$TS_CMD_UMOUNT" "$TS_MOUNTPOINT" || ts_die "Cannot umount $TS_MOUNTPOINT"
+
+ ts_finalize_subtest
+}
+
+test_mount_fallback "open_tree" "-s open_tree"
+test_mount_fallback "fsopen" "-s fsopen"
+
+
+ts_device_init
+DEVICE=$TS_LODEV
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_udevadm_settle "$DEVICE"
+
+# use the same in all next subtests
+MOUNTPOINT=$TS_MOUNTPOINT
+mkdir -p "$MOUNTPOINT"
+
+
+ts_init_subtest "later-fsopen"
+$TS_HELPER_ENOSYS -s fsopen -- "$TS_CMD_MOUNT" -t foo,bar,ext2 "$DEVICE" "$MOUNTPOINT" \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+mkdir -p ${MOUNTPOINT}/subdir
+$TS_CMD_UMOUNT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "subdir"
+$TS_HELPER_ENOSYS -s fsopen -s open_tree -- \
+ "$TS_CMD_MOUNT" -o X-mount.subdir=subdir "$DEVICE" "$MOUNTPOINT" \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $MOUNTPOINT
+ts_finalize_subtest
+
+
+ts_init_subtest "mount_setattr"
+"$TS_CMD_MOUNT" "$DEVICE" "$MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_HELPER_ENOSYS -s mount_setattr -- \
+ "$TS_CMD_MOUNT" -o remount,ro "$MOUNTPOINT" \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT --kernel --mountpoint "$MOUNTPOINT" --options "ro" &> /dev/null
+[ "$?" == "0" ] || ts_die "Cannot find read-only in $MOUNTPOINT in /proc/self/mountinfo"
+$TS_HELPER_ENOSYS -s mount_setattr -- \
+ "$TS_CMD_MOUNT" --make-slave "$MOUNTPOINT" \
+ >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT -n --kernel --mountpoint "$MOUNTPOINT" -o PROPAGATION >> $TS_OUTPUT
+$TS_CMD_UMOUNT $MOUNTPOINT
+ts_finalize_subtest
+
+
+ts_finalize
+
diff --git a/tests/ts/mount/fslists b/tests/ts/mount/fslists
new file mode 100755
index 0000000..230186a
--- /dev/null
+++ b/tests/ts/mount/fslists
@@ -0,0 +1,90 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2014 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="${0%/*}/../.."
+TS_DESC="fs lists"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+
+ts_device_has "TYPE" "ext2" $DEVICE || ts_die "Cannot find ext2 on $DEVICE"
+
+# Don't forget that $TS_MOUNTPOINT is subtest specific, don't create it
+# globally!
+
+
+ts_init_subtest "one-type"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -t ext2 $DEVICE $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $TS_MOUNTPOINT
+ts_log "Success"
+ts_finalize_subtest
+
+
+ts_init_subtest "more-types"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -t foo,bar,ext2 $DEVICE $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $TS_MOUNTPOINT
+ts_log "Success"
+ts_finalize_subtest
+
+
+ts_init_subtest "more-types-fstab"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+ts_fstab_add $DEVICE $TS_MOUNTPOINT "foo,bar,ext2"
+$TS_CMD_MOUNT $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fstab_clean
+ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $TS_MOUNTPOINT
+ts_log "Success"
+ts_finalize_subtest
+
+
+ts_init_subtest "type-pattern"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -i -t nofoo,bar $DEVICE $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $TS_MOUNTPOINT
+ts_log "Success"
+ts_finalize_subtest
+
+
+ts_init_subtest "type-pattern-neg"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -i -t nofoo,bar,ext2,ext2,ext4 $DEVICE $TS_MOUNTPOINT &> /dev/null
+ts_is_mounted $DEVICE && ts_die "$DEVICE unexpectedly mounted"
+ts_log "Success"
+ts_finalize_subtest
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-all b/tests/ts/mount/fstab-all
new file mode 100755
index 0000000..83e1b63
--- /dev/null
+++ b/tests/ts/mount/fstab-all
@@ -0,0 +1,156 @@
+#!/bin/bash
+
+# Copyright (C) 2019 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="all (fstab)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FDISK"
+
+ts_skip_nonroot
+ts_check_prog "mkfs.ext2"
+ts_check_prog "mkfs.ext4"
+
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} &> /dev/null <<EOF
+o
+n
+p
+1
+
++10M
+n
+p
+2
+
++10M
+n
+p
+3
+
++10M
+n
+p
+
++10M
+w
+q
+EOF
+
+udevadm settle
+
+ts_log "Create filesystem A"
+mkfs.ext2 ${TS_DEVICE}1 &> /dev/null
+ts_log "Create filesystem B"
+mkfs.ext2 ${TS_DEVICE}2 &> /dev/null
+ts_log "Create filesystem C"
+mkfs.ext2 ${TS_DEVICE}3 &> /dev/null
+ts_log "Create filesystem D"
+mkfs.ext4 ${TS_DEVICE}4 &> /dev/null
+
+udevadm settle
+
+# use the same top-level mountpoint for all sub-tests
+MOUNTPOINT=$TS_MOUNTPOINT
+
+[ -d "${MOUNTPOINT}A" ] || mkdir -p ${MOUNTPOINT}A
+[ -d "${MOUNTPOINT}B" ] || mkdir -p ${MOUNTPOINT}B
+[ -d "${MOUNTPOINT}C" ] || mkdir -p ${MOUNTPOINT}C
+[ -d "${MOUNTPOINT}D" ] || mkdir -p ${MOUNTPOINT}D
+
+# generic fstab
+MY_FSTAB="$TS_OUTDIR/${TS_TESTNAME}.fstab"
+rm -rf $MY_FSTAB
+echo "${TS_DEVICE}1 ${MOUNTPOINT}A ext2 rw,defaults 0 0" >> $MY_FSTAB
+echo "${TS_DEVICE}2 ${MOUNTPOINT}B ext2 rw,defaults 0 0" >> $MY_FSTAB
+echo "${TS_DEVICE}3 ${MOUNTPOINT}C ext2 ro,defaults 0 0" >> $MY_FSTAB
+echo "${TS_DEVICE}4 ${MOUNTPOINT}D ext4 rw,defaults 0 0" >> $MY_FSTAB
+
+
+ts_init_subtest "basic"
+$TS_CMD_MOUNT --all --fstab $MY_FSTAB >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "mount failed"
+udevadm settle
+$TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C,D}
+[ $? == 0 ] || ts_log "umount failed"
+ts_finalize_subtest
+
+
+ts_init_subtest "filter-type"
+$TS_CMD_MOUNT --all --fstab $MY_FSTAB -t ext4 >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "mount failed"
+udevadm settle
+$TS_CMD_UMOUNT ${MOUNTPOINT}D
+[ $? == 0 ] || ts_log "umount failed"
+ts_finalize_subtest
+
+
+ts_init_subtest "filter-notype"
+$TS_CMD_MOUNT --all --fstab $MY_FSTAB -t noext4 >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "mount failed"
+udevadm settle
+$TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C}
+[ $? == 0 ] || ts_log "umount failed"
+ts_finalize_subtest
+
+
+ts_init_subtest "filter-option"
+$TS_CMD_MOUNT --all --fstab $MY_FSTAB -O ro >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "mount failed"
+udevadm settle
+$TS_CMD_UMOUNT ${MOUNTPOINT}C
+[ $? == 0 ] || ts_log "umount failed"
+ts_finalize_subtest
+
+
+ts_init_subtest "override-option"
+$TS_CMD_MOUNT --all --fstab $MY_FSTAB -o ro >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "mount failed"
+udevadm settle
+$TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C,D}
+[ $? == 0 ] || ts_log "umount failed"
+ts_finalize_subtest
+
+
+ts_init_subtest "relative-path"
+cd "$TS_OUTDIR" > /dev/null
+$TS_CMD_MOUNT --all --fstab $(basename "$MY_FSTAB") >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "mount failed"
+udevadm settle
+$TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C,D}
+[ $? == 0 ] || ts_log "umount failed"
+cd - > /dev/null
+ts_finalize_subtest
+
+
+ts_init_subtest "prefix"
+MY_ROOT="$TS_OUTDIR/${TS_TESTNAME}-rootdir"
+[ -d "${MY_ROOT}" ] || mkdir -p ${MY_ROOT}
+# sub-test specific fstab
+MY_FSTAB="$TS_OUTDIR/${TS_TESTNAME}.fstab"
+rm -rf $MY_FSTAB
+echo "${TS_DEVICE}1 /foo/A ext2 rw,defaults 0 0" >> $MY_FSTAB
+echo "${TS_DEVICE}2 /foo/B ext2 rw,defaults 0 0" >> $MY_FSTAB
+echo "${TS_DEVICE}3 /foo/C ext2 rw,defaults 0 0" >> $MY_FSTAB
+echo "${TS_DEVICE}4 /foo/D ext4 rw,defaults 0 0" >> $MY_FSTAB
+# mount all to prefix
+$TS_CMD_MOUNT --all \
+ --fstab $MY_FSTAB \
+ --target-prefix $MY_ROOT \
+ -o X-mount.mkdir >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "mount failed"
+udevadm settle
+$TS_CMD_UMOUNT $MY_ROOT/foo/{A,B,C,D}
+[ $? == 0 ] || ts_log "umount failed"
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/mount/fstab-bind b/tests/ts/mount/fstab-bind
new file mode 100755
index 0000000..2c799df
--- /dev/null
+++ b/tests/ts/mount/fstab-bind
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="fstab-bind"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+ts_skip_nonroot
+ts_skip_docker
+
+MY_SOURCE="${TS_MOUNTPOINT}-src"
+
+ts_fstab_add $MY_SOURCE "$TS_MOUNTPOINT" "none" "bind,default,noauto"
+
+mkdir -p $MY_SOURCE
+mkdir -p $TS_MOUNTPOINT
+
+$TS_CMD_MOUNT $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ "$?" = "0" ] || ts_log "error: mount $TS_MOUNTPOINT"
+
+$TS_CMD_FINDMNT --mountpoint "$TS_MOUNTPOINT" &> /dev/null
+[ $? -eq 0 ] || ts_die "Not found target (mount failed?)"
+
+$TS_CMD_UMOUNT $TS_MOUNTPOINT || ts_die "Cannot umount $TS_MOUNTPOINT"
+
+ts_fstab_clean
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-broken b/tests/ts/mount/fstab-broken
new file mode 100755
index 0000000..19edc5f
--- /dev/null
+++ b/tests/ts/mount/fstab-broken
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="broken fstab"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+ts_skip_nonroot
+ts_skip_docker
+
+# Let's use the same mountpoint for all subtests
+MNT=$TS_MOUNTPOINT
+mkdir -p $MNT
+
+ts_fstab_lock
+ts_fstab_open
+echo "tmpd $MNT tmpfs" >> /etc/fstab
+ts_fstab_close
+
+ts_init_subtest "mount"
+$TS_CMD_MOUNT $MNT &> /dev/null
+[ "$?" = "0" ] || ts_log "error: mount $MNT"
+$TS_CMD_FINDMNT --kernel --mountpoint "$MNT" &> /dev/null
+if [ "$?" != "0" ]; then
+ ts_log "Cannot find $MNT in /proc/self/mountinfo"
+else
+ ts_log "OK"
+fi
+$TS_CMD_UMOUNT $MNT &> /dev/null
+if [ "$?" = "0" ]; then
+ # for old systems with mtab and /sbin/mount.tmpfs
+ /bin/umount --fake "$MNT" &> /dev/null
+else
+ ts_log "error: umount $MNT"
+fi
+ts_finalize_subtest
+
+
+ts_init_subtest "mount-all"
+$TS_CMD_MOUNT -a &> /dev/null
+[ "$?" = "0" ] || ts_log "error: mount -a"
+$TS_CMD_FINDMNT --kernel --mountpoint "$MNT" &> /dev/null
+if [ "$?" != "0" ]; then
+ ts_log "Cannot find $MNT in /proc/self/mountinfo"
+else
+ ts_log "OK"
+fi
+$TS_CMD_UMOUNT $MNT &> /dev/null
+if [ "$?" = "0" ]; then
+ # for old systems with mtab and /sbin/mount.tmpfs
+ /bin/umount --fake $MNT &> /dev/null
+else
+ ts_log "error: umount $MNT"
+fi
+ts_finalize_subtest
+
+ts_fstab_clean # this unlocks too
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-btrfs b/tests/ts/mount/fstab-btrfs
new file mode 100755
index 0000000..a1003ab
--- /dev/null
+++ b/tests/ts/mount/fstab-btrfs
@@ -0,0 +1,144 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2016 Stanislav Brabec <sbrabec@suse.cz>
+#
+# 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="btrfs (fstab)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_enotty
+ts_check_prog "mkfs.btrfs"
+ts_check_prog "btrfs"
+
+# btrfs feature check
+if ! btrfs inspect-internal --help &>/dev/null || \
+ btrfs inspect-internal rootid bla 2>&1 | grep -q "unknown token"; then
+ ts_skip "btrfs too old"
+fi
+
+TS_MOUNTPOINT_ANY="$TS_MOUNTPOINT"
+TS_MOUNTPOINT_CREATE="$TS_MOUNTPOINT-create"
+TS_MOUNTPOINT_DEFAULT="$TS_MOUNTPOINT-default"
+TS_MOUNTPOINT_SUBVOL="$TS_MOUNTPOINT-subvol"
+TS_MOUNTPOINT_SUBVOLID="$TS_MOUNTPOINT-subvolid"
+TS_MOUNTPOINT_BIND="$TS_MOUNTPOINT-bind"
+
+ts_device_init 50
+DEVICE=$TS_LODEV
+[ -d "$TS_MOUNTPOINT_CREATE" ] || mkdir -p "$TS_MOUNTPOINT_CREATE"
+[ -d "$TS_MOUNTPOINT_DEFAULT" ] || mkdir -p "$TS_MOUNTPOINT_DEFAULT"
+[ -d "$TS_MOUNTPOINT_SUBVOL" ] || mkdir -p "$TS_MOUNTPOINT_SUBVOL"
+[ -d "$TS_MOUNTPOINT_SUBVOLID" ] || mkdir -p "$TS_MOUNTPOINT_SUBVOLID"
+[ -d "$TS_MOUNTPOINT_BIND" ] || mkdir -p "$TS_MOUNTPOINT_BIND"
+mkfs.btrfs -d single -m single $DEVICE &> /dev/null || ts_die "Cannot make btrfs on $DEVICE"
+
+btrfs device ready $DEVICE 2>/dev/null || ts_skip "btrfs kernel support is missing"
+
+$TS_CMD_MOUNT -o loop "$DEVICE" "$TS_MOUNTPOINT_CREATE" &> /dev/null
+pushd . >/dev/null
+cd "$TS_MOUNTPOINT_CREATE"
+mkdir -p d0/dd0/ddd0
+cd ./d0/dd0/ddd0
+touch file{1..5}
+btrfs subvol create s1 >/dev/null
+cd ./s1
+touch file{1..5}
+mkdir bind-point
+mkdir -p d1/dd1/ddd1
+cd ./d1/dd1/ddd1
+btrfs subvol create s2 >/dev/null
+DEFAULT_SUBVOLID=$(btrfs inspect-internal rootid s2)
+btrfs subvol set-default $DEFAULT_SUBVOLID . >/dev/null
+NON_DEFAULT_SUBVOLID=$(btrfs subvol list "$TS_MOUNTPOINT_CREATE" | while read dummy id rest ; do if test $id = $DEFAULT_SUBVOLID ; then continue ; fi ; echo $id ; done)
+cd ../../../..
+mkdir -p d2/dd2/ddd2
+cd ./d2/dd2/ddd2
+btrfs subvol create s3 >/dev/null
+mkdir -p s3/bind-mnt
+popd >/dev/null
+NON_DEFAULT_SUBVOL=d0/dd0/ddd0/d2/dd2/ddd2/s3
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT_CREATE"
+
+
+ts_init_subtest "btrfs"
+ts_fstab_lock
+ts_fstab_open
+# Tests with fs == btrfs
+# mounting default subvolume, deep in the structure, without entry in fstab
+ts_fstab_addline "$DEVICE" "$TS_MOUNTPOINT_DEFAULT" "btrfs" ""
+# mounting default subvolume, deep in the structure
+ts_fstab_addline "$DEVICE" "$TS_MOUNTPOINT_SUBVOL" "btrfs" "subvol=$NON_DEFAULT_SUBVOL"
+# mounting non-default subvolume
+ts_fstab_addline "$DEVICE" "$TS_MOUNTPOINT_SUBVOLID" "btrfs" "subvolid=$NON_DEFAULT_SUBVOLID"
+# test bind mount pointing to subvolume root
+ts_fstab_addline "$TS_MOUNTPOINT_SUBVOLID" "$TS_MOUNTPOINT_BIND" "auto" "bind"
+ts_fstab_close
+
+$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT_BIND" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT_DEFAULT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT_SUBVOL" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT_SUBVOLID" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+# check that everything was unmounted
+$TS_CMD_MOUNT | grep "$TS_MOUNTPOINT_ANY" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_fstab_clean # this unlock too
+ts_log "Success"
+ts_finalize_subtest
+
+
+ts_init_subtest "auto"
+ts_fstab_lock
+ts_fstab_open
+# Tests with fs == auto
+# mounting default subvolume, deep in the structure, without entry in fstab
+ts_fstab_addline "$DEVICE" "$TS_MOUNTPOINT_DEFAULT" "auto" ""
+# mounting default subvolume, deep in the structure
+ts_fstab_addline "$DEVICE" "$TS_MOUNTPOINT_SUBVOL" "auto" "subvol=$NON_DEFAULT_SUBVOL"
+# mounting non-default subvolume
+ts_fstab_addline "$DEVICE" "$TS_MOUNTPOINT_SUBVOLID" "auto" "subvolid=$NON_DEFAULT_SUBVOLID"
+# test bind mount pointing to subvolume sub-directory
+ts_fstab_addline "$TS_MOUNTPOINT_SUBVOL/bind-mnt" "$TS_MOUNTPOINT_BIND" "auto" "bind"
+ts_fstab_close
+
+$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT_BIND" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT_DEFAULT" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT_SUBVOL" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT_SUBVOLID" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+# check that everything was unmounted
+$TS_CMD_MOUNT | grep "$TS_MOUNTPOINT_ANY" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_fstab_clean # this unlock too
+ts_log "Success"
+ts_finalize_subtest
+
+
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-devname b/tests/ts/mount/fstab-devname
new file mode 100755
index 0000000..5b64a32
--- /dev/null
+++ b/tests/ts/mount/fstab-devname
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by devname (fstab)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+
+ts_device_has "TYPE" "ext2" $DEVICE || ts_die "Cannot find ext2 on $DEVICE"
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+# Use one mountpoint for all subtests
+MOUNTPOINT=$TS_MOUNTPOINT
+
+ts_fstab_add $DEVICE
+
+ts_init_subtest "mountpoint"
+$TS_CMD_MOUNT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE || >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "device-name"
+$TS_CMD_MOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_fstab_clean
+
+ts_finalize
diff --git a/tests/ts/mount/fstab-devname2label b/tests/ts/mount/fstab-devname2label
new file mode 100755
index 0000000..1d85621
--- /dev/null
+++ b/tests/ts/mount/fstab-devname2label
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by devname (fstab label)"
+LABEL="testMountD2L"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot find LABEL '$LABEL' on $DEVICE"
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+ts_fstab_add "LABEL=$LABEL"
+ts_udevadm_settle "$DEVICE" "LABEL"
+
+$TS_CMD_MOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE"
+
+ts_fstab_clean
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-devname2uuid b/tests/ts/mount/fstab-devname2uuid
new file mode 100755
index 0000000..8105fa0
--- /dev/null
+++ b/tests/ts/mount/fstab-devname2uuid
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by devname (fstab uuid)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+UUID=$(ts_uuid_by_devname "$DEVICE") || ts_die "Cannot find UUID on $DEVICE"
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+ts_fstab_add "UUID=$UUID"
+ts_udevadm_settle "$DEVICE" "UUID"
+
+$TS_CMD_MOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE"
+
+ts_fstab_clean
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-label b/tests/ts/mount/fstab-label
new file mode 100755
index 0000000..4b23e7f
--- /dev/null
+++ b/tests/ts/mount/fstab-label
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by label (fstab)"
+LABEL="testFstabLabel"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot find LABEL '$LABEL' on $DEVICE"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+MOUNTPOINT=$TS_MOUNTPOINT
+
+ts_fstab_add "LABEL=$LABEL"
+ts_udevadm_settle "$DEVICE" "LABEL"
+
+ts_init_subtest "no-option"
+$TS_CMD_MOUNT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "L-option"
+$TS_CMD_MOUNT -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "LABEL-option"
+$TS_CMD_MOUNT LABEL=$LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/mount/fstab-label2devname b/tests/ts/mount/fstab-label2devname
new file mode 100755
index 0000000..75ca05e
--- /dev/null
+++ b/tests/ts/mount/fstab-label2devname
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by label (fstab devname)"
+LABEL="testMountL2D"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot find LABEL '$LABEL' on $DEVICE"
+
+ts_fstab_add "$DEVICE"
+ts_udevadm_settle "$DEVICE" "LABEL"
+
+# Mountpoint has to be created here rather than in each subtest since ts_fstab_add writes
+# this mountpoint to the /etc/fstab file and the mountpoint is needed in subtests
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+ts_init_subtest "L-option"
+$TS_CMD_MOUNT -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "LABEL-option"
+$TS_CMD_MOUNT "LABEL=$LABEL" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_fstab_clean
+
+ts_finalize
diff --git a/tests/ts/mount/fstab-label2uuid b/tests/ts/mount/fstab-label2uuid
new file mode 100755
index 0000000..4bfcae4
--- /dev/null
+++ b/tests/ts/mount/fstab-label2uuid
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by label (fstab uuid)"
+LABEL="testMountL2U"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot find LABEL '$LABEL' on $DEVICE"
+UUID=$(ts_uuid_by_devname "$DEVICE") || ts_die "Cannot find UUID on $DEVICE"
+
+ts_fstab_add "UUID=$UUID"
+ts_udevadm_settle "$DEVICE" "LABEL" "UUID"
+
+# Mountpoint has to be created here rather than in each subtest since ts_fstab_add writes
+# this mountpoint to the /etc/fstab file and the mountpoint is needed in subtests
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+ts_init_subtest "L-option"
+$TS_CMD_MOUNT -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "LABEL-option"
+$TS_CMD_MOUNT "LABEL=$LABEL" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_fstab_clean
+
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-loop b/tests/ts/mount/fstab-loop
new file mode 100755
index 0000000..7cc589f
--- /dev/null
+++ b/tests/ts/mount/fstab-loop
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2016 Stanislav Brabec <sbrabec@suse.cz>
+#
+# 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="loop (fstab)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+IMG=$(ts_image_init)
+
+mkfs.ext2 -F $IMG &> /dev/null || ts_die "Cannot make ext2 on $IMG"
+
+[ -d "$TS_MOUNTPOINT-1" ] || mkdir -p $TS_MOUNTPOINT-1
+[ -d "$TS_MOUNTPOINT-2" ] || mkdir -p $TS_MOUNTPOINT-2
+
+ts_fstab_lock
+ts_fstab_open
+
+ts_fstab_addline "$IMG" "$TS_MOUNTPOINT-1" "ext2" "loop"
+$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_fstab_addline "$IMG" "$TS_MOUNTPOINT-2" "ext2" "loop"
+$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_fstab_close
+
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UMOUNT "$TS_MOUNTPOINT-2" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_fstab_clean
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-none b/tests/ts/mount/fstab-none
new file mode 100755
index 0000000..6a4d05b
--- /dev/null
+++ b/tests/ts/mount/fstab-none
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="none"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+ts_skip_nonroot
+ts_skip_docker
+
+ts_fstab_add "none" "$TS_MOUNTPOINT" "tmpfs" "rw,nosuid,nodev,relatime"
+
+mkdir -p $TS_MOUNTPOINT
+
+$TS_CMD_MOUNT $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ "$?" = "0" ] || ts_log "error: mount $TS_MOUNTPOINT"
+
+$TS_CMD_FINDMNT --mountpoint "$TS_MOUNTPOINT" &> /dev/null
+[ $? -eq 0 ] || ts_die "Not found target (mount failed?)"
+
+$TS_CMD_FINDMNT --source "none" --mountpoint "$TS_MOUNTPOINT" &> /dev/null
+[ $? -eq 0 ] || ts_die "Not found source and target"
+
+$TS_CMD_UMOUNT $TS_MOUNTPOINT || ts_die "Cannot umount $TS_MOUNTPOINT"
+
+# for old systems with mtab and /sbin/mount.tmpfs
+/bin/umount --fake "$TS_MOUNTPOINT" &> /dev/null
+
+ts_fstab_clean
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-symlink b/tests/ts/mount/fstab-symlink
new file mode 100755
index 0000000..4d3e37b
--- /dev/null
+++ b/tests/ts/mount/fstab-symlink
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by devname (fstab symlink)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+LINKNAME="$TS_OUTDIR/${TS_TESTNAME}_lnk"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+
+ts_device_has "TYPE" "ext2" $DEVICE || ts_die "Cannot find ext2 on $DEVICE"
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+rm -rf $LINKNAME
+ln -s $DEVICE $LINKNAME
+
+ts_fstab_add $LINKNAME $TS_MOUNTPOINT "auto" "defaults,user"
+
+# variant A) -- UID=0
+$TS_CMD_MOUNT $LINKNAME >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_die "A) Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $LINKNAME || ts_die "A) Cannot umount $LINKNAME"
+
+# variant B) -- disabled, the $TS_CMD_MOUNT is usually not a real program, but
+# libtool wrapper and the real mount is exec()ed with
+# LD_LIBRARY_PATH. This all is bad for suid programs...
+
+#ts_init_suid $TS_CMD_MOUNT
+#ts_init_suid $TS_CMD_UMOUNT
+#
+#su $TS_TESTUSER -c "$TS_CMD_MOUNT -v -v -v $LINKNAME" >> $TS_OUTPUT 2>> $TS_ERRLOG
+#ts_is_mounted $DEVICE
+# || ts_die "B) Cannot find $DEVICE in /proc/mounts"
+#su $TS_TESTUSER -c "$TS_CMD_UMOUNT $LINKNAME" >> $TS_OUTPUT 2>> $TS_ERRLOG \
+# || ts_die "B) Cannot umount $LINKNAME"
+
+ts_fstab_clean
+rm -f $LINKNAME
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-uuid b/tests/ts/mount/fstab-uuid
new file mode 100755
index 0000000..03917b7
--- /dev/null
+++ b/tests/ts/mount/fstab-uuid
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by uuid (fstab)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+UUID=$(ts_uuid_by_devname "$DEVICE") || ts_die "Cannot find UUID on $DEVICE"
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+# Use one mountpoint for all tests
+MOUNTPOINT=$TS_MOUNTPOINT
+
+ts_fstab_add "UUID=$UUID"
+ts_udevadm_settle "$DEVICE" "UUID"
+
+ts_init_subtest "no-option"
+$TS_CMD_MOUNT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "U-option"
+$TS_CMD_MOUNT -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "UUID-option"
+$TS_CMD_MOUNT UUID=$UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_fstab_clean
+
+ts_finalize
diff --git a/tests/ts/mount/fstab-uuid2devname b/tests/ts/mount/fstab-uuid2devname
new file mode 100755
index 0000000..9bf165e
--- /dev/null
+++ b/tests/ts/mount/fstab-uuid2devname
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by uuid (fstab devname)"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+UUID=$(ts_uuid_by_devname "$DEVICE") || ts_die "Cannot find UUID on $DEVICE"
+
+ts_fstab_add "$DEVICE"
+ts_udevadm_settle "$DEVICE" "UUID"
+
+# Mountpoint has to be created here rather than in each subtest since ts_fstab_add writes
+# this mountpoint to the /etc/fstab file and the mountpoint is needed in subtests
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+ts_init_subtest "U-option"
+$TS_CMD_MOUNT -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "UUID-option"
+$TS_CMD_MOUNT "UUID=$UUID" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_fstab_clean
+
+ts_finalize
+
diff --git a/tests/ts/mount/fstab-uuid2label b/tests/ts/mount/fstab-uuid2label
new file mode 100755
index 0000000..de10ff0
--- /dev/null
+++ b/tests/ts/mount/fstab-uuid2label
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by uuid (fstab label)"
+LABEL="testMountU2L"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot find LABEL '$LABEL' on $DEVICE"
+UUID=$(ts_uuid_by_devname "$DEVICE") || ts_die "Cannot find UUID on $DEVICE"
+
+ts_fstab_add "LABEL=$LABEL"
+ts_udevadm_settle "$DEVICE" "LABEL" "UUID"
+
+# Mountpoint has to be created here rather than in each subtest since ts_fstab_add writes
+# this mountpoint to the /etc/fstab file and the mountpoint is needed in subtests
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+ts_init_subtest "U-option"
+$TS_CMD_MOUNT -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "UUID-option"
+$TS_CMD_MOUNT "UUID=$UUID" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>>$TS_ERRLOG
+ts_finalize_subtest
+
+ts_fstab_clean
+
+ts_finalize
diff --git a/tests/ts/mount/label b/tests/ts/mount/label
new file mode 100755
index 0000000..402eca6
--- /dev/null
+++ b/tests/ts/mount/label
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by label"
+LABEL="testMountLabel"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot find LABEL '$LABEL' on $DEVICE"
+
+ts_udevadm_settle "$DEVICE" "LABEL"
+
+ts_init_subtest "L-option"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -L $LABEL $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "LABEL-option"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT LABEL=$LABEL $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/mount/move b/tests/ts/mount/move
new file mode 100755
index 0000000..26b8f3d
--- /dev/null
+++ b/tests/ts/mount/move
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="move"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_test_command "$TS_CMD_MOUNTPOINT"
+
+ts_skip_nonroot
+ts_skip_docker
+
+function mount_and_check {
+ # last arg must be an existing or to-be-mounted mountpoint
+ local mountpoint="${@: -1}"
+
+ $TS_CMD_MOUNT "$@" &> /dev/null \
+ || ts_die "error: mount $*"
+
+ $TS_CMD_MOUNTPOINT -q "$mountpoint" \
+ || ts_die "error: mountpoint $mountpoint"
+}
+
+DIR_PRIVATE="$TS_OUTDIR/mnt-move-private"
+
+DIR_SRC="$DIR_PRIVATE/mnt-move-src"
+DIR_A="$DIR_PRIVATE/mnt-move-A"
+DIR_B="$DIR_PRIVATE/mnt-move-B"
+
+# this may fail if there are mounted dirs left
+rm -rf "$DIR_PRIVATE" || ts_die "cleanup failed, check manually!"
+mkdir "$DIR_PRIVATE" || ts_die "error: mkdir DIR_PRIVATE"
+
+# create bind mount and make it private to be sure
+# (kernel cannot move mount with shared parent)
+mount_and_check --bind $DIR_PRIVATE $DIR_PRIVATE
+mount_and_check --make-rprivate $DIR_PRIVATE
+
+# Is the bind mount still rw?
+mkdir $DIR_SRC $DIR_A $DIR_B \
+ || ts_die "error: mkdir on private bind mount"
+
+# bind
+mount_and_check --bind $DIR_SRC $DIR_A
+
+# move
+mount_and_check --move $DIR_A $DIR_B
+
+# BTW a basic test for findmnt(8) and mountpoint(1)
+for f in `find $DIR_PRIVATE2 $DIR_PRIVATE`; do
+ xo="$($TS_CMD_MOUNTPOINT -q "$f" 2>&1)"
+ x=$?
+ # mountpoint(1) returns 32 if mountpoint does not exist, map it to 1 to
+ # be compatible with findmnt(8)
+ if [ "$x" = "32" ]; then
+ x=1
+ fi
+ yo="$($TS_CMD_FINDMNT --kernel --mountpoint "$f" 2>&1)"
+ y=$?
+
+ [ "$x" = "$y" ] || ts_log "error: findmount vs. mountpoint: $x, $y, $f"
+ [ -z "$xo" ] || ts_log "error: mountpoint is not quiet: $x, $y, $f"
+ if [ "$y" = "0" -a "$yo" = "" ] || [ "$y" = "1" -a "$yo" != "" ]; then
+ ts_log "error, findmount return value vs. output: $x, $y, $f"
+ fi
+done
+
+# clean up
+$TS_CMD_UMOUNT $DIR_B || ts_log "error: umount DIR_B"
+rmdir $DIR_SRC $DIR_A $DIR_B || ts_log "error: rmdir DIR_B"
+$TS_CMD_UMOUNT $DIR_PRIVATE || ts_log "error: umount DIR_PRIVATE"
+rmdir $DIR_PRIVATE || ts_log "error: rmdir DIR_PRIVATE"
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/regfile b/tests/ts/mount/regfile
new file mode 100755
index 0000000..c17c687
--- /dev/null
+++ b/tests/ts/mount/regfile
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Copyright (C) 2011 Karel Zak <kzak@redhat.com>
+# This file is part of util-linux.
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="regular file"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+IMAGE=$(ts_image_init)
+mkfs.ext2 -F $IMAGE &> /dev/null || ts_die "Cannot make ext2 on $IMAGE"
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+$TS_CMD_MOUNT $IMAGE $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+DEVICE=$(awk '/regfile/ { print $1 }' /proc/mounts)
+
+ts_is_mounted "$TS_MOUNTPOINT" || ts_die "Cannot find $TS_MOUNTPOINT in /proc/mounts"
+
+if [ -f "/sys/block/$(basename $DEVICE)/loop/backing_file" ]; then
+ $TS_CMD_UMOUNT $IMAGE || ts_die "Cannot umount $IMAGE"
+else
+ $TS_CMD_UMOUNT $TS_MOUNTPOINT &> /dev/null
+ ts_skip "too old kernel"
+fi
+
+ts_is_mounted "$TS_MOUNTPOINT" && ts_die "$TS_MOUNTPOINT still in /proc/mounts"
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/remount b/tests/ts/mount/remount
new file mode 100755
index 0000000..003f0dc
--- /dev/null
+++ b/tests/ts/mount/remount
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="remount"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+# mountpoint
+[ -d $TS_MOUNTPOINT ] || mkdir -p $TS_MOUNTPOINT
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+MTAB_FILE="/proc/mounts"
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+
+# mount read-write
+$TS_CMD_MOUNT $DEVICE $TS_MOUNTPOINT &> /dev/null \
+ || ts_die "Cannot mount $TS_MOUNTPOINT"
+
+# check the mount
+grep -E -q "^$DEVICE $TS_MOUNTPOINT" $MTAB_FILE \
+ || ts_die "Cannot find $TS_MOUNTPOINT in $MTAB_FILE"
+
+# remount
+$TS_CMD_MOUNT -o remount,ro $TS_MOUNTPOINT &> /dev/null \
+ || ts_die "Cannot remount $TS_MOUNTPOINT"
+
+# check the remount
+$TS_CMD_FINDMNT --kernel --mountpoint "$TS_MOUNTPOINT" --options "ro" &> /dev/null
+[ "$?" == "0" ] || ts_die "Cannot find read-only in $TS_MOUNTPOINT in /proc/self/mountinfo"
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/set_ugid_mode b/tests/ts/mount/set_ugid_mode
new file mode 100755
index 0000000..8041354
--- /dev/null
+++ b/tests/ts/mount/set_ugid_mode
@@ -0,0 +1,64 @@
+#!/bin/bash
+# SPDX-License-Identifier: 0BSD
+
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="X-mount.{owner,group,mode}="
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+ts_check_prog "id"
+ts_check_prog "stat"
+
+
+do_one() {
+ expected="$1"; shift
+ what="$1"; shift
+ where="$1"; shift
+ $TS_CMD_MOUNT "$@" "$what" "$where" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ actual=$(stat --format="%A %u %g" "$where")
+ [ "$actual" = "$expected" ] || echo "$*: $actual != $expected" >> $TS_ERRLOG
+ $TS_CMD_UMOUNT "$where" >> $TS_OUTPUT 2>> $TS_ERRLOG
+}
+
+ts_device_init
+
+mkfs.ext2 "$TS_LODEV" > /dev/null 2>&1 || ts_die "Cannot make ext2 on $TS_LODEV"
+ts_device_has "TYPE" "ext2" "$TS_LODEV" || ts_die "Cannot find ext2 on $TS_LODEV"
+
+user_1="$(id -un 1)"
+group_2="$(id -gn 2)"
+
+
+mkdir -p "$TS_MOUNTPOINT"
+
+do_one "drwxr-xr-x 0 0" "$TS_LODEV" "$TS_MOUNTPOINT"
+do_one "drwxr-xr-x 1 0" "$TS_LODEV" "$TS_MOUNTPOINT" -o "X-mount.owner=$user_1"
+do_one "drwxr-xr-x 1 2" "$TS_LODEV" "$TS_MOUNTPOINT" -o "X-mount.group=$group_2"
+do_one "d-w--wxr-T 132 2" "$TS_LODEV" "$TS_MOUNTPOINT" -o "X-mount.owner=132,X-mount.mode=1234"
+do_one "d-ws-w---x 132 123" "$TS_LODEV" "$TS_MOUNTPOINT" -o "X-mount.mode=4321,X-mount.group=123"
+do_one "d-ws-w---x 1 321" "$TS_LODEV" "$TS_MOUNTPOINT" -o "X-mount.owner=$user_1,X-mount.group=321"
+
+
+> "$TS_MOUNTPOINT/bind"
+> "$TS_MOUNTPOINT/bindsrc"
+
+do_one "-rw-r--r-- 0 0" "$TS_MOUNTPOINT/bindsrc" "$TS_MOUNTPOINT/bind" --bind
+do_one "-rw-r--r-- 1 0" "$TS_MOUNTPOINT/bindsrc" "$TS_MOUNTPOINT/bind" --bind -o "X-mount.owner=$user_1"
+do_one "-rw-r--r-- 1 2" "$TS_MOUNTPOINT/bindsrc" "$TS_MOUNTPOINT/bind" --bind -o "X-mount.group=$group_2"
+do_one "--w--wxr-T 132 2" "$TS_MOUNTPOINT/bindsrc" "$TS_MOUNTPOINT/bind" --bind -o "X-mount.owner=132,X-mount.mode=1234"
+do_one "--ws-w---x 132 123" "$TS_MOUNTPOINT/bindsrc" "$TS_MOUNTPOINT/bind" --bind -o "X-mount.mode=4321,X-mount.group=123"
+do_one "--wx-w---x 1 321" "$TS_MOUNTPOINT/bindsrc" "$TS_MOUNTPOINT/bind" --bind -o "X-mount.owner=$user_1,X-mount.group=321"
+
+
+rm -fd "$TS_MOUNTPOINT/bind" "$TS_MOUNTPOINT/bindsrc" "$TS_MOUNTPOINT"
+
+ts_log "Success"
+ts_finalize
diff --git a/tests/ts/mount/shared-subtree b/tests/ts/mount/shared-subtree
new file mode 100755
index 0000000..aaaaf64
--- /dev/null
+++ b/tests/ts/mount/shared-subtree
@@ -0,0 +1,87 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="shared-subtree"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+[ -d $TS_MOUNTPOINT ] || mkdir -p $TS_MOUNTPOINT
+
+# bind
+$TS_CMD_MOUNT --bind $TS_MOUNTPOINT $TS_MOUNTPOINT &> /dev/null
+[ "$?" = "0" ] || ts_die "error: mount --bind"
+
+# check the bind
+$TS_CMD_FINDMNT --kernel --mountpoint $TS_MOUNTPOINT &> /dev/null
+[ "$?" == "0" ] || ts_die "Cannot find binded $TS_MOUNTPOINT in /proc/self/mountinfo"
+
+# use the same mounpoint for all sub-tests
+MOUNTPOINT="$TS_MOUNTPOINT"
+
+
+ts_init_subtest "make-shared"
+$TS_CMD_MOUNT --make-shared $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT -nr --mountpoint $MOUNTPOINT -o PROPAGATION >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "make-private"
+$TS_CMD_MOUNT --make-private $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT -nr --mountpoint $MOUNTPOINT -o PROPAGATION >> $TS_OUTPUT
+ts_finalize_subtest
+
+
+ts_init_subtest "make-unbindable"
+$TS_CMD_MOUNT --make-unbindable $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT -nr --mountpoint $MOUNTPOINT -o PROPAGATION >> $TS_OUTPUT
+ts_finalize_subtest
+
+# clean up
+$TS_CMD_UMOUNT $MOUNTPOINT
+
+
+ts_init_subtest "bind-shared"
+$TS_CMD_MOUNT --make-shared \
+ --bind $MOUNTPOINT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT -nr --mountpoint $MOUNTPOINT -o PROPAGATION >> $TS_OUTPUT
+$TS_CMD_UMOUNT $MOUNTPOINT
+ts_finalize_subtest
+
+
+#
+# block dev based mounts
+#
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_device_has "TYPE" "ext2" $DEVICE || ts_die "Cannot find ext2 on $DEVICE"
+
+
+ts_init_subtest "mount-private"
+$TS_CMD_MOUNT --make-private --make-unbindable \
+ $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT -nr --mountpoint $MOUNTPOINT -o PROPAGATION >> $TS_OUTPUT
+$TS_CMD_UMOUNT $MOUNTPOINT
+ts_finalize_subtest
+
+ts_init_subtest "mount-private-ro"
+$TS_CMD_MOUNT $DEVICE $MOUNTPOINT -o ro,private >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_FINDMNT -nr --mountpoint $MOUNTPOINT -o PROPAGATION >> $TS_OUTPUT
+$TS_CMD_FINDMNT -nr --mountpoint $MOUNTPOINT -o VFS-OPTIONS >> $TS_OUTPUT
+$TS_CMD_UMOUNT $MOUNTPOINT
+ts_finalize_subtest
+
+rmdir $MOUNTPOINT
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/special b/tests/ts/mount/special
new file mode 100755
index 0000000..359d8aa
--- /dev/null
+++ b/tests/ts/mount/special
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="call mount.<type>"
+MOUNTER="/sbin/mount.mytest"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+
+ts_skip_nonroot
+
+cat > $MOUNTER <<\EOF
+#!/bin/bash
+# This util-linux regression test component
+# It's safe to remove me...
+#
+echo "$0 called with \"$*\""
+EOF
+chmod +x $MOUNTER
+
+ts_init_subtest "basic"
+$TS_CMD_MOUNT -t mytest /foo /bar &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "options"
+$TS_CMD_MOUNT -t mytest -o foo,defaults /foo /bar &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "multi-types"
+$TS_CMD_MOUNT -t mytest,invalid /foo /bar &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "user"
+$TS_CMD_MOUNT -t mytest -ouser,abc /foo /bar &> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "username"
+$TS_CMD_MOUNT -t mytest -ouser=name,abc /foo /bar &> $TS_OUTPUT
+ts_finalize_subtest
+
+rm -f $MOUNTER
+
+ts_finalize
+
diff --git a/tests/ts/mount/subdir b/tests/ts/mount/subdir
new file mode 100755
index 0000000..a16a7d0
--- /dev/null
+++ b/tests/ts/mount/subdir
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2022 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="${0%/*}/../.."
+TS_DESC="X-mount.subdir"
+
+. $TS_TOPDIR/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_skip_nonroot
+ts_check_losetup
+
+# unshared session is possible to support only on kernels with new mount API
+if [ "$("$TS_HELPER_SYSINFO" fsopen-ok)" = "0" ]; then
+ prop=$($TS_CMD_FINDMNT --task "$$" -n -o PROPAGATION "/")
+ [[ "$prop" == *"private"* ]] && ts_skip "unsupported session"
+fi
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+ts_udevadm_settle "$DEVICE"
+
+# use the same mountpoiunt for all subtests
+MOUNTPOINT="$TS_MOUNTPOINT"
+[ -d "$MOUNTPOINT" ] || mkdir -p $MOUNTPOINT
+
+
+# create subdirectory on the filesystem
+ts_init_subtest "init"
+$TS_CMD_MOUNT $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+mkdir -p $MOUNTPOINT/submnt
+touch $MOUNTPOINT/submnt/file
+$TS_CMD_UMOUNT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "subdir"
+$TS_CMD_MOUNT -o X-mount.subdir=submnt $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+if [ ! -f "$MOUNTPOINT/file" ]; then
+ echo "$MOUNTPOINT/file not found" >> $TS_OUTPUT
+fi
+$TS_CMD_UMOUNT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/mount/umount-alltargets b/tests/ts/mount/umount-alltargets
new file mode 100755
index 0000000..3277d6e
--- /dev/null
+++ b/tests/ts/mount/umount-alltargets
@@ -0,0 +1,120 @@
+#!/bin/bash
+
+# Copyright (C) 2013 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="umount-all-targets"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FDISK"
+
+ts_skip_nonroot
+ts_check_prog "mkfs.ext2"
+
+$TS_CMD_UMOUNT --help | grep -q all-targets
+[ $? -eq 1 ] && ts_skip "all-targets unsupported"
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} &> /dev/null <<EOF
+o
+n
+p
+1
+
++10M
+n
+p
+2
+
++10M
+n
+p
+3
+
++10M
+n
+p
+
++10M
+w
+q
+EOF
+
+udevadm settle
+
+ts_log "Create filesystem A"
+mkfs.ext2 ${TS_DEVICE}1 &> /dev/null
+ts_log "Create filesystem B"
+mkfs.ext2 ${TS_DEVICE}2 &> /dev/null
+ts_log "Create filesystem C"
+mkfs.ext2 ${TS_DEVICE}3 &> /dev/null
+ts_log "Create filesystem D"
+mkfs.ext2 ${TS_DEVICE}4 &> /dev/null
+
+udevadm settle
+
+function multi_mount() {
+ local DEV=$1
+ local MNT=$2
+
+ ts_log "prepare: Mount dev to mnt1"
+ [ -d "${MNT}1" ] || mkdir -p ${MNT}1
+ $TS_CMD_MOUNT $DEV ${MNT}1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ ts_log "prepare: Mount dev to mnt2"
+ [ -d "${MNT}2" ] || mkdir -p ${MNT}2
+ $TS_CMD_MOUNT $DEV ${MNT}2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ ts_log "prepare: Mount /dev/xxx1 to mnt3"
+ [ -d "${MNT}3" ] || mkdir -p ${MNT}3
+ $TS_CMD_MOUNT $DEV ${MNT}3 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ udevadm settle
+}
+
+# use the same top-level mountpoint for all sub-tests
+MOUNTPOINT=$TS_MOUNTPOINT
+
+#
+# The same device mounted on more places, umount all by mountpoint name
+#
+ts_init_subtest "all-targets-mnt"
+multi_mount ${TS_DEVICE}1 $MOUNTPOINT
+$TS_CMD_UMOUNT --all-targets ${MOUNTPOINT}1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "umount failed"
+ts_finalize_subtest
+
+#
+# The same device mounted on more places, umount all by device name
+#
+ts_init_subtest "all-targets-dev"
+multi_mount ${TS_DEVICE}1 $MOUNTPOINT
+$TS_CMD_UMOUNT --all-targets ${TS_DEVICE}1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "umount failed"
+ts_finalize_subtest
+
+#
+# The same device mounted on more places, one of the mountpoints also contains
+# sub-mounts. Umount all by one umount all by top-level device name.
+#
+ts_init_subtest "all-targets-recursive"
+multi_mount ${TS_DEVICE}1 $MOUNTPOINT
+[ -d "${MOUNTPOINT}1/subA" ] || mkdir -p ${MOUNTPOINT}1/subA
+$TS_CMD_MOUNT ${TS_DEVICE}2 ${MOUNTPOINT}1/subA &> /dev/null
+[ -d "${MOUNTPOINT}1/subA/subAB" ] || mkdir -p ${MOUNTPOINT}1/subA/subAB
+$TS_CMD_MOUNT ${TS_DEVICE}3 ${MOUNTPOINT}1/subA/subAB &> /dev/null
+[ -d "${MOUNTPOINT}1/subB" ] || mkdir -p ${MOUNTPOINT}1/subB
+$TS_CMD_MOUNT ${TS_DEVICE}4 ${MOUNTPOINT}1/subB &> /dev/null
+$TS_CMD_UMOUNT --recursive --all-targets ${TS_DEVICE}1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_log "umount failed"
+ts_finalize_subtest
+
+ts_log "Success"
+ts_finalize
diff --git a/tests/ts/mount/umount-recursive b/tests/ts/mount/umount-recursive
new file mode 100755
index 0000000..8b1fd47
--- /dev/null
+++ b/tests/ts/mount/umount-recursive
@@ -0,0 +1,100 @@
+#!/bin/bash
+
+# Copyright (C) 2012 Karel Zak <kzak@redhat.com>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="umount-recursive"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+ts_check_test_command "$TS_CMD_FDISK"
+
+ts_skip_nonroot
+ts_check_prog "mkfs.ext2"
+
+$TS_CMD_UMOUNT --help | grep -q recursive
+[ $? -eq 1 ] && ts_skip "recursive unsupported"
+
+ts_log "Init device"
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50
+
+ts_log "Create partitions"
+$TS_CMD_FDISK --noauto-pt ${TS_DEVICE} &> /dev/null <<EOF
+o
+n
+p
+1
+
++10M
+n
+p
+2
+
++10M
+n
+p
+3
+
++10M
+n
+p
+
++10M
+w
+q
+EOF
+
+udevadm settle
+
+ts_log "Create filesystem A"
+mkfs.ext2 ${TS_DEVICE}1 &> /dev/null
+ts_log "Create filesystem B"
+mkfs.ext2 ${TS_DEVICE}2 &> /dev/null
+ts_log "Create filesystem C"
+mkfs.ext2 ${TS_DEVICE}3 &> /dev/null
+ts_log "Create filesystem D"
+mkfs.ext2 ${TS_DEVICE}4 &> /dev/null
+
+udevadm settle
+
+ts_log "Do tests..."
+
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+
+ts_log "A) Mount root"
+$TS_CMD_MOUNT ${TS_DEVICE}1 $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT --make-shared $TS_MOUNTPOINT &> /dev/null
+
+ts_log "B) Mount child"
+mkdir -p $TS_MOUNTPOINT/mntB
+$TS_CMD_MOUNT ${TS_DEVICE}2 $TS_MOUNTPOINT/mntB >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_log "B2) Mount child-bind"
+mkdir -p $TS_MOUNTPOINT/bindB
+$TS_CMD_MOUNT --bind $TS_MOUNTPOINT/mntB $TS_MOUNTPOINT/bindB >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_log "C) Mount child/child"
+mkdir -p $TS_MOUNTPOINT/mntB/mnt{C,D}
+$TS_CMD_MOUNT ${TS_DEVICE}3 $TS_MOUNTPOINT/mntB/mntC >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_log "D) Mount child/child"
+$TS_CMD_MOUNT ${TS_DEVICE}4 $TS_MOUNTPOINT/mntB/mntD >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_log "E) Mount child-bind"
+mkdir -p $TS_MOUNTPOINT/bindC
+$TS_CMD_MOUNT --bind $TS_MOUNTPOINT/mntB/mntC $TS_MOUNTPOINT/bindC &> /dev/nul
+
+ts_log "F) Mount mountpoint-bind"
+$TS_CMD_MOUNT --bind $TS_MOUNTPOINT $TS_MOUNTPOINT &> /dev/null
+
+udevadm settle
+$TS_CMD_UMOUNT --recursive $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+[ $? == 0 ] || ts_die "umount failed"
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/mount/uuid b/tests/ts/mount/uuid
new file mode 100755
index 0000000..f2edfe1
--- /dev/null
+++ b/tests/ts/mount/uuid
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by uuid"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
+
+ts_skip_nonroot
+ts_check_losetup
+ts_check_prog "mkfs.ext2"
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+mkfs.ext2 $DEVICE &> /dev/null || ts_die "Cannot make ext2 on $DEVICE"
+UUID=$(ts_uuid_by_devname "$DEVICE") || ts_die "Cannot find UUID on $DEVICE"
+
+ts_udevadm_settle "$DEVICE" "UUID"
+
+ts_init_subtest "U-option"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT -U $UUID $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "UUID-option"
+[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+$TS_CMD_MOUNT UUID=$UUID $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
+$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/namei/logic b/tests/ts/namei/logic
new file mode 100755
index 0000000..52ce9ac
--- /dev/null
+++ b/tests/ts/namei/logic
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="basic functionality"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_NAMEI"
+
+ts_cd "$TS_OUTDIR"
+
+mkdir -p namei1/namei2
+touch namei1/namei2/a namei1/namei2/b
+
+$TS_CMD_NAMEI namei1/namei2/a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_NAMEI namei1/namei2/b >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
+
diff --git a/tests/ts/partx/partx b/tests/ts/partx/partx
new file mode 100755
index 0000000..e202100
--- /dev/null
+++ b/tests/ts/partx/partx
@@ -0,0 +1,186 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2010 Davidlohr Bueso <dave@gnu.org>
+#
+# 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="partitions probing"
+PARTS=3
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_PARTX"
+ts_check_test_command "$TS_CMD_ADDPART"
+ts_check_test_command "$TS_CMD_DELPART"
+ts_check_test_command "$TS_CMD_SFDISK"
+
+ts_skip_nonroot
+
+shopt -s nullglob
+
+function check_partition_count
+{
+ # this function needs shopt -s nullglob
+ local cnt_want=$1
+ local devname=$(basename $TS_DEVICE)
+ local parts=(/sys/block/${devname}/${devname}*)
+ local cnt_have=${#parts[@]}
+
+ if [ $cnt_have -eq $cnt_want ]; then
+ return 0
+ fi
+ echo "error: expected $cnt_want partitions, have $cnt_have" >&2
+ echo "${parts[@]}" >&2
+ return 1
+}
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50
+
+ts_init_subtest "addpart"
+{
+ $TS_CMD_ADDPART ${TS_DEVICE} 1 0 1 &&
+ echo OK ||
+ echo "Unable to add partition"
+ check_partition_count 1
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "delpart"
+{
+ $TS_CMD_DELPART ${TS_DEVICE} 1 &&
+ echo OK ||
+ echo "Unable to remove partition"
+ check_partition_count 0
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+udevadm settle
+$TS_CMD_SFDISK $TS_DEVICE &> /dev/null <<EOF
+label: dos
+label-id: 0x1ddc8a79
+32,33760,,
+33792,33792,,
+67584,34816,,
+EOF
+udevadm settle
+
+
+ts_init_subtest "detect-parts"
+{
+ $TS_CMD_PARTX --show $TS_DEVICE &&
+ echo OK ||
+ echo "Unable to list partitions"
+ check_partition_count $PARTS
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "delete-all"
+#delete partinfo
+{
+ $TS_CMD_PARTX --delete $TS_DEVICE &&
+ echo "partitions deleted" ||
+ echo "Unable to delete partitions on $TS_DEVICE"
+ check_partition_count 0
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "add-all"
+#read TS_DEVICE and restore the partinfo
+{
+ $TS_CMD_PARTX --add $TS_DEVICE &&
+ echo "partitions added" ||
+ echo "Unable to add partitions for $TS_DEVICE"
+ check_partition_count $PARTS
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "update-one"
+#read TS_DEVICE and update second partition
+{
+ $TS_CMD_PARTX --update ${TS_DEVICE}2 &&
+ echo "partitions updated" ||
+ echo "Unable to update 2nd partition for $TS_DEVICE"
+ check_partition_count $PARTS
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "delete-one"
+#remove last partition only
+{
+ $TS_CMD_PARTX -d --nr -1 $TS_DEVICE &&
+ echo "last partition removed" ||
+ echo "Unable to remove a partition on $TS_DEVICE"
+ check_partition_count $((PARTS-1))
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "delete-non-existent"
+#attempt to remove it again
+{
+ # remove non-existing partitions (ENXIO) is not error
+ #
+ # see ab025087f91b66ee8e23a16bc49eb0d9bd421d65 and
+ # 53ae7d60cfeacd4e87bfe6fcc015b58b78ef4555
+ #
+ $TS_CMD_PARTX -d --nr $PARTS $TS_DEVICE &&
+ echo "partx: OK" ||
+ echo "partx failed: removed non-existing partition"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "add-existing"
+#try adding an existing partition
+{
+ $TS_CMD_PARTX -a --nr 1 $TS_DEVICE 2>/dev/null &&
+ echo "partx failed: re-added an existing partition" ||
+ echo "partx: OK"
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+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 $TS_DEVICE &&
+ echo "partitions deleted" ||
+ echo "Unable to delete partitions on $TS_DEVICE"
+ check_partition_count 0
+ $TS_CMD_PARTX -a --nr 0 $TS_DEVICE &&
+ echo "partitions added" ||
+ echo "Failed to add $TS_DEVICE partitions"
+ check_partition_count $PARTS
+} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/partx/partx-image b/tests/ts/partx/partx-image
new file mode 100755
index 0000000..a0ecf2c
--- /dev/null
+++ b/tests/ts/partx/partx-image
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2010 Davidlohr Bueso <dave@gnu.org>
+#
+# 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="show images"
+TS_IMGDIR="$TS_TOPDIR/ts/blkid/images-pt"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_PARTX"
+ts_check_prog "xz"
+
+mkdir -p $TS_OUTDIR/images-pt
+for img in $TS_IMGDIR/*.img.xz; do
+ name=$(basename $img .img.xz)
+ outimg=$TS_OUTDIR/images-pt/${name}.img
+
+ ts_init_subtest $name
+ {
+ xz -dc $img > $outimg &&
+ $TS_CMD_PARTX $outimg ||
+ echo "failed: $?"
+ } >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_finalize_subtest
+done
+
+ts_finalize
diff --git a/tests/ts/paths/built-in b/tests/ts/paths/built-in
new file mode 100755
index 0000000..2301ffb
--- /dev/null
+++ b/tests/ts/paths/built-in
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="built-in"
+
+# Don't execute this test by default, --force required
+TS_OPTIONAL="yes"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_PATHS"
+
+$TS_HELPER_PATHS &> $TS_OUTPUT
+
+ts_finalize
+
diff --git a/tests/ts/rename/basic b/tests/ts/rename/basic
new file mode 100755
index 0000000..786b092
--- /dev/null
+++ b/tests/ts/rename/basic
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2014 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="basic check"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_RENAME"
+ts_cd "$TS_OUTDIR"
+
+touch rename_basic.{1..3}
+$TS_CMD_RENAME -v basic test rename_basic.? >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+for i in rename_basic.?; do
+ echo "what is $i doing here?" >> $TS_OUTPUT
+done
+for i in rename_test.{1..3}; do
+ if [ ! -f $i ]; then
+ echo "file $i is missing" >> $TS_OUTPUT
+ else
+ rm -f $i
+ fi
+done
+
+
+touch rename_all\ file\ with\ spaces.{1..3}
+$TS_CMD_RENAME -v -a ' ' '_' rename_all*.? >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+for i in rename_all*\ *.?; do
+ echo "what is $i doing here?" >> $TS_OUTPUT
+done
+for i in rename_all_file_with_spaces.{1..3}; do
+ if [ ! -f $i ]; then
+ echo "file $i is missing" >> $TS_OUTPUT
+ else
+ rm -f $i
+ fi
+done
+
+touch rename_zz_last_{z,z{,z{,z}}}.{x..z}
+$TS_CMD_RENAME -v -l zz AAzzBB rename_zz_last_* >> $TS_OUTPUT 2>> $TS_ERRLOG
+for i in rename_AAzzBB_last_z.x rename_AAzzBB_last_z.y rename_AAzzBB_last_z.z \
+ rename_zz_last_AAzzBB.x rename_zz_last_AAzzBB.y rename_zz_last_AAzzBB.z \
+ rename_zz_last_zAAzzBB.x rename_zz_last_zAAzzBB.y rename_zz_last_zAAzzBB.z ; do
+ if [ ! -f $i ]; then
+ echo "file $i is missing" >> $TS_OUTPUT
+ else
+ rm -f $i
+ fi
+done
+for i in rename*last* ; do
+ echo "what is $i doing here?" >> $TS_OUTPUT
+done
+
+touch rename_all_empty
+$TS_CMD_RENAME -v -a '' _ rename_all_empty >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f _r_e_n_a_m_e___a_l_l___e_m_p_t_y_
+
+ts_finalize
diff --git a/tests/ts/rename/exit_codes b/tests/ts/rename/exit_codes
new file mode 100755
index 0000000..2f79d55
--- /dev/null
+++ b/tests/ts/rename/exit_codes
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2014 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="exit codes"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_RENAME"
+
+ts_cd "$TS_OUTDIR"
+
+touch rename_exit_codes.{1..2}
+$TS_CMD_RENAME -v not_a_match impossible rename_exit_codes.? >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "RENAME_EXIT_NOTHING: $?" >> $TS_OUTPUT
+
+$TS_CMD_RENAME -v codes values rename_exit_codes.? >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "EXIT_SUCCESS: $?" >> $TS_OUTPUT
+
+mkdir rename_exit_codes.2
+$TS_CMD_RENAME -v values codes rename_exit_values.? >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "RENAME_EXIT_SOMEOK: $?" >> $TS_OUTPUT
+
+rmdir rename_exit_codes.2
+rm rename_exit_codes.? rename_exit_values.?
+
+ts_finalize
diff --git a/tests/ts/rename/overwrite b/tests/ts/rename/overwrite
new file mode 100755
index 0000000..96a524a
--- /dev/null
+++ b/tests/ts/rename/overwrite
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2017 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="overwrite"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_RENAME"
+ts_cd "$TS_OUTDIR"
+
+touch rename_from rename_to
+$TS_CMD_RENAME -v --no-overwrite from to rename_from >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm rename_from rename_to >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/rename/subdir b/tests/ts/rename/subdir
new file mode 100755
index 0000000..c3de0ac
--- /dev/null
+++ b/tests/ts/rename/subdir
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2014 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="subdir check"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_RENAME"
+ts_cd "$TS_OUTDIR"
+
+echo "== files ==" >> $TS_OUTPUT
+mkdir rename_a{a,b}
+touch rename_a{a,b}/aa
+$TS_CMD_RENAME -v a x rename_a?/aa >> $TS_OUTPUT 2>> $TS_ERRLOG
+find rename_a{a,b} >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+echo "== symlinks ==" >> $TS_OUTPUT
+for i in rename_a{a,b}/sublink.{1..3}; do
+ ln -s rename/aa $i
+done
+$TS_CMD_RENAME -s -v a x rename_a{a,b}/sublink.? >> $TS_OUTPUT 2>> $TS_ERRLOG
+for i in rename_a{a,b}/sublink.?; do
+ readlink $i >> $TS_OUTPUT 2>> $TS_ERRLOG
+done
+
+rm -rf rename_a{a,b}
+
+echo "== fullpath ==" >> $TS_OUTPUT
+touch rename_path1
+$TS_CMD_RENAME -v ./rename_path1 ./rename_path2 ./rename_path1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+find . -name 'rename_path*' >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f ./rename_path*
+
+mkdir rename_path_a
+touch rename_path_test1
+
+$TS_CMD_RENAME -v rename_path_test1 rename_path_a/test1 rename_path_test1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+find . -name '*test1*' >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f rename_path_test1 rename_path_a/test1
+
+mkdir rename_path_b
+touch rename_path_a/test2
+$TS_CMD_RENAME -v rename_path_a/test2 rename_path_b/test2 rename_path_a/test2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+find rename_path_a rename_path_b >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f rename_path_a/test2 rename_path_b/test2
+
+rmdir rename_path_a rename_path_b
+
+ln -s some/nonexistent/path rename_link
+$TS_CMD_RENAME -s -v t/p _ rename_link >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_RENAME -s -v exist / rename_link >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_RENAME -s -v e x rename_link >> $TS_OUTPUT 2>> $TS_ERRLOG
+readlink rename_link >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm rename_link
+
+echo "== empty 'from' ==" >> $TS_OUTPUT
+
+touch rename_test
+$TS_CMD_RENAME -v '' _ rename_test >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f *rename_test
+
+touch rename_test
+$TS_CMD_RENAME -v '' _ ./rename_test >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f *rename_test
+
+touch rename_test
+mkdir rename_subdir
+$TS_CMD_RENAME -v '' rename_subdir/ rename_test >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -rf rename_subdir
+
+touch rename_test
+mkdir rename_subdir
+$TS_CMD_RENAME -v '' rename_subdir/ ./rename_test >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -rf rename_subdir
+
+ts_finalize
diff --git a/tests/ts/rename/symlink b/tests/ts/rename/symlink
new file mode 100755
index 0000000..f775ada
--- /dev/null
+++ b/tests/ts/rename/symlink
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2014 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="symlink check"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_RENAME"
+ts_cd "$TS_OUTDIR"
+
+for i in rename_slink.{1..3}; do
+ ln -s old $i
+done
+
+$TS_CMD_RENAME -s -v old new rename_slink.? >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+for i in rename_slink.{1..3}; do
+ where="$(readlink $i)"
+ if [ "$where" != "new" ]; then
+ echo "error: $i points to $where" >> $TS_OUTPUT
+ fi
+ rm -f $i
+done
+
+touch target
+ln -s target rename_slink.1
+$TS_CMD_RENAME -v slink symlink rename_slink.1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+readlink rename_symlink.1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f rename_slink.1 rename_symlink.1
+
+rm target
+ln -s target rename_slink.2
+$TS_CMD_RENAME -v slink symlink rename_slink.2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+readlink rename_symlink.2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+rm -f rename_slink.2 rename_symlink.2
+
+$TS_CMD_RENAME -v slink symlink rename_slink.3 >> $TS_OUTPUT 2>> $TS_ERRLOG
+# The error may differ on Mac OS X due to faccessat()/lstat(); normalize it.
+sed -i -e 's/\(rename_slink.3\): not accessible/\1/' -e 's/stat of \(rename_slink.3\) failed/\1/' $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/schedutils/chrt b/tests/ts/schedutils/chrt
new file mode 100755
index 0000000..aca735f
--- /dev/null
+++ b/tests/ts/schedutils/chrt
@@ -0,0 +1,110 @@
+#!/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="chrt"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_CHRT"
+ts_skip_nonroot
+
+# TODO: drone.io does not like FIFO and RR (container restriction?)
+TS_KNOWN_FAIL="yes"
+
+function do_chrt {
+ $TS_CMD_CHRT $* $TS_CMD_CHRT --pid 0 | sed 's/.* policy: //; s/.* priority: //' >> $TS_OUTPUT 2>> $TS_ERRLOG
+}
+
+function skip_policy {
+ $TS_CMD_CHRT --max | grep $1 | grep 'priority' &> /dev/null
+ if [ $? == 1 ]; then
+ ts_skip_subtest "unsupported"
+ return 1
+ fi
+ return 0
+}
+
+function cleanup_output {
+ sed -i -e 's/pid [0-9]*/<removed>/' $TS_OUTPUT
+}
+
+
+ts_init_subtest "fifo"
+skip_policy SCHED_FIFO
+if [ $? == 0 ]; then
+ do_chrt --fifo 1
+ do_chrt --fifo 99
+ cleanup_output
+ ts_finalize_subtest
+fi
+
+
+ts_init_subtest "batch"
+skip_policy SCHED_BATCH
+if [ $? == 0 ]; then
+ do_chrt --batch 0
+ cleanup_output
+ ts_finalize_subtest
+fi
+
+
+ts_init_subtest "other"
+skip_policy SCHED_OTHER
+if [ $? == 0 ]; then
+ do_chrt --other 0
+ cleanup_output
+ ts_finalize_subtest
+fi
+
+
+ts_init_subtest "rr"
+skip_policy SCHED_RR
+if [ $? == 0 ]; then
+ do_chrt --rr 1
+ do_chrt --rr 99
+ cleanup_output
+ ts_finalize_subtest
+fi
+
+
+ts_init_subtest "idle"
+skip_policy SCHED_IDLE
+if [ $? == 0 ]; then
+ do_chrt --idle 0
+ cleanup_output
+ ts_finalize_subtest
+fi
+
+
+ts_init_subtest "deadline"
+skip_policy SCHED_DEADLINE
+if [ $? == 0 ]; then
+ do_chrt --deadline --sched-period 13000 0
+ do_chrt --deadline --sched-period 13000 --sched-deadline 12000 0
+ do_chrt --deadline --sched-period 13000 --sched-deadline 12000 --sched-runtime 10000 0
+ cleanup_output
+ ts_finalize_subtest
+fi
+
+# failed -- let's report kernel limits
+#
+if [ $TS_NSUBFAILED -ne 0 ]; then
+ echo "Supported policies:"
+ $TS_CMD_CHRT --max
+fi
+
+ts_finalize
diff --git a/tests/ts/schedutils/chrt-non-root b/tests/ts/schedutils/chrt-non-root
new file mode 100755
index 0000000..8600981
--- /dev/null
+++ b/tests/ts/schedutils/chrt-non-root
@@ -0,0 +1,61 @@
+#!/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="chrt-non-user"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_CHRT"
+
+# TODO: drone.io does not like FIFO and RR (container restriction?)
+TS_KNOWN_FAIL="yes"
+
+function do_chrt {
+ $TS_CMD_CHRT $* $TS_CMD_CHRT --pid 0 | sed 's/.* policy: //; s/.* priority: //' >> $TS_OUTPUT 2>> $TS_ERRLOG
+}
+
+function skip_policy {
+ $TS_CMD_CHRT --max | grep $1 | grep 'priority' &> /dev/null
+ if [ $? == 1 ]; then
+ ts_skip_subtest "unsupported"
+ return 1
+ fi
+ return 0
+}
+
+function cleanup_output {
+ sed -i -e 's/pid [0-9]*/<removed>/' $TS_OUTPUT
+ sed -i -e 's/[0-9]* (process/<removed> (process/' $TS_OUTPUT
+}
+
+ts_init_subtest "batch-vs-nice"
+skip_policy SCHED_BATCH
+if [ $? == 0 ]; then
+ renice -n 5 -p $$ >> $TS_OUTPUT 2>> $TS_ERRLOG
+ do_chrt --batch 0
+ cleanup_output
+ ts_finalize_subtest
+fi
+
+# failed -- let's report kernel limits
+#
+if [ $TS_NSUBFAILED -ne 0 ]; then
+ echo "Supported policies:"
+ $TS_CMD_CHRT --max
+fi
+
+ts_finalize
diff --git a/tests/ts/schedutils/cpuset b/tests/ts/schedutils/cpuset
new file mode 100755
index 0000000..0e756ee
--- /dev/null
+++ b/tests/ts/schedutils/cpuset
@@ -0,0 +1,59 @@
+#!/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="cpuset"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_CPUSET"
+
+MASKS=" 0x00000001 \
+ 0x00000002 \
+ 0x00000003 \
+ 0x00000004 \
+ 0x00000005 \
+ 0x00000006 \
+ 0x00000007 \
+ 0x00000008 \
+ 0x00000009 \
+ 0x00005555 \
+ 0x00007777"
+
+RANGES="0 \
+ 1 \
+ 0,1 \
+ 2 \
+ 0,2 \
+ 1,2 \
+ 0-2 \
+ 3 \
+ 0,3 \
+ 0,2,4,6,8,10,12,14 \
+ 0-2,4-6,8-10,12-14"
+
+ts_log "masks:"
+for i in $MASKS; do
+ $TS_HELPER_CPUSET --mask $i >> $TS_OUTPUT
+done
+
+ts_log "strings:"
+for i in $RANGES; do
+ $TS_HELPER_CPUSET --range $i >> $TS_OUTPUT
+done
+
+ts_finalize
diff --git a/tests/ts/script/buffering-race b/tests/ts/script/buffering-race
new file mode 100755
index 0000000..a5f3d94
--- /dev/null
+++ b/tests/ts/script/buffering-race
@@ -0,0 +1,27 @@
+#!/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="buffering race"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SCRIPT"
+
+#SCRIPT_DEBUG=all ULPTY_DEBUG=all
+$TS_CMD_SCRIPT -c "echo Hallo World" /dev/null </dev/null >$TS_OUTPUT
+
+ts_finalize
+
diff --git a/tests/ts/script/options b/tests/ts/script/options
new file mode 100755
index 0000000..3cbd5c8
--- /dev/null
+++ b/tests/ts/script/options
@@ -0,0 +1,66 @@
+#!/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="options"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+export SCRIPT_TEST_SECOND_SINCE_EPOCH=1432489398
+export TZ="GMT"
+
+ts_check_test_command "$TS_HELPER_SCRIPT"
+
+ts_init_subtest "append"
+$TS_HELPER_SCRIPT --command "echo append1" $TS_OUTPUT </dev/null >/dev/null 2>&1
+$TS_HELPER_SCRIPT --append -c "echo append2" $TS_OUTPUT </dev/null >/dev/null 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "force"
+ln -s $TS_OUTPUT typescript
+$TS_HELPER_SCRIPT --command "echo no force" </dev/null >/dev/null 2>> $TS_OUTPUT
+echo $? >> $TS_OUTPUT
+$TS_HELPER_SCRIPT -a --force --command "echo with force" </dev/null >/dev/null
+echo $? >> $TS_OUTPUT
+rm -f typescript
+ln -s $TS_OUTPUT tpircsepyt
+$TS_HELPER_SCRIPT -a --command "echo not typescript" tpircsepyt </dev/null >/dev/null
+echo $? >> $TS_OUTPUT
+rm -f tpircsepyt
+ts_finalize_subtest
+
+ts_init_subtest "quiet"
+$TS_HELPER_SCRIPT --quiet --command "echo quiet1" $TS_OUTPUT </dev/null >/dev/null 2>&1
+$TS_HELPER_SCRIPT -a -q --command "echo quiet2" $TS_OUTPUT </dev/null >/dev/null 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "return"
+$TS_HELPER_SCRIPT --command "exit 1" $TS_OUTPUT </dev/null >/dev/null 2>&1
+echo $? >> $TS_OUTPUT
+$TS_HELPER_SCRIPT -a --command "exit 0" $TS_OUTPUT </dev/null >/dev/null 2>&1
+echo $? >> $TS_OUTPUT
+$TS_HELPER_SCRIPT -e --append -c "exit 42" $TS_OUTPUT </dev/null >/dev/null 2>&1
+echo $? >> $TS_OUTPUT
+$TS_HELPER_SCRIPT --return --append -c "exit 127" $TS_OUTPUT </dev/null >/dev/null 2>&1
+echo $? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_init_subtest "size"
+$TS_HELPER_SCRIPT --output-limit 9 --command "echo 1:1234567890" $TS_OUTPUT </dev/null >/dev/null 2>&1
+$TS_HELPER_SCRIPT -a -o 9 --command "echo 2:1234567890" $TS_OUTPUT </dev/null >/dev/null 2>&1
+echo $? >> $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/script/race b/tests/ts/script/race
new file mode 100755
index 0000000..b4d2d8a
--- /dev/null
+++ b/tests/ts/script/race
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="race conditions"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SCRIPT"
+
+# this test may fail on systems with very heavy load
+# https://github.com/util-linux/util-linux/issues/296
+TS_KNOWN_FAIL="yes"
+
+bingofile="$TS_OUTDIR/${TS_TESTNAME}-bingo"
+
+count=1000
+for i in `seq 1 $count`; do
+ $TS_CMD_SCRIPT -q -c "printf 'Bingo\n'" $bingofile
+done | grep -c Bingo >> $TS_OUTPUT
+
+seen=$(<$TS_OUTPUT)
+if [ "$seen" = "$count" ]; then
+ echo "all bingos seen" > $TS_OUTPUT
+else
+ echo "only $seen of $count bingos seen" > $TS_OUTPUT
+fi
+
+rm -f $bingofile
+
+ts_finalize
+
diff --git a/tests/ts/script/replay b/tests/ts/script/replay
new file mode 100755
index 0000000..384c5b3
--- /dev/null
+++ b/tests/ts/script/replay
@@ -0,0 +1,98 @@
+#!/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="replay"
+
+. "$TS_TOPDIR/functions.sh"
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SCRIPT"
+ts_check_test_command "$TS_CMD_SCRIPTREPLAY"
+ts_check_test_command "$TS_CMD_SCRIPTLIVE"
+
+LOG_OUT_FILE="${TS_OUTDIR}/${TS_TESTNAME}-logfile-out"
+LOG_IN_FILE="${TS_OUTDIR}/${TS_TESTNAME}-logfile-in"
+LOG_IO_FILE="${TS_OUTDIR}/${TS_TESTNAME}-logfile-io"
+TIMING_FILE="${TS_OUTDIR}/${TS_TESTNAME}-logfile-tm"
+
+rm -f $TIMING_FILE $LOG_IN_FILE $LOG_OUT_FILE $LOG_IO_FILE
+
+
+#
+# Old command line format
+#
+ts_init_subtest "basic"
+echo "===recording" >"$TS_OUTPUT"
+$TS_CMD_SCRIPT \
+ --command "echo hello world; sleep 0.5; echo all done" \
+ --timing="$TIMING_FILE" \
+ "$LOG_OUT_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+echo "===replaying" >>"$TS_OUTPUT"
+$TS_CMD_SCRIPTREPLAY "$TIMING_FILE" "$LOG_OUT_FILE" 1.5 >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+sed -i "s|$TIMING_FILE|timingfile|g; s|$LOG_OUT_FILE|outlog|g" $TS_OUTPUT $TS_ERRLOG
+ts_finalize_subtest
+
+
+#
+# New command line format
+#
+ts_init_subtest "output"
+echo "===recording" >"$TS_OUTPUT"
+NUMBER=1 $TS_CMD_SCRIPT \
+ --command 'echo "result is $(($NUMBER + 1))"' \
+ --log-out "$LOG_OUT_FILE" \
+ --log-timing "$TIMING_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+echo "===replaying" >>"$TS_OUTPUT"
+$TS_CMD_SCRIPTREPLAY \
+ --log-out "$LOG_OUT_FILE" \
+ --log-timing "$TIMING_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+sed -i "s|$TIMING_FILE|timingfile|g; s|$LOG_OUT_FILE|outlog|g" $TS_OUTPUT $TS_ERRLOG
+ts_finalize_subtest
+
+
+#
+# Log input
+#
+ts_init_subtest "input"
+echo "===recording" >"$TS_OUTPUT"
+echo 'echo "result is $(($NUMBER + 1))"' | $TS_CMD_SCRIPT \
+ --command 'sh' \
+ --log-in "$LOG_IN_FILE" \
+ --log-timing "$TIMING_FILE" >> /dev/null 2>> $TS_ERRLOG
+
+echo "===replaying" >>"$TS_OUTPUT"
+$TS_CMD_SCRIPTREPLAY \
+ --log-in "$LOG_IN_FILE" \
+ --log-timing "$TIMING_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+#
+# Live replay
+#
+ts_init_subtest "live"
+TS_KNOWN_FAIL="yes"
+NUMBER=123 $TS_CMD_SCRIPTLIVE \
+ --command 'sh' \
+ --log-in "$LOG_IN_FILE" \
+ --log-timing "$TIMING_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+sed -i 's/^[[:alnum:][:punct:][:blank:]]*[\$\#] /prompt> /g' $TS_OUTPUT
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/sfdisk/dos b/tests/ts/sfdisk/dos
new file mode 100755
index 0000000..0cff511
--- /dev/null
+++ b/tests/ts/sfdisk/dos
@@ -0,0 +1,276 @@
+#!/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"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_CMD_WIPEFS"
+
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3
+
+
+ts_init_subtest "simple-commas"
+$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+ 2048,6144,L
+8192, 6144,S
+14336 , 6144 ,
+20480,,E
+,6144 ,
+,,
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "activate"
+$TS_CMD_SFDISK --activate ${TS_DEVICE} 1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --unit S --list ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "simple-space"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+ 2048 6144 L
+8192 6144 S
+,,
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "read-dump-case"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label-id: 0x1ddc8a79
+
+${TS_DEVICE}1 : stArt= 2048, sIZe= 6144, id=83, bootAble
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "read-dump"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label-id: 0x1ddc8a79
+
+${TS_DEVICE}1 : start= 2048, size= 6144, Id=83, bootable
+${TS_DEVICE}2 : start= 8192, size= 6144, Id=82
+${TS_DEVICE}3 : start= 14336, size= 6144, Id=83
+${TS_DEVICE}4 : start= 20480, size= 81920, Id= 5
+${TS_DEVICE}5 : start= 20481, size= 6144, Id=83
+${TS_DEVICE}6 : start= 26626, size= 75774, Id=83
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "write-dump"
+$TS_CMD_SFDISK --unit S --dump ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "write-json"
+$TS_CMD_SFDISK --json ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+#
+# Test first LBA smaller than libfdisk default (~1MiB) and small gaps between
+# logical partitions (just only one sector for EBR).
+#
+ts_init_subtest "explicit-size"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+label: dos
+1, 1000, L
+1001, 1000, S
+2001, 1000
+3001,,E
+3002,1000,L
+4003,1000,L
+5004,,L
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "resize"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} > /dev/null 2>&1 <<EOF
+label: dos
+,10M,S,*
+EOF
+udevadm settle
+echo ',+' | $TS_CMD_SFDISK --no-reread -N1 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "resize-empty-extended"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} > /dev/null 2>&1 <<EOF
+label: dos
+,1M
+,2M,E
+EOF
+udevadm settle
+echo ',+' | $TS_CMD_SFDISK --no-reread -N2 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "reduce-empty-extended"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} > /dev/null 2>&1 <<EOF
+label: dos
+,1M
+,5M,E
+EOF
+udevadm settle
+echo ',-2M' | $TS_CMD_SFDISK --no-reread -N2 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+ts_init_subtest "resize-extended"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} > /dev/null 2>&1 <<EOF
+label: dos
+,1M
+,1M
+,1M
+,5M,E
+,1M
+,1M
+EOF
+udevadm settle
+echo ',+' | $TS_CMD_SFDISK --no-reread -N4 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "resize-logical"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} > /dev/null 2>&1 <<EOF
+label: dos
+,1M
+,1M
+,1M
+,10M,E
+,1M
+,1M
+EOF
+udevadm settle
+echo ',+' | $TS_CMD_SFDISK --no-reread -N6 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "dump-old"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} < $TS_SELF/files/dump-old >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "dump-gaps"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} < $TS_SELF/files/dump-gaps >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "default-vs-gap1"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+3MiB 5MiB L
+- 6MiB L
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "default-vs-gap2"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+4MiB 3MiB L
+13MiB 5MiB L
+- 4MiB L
+- 2MiB L
+- - L
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "sizes-vs-gaps"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+2048 1023 L -
+4096 4095 L -
+8192 8191 L -
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/sfdisk/dump b/tests/ts/sfdisk/dump
new file mode 100755
index 0000000..3311d31
--- /dev/null
+++ b/tests/ts/sfdisk/dump
@@ -0,0 +1,87 @@
+#!/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="script"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_CMD_WIPEFS"
+
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=100 sector_size=512 physblk_exp=3
+
+ts_init_subtest "v2.32"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+label: gpt
+label-id: 613005F9-1C8C-E141-8AEB-F32E8E296C75
+device: ${TS_DEVICE}
+unit: sectors
+first-lba: 2048
+last-lba: 204766
+
+${TS_DEVICE}1 : start= 2048, size= 20480, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=28A432A3-8D63-3142-B9F5-68A2BF2BC60B
+${TS_DEVICE}2 : start= 22528, size= 22528, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=6A7D17FC-7252-564A-9B68-5E2107999BF1
+${TS_DEVICE}3 : start= 45056, size= 24576, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=26C303E4-0321-3346-B9EF-BDD39BEA1166
+${TS_DEVICE}4 : start= 69632, size= 135135, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=AF79D434-C8B3-2445-80FB-317AB157447C
+EOF
+udevadm settle
+$TS_CMD_SFDISK --list -o START,END,SIZE,UUID,TYPE,NAME ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "v2.35"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+label: gpt
+label-id: 613005F9-1C8C-E141-8AEB-F32E8E296C75
+device: ${TS_DEVICE}
+unit: sectors
+first-lba: 2048
+last-lba: 204766
+sector-size: 512
+
+${TS_DEVICE}1 : start= 2048, size= 20480, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=28A432A3-8D63-3142-B9F5-68A2BF2BC60B
+${TS_DEVICE}2 : start= 22528, size= 22528, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=6A7D17FC-7252-564A-9B68-5E2107999BF1
+${TS_DEVICE}3 : start= 45056, size= 24576, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=26C303E4-0321-3346-B9EF-BDD39BEA1166
+${TS_DEVICE}4 : start= 69632, size= 135135, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=AF79D434-C8B3-2445-80FB-317AB157447C
+EOF
+udevadm settle
+$TS_CMD_SFDISK --list -o START,END,SIZE,UUID,TYPE,NAME ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "current"
+$TS_CMD_SFDISK --dump ${TS_DEVICE} > $TS_OUTPUT.dump 2>> $TS_ERRLOG
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+cat $TS_OUTPUT.dump | $TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+$TS_CMD_SFDISK --list -o START,END,SIZE,UUID,TYPE,NAME ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/sfdisk/files/dump-gaps b/tests/ts/sfdisk/files/dump-gaps
new file mode 100644
index 0000000..3aff9ca
--- /dev/null
+++ b/tests/ts/sfdisk/files/dump-gaps
@@ -0,0 +1,7 @@
+# partition table of /dev/sdc
+unit: sectors
+
+/dev/sdc1 : start= 2048, size= 49999, Id=83, bootable
+/dev/sdc2 : start= 0, size= 0, Id= 0
+/dev/sdc3 : start= 52048, size= 49999, Id=83
+/dev/sdc4 : start= 0, size= 0, Id= 0
diff --git a/tests/ts/sfdisk/files/dump-old b/tests/ts/sfdisk/files/dump-old
new file mode 100644
index 0000000..7708e5e
--- /dev/null
+++ b/tests/ts/sfdisk/files/dump-old
@@ -0,0 +1,7 @@
+# partition table of /dev/sdc
+unit: sectors
+
+/dev/sdc1 : start= 2048, size= 49999, Id=83, bootable
+/dev/sdc2 : start= 0, size= 0, Id= 0
+/dev/sdc3 : start= 0, size= 0, Id= 0
+/dev/sdc4 : start= 0, size= 0, Id= 0
diff --git a/tests/ts/sfdisk/gpt b/tests/ts/sfdisk/gpt
new file mode 100755
index 0000000..273d965
--- /dev/null
+++ b/tests/ts/sfdisk/gpt
@@ -0,0 +1,206 @@
+#!/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="GPT"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_CMD_FDISK"
+ts_check_test_command "$TS_CMD_WIPEFS"
+
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3
+
+
+ts_init_subtest "all-defaults"
+$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+label: gpt
+label-id: b181c399-4711-4c52-8b65-9e764541218d
+
+,5M
+, 5M, L
+, 5M,S
+, 5M, 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709
+, ,
+EOF
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "uuid"
+$TS_CMD_SFDISK --part-uuid ${TS_DEVICE} 1 91dc657b-d7b4-4653-a367-663194ffd432 &> /dev/null
+$TS_CMD_SFDISK --part-uuid ${TS_DEVICE} 2 baa08adf-327e-4177-8953-98da1a5176c4 &> /dev/null
+$TS_CMD_SFDISK --part-uuid ${TS_DEVICE} 3 cead8a87-ff1a-45cb-83e5-99b08d0ebc87 &> /dev/null
+$TS_CMD_SFDISK --part-uuid ${TS_DEVICE} 4 d4fcdc60-765d-4bc3-bd84-0d0b9842c6db &> /dev/null
+$TS_CMD_SFDISK --part-uuid ${TS_DEVICE} 5 60155bd7-bfd8-4e8c-b800-221900779373 &> /dev/null
+
+$TS_CMD_SFDISK --part-uuid ${TS_DEVICE} 1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "label"
+$TS_CMD_SFDISK --part-label ${TS_DEVICE} 1 "EFI system" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --part-label ${TS_DEVICE} 1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "type"
+$TS_CMD_SFDISK --part-type ${TS_DEVICE} 1 "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --part-type ${TS_DEVICE} 1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "attrs"
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 "RequiredPartition,NoBlockIOProtocol,48,51" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo -ne 'x\nD\n' | $TS_CMD_FDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "attrs-space"
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 "RequiredPartition NoBlockIOProtocol 48 51" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo -ne 'x\nD\n' | $TS_CMD_FDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "attrs-guid"
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 "GUID:48 GUID:51,52,63" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo -ne 'x\nD\n' | $TS_CMD_FDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "attrs-with-typo"
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 "RequiredPartiton,NoBlockIOProtocol,48,51" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo -ne 'x\nD\n' | $TS_CMD_FDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "attrs-unsupported"
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 "NoBlockIOProtocol FooBar 48 51" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "attrs-broken-nosep"
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 "NoBlockIOProtocolRequiredPartiton" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "attrs-broken-guid"
+$TS_CMD_SFDISK --part-attrs ${TS_DEVICE} 2 "GUID:NoBlockIOProtocol GUID:GUID:63 RequiredPartiton" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "read-dump"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start=2048, size=6144, type=44479540-F297-41B2-9AF7-D131D5F0458A, uuid=4dd6948a-44f8-4e6c-8bdc-064f740704f8
+${TS_DEVICE}2 : start=8192, size=6144, uuid=44b51def-5f04-465a-91aa-2889a62d8e49
+${TS_DEVICE}3 : start=14336, size=6144, uuid=643e1d0d-bc02-4ced-b83b-86121062858f
+${TS_DEVICE}4 : start=20480, size=81887,uuid=d2a29b0a-fdee-40c3-9bae-b9fa782c986c, name="GPT is the best"
+EOF
+udevadm settle
+$TS_CMD_SFDISK --list -o START,END,SIZE,UUID,TYPE,NAME ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "write-dump"
+$TS_CMD_SFDISK --unit S --dump ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "write-json"
+$TS_CMD_SFDISK --json ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "list-pmbr"
+$TS_CMD_SFDISK --list --label-nested dos ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "resize"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} > /dev/null 2>&1 <<EOF
+label: gpt
+,10M,S,*
+EOF
+udevadm settle
+echo ',+' | $TS_CMD_SFDISK --no-reread -N1 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_init_subtest "reorder"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start=8192, size=6144
+${TS_DEVICE}2 : start=2048, size=6144
+${TS_DEVICE}3 : start=20480, size=81887
+${TS_DEVICE}4 : start=14336, size=6144
+EOF
+udevadm settle
+# why --reorder does not re-read?
+$TS_CMD_SFDISK --reorder ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SFDISK --list ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/sfdisk/movedata b/tests/ts/sfdisk/movedata
new file mode 100755
index 0000000..5b5232c
--- /dev/null
+++ b/tests/ts/sfdisk/movedata
@@ -0,0 +1,75 @@
+#!/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="movedata"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_HELPER_MD5"
+
+ts_skip_nonroot
+ts_check_prog "mkfs.ext4"
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=100 sector_size=512
+
+# create a partition
+echo ',10M,L' | $TS_CMD_SFDISK --no-reread ${TS_DEVICE} &> /dev/null
+udevadm settle
+
+mkfs.ext4 ${TS_DEVICE}1 &> /dev/null
+udevadm settle
+CHECKSUM=$("$TS_HELPER_MD5" < "${TS_DEVICE}1")
+
+function checksum() {
+ local dev="$1"
+ CHECK=$("$TS_HELPER_MD5" < "${dev}")
+ if [ "$CHECKSUM" != "$CHECK" ]; then
+ echo "Checksum does not match!" >> $TS_OUTPUT
+ fi
+}
+
+ts_init_subtest "up"
+echo '+1000,' | $TS_CMD_SFDISK --no-reread --move-data=$TS_OUTPUT.log -N1 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+checksum ${TS_DEVICE}1
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "down"
+echo "-500," | $TS_CMD_SFDISK --no-reread --move-data=$TS_OUTPUT.log -N1 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+checksum ${TS_DEVICE}1
+ts_finalize_subtest
+
+udevadm settle
+
+ts_init_subtest "non-overlay"
+echo "+30M," | $TS_CMD_SFDISK --no-reread --move-data=$TS_OUTPUT.log -N1 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+checksum ${TS_DEVICE}1
+ts_finalize_subtest
+
+
+ts_finalize
diff --git a/tests/ts/sfdisk/resize b/tests/ts/sfdisk/resize
new file mode 100755
index 0000000..664301d
--- /dev/null
+++ b/tests/ts/sfdisk/resize
@@ -0,0 +1,154 @@
+#!/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="resize"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_CMD_WIPEFS"
+
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=100 sector_size=512
+
+declare -a COMM
+declare -a NAME
+
+COMM[0]="3000,"
+NAME[0]="move-up-absolute"
+
+COMM[1]="2048,"
+NAME[1]="move-down-absolute"
+
+COMM[2]="+1M,"
+NAME[2]="move-up-relative"
+
+COMM[3]="-1M,"
+NAME[3]="move-down-relative"
+
+COMM[4]="-,15M"
+NAME[4]="enlarge-absolute"
+
+COMM[5]=",5M,"
+NAME[5]="reduce-absolute"
+
+COMM[6]=", +10M"
+NAME[6]="enlarge-relative"
+
+NAME[7]="reduce-relative"
+COMM[7]=", -10M"
+
+NAME[8]="enlarge-all"
+COMM[8]=",+"
+
+NAME[9]="up-preduce"
+COMM[9]="+10M,-10M"
+
+NAME[10]="down-enlarge"
+COMM[10]="-10M,+10M,,*"
+
+NAME[11]="absolute-move-resize"
+COMM[11]="2048,10M,L"
+
+function test_label_resize {
+ local label="$1"
+
+ $TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+ udevadm settle
+
+ # create a partition
+ echo ',10M,L' | $TS_CMD_SFDISK --no-reread --label ${label} ${TS_DEVICE} &> /dev/null
+ udevadm settle
+
+ for idx in $(seq 0 $(( ${#COMM[*]} - 1 ))); do
+
+ cmd=${COMM[$idx]}
+ name=${NAME[$idx]}
+
+ ts_init_subtest "$label-$idx-$name"
+ echo -e "$cmd\n" >> $TS_OUTPUT
+ echo "$cmd" | $TS_CMD_SFDISK --no-reread -N1 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_fdisk_clean $TS_DEVICE
+ udevadm settle
+ ts_finalize_subtest
+ done
+
+ echo ',10M,L' | $TS_CMD_SFDISK --no-reread --append ${TS_DEVICE} &> /dev/null
+ udevadm settle
+
+ echo ',10M,L' | $TS_CMD_SFDISK --no-reread --append ${TS_DEVICE} &> /dev/null
+ udevadm settle
+
+ idx=$(( $idx + 1 ))
+ ts_init_subtest "$label-$idx-reduce-midle"
+ cmd=',-5M'
+ echo -e "$cmd\n" >> $TS_OUTPUT
+ echo "$cmd" | $TS_CMD_SFDISK --no-reread -N2 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_fdisk_clean $TS_DEVICE
+ udevadm settle
+ ts_finalize_subtest
+
+ idx=$(( $idx + 1 ))
+ ts_init_subtest "$label-$idx-max-last"
+ cmd='-5M,+'
+ echo -e "$cmd\n" >> $TS_OUTPUT
+ echo $cmd | $TS_CMD_SFDISK --no-reread -N3 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ts_fdisk_clean $TS_DEVICE
+ udevadm settle
+ ts_finalize_subtest
+}
+
+# MBR
+test_label_resize dos
+
+# GPT
+test_label_resize gpt
+
+
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+
+ts_init_subtest "dos-unsorted"
+# create layout where partition #4 is the last on disk (by offset)
+# and there is freespace at the end of the disk. Note that #4 is not the last
+# partno on the disk. The libfdisk has to be able to check for the free space
+# independently on the partno, only offset+size matters.
+$TS_CMD_SFDISK --no-reread ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+label: dos
+label-id: 0xda2e45ac
+device: ${TS_DEVICE}
+unit: sectors
+
+${TS_DEVICE}1 : start= 2048, size= 2048, type=83
+${TS_DEVICE}2 : start= 4096, size= 2048, type=83
+${TS_DEVICE}3 : start= 6144, size= 102400, type=5
+${TS_DEVICE}4 : start= 108544, size= 2048, type=83
+${TS_DEVICE}5 : start= 8192, size= 2048, type=83
+${TS_DEVICE}6 : start= 12288, size= 96256, type=83
+EOF
+udevadm settle
+# enlarge to use all space behind partition #4
+echo ',+,' | $TS_CMD_SFDISK --no-reread -N 4 ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/sfdisk/script b/tests/ts/sfdisk/script
new file mode 100755
index 0000000..1e4bb2f
--- /dev/null
+++ b/tests/ts/sfdisk/script
@@ -0,0 +1,157 @@
+#!/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="script"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_CMD_WIPEFS"
+
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3
+
+ts_init_subtest "type-and-id"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start=2048, size=6144, Id=44479540-F297-41B2-9AF7-D131D5F0458A, uuid=4dd6948a-44f8-4e6c-8bdc-064f740704f8
+${TS_DEVICE}2 : start=8192, size=6144, id=44479540-F297-41B2-9AF7-D131D5F0458A, uuid=44b51def-5f04-465a-91aa-2889a62d8e49
+${TS_DEVICE}3 : start=14336, size=6144, type=44479540-F297-41B2-9AF7-D131D5F0458A, uuid=643e1d0d-bc02-4ced-b83b-86121062858f
+${TS_DEVICE}4 : start=20480, size=81887,Type=44479540-F297-41B2-9AF7-D131D5F0458A, uuid=d2a29b0a-fdee-40c3-9bae-b9fa782c986c
+EOF
+udevadm settle
+$TS_CMD_SFDISK --list -o START,END,SIZE,UUID,TYPE,NAME ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+ts_init_subtest "separator"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start=2048 size=6144 uuid=4dd6948a-44f8-4e6c-8bdc-064f740704f8
+${TS_DEVICE}2 : start=8192,size=6144, uuid=44b51def-5f04-465a-91aa-2889a62d8e49 ,type=44479540-F297-41B2-9AF7-D131D5F0458A
+${TS_DEVICE}3 : start=14336 , size=6144 ,uuid=643e1d0d-bc02-4ced-b83b-86121062858f
+${TS_DEVICE}4 : start=20480; size=81887 ; uuid=d2a29b0a-fdee-40c3-9bae-b9fa782c986c
+EOF
+udevadm settle
+$TS_CMD_SFDISK --list -o START,END,SIZE,UUID,TYPE,NAME ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "quotes"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start=2048 uuid="4dd6948a-44f8-4e6c-8bdc-064f740704f8" size=6144
+${TS_DEVICE}2 : start= 8192 uuid="44b51def-5f04-465a-91aa-2889a62d8e49" , size=6144
+${TS_DEVICE}3: start=14336 uuid="643e1d0d-bc02-4ced-b83b-86121062858f",size=6144
+${TS_DEVICE}4 : start=20480 uuid="d2a29b0a-fdee-40c3-9bae-b9fa782c986c", size=6144
+EOF
+udevadm settle
+$TS_CMD_SFDISK --list -o START,END,SIZE,UUID,TYPE,NAME ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "broken-1"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start =2048 uuid="4dd6948a-44f8-4e6c-8bdc-064f740704f8" size=6144
+EOF
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "broken-2"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start=2048uuid="4dd6948a-44f8-4e6c-8bdc-064f740704f8" size=6144
+EOF
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "broken-3"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start=2048 uuid=,"4dd6948a-44f8-4e6c-8bdc-064f740704f8" size=6144
+EOF
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "broken-4"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start=2048 uuid="4dd6948a-44f8-4e6c-8bdc-064f740704f8 size=6144
+EOF
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+ts_init_subtest "broken-5"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_SFDISK ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG <<EOF
+unit: sectors
+label: gpt
+label-id: 3b8559db-33af-43e9-befc-c331d829b539
+
+${TS_DEVICE}1 : start=2048 uuid=4dd6948a-44f8-4e6c-8bdc-064f740704f8" size=6144
+EOF
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/sfdisk/wipe b/tests/ts/sfdisk/wipe
new file mode 100755
index 0000000..fd15525
--- /dev/null
+++ b/tests/ts/sfdisk/wipe
@@ -0,0 +1,104 @@
+#!/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="wipe"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_SFDISK"
+ts_check_test_command "$TS_CMD_WIPEFS"
+ts_check_test_command "$TS_CMD_MKSWAP"
+
+ts_skip_nonroot
+
+SFDISK_OPTS="--no-tell-kernel --no-reread"
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3
+
+
+ts_init_subtest "gpt-to-dos"
+ts_separator "Create GPT"
+echo ',,L' | $TS_CMD_SFDISK $SFDISK_OPTS --label=gpt ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_separator "Create DOS"
+echo ',,L' | $TS_CMD_SFDISK $SFDISK_OPTS --wipe=always --label=dos ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_separator "Check content"
+$TS_CMD_WIPEFS -O OFFSET,TYPE ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+# Same as previous test, but without --wipe=always, sfdisk has to wipe
+# the device automatically when switch from one PT to another PT
+#
+ts_init_subtest "gpt-to-dos-auto"
+ts_separator "Create GPT"
+echo ',,L' | $TS_CMD_SFDISK $SFDISK_OPTS --label=gpt ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_separator "Create DOS"
+echo ',,L' | $TS_CMD_SFDISK $SFDISK_OPTS --label=dos ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_separator "Check content"
+$TS_CMD_WIPEFS -O OFFSET,TYPE ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "fs-to-dos"
+ts_separator "Create FS"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+$TS_CMD_MKSWAP ${TS_DEVICE} &> /dev/null
+udevadm settle
+ts_separator "Create DOS"
+echo ',,L' | $TS_CMD_SFDISK $SFDISK_OPTS --wipe=always --label=dos ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+udevadm settle
+ts_separator "Check content"
+$TS_CMD_WIPEFS -O OFFSET,TYPE ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+
+ts_init_subtest "partition"
+ts_separator "Create GPT"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+echo ',,L' | $TS_CMD_SFDISK --no-reread --label=gpt ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_separator "Create FS in partition"
+$TS_CMD_MKSWAP ${TS_DEVICE}1 &> /dev/null
+udevadm settle
+ts_separator "Wipe whole-disk device"
+$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
+ts_separator "Create GPT (again)"
+echo ',,L' | $TS_CMD_SFDISK --no-reread --wipe-partition=always --label=gpt ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_separator "Check content (disk)"
+$TS_CMD_WIPEFS -O OFFSET,TYPE ${TS_DEVICE} >> $TS_OUTPUT 2>> $TS_ERRLOG
+udevadm settle
+ts_separator "Check content (partition)"
+$TS_CMD_WIPEFS -O OFFSET,TYPE ${TS_DEVICE}1 >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
+udevadm settle
+ts_finalize
diff --git a/tests/ts/sha1/data b/tests/ts/sha1/data
new file mode 100644
index 0000000..1eed05a
--- /dev/null
+++ b/tests/ts/sha1/data
@@ -0,0 +1,7 @@
+
+abc
+qazxswedc
+1qazxsw23edc
+a a a a a a a a a a
+KUWIOJDNWQKLFDHQUWEDAYCNAUIWSYDUQUICBSKLBCLUWIGDF
+EASC6545642432132SDECSESCEACSJKDWIOUDOIWIDOQPWUDQWIOSNXCSASCA
diff --git a/tests/ts/sha1/sha1 b/tests/ts/sha1/sha1
new file mode 100755
index 0000000..7d2413c
--- /dev/null
+++ b/tests/ts/sha1/sha1
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2009 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="${0%/*}/../.."
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_SHA1"
+
+cat $TS_SELF/data | while read data
+do
+ echo -n $data | $TS_HELPER_SHA1 >> $TS_OUTPUT
+done
+
+ts_finalize
+
diff --git a/tests/ts/swapon/devname b/tests/ts/swapon/devname
new file mode 100755
index 0000000..d62b9d9
--- /dev/null
+++ b/tests/ts/swapon/devname
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by devname"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKSWAP"
+ts_check_test_command "$TS_CMD_SWAPON"
+ts_check_test_command "$TS_CMD_SWAPOFF"
+
+ts_skip_nonroot
+ts_check_losetup
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+$TS_CMD_MKSWAP $DEVICE > /dev/null 2>> $TS_OUTPUT \
+ || ts_die "Cannot make swap $DEVICE"
+
+ts_device_has "TYPE" "swap" $DEVICE || ts_die "Cannot find swap on $DEVICE"
+
+$TS_CMD_SWAPON $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+grep -q "^$DEVICE\b" /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps"
+
+$TS_CMD_SWAPOFF $DEVICE
+
+# swapon/mkswap warns if system sets different permissions for loop devices
+sed --in-place '/insecure permissions .*, 0660 suggested/d' $TS_OUTPUT
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/swapon/fixpgsz b/tests/ts/swapon/fixpgsz
new file mode 100755
index 0000000..68e17c1
--- /dev/null
+++ b/tests/ts/swapon/fixpgsz
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="fix page size"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKSWAP"
+ts_check_test_command "$TS_CMD_SWAPON"
+ts_check_test_command "$TS_CMD_SWAPOFF"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+ts_skip_nonroot
+ts_check_losetup
+
+PAGESIZE=$($TS_HELPER_SYSINFO pagesize)
+
+#
+# Create a swap-area with incompatible page size
+#
+[ "$?" == 0 ] || ts_die "Cannot init device"
+
+if [ $(( 64 * 1024 )) -ne $PAGESIZE ]; then
+ BADSIZE=$(( 64 * 1024 ))
+else
+ BADSIZE=4096
+fi
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+$TS_CMD_MKSWAP -L MyFooBarLabel --pagesize $BADSIZE $DEVICE > /dev/null &> /dev/null \
+ || ts_die "Cannot make swap $DEVICE"
+
+ts_device_has "TYPE" "swap" $DEVICE || ts_die "Cannot find swap on $DEVICE"
+
+#
+# Swapon
+#
+$TS_CMD_SWAPON --fixpgsz $DEVICE &> /dev/null
+
+grep -q "^$DEVICE\b" /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps"
+
+$TS_CMD_SWAPOFF $DEVICE
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/swapon/fixsig b/tests/ts/swapon/fixsig
new file mode 100755
index 0000000..9648e6d
--- /dev/null
+++ b/tests/ts/swapon/fixsig
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="fix signature"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKSWAP"
+ts_check_test_command "$TS_CMD_SWAPON"
+ts_check_test_command "$TS_CMD_SWAPOFF"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+ts_skip_nonroot
+ts_check_losetup
+
+PAGESIZE=$($TS_HELPER_SYSINFO pagesize)
+
+#
+# Create a swap-area
+#
+ts_device_init
+DEVICE=$TS_LODEV
+
+$TS_CMD_MKSWAP $DEVICE > /dev/null 2>> $TS_OUTPUT \
+ || ts_die "Cannot make swap $DEVICE"
+
+ts_device_has "TYPE" "swap" $DEVICE || ts_die "Cannot find swap on $DEVICE"
+
+#
+# Rewrite signature to swsuspend
+#
+echo "S2SUSPEND " > $TS_OUTPUT.signature
+dd if=$TS_OUTPUT.signature of=$DEVICE \
+ seek=$(( $PAGESIZE - 10 )) count=10 bs=1 conv=notrunc &> /dev/null
+
+ts_device_has "TYPE" "swsuspend" $DEVICE || ts_die "Cannot find swsuspend on $DEVICE"
+
+#
+# Swapon
+#
+$TS_CMD_SWAPON $DEVICE &> /dev/null
+
+grep -q "^$DEVICE\b" /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps"
+
+$TS_CMD_SWAPOFF $DEVICE
+
+# swapon/mkswap warns if system sets different permissions for loop devices
+sed --in-place '/insecure permissions .*, 0660 suggested/d' $TS_OUTPUT
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/swapon/label b/tests/ts/swapon/label
new file mode 100755
index 0000000..0931fe0
--- /dev/null
+++ b/tests/ts/swapon/label
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by label"
+LABEL="testSwapLabel"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKSWAP"
+ts_check_test_command "$TS_CMD_SWAPON"
+ts_check_test_command "$TS_CMD_SWAPOFF"
+
+ts_skip_nonroot
+ts_check_losetup
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+$TS_CMD_MKSWAP -L $LABEL $DEVICE > /dev/null 2>> $TS_OUTPUT \
+ || ts_die "Cannot make swap on $DEVICE"
+ts_device_has "LABEL" $LABEL $DEVICE \
+ || ts_die "Cannot find LABEL '$LABEL' on $DEVICE"
+ts_udevadm_settle "$DEVICE" "LABEL"
+
+$TS_CMD_SWAPON -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+grep -q "^$DEVICE\b" /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps"
+
+$TS_CMD_SWAPOFF $DEVICE
+
+# swapon/mkswap warns if system sets different permissions for loop devices
+sed --in-place '/insecure permissions .*, 0660 suggested/d' $TS_OUTPUT
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/swapon/uuid b/tests/ts/swapon/uuid
new file mode 100755
index 0000000..724cec2
--- /dev/null
+++ b/tests/ts/swapon/uuid
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2007 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="${0%/*}/../.."
+TS_DESC="by uuid"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_MKSWAP"
+ts_check_test_command "$TS_CMD_SWAPON"
+ts_check_test_command "$TS_CMD_SWAPOFF"
+
+ts_skip_nonroot
+ts_check_losetup
+
+ts_device_init
+DEVICE=$TS_LODEV
+
+$TS_CMD_MKSWAP $DEVICE > /dev/null 2>> $TS_OUTPUT \
+ || ts_die "Cannot make swap $DEVICE"
+UUID=$(ts_uuid_by_devname "$DEVICE") || ts_die "Cannot find UUID on $DEVICE"
+ts_udevadm_settle "$DEVICE" "UUID"
+
+$TS_CMD_SWAPON -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+grep -q "^$DEVICE\b" /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps"
+
+$TS_CMD_SWAPOFF $DEVICE
+
+# swapon/mkswap warns if system sets different permissions for loop devices
+sed --in-place '/insecure permissions .*, 0660 suggested/d' $TS_OUTPUT
+
+ts_log "Success"
+ts_finalize
+
diff --git a/tests/ts/ul/basic b/tests/ts/ul/basic
new file mode 100755
index 0000000..56138ab
--- /dev/null
+++ b/tests/ts/ul/basic
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2020 Sami Kerola <kerolasa@iki.fi>
+#
+# 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="basic tests"
+
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_UL"
+
+# This test provides different result on some terminals and virtual machines
+TS_KNOWN_FAIL="yes"
+
+ts_init_subtest "printable-characters"
+$TS_CMD_UL < $TS_SELF/basic.input >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "filter-input"
+$TS_CMD_UL $TS_SELF/filter.input >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_init_subtest "indicated"
+printf "u\b_l\b_\n" | ul --indicated >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
+ts_finalize
diff --git a/tests/ts/ul/basic.input b/tests/ts/ul/basic.input
new file mode 100644
index 0000000..3bc7fbc
--- /dev/null
+++ b/tests/ts/ul/basic.input
@@ -0,0 +1,95 @@
+
+!
+"
+#
+$
+%
+&
+'
+(
+)
+*
++
+,
+-
+.
+/
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+:
+;
+<
+=
+>
+?
+@
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+[
+\
+]
+^
+_
+`
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+{
+|
+}
+~
diff --git a/tests/ts/ul/filter.input b/tests/ts/ul/filter.input
new file mode 100644
index 0000000..4e5bd46
--- /dev/null
+++ b/tests/ts/ul/filter.input
@@ -0,0 +1,9 @@
+backspacexy
+ tab
+R S
+SO
+SI
+u_n_d_e_r_line
+flush after flush
+normal7reverse
+eof
diff --git a/tests/ts/ul/ul b/tests/ts/ul/ul
new file mode 100755
index 0000000..7ba72a9
--- /dev/null
+++ b/tests/ts/ul/ul
@@ -0,0 +1,29 @@
+#!/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="ul"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_UL"
+
+# This test provides different result on some terminals and virtual machines
+TS_KNOWN_FAIL="yes"
+
+printf "a\x08ab\x5F\x08c\\n\\ttab\\f\\b\\r" |
+ $TS_CMD_UL -t xterm >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/utmp/last b/tests/ts/utmp/last
new file mode 100755
index 0000000..b125ce9
--- /dev/null
+++ b/tests/ts/utmp/last
@@ -0,0 +1,93 @@
+#!/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="last"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LAST"
+ts_check_test_command "$TS_CMD_UTMPDUMP"
+ts_check_prog "ln"
+
+$TS_CMD_LAST --version 2>&1 | grep -q "invalid option" \
+ && ts_skip "deprecated last"
+
+. "$TS_SELF/utmp_functions.sh"
+
+WTMP_FILE=${TS_OUTDIR}/wtmp-a
+rm -f $WTMP_FILE
+
+export LANG=C
+export TZ=GMT
+
+if [ $SIZEOF_UTMP -eq 384 ]; then
+ ln -s ${TS_SELF}/wtmp-a.${BYTE_ORDER} $WTMP_FILE
+else
+ $TS_CMD_UTMPDUMP -r ${TS_SELF}/txt-a > $WTMP_FILE 2>/dev/null \
+ || ts_skip "can't create test data"
+fi
+
+# there is no better way yet to skip a subtest
+if ts_resolve_host "a.root-servers.net" >/dev/null; then
+ts_init_subtest "dns"
+
+ts_log "~~~ dns short ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -d root >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ dns long ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -w -d root >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ dns host last ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -a -d root >> $TS_OUTPUT 2>/dev/null
+
+ts_finalize_subtest
+fi
+
+ts_init_subtest "nodns"
+ts_log "~~~ basic output ~~~"
+$TS_CMD_LAST -f $WTMP_FILE >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ include system ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -x >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ show ip ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -i torvalds >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ no host ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -R torvalds >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ full times shortopt ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -F >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ full times longopt ~~~"
+$TS_CMD_LAST -f $WTMP_FILE --time-format=full >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ no time ~~~"
+$TS_CMD_LAST -f $WTMP_FILE --time-format=notime >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ iso-8601 time ~~~"
+$TS_CMD_LAST -f $WTMP_FILE --time-format=iso -w >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ since and until ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -s "2013-08-28 02:20" -t "2013-08-28 08:20" >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ present ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -p "2013-08-28 11:20" >> $TS_OUTPUT 2>/dev/null
+ts_finalize_subtest
+
+rm -f $WTMP_FILE
+
+ts_finalize
diff --git a/tests/ts/utmp/last-ipv6 b/tests/ts/utmp/last-ipv6
new file mode 100755
index 0000000..4567612
--- /dev/null
+++ b/tests/ts/utmp/last-ipv6
@@ -0,0 +1,66 @@
+#!/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="last ipv6"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_LAST"
+$TS_CMD_LAST --version 2>&1 | grep -q "invalid option" \
+ && ts_skip "deprecated last"
+
+. "$TS_SELF/utmp_functions.sh"
+
+WTMP_FILE=${TS_OUTDIR}/wtmp-ipv6
+rm -f $WTMP_FILE
+
+export LANG=C
+export TZ=GMT
+
+if [ $SIZEOF_UTMP -eq 384 ]; then
+ ln -s ${TS_SELF}/wtmp-ipv6.${BYTE_ORDER} $WTMP_FILE
+else
+ $TS_CMD_UTMPDUMP -r ${TS_SELF}/txt-ipv6 > $WTMP_FILE 2>/dev/null \
+ || ts_skip "can't create test data"
+fi
+
+# there is no better way yet to skip a subtest
+if ts_resolve_host "a.root-servers.net" >/dev/null; then
+ts_init_subtest "dns"
+
+ts_log "~~~ dns short ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -d >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ dns long ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -d -w >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ dns host last ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -d -a >> $TS_OUTPUT 2>/dev/null
+
+ts_finalize_subtest
+fi
+
+ts_init_subtest "nodns"
+ts_log "~~~ show ip ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -i >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ show ip last ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -i -a >> $TS_OUTPUT 2>/dev/null
+ts_finalize_subtest
+
+rm -f $WTMP_FILE
+
+ts_finalize
diff --git a/tests/ts/utmp/subsec b/tests/ts/utmp/subsec
new file mode 100644
index 0000000..0fdff05
--- /dev/null
+++ b/tests/ts/utmp/subsec
@@ -0,0 +1,3 @@
+[7] [00010] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [2013-08-28T20:30:40,123456+00:00]
+[8] [00011] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [2013-08-28T20:40:50,999999+00:00]
+[0] [00000] [ts/0] [nonvalid] [foo ] [zero ] [0.0.0.0 ] [2013-08-28T12:00:00,123456789+00:00]
diff --git a/tests/ts/utmp/txt-a b/tests/ts/utmp/txt-a
new file mode 100644
index 0000000..47b6fc2
--- /dev/null
+++ b/tests/ts/utmp/txt-a
@@ -0,0 +1,19 @@
+[9] [00009] [ts/9] [accounting] [foo ] [nine ] [0.0.0.0 ] [2013-08-28T03:00:00,000000+00:00]
+[8] [00008] [ts/8] [dead_process] [foo ] [eight ] [0.0.0.0 ] [2013-08-28T04:00:00,000000+00:00]
+[7] [00007] [ts/7] [user_process] [foo ] [seven ] [0.0.0.0 ] [2013-08-28T05:00:00,000000+00:00]
+[6] [00006] [ts/6] [login ] [foo ] [six ] [0.0.0.0 ] [2013-08-28T06:00:00,000000+00:00]
+[5] [00005] [ts/5] [init ] [foo ] [five ] [0.0.0.0 ] [2013-08-28T07:00:00,000000+00:00]
+[4] [00004] [ts/4] [oldtime ] [foo ] [four ] [0.0.0.0 ] [2013-08-28T08:00:00,000000+00:00]
+[3] [00003] [ts/3] [newtime ] [foo ] [three ] [0.0.0.0 ] [2013-08-28T09:00:00,000000+00:00]
+[2] [00002] [ts/2] [sysboot ] [foo ] [two ] [0.0.0.0 ] [2013-08-28T10:00:00,000000+00:00]
+[1] [00001] [ts/1] [runlevel] [foo ] [one ] [0.0.0.0 ] [2013-08-28T11:00:00,000000+00:00]
+[0] [00000] [ts/0] [nonvalid] [foo ] [zero ] [0.0.0.0 ] [2013-08-28T12:00:00,000000+00:00]
+[7] [00010] [ipv4] [IPv4 ] [root ] [dns-server ] [198.41.0.4 ] [2013-08-28T13:00:00,000000+00:00]
+[8] [00011] [ipv4] [IPv4 ] [root ] [dns-server ] [198.41.0.4 ] [2013-08-28T14:00:00,000000+00:00]
+[1] [00012] [~~ ] [shutdown] [~ ] [system-name ] [0.0.0.0 ] [2013-08-28T15:00:00,000000+00:00]
+[2] [00012] [~~ ] [reboot ] [~ ] [system-name ] [0.0.0.0 ] [2013-08-28T16:00:00,000000+00:00]
+[1] [00012] [~~ ] [shutdown] [~ ] [system-name ] [0.0.0.0 ] [2013-08-28T17:00:00,000000+00:00]
+[2] [00012] [~~ ] [reboot ] [~ ] [system-name ] [0.0.0.0 ] [2013-08-28T18:00:00,000000+00:00]
+[7] [00013] [ts/1] [torvalds] [linux ] [hobby ] [128.214.205.14 ] [1991-08-26T00:57:08,000000+00:00]
+[7] [00014] [long] [rick ] [long ] [never-gonna-logout ] [0.0.0.0 ] [1970-01-01T00:00:00,000000+00:00]
+[8] [00014] [long] [rick ] [long ] [never-gonna-logout ] [0.0.0.0 ] [2038-01-19T03:14:07,000000+00:00]
diff --git a/tests/ts/utmp/txt-a-old b/tests/ts/utmp/txt-a-old
new file mode 100644
index 0000000..bc91d19
--- /dev/null
+++ b/tests/ts/utmp/txt-a-old
@@ -0,0 +1,19 @@
+[9] [00009] [ts/9] [accounting] [foo ] [nine ] [0.0.0.0 ] [Wed Aug 28 03:00:00 2013 GMT]
+[8] [00008] [ts/8] [dead_process] [foo ] [eight ] [0.0.0.0 ] [Wed Aug 28 04:00:00 2013 GMT]
+[7] [00007] [ts/7] [user_process] [foo ] [seven ] [0.0.0.0 ] [Wed Aug 28 05:00:00 2013 GMT]
+[6] [00006] [ts/6] [login ] [foo ] [six ] [0.0.0.0 ] [Wed Aug 28 06:00:00 2013 GMT]
+[5] [00005] [ts/5] [init ] [foo ] [five ] [0.0.0.0 ] [Wed Aug 28 07:00:00 2013 GMT]
+[4] [00004] [ts/4] [oldtime ] [foo ] [four ] [0.0.0.0 ] [Wed Aug 28 08:00:00 2013 GMT]
+[3] [00003] [ts/3] [newtime ] [foo ] [three ] [0.0.0.0 ] [Wed Aug 28 09:00:00 2013 GMT]
+[2] [00002] [ts/2] [sysboot ] [foo ] [two ] [0.0.0.0 ] [Wed Aug 28 10:00:00 2013 GMT]
+[1] [00001] [ts/1] [runlevel] [foo ] [one ] [0.0.0.0 ] [Wed Aug 28 11:00:00 2013 GMT]
+[0] [00000] [ts/0] [nonvalid] [foo ] [zero ] [0.0.0.0 ] [Wed Aug 28 12:00:00 2013 GMT]
+[7] [00010] [ipv4] [IPv4 ] [root ] [dns-server ] [198.41.0.4 ] [Wed Aug 28 13:00:00 2013 GMT]
+[8] [00011] [ipv4] [IPv4 ] [root ] [dns-server ] [198.41.0.4 ] [Wed Aug 28 14:00:00 2013 GMT]
+[1] [00012] [~~ ] [shutdown] [~ ] [system-name ] [0.0.0.0 ] [Wed Aug 28 15:00:00 2013 GMT]
+[2] [00012] [~~ ] [reboot ] [~ ] [system-name ] [0.0.0.0 ] [Wed Aug 28 16:00:00 2013 GMT]
+[1] [00012] [~~ ] [shutdown] [~ ] [system-name ] [0.0.0.0 ] [Wed Aug 28 17:00:00 2013 GMT]
+[2] [00012] [~~ ] [reboot ] [~ ] [system-name ] [0.0.0.0 ] [Wed Aug 28 18:00:00 2013 GMT]
+[7] [00013] [ts/1] [torvalds] [linux ] [hobby ] [128.214.205.14 ] [Mon Aug 26 00:57:08 1991 GMT]
+[7] [00014] [long] [rick ] [long ] [never-gonna-logout ] [0.0.0.0 ] [ ]
+[8] [00014] [long] [rick ] [long ] [never-gonna-logout ] [0.0.0.0 ] [Tue Jan 19 03:14:07 2038 GMT]
diff --git a/tests/ts/utmp/txt-b b/tests/ts/utmp/txt-b
new file mode 100644
index 0000000..f929273
--- /dev/null
+++ b/tests/ts/utmp/txt-b
@@ -0,0 +1,10 @@
+[7] [17058] [ts/1] [kerolasa] [pts/1 ] [:0.0 ] [0.0.0.0 ] [2013-01-16T23:44:09,000000+00:00]
+[7] [22098] [ts/2] [kerolasa] [pts/2 ] [:0.0 ] [0.0.0.0 ] [2013-01-16T23:49:17,000000+00:00]
+[7] [24915] [ts/3] [kerolasa] [pts/3 ] [:0.0 ] [0.0.0.0 ] [2013-01-17T12:23:33,000000+00:00]
+[8] [24915] [ts/3] [kerolasa] [pts/3 ] [ ] [0.0.0.0 ] [2013-01-17T12:24:49,000000+00:00]
+[7] [30629] [ts/3] [kerolasa] [pts/3 ] [:0.0 ] [0.0.0.0 ] [2013-01-17T13:12:39,000000+00:00]
+[8] [30629] [ts/3] [kerolasa] [pts/3 ] [ ] [0.0.0.0 ] [2013-01-17T13:42:19,000000+00:00]
+[8] [22098] [ts/2] [kerolasa] [pts/2 ] [ ] [0.0.0.0 ] [2013-01-17T13:42:48,000000+00:00]
+[8] [17058] [ts/1] [kerolasa] [pts/1 ] [ ] [0.0.0.0 ] [2013-01-17T13:42:48,000000+00:00]
+[7] [31545] [ts/1] [kerolasa] [pts/1 ] [:0.0 ] [0.0.0.0 ] [2013-01-17T20:17:21,000000+00:00]
+[7] [28496] [ts/2] [kerolasa] [pts/2 ] [:0.0 ] [0.0.0.0 ] [2013-01-17T21:09:39,000000+00:00]
diff --git a/tests/ts/utmp/txt-b-old b/tests/ts/utmp/txt-b-old
new file mode 100644
index 0000000..02fb22d
--- /dev/null
+++ b/tests/ts/utmp/txt-b-old
@@ -0,0 +1,10 @@
+[7] [17058] [ts/1] [kerolasa] [pts/1 ] [:0.0 ] [0.0.0.0 ] [Wed Jan 16 23:44:09 2013 GMT]
+[7] [22098] [ts/2] [kerolasa] [pts/2 ] [:0.0 ] [0.0.0.0 ] [Wed Jan 16 23:49:17 2013 GMT]
+[7] [24915] [ts/3] [kerolasa] [pts/3 ] [:0.0 ] [0.0.0.0 ] [Thu Jan 17 12:23:33 2013 GMT]
+[8] [24915] [ts/3] [kerolasa] [pts/3 ] [ ] [0.0.0.0 ] [Thu Jan 17 12:24:49 2013 GMT]
+[7] [30629] [ts/3] [kerolasa] [pts/3 ] [:0.0 ] [0.0.0.0 ] [Thu Jan 17 13:12:39 2013 GMT]
+[8] [30629] [ts/3] [kerolasa] [pts/3 ] [ ] [0.0.0.0 ] [Thu Jan 17 13:42:19 2013 GMT]
+[8] [22098] [ts/2] [kerolasa] [pts/2 ] [ ] [0.0.0.0 ] [Thu Jan 17 13:42:48 2013 GMT]
+[8] [17058] [ts/1] [kerolasa] [pts/1 ] [ ] [0.0.0.0 ] [Thu Jan 17 13:42:48 2013 GMT]
+[7] [31545] [ts/1] [kerolasa] [pts/1 ] [:0.0 ] [0.0.0.0 ] [Thu Jan 17 20:17:21 2013 GMT]
+[7] [28496] [ts/2] [kerolasa] [pts/2 ] [:0.0 ] [0.0.0.0 ] [Thu Jan 17 21:09:39 2013 GMT]
diff --git a/tests/ts/utmp/txt-ipv6 b/tests/ts/utmp/txt-ipv6
new file mode 100644
index 0000000..cceb411
--- /dev/null
+++ b/tests/ts/utmp/txt-ipv6
@@ -0,0 +1,2 @@
+[7] [00010] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [2013-08-28T20:30:40,000000+00:00]
+[8] [00011] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [2013-08-28T20:40:50,000000+00:00]
diff --git a/tests/ts/utmp/txt-ipv6-old b/tests/ts/utmp/txt-ipv6-old
new file mode 100644
index 0000000..5cce150
--- /dev/null
+++ b/tests/ts/utmp/txt-ipv6-old
@@ -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/ts/utmp/utmp_functions.sh b/tests/ts/utmp/utmp_functions.sh
new file mode 100644
index 0000000..74a100c
--- /dev/null
+++ b/tests/ts/utmp/utmp_functions.sh
@@ -0,0 +1,18 @@
+ts_check_test_command "$TS_CMD_UTMPDUMP"
+ts_check_test_command "$TS_HELPER_SYSINFO"
+
+function utmp_struct_size {
+ local size
+ # probably "utmpdump -r" could be improved regarding white spaces ...
+ local txt="[0] [00000] [ ] [ ] [ ] [ ] [0.0.0.0 ] [ ]"
+
+ size=$(echo "$txt" | "$TS_CMD_UTMPDUMP" -r 2>/dev/null | wc -c \
+ && exit ${PIPESTATUS[1]})
+ ret=$?
+ [ $ret -eq 0 ] || size="0"
+ echo "$size"
+ return $ret
+}
+
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) || ts_failed "byte-order failed"
+SIZEOF_UTMP=$(utmp_struct_size) || ts_failed "utmp_struct_size failed"
diff --git a/tests/ts/utmp/utmpdump-circle b/tests/ts/utmp/utmpdump-circle
new file mode 100755
index 0000000..e8464b8
--- /dev/null
+++ b/tests/ts/utmp/utmpdump-circle
@@ -0,0 +1,48 @@
+#!/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="circle"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+# this test is arch independent, no need for utmp_functions.sh
+ts_check_test_command "$TS_CMD_UTMPDUMP"
+
+export LANG=C
+export TZ=Asia/Tokyo
+OUT_BIN1=${TS_OUTDIR}/${TS_TESTNAME}.bin1
+OUT_BIN2=${TS_OUTDIR}/${TS_TESTNAME}.bin2
+OUT_TXT=${TS_OUTDIR}/${TS_TESTNAME}.txt
+
+# Files with -old extension are using timestamp format before utmpdump
+# started to use iso-8601 format. This check is testing nothing is lost
+# when conversions performing following conversions.
+#
+# old text format -> binary -> new text format -> binary
+
+echo "no output expected" > $TS_OUTPUT
+for f in txt-a txt-b txt-ipv6; do
+ $TS_CMD_UTMPDUMP -r $TS_SELF/$f-old > $OUT_BIN1 2>/dev/null &&
+ $TS_CMD_UTMPDUMP $OUT_BIN1 > $OUT_TXT 2>/dev/null &&
+ diff -u $TS_SELF/$f $OUT_TXT &&
+ $TS_CMD_UTMPDUMP -r $OUT_TXT > $OUT_BIN2 2>/dev/null &&
+ diff -q $OUT_BIN1 $OUT_BIN2 ||
+ echo "circle failed for $f"
+done >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+rm -f "$OUT_BIN1" "$OUT_BIN2" "$OUT_TXT"
+
+ts_finalize
diff --git a/tests/ts/utmp/utmpdump-subsecond b/tests/ts/utmp/utmpdump-subsecond
new file mode 100755
index 0000000..d0d3289
--- /dev/null
+++ b/tests/ts/utmp/utmpdump-subsecond
@@ -0,0 +1,32 @@
+#!/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="subsecond"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+# this test is arch independent, no need for utmp_functions.sh
+ts_check_test_command "$TS_CMD_UTMPDUMP"
+
+OUT_BIN=${TS_OUTDIR}/${TS_TESTNAME}.bin
+
+echo "last 9 is expected to disappear in conversion" > $TS_OUTPUT
+$TS_CMD_UTMPDUMP -r $TS_SELF/subsec > $OUT_BIN 2>/dev/null
+$TS_CMD_UTMPDUMP $OUT_BIN >> $TS_OUTPUT 2>/dev/null
+
+rm -f "$OUT_BIN"
+
+ts_finalize
diff --git a/tests/ts/utmp/utmpdump-tobin b/tests/ts/utmp/utmpdump-tobin
new file mode 100755
index 0000000..556ad30
--- /dev/null
+++ b/tests/ts/utmp/utmpdump-tobin
@@ -0,0 +1,32 @@
+#!/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="to binary"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/utmp_functions.sh"
+[ $SIZEOF_UTMP -eq 384 ] || ts_skip "utmp struct size $SIZEOF_UTMP"
+
+export LANG=C
+export TZ=Asia/Tokyo
+OUTFILE=${TS_OUTDIR}/${TS_TESTNAME}.file
+$TS_CMD_UTMPDUMP -r $TS_SELF/txt-b >| $OUTFILE 2>/dev/null
+if diff -q $TS_SELF/wtmp-b.$BYTE_ORDER $OUTFILE; then
+ echo "no diff"
+fi >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/utmp/utmpdump-tobin-ipv6 b/tests/ts/utmp/utmpdump-tobin-ipv6
new file mode 100755
index 0000000..85254b7
--- /dev/null
+++ b/tests/ts/utmp/utmpdump-tobin-ipv6
@@ -0,0 +1,32 @@
+#!/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="IPv6 to binary"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/utmp_functions.sh"
+[ $SIZEOF_UTMP -eq 384 ] || ts_skip "utmp struct size $SIZEOF_UTMP"
+
+export LANG=C
+export TZ=Asia/Tokyo
+OUTFILE=${TS_OUTDIR}/${TS_TESTNAME}.file
+$TS_CMD_UTMPDUMP -r $TS_SELF/txt-ipv6 >| $OUTFILE 2>/dev/null
+if diff -q $TS_SELF/wtmp-ipv6.$BYTE_ORDER $OUTFILE; then
+ echo "no diff"
+fi >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+ts_finalize
diff --git a/tests/ts/utmp/utmpdump-totxt b/tests/ts/utmp/utmpdump-totxt
new file mode 100755
index 0000000..7097fdd
--- /dev/null
+++ b/tests/ts/utmp/utmpdump-totxt
@@ -0,0 +1,28 @@
+#!/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="to text"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/utmp_functions.sh"
+[ $SIZEOF_UTMP -eq 384 ] || ts_skip "utmp struct size $SIZEOF_UTMP"
+
+export LANG=C
+export TZ=Asia/Tokyo
+$TS_CMD_UTMPDUMP $TS_SELF/wtmp-b.$BYTE_ORDER >| $TS_OUTPUT 2>/dev/null
+
+ts_finalize
diff --git a/tests/ts/utmp/utmpdump-totxt-ipv6 b/tests/ts/utmp/utmpdump-totxt-ipv6
new file mode 100755
index 0000000..84ab570
--- /dev/null
+++ b/tests/ts/utmp/utmpdump-totxt-ipv6
@@ -0,0 +1,28 @@
+#!/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="IPv6 to text"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+. "$TS_SELF/utmp_functions.sh"
+[ $SIZEOF_UTMP -eq 384 ] || ts_skip "utmp struct size $SIZEOF_UTMP"
+
+export LANG=C
+export TZ=Asia/Tokyo
+$TS_CMD_UTMPDUMP $TS_SELF/wtmp-ipv6.$BYTE_ORDER >| $TS_OUTPUT 2>/dev/null
+
+ts_finalize
diff --git a/tests/ts/utmp/wtmp-a.BE b/tests/ts/utmp/wtmp-a.BE
new file mode 100644
index 0000000..5015f8e
--- /dev/null
+++ b/tests/ts/utmp/wtmp-a.BE
Binary files differ
diff --git a/tests/ts/utmp/wtmp-a.LE b/tests/ts/utmp/wtmp-a.LE
new file mode 100644
index 0000000..f66bb20
--- /dev/null
+++ b/tests/ts/utmp/wtmp-a.LE
Binary files differ
diff --git a/tests/ts/utmp/wtmp-b.BE b/tests/ts/utmp/wtmp-b.BE
new file mode 100644
index 0000000..fb09a0c
--- /dev/null
+++ b/tests/ts/utmp/wtmp-b.BE
Binary files differ
diff --git a/tests/ts/utmp/wtmp-b.LE b/tests/ts/utmp/wtmp-b.LE
new file mode 100644
index 0000000..45d35bb
--- /dev/null
+++ b/tests/ts/utmp/wtmp-b.LE
Binary files differ
diff --git a/tests/ts/utmp/wtmp-ipv6.BE b/tests/ts/utmp/wtmp-ipv6.BE
new file mode 100644
index 0000000..8cf7d39
--- /dev/null
+++ b/tests/ts/utmp/wtmp-ipv6.BE
Binary files differ
diff --git a/tests/ts/utmp/wtmp-ipv6.LE b/tests/ts/utmp/wtmp-ipv6.LE
new file mode 100644
index 0000000..342553b
--- /dev/null
+++ b/tests/ts/utmp/wtmp-ipv6.LE
Binary files differ
diff --git a/tests/ts/uuid/namespace b/tests/ts/uuid/namespace
new file mode 100755
index 0000000..7bfbe99
--- /dev/null
+++ b/tests/ts/uuid/namespace
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2009 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="${0%/*}/../.."
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_UUID_NAMESPACE"
+
+$TS_HELPER_UUID_NAMESPACE > $TS_OUTPUT
+
+ts_finalize
+
+
diff --git a/tests/ts/uuid/oids b/tests/ts/uuid/oids
new file mode 100755
index 0000000..ec9c29d
--- /dev/null
+++ b/tests/ts/uuid/oids
@@ -0,0 +1,33 @@
+#!/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="oids"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+: . > $TS_OUTPUT
+
+ts_check_test_command "$TS_CMD_UUIDGEN"
+
+$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.widgets.com" >> $TS_OUTPUT
+
+$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
+
+$TS_CMD_UUIDGEN --sha1 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
+
+$TS_CMD_UUIDGEN --sha1 --namespace @oid --hex --name "525400fc0f5e" >> $TS_OUTPUT
+
+ts_finalize
diff --git a/tests/ts/uuid/uuid_parser b/tests/ts/uuid/uuid_parser
new file mode 100755
index 0000000..c286f6c
--- /dev/null
+++ b/tests/ts/uuid/uuid_parser
@@ -0,0 +1,26 @@
+#!/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="uuid_parser"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_UUID_PARSER"
+
+$TS_HELPER_UUID_PARSER >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "return value: $?" >> $TS_OUTPUT
+
+ts_finalize
diff --git a/tests/ts/uuid/uuidd b/tests/ts/uuid/uuidd
new file mode 100755
index 0000000..afc1121
--- /dev/null
+++ b/tests/ts/uuid/uuidd
@@ -0,0 +1,59 @@
+#!/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="uuidd"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_UUID_PARSER"
+ts_check_test_command "$TS_CMD_UUIDD"
+
+OUTPUT_FILE="$(mktemp "${TS_OUTDIR}/uuiddXXXXXXXXXXXXX")"
+UUIDD_PID="$(mktemp -u "${TS_OUTDIR}/uuiddXXXXXXXXXXXXX")"
+# socket path must be short (SIZEOF_SOCKADDR_UN_SUN_PATH 108)
+UUIDD_SOCKET=$(mktemp "/tmp/ultest-$TS_COMPONENT-$TS_TESTNAME-socketXXXXXX")
+
+$TS_CMD_UUIDD -p "$UUIDD_PID" -s "$UUIDD_SOCKET"
+if [ $? -ne 0 ]; then
+ ts_failed "daemon start"
+fi
+
+test_flag() {
+ echo "options: $*" >> $TS_OUTPUT
+ $TS_CMD_UUIDD -s $UUIDD_SOCKET $* |
+ sed '/List of UUIDs:/d; s/^[[:space:]]*//' > "$OUTPUT_FILE" 2>>$TS_OUTPUT
+ $TS_HELPER_UUID_PARSER "$OUTPUT_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ echo "something wrong with $OUTPUT_FILE" >> $TS_OUTPUT
+ cat $OUTPUT_FILE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ fi
+ echo "return value: $ret" >> $TS_OUTPUT
+}
+
+test_flag -t
+test_flag --time
+test_flag -r
+test_flag --random
+test_flag -r -n 65
+
+$TS_CMD_UUIDD -k -s "$UUIDD_SOCKET" >> $TS_OUTPUT 2>> $TS_ERRLOG
+
+sed -i 's/pid [0-9]*.$/pid <num>./' $TS_OUTPUT $TS_ERRLOG
+
+rm -f "$OUTPUT_FILE" "$UUIDD_PID" "$UUIDD_SOCKET"
+
+ts_finalize
diff --git a/tests/ts/uuid/uuidgen b/tests/ts/uuid/uuidgen
new file mode 100755
index 0000000..cbaaefa
--- /dev/null
+++ b/tests/ts/uuid/uuidgen
@@ -0,0 +1,45 @@
+#!/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="uuidgen"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_UUID_PARSER"
+ts_check_test_command "$TS_CMD_UUIDGEN"
+
+OUTPUT_FILE="$(mktemp "${TS_OUTDIR}/uuidgenXXXXXXXXXXXXX")"
+
+test_flag() {
+ echo "option: $1" >> $TS_OUTPUT
+ $TS_CMD_UUIDGEN $1 > "$OUTPUT_FILE" 2>>$TS_OUTPUT
+ ret=$?
+ $TS_HELPER_UUID_PARSER "$OUTPUT_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+ if [ $? -ne 0 ] || [ $ret -ne 0 ]; then
+ echo "something wrong with $OUTPUT_FILE" >> $TS_OUTPUT
+ cat $OUTPUT_FILE >> $TS_OUTPUT 2>> $TS_ERRLOG
+ fi
+ echo "return values: $ret and $?" >> $TS_OUTPUT
+}
+
+test_flag -r
+test_flag -t
+test_flag --random
+test_flag --time
+
+rm -f "$OUTPUT_FILE"
+
+ts_finalize
diff --git a/tests/ts/uuid/uuidparse b/tests/ts/uuid/uuidparse
new file mode 100755
index 0000000..915886c
--- /dev/null
+++ b/tests/ts/uuid/uuidparse
@@ -0,0 +1,61 @@
+#!/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="uuidparse"
+export TZ=GMT
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_UUIDPARSE"
+
+echo '00000000-0000-0000-0000-000000000000
+
+00000000-0000-1000-0000-000000000000
+00000000-0000-2000-0000-000000000000
+00000000-0000-3000-0000-000000000000
+00000000-0000-4000-0000-000000000000
+00000000-0000-5000-0000-000000000000
+00000000-0000-6000-0000-000000000000
+
+00000000-0000-0000-8000-000000000000
+00000000-0000-2000-8000-000000000000
+00000000-0000-3000-8000-000000000000
+00000000-0000-4000-8000-000000000000
+00000000-0000-5000-8000-000000000000
+00000000-0000-6000-8000-000000000000
+
+00000000-0000-0000-d000-000000000000
+00000000-0000-1000-d000-000000000000
+00000000-0000-2000-d000-000000000000
+00000000-0000-3000-d000-000000000000
+00000000-0000-4000-d000-000000000000
+00000000-0000-5000-d000-000000000000
+00000000-0000-6000-d000-000000000000
+
+00000000-0000-0000-f000-000000000000
+00000000-0000-1000-f000-000000000000
+00000000-0000-2000-f000-000000000000
+00000000-0000-3000-f000-000000000000
+00000000-0000-4000-f000-000000000000
+00000000-0000-5000-f000-000000000000
+00000000-0000-6000-f000-000000000000
+
+9b274c46-544a-11e7-a972-00037f500001
+
+invalid-input' | $TS_CMD_UUIDPARSE >> $TS_OUTPUT 2>> $TS_ERRLOG
+echo "return value: $?" >> $TS_OUTPUT
+
+ts_finalize
diff --git a/tests/ts/wipefs/wipefs b/tests/ts/wipefs/wipefs
new file mode 100755
index 0000000..c79be0c
--- /dev/null
+++ b/tests/ts/wipefs/wipefs
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="wipefs"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_WIPEFS"
+
+ts_skip_nonroot
+
+# set global variable TS_DEVICE
+ts_scsi_debug_init dev_size_mb=50 num_parts=2
+
+# remove old backups
+rm -rf $HOME/wipefs-$(basename ${TS_DEVICE})-*.bak
+
+#remove the magic byte, back it up
+$TS_CMD_WIPEFS --all --backup ${TS_DEVICE} &>/dev/null || ts_die "wipefs failed"
+
+#there should be just one magic string/backup file in this case
+INFILE=$(ls $HOME/wipefs-$(basename ${TS_DEVICE})-*.bak)
+OFFT=$(echo $INFILE | sed 's/^.*-\(.*\).bak$/\1/')
+dd if=$INFILE of=$TS_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 ${TS_DEVICE} > $TS_OUTDIR/out 2>/dev/null
+
+# check for output
+[ -s $TS_OUTDIR/out ] && echo "OK" &> $TS_OUTPUT || exit 1
+
+ts_finalize