diff options
Diffstat (limited to 'tests/ts/blkid')
111 files changed, 452 insertions, 0 deletions
diff --git a/tests/ts/blkid/dm-err b/tests/ts/blkid/dm-err new file mode 100755 index 0000000..d01f002 --- /dev/null +++ b/tests/ts/blkid/dm-err @@ -0,0 +1,45 @@ +#!/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 + +ts_log "Probe device" +$TS_CMD_BLKID -p -o udev $DEVICE 2>&1 >> $TS_OUTPUT +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 Binary files differnew file mode 100644 index 0000000..20387cd --- /dev/null +++ b/tests/ts/blkid/images-fs/adaptec-raid.img.xz diff --git a/tests/ts/blkid/images-fs/bcache-B.img.xz b/tests/ts/blkid/images-fs/bcache-B.img.xz Binary files differnew file mode 100644 index 0000000..ed187f1 --- /dev/null +++ b/tests/ts/blkid/images-fs/bcache-B.img.xz diff --git a/tests/ts/blkid/images-fs/bcache-C.img.xz b/tests/ts/blkid/images-fs/bcache-C.img.xz Binary files differnew file mode 100644 index 0000000..af90cbf --- /dev/null +++ b/tests/ts/blkid/images-fs/bcache-C.img.xz diff --git a/tests/ts/blkid/images-fs/befs.img.xz b/tests/ts/blkid/images-fs/befs.img.xz Binary files differnew file mode 100644 index 0000000..188a6e8 --- /dev/null +++ b/tests/ts/blkid/images-fs/befs.img.xz diff --git a/tests/ts/blkid/images-fs/bfs.img.xz b/tests/ts/blkid/images-fs/bfs.img.xz Binary files differnew file mode 100644 index 0000000..98f024a --- /dev/null +++ b/tests/ts/blkid/images-fs/bfs.img.xz diff --git a/tests/ts/blkid/images-fs/cramfs.img.xz b/tests/ts/blkid/images-fs/cramfs.img.xz Binary files differnew file mode 100644 index 0000000..5943867 --- /dev/null +++ b/tests/ts/blkid/images-fs/cramfs.img.xz diff --git a/tests/ts/blkid/images-fs/ddf-raid.img.xz b/tests/ts/blkid/images-fs/ddf-raid.img.xz Binary files differnew file mode 100644 index 0000000..b5b64fe --- /dev/null +++ b/tests/ts/blkid/images-fs/ddf-raid.img.xz diff --git a/tests/ts/blkid/images-fs/drbdmanage-control-volume.img.xz b/tests/ts/blkid/images-fs/drbdmanage-control-volume.img.xz Binary files differnew file mode 100644 index 0000000..d31bfc1 --- /dev/null +++ b/tests/ts/blkid/images-fs/drbdmanage-control-volume.img.xz diff --git a/tests/ts/blkid/images-fs/exfat.img.xz b/tests/ts/blkid/images-fs/exfat.img.xz Binary files differnew file mode 100644 index 0000000..43cc09a --- /dev/null +++ b/tests/ts/blkid/images-fs/exfat.img.xz diff --git a/tests/ts/blkid/images-fs/ext2.img.xz b/tests/ts/blkid/images-fs/ext2.img.xz Binary files differnew file mode 100644 index 0000000..3b5489f --- /dev/null +++ b/tests/ts/blkid/images-fs/ext2.img.xz diff --git a/tests/ts/blkid/images-fs/ext3.img.xz b/tests/ts/blkid/images-fs/ext3.img.xz Binary files differnew file mode 100644 index 0000000..7d170e2 --- /dev/null +++ b/tests/ts/blkid/images-fs/ext3.img.xz diff --git a/tests/ts/blkid/images-fs/f2fs.img.xz b/tests/ts/blkid/images-fs/f2fs.img.xz Binary files differnew file mode 100644 index 0000000..f7f9dde --- /dev/null +++ b/tests/ts/blkid/images-fs/f2fs.img.xz diff --git a/tests/ts/blkid/images-fs/fat.img.xz b/tests/ts/blkid/images-fs/fat.img.xz Binary files differnew file mode 100644 index 0000000..4e0997a --- /dev/null +++ b/tests/ts/blkid/images-fs/fat.img.xz diff --git a/tests/ts/blkid/images-fs/fat16_noheads.img.xz b/tests/ts/blkid/images-fs/fat16_noheads.img.xz Binary files differnew file mode 100644 index 0000000..a0ee296 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat16_noheads.img.xz 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 Binary files differnew file mode 100644 index 0000000..06eb2c9 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_cp850_O_tilde.img.xz diff --git a/tests/ts/blkid/images-fs/fat32_label_64MB.img.xz b/tests/ts/blkid/images-fs/fat32_label_64MB.img.xz Binary files differnew file mode 100644 index 0000000..f0976bc --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_label_64MB.img.xz diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_label1.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1.img.xz Binary files differnew file mode 100644 index 0000000..4df4b1d --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1.img.xz 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 Binary files differnew file mode 100644 index 0000000..932ab11 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_NO_NAME.img.xz 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 Binary files differnew file mode 100644 index 0000000..3027031 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_empty.img.xz 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 Binary files differnew file mode 100644 index 0000000..1551e11 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_dosfslabel_label2.img.xz 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 Binary files differnew file mode 100644 index 0000000..264c440 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_NO_NAME.img.xz 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 Binary files differnew file mode 100644 index 0000000..f0a9571 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_mlabel_erase.img.xz 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 Binary files differnew file mode 100644 index 0000000..cc4280e --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_erase.img.xz 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 Binary files differnew file mode 100644 index 0000000..66d4838 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_label1_xp_label2.img.xz diff --git a/tests/ts/blkid/images-fs/fat32_mkdosfs_none.img.xz b/tests/ts/blkid/images-fs/fat32_mkdosfs_none.img.xz Binary files differnew file mode 100644 index 0000000..0d084f3 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none.img.xz 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 Binary files differnew file mode 100644 index 0000000..a238a01 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_NO_NAME.img.xz 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 Binary files differnew file mode 100644 index 0000000..1486031 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1.img.xz 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 Binary files differnew file mode 100644 index 0000000..5401e1f --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_dosfslabel_label1_xp_label2.img.xz 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 Binary files differnew file mode 100644 index 0000000..acf01cc --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1.img.xz 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 Binary files differnew file mode 100644 index 0000000..bff0971 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_mkdosfs_none_xp_label1_dosfslabel_label2.img.xz diff --git a/tests/ts/blkid/images-fs/fat32_xp_label1.img.xz b/tests/ts/blkid/images-fs/fat32_xp_label1.img.xz Binary files differnew file mode 100644 index 0000000..97d71e9 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_xp_label1.img.xz diff --git a/tests/ts/blkid/images-fs/fat32_xp_none.img.xz b/tests/ts/blkid/images-fs/fat32_xp_none.img.xz Binary files differnew file mode 100644 index 0000000..a8c819e --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_xp_none.img.xz 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 Binary files differnew file mode 100644 index 0000000..0ebe6be --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_xp_none_dosfslabel_label1.img.xz 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 Binary files differnew file mode 100644 index 0000000..5a7a774 --- /dev/null +++ b/tests/ts/blkid/images-fs/fat32_xp_none_mlabel_label1.img.xz diff --git a/tests/ts/blkid/images-fs/gfs2.img.xz b/tests/ts/blkid/images-fs/gfs2.img.xz Binary files differnew file mode 100644 index 0000000..22d4d6b --- /dev/null +++ b/tests/ts/blkid/images-fs/gfs2.img.xz diff --git a/tests/ts/blkid/images-fs/hfs.img.xz b/tests/ts/blkid/images-fs/hfs.img.xz Binary files differnew file mode 100644 index 0000000..cfa3252 --- /dev/null +++ b/tests/ts/blkid/images-fs/hfs.img.xz diff --git a/tests/ts/blkid/images-fs/hfsplus.img.xz b/tests/ts/blkid/images-fs/hfsplus.img.xz Binary files differnew file mode 100644 index 0000000..1c37a70 --- /dev/null +++ b/tests/ts/blkid/images-fs/hfsplus.img.xz diff --git a/tests/ts/blkid/images-fs/hpfs.img.xz b/tests/ts/blkid/images-fs/hpfs.img.xz Binary files differnew file mode 100644 index 0000000..4e22a8e --- /dev/null +++ b/tests/ts/blkid/images-fs/hpfs.img.xz diff --git a/tests/ts/blkid/images-fs/hpt37x-raid.img.xz b/tests/ts/blkid/images-fs/hpt37x-raid.img.xz Binary files differnew file mode 100644 index 0000000..1b53059 --- /dev/null +++ b/tests/ts/blkid/images-fs/hpt37x-raid.img.xz diff --git a/tests/ts/blkid/images-fs/hpt45x-raid.img.xz b/tests/ts/blkid/images-fs/hpt45x-raid.img.xz Binary files differnew file mode 100644 index 0000000..7dfe68a --- /dev/null +++ b/tests/ts/blkid/images-fs/hpt45x-raid.img.xz diff --git a/tests/ts/blkid/images-fs/iso-joliet.img.xz b/tests/ts/blkid/images-fs/iso-joliet.img.xz Binary files differnew file mode 100644 index 0000000..16b8961 --- /dev/null +++ b/tests/ts/blkid/images-fs/iso-joliet.img.xz diff --git a/tests/ts/blkid/images-fs/iso-rr-joliet.img.xz b/tests/ts/blkid/images-fs/iso-rr-joliet.img.xz Binary files differnew file mode 100644 index 0000000..1d6ad2c --- /dev/null +++ b/tests/ts/blkid/images-fs/iso-rr-joliet.img.xz diff --git a/tests/ts/blkid/images-fs/iso.img.xz b/tests/ts/blkid/images-fs/iso.img.xz Binary files differnew file mode 100644 index 0000000..f1146f3 --- /dev/null +++ b/tests/ts/blkid/images-fs/iso.img.xz diff --git a/tests/ts/blkid/images-fs/isw-raid.img.xz b/tests/ts/blkid/images-fs/isw-raid.img.xz Binary files differnew file mode 100644 index 0000000..8e5529a --- /dev/null +++ b/tests/ts/blkid/images-fs/isw-raid.img.xz diff --git a/tests/ts/blkid/images-fs/jbd.img.xz b/tests/ts/blkid/images-fs/jbd.img.xz Binary files differnew file mode 100644 index 0000000..7c5a089 --- /dev/null +++ b/tests/ts/blkid/images-fs/jbd.img.xz diff --git a/tests/ts/blkid/images-fs/jfs.img.xz b/tests/ts/blkid/images-fs/jfs.img.xz Binary files differnew file mode 100644 index 0000000..4780f6d --- /dev/null +++ b/tests/ts/blkid/images-fs/jfs.img.xz diff --git a/tests/ts/blkid/images-fs/jmicron-raid.img.xz b/tests/ts/blkid/images-fs/jmicron-raid.img.xz Binary files differnew file mode 100644 index 0000000..cde0811 --- /dev/null +++ b/tests/ts/blkid/images-fs/jmicron-raid.img.xz diff --git a/tests/ts/blkid/images-fs/lsi-raid.img.xz b/tests/ts/blkid/images-fs/lsi-raid.img.xz Binary files differnew file mode 100644 index 0000000..d6ae15a --- /dev/null +++ b/tests/ts/blkid/images-fs/lsi-raid.img.xz diff --git a/tests/ts/blkid/images-fs/luks1.img.xz b/tests/ts/blkid/images-fs/luks1.img.xz Binary files differnew file mode 100644 index 0000000..c0f5902 --- /dev/null +++ b/tests/ts/blkid/images-fs/luks1.img.xz diff --git a/tests/ts/blkid/images-fs/luks2.img.xz b/tests/ts/blkid/images-fs/luks2.img.xz Binary files differnew file mode 100644 index 0000000..997fb04 --- /dev/null +++ b/tests/ts/blkid/images-fs/luks2.img.xz diff --git a/tests/ts/blkid/images-fs/lvm2.img.xz b/tests/ts/blkid/images-fs/lvm2.img.xz Binary files differnew file mode 100644 index 0000000..4c3c183 --- /dev/null +++ b/tests/ts/blkid/images-fs/lvm2.img.xz diff --git a/tests/ts/blkid/images-fs/mdraid.img.xz b/tests/ts/blkid/images-fs/mdraid.img.xz Binary files differnew file mode 100644 index 0000000..e8ff4f5 --- /dev/null +++ b/tests/ts/blkid/images-fs/mdraid.img.xz diff --git a/tests/ts/blkid/images-fs/minix-BE.img.xz b/tests/ts/blkid/images-fs/minix-BE.img.xz Binary files differnew file mode 100644 index 0000000..c349a4f --- /dev/null +++ b/tests/ts/blkid/images-fs/minix-BE.img.xz diff --git a/tests/ts/blkid/images-fs/minix-LE.img.xz b/tests/ts/blkid/images-fs/minix-LE.img.xz Binary files differnew file mode 100644 index 0000000..da646a8 --- /dev/null +++ b/tests/ts/blkid/images-fs/minix-LE.img.xz diff --git a/tests/ts/blkid/images-fs/mpool.img.xz b/tests/ts/blkid/images-fs/mpool.img.xz Binary files differnew file mode 100644 index 0000000..4bfefde --- /dev/null +++ b/tests/ts/blkid/images-fs/mpool.img.xz diff --git a/tests/ts/blkid/images-fs/netware.img.xz b/tests/ts/blkid/images-fs/netware.img.xz Binary files differnew file mode 100644 index 0000000..fe5b103 --- /dev/null +++ b/tests/ts/blkid/images-fs/netware.img.xz diff --git a/tests/ts/blkid/images-fs/nilfs2.img.xz b/tests/ts/blkid/images-fs/nilfs2.img.xz Binary files differnew file mode 100644 index 0000000..38de645 --- /dev/null +++ b/tests/ts/blkid/images-fs/nilfs2.img.xz diff --git a/tests/ts/blkid/images-fs/ntfs.img.xz b/tests/ts/blkid/images-fs/ntfs.img.xz Binary files differnew file mode 100644 index 0000000..2b414c4 --- /dev/null +++ b/tests/ts/blkid/images-fs/ntfs.img.xz diff --git a/tests/ts/blkid/images-fs/nvidia-raid.img.xz b/tests/ts/blkid/images-fs/nvidia-raid.img.xz Binary files differnew file mode 100644 index 0000000..775f810 --- /dev/null +++ b/tests/ts/blkid/images-fs/nvidia-raid.img.xz diff --git a/tests/ts/blkid/images-fs/ocfs2.img.xz b/tests/ts/blkid/images-fs/ocfs2.img.xz Binary files differnew file mode 100644 index 0000000..12ed926 --- /dev/null +++ b/tests/ts/blkid/images-fs/ocfs2.img.xz diff --git a/tests/ts/blkid/images-fs/promise-raid.img.xz b/tests/ts/blkid/images-fs/promise-raid.img.xz Binary files differnew file mode 100644 index 0000000..77f135f --- /dev/null +++ b/tests/ts/blkid/images-fs/promise-raid.img.xz diff --git a/tests/ts/blkid/images-fs/reiser3.img.xz b/tests/ts/blkid/images-fs/reiser3.img.xz Binary files differnew file mode 100644 index 0000000..8bc595f --- /dev/null +++ b/tests/ts/blkid/images-fs/reiser3.img.xz diff --git a/tests/ts/blkid/images-fs/reiser4.img.xz b/tests/ts/blkid/images-fs/reiser4.img.xz Binary files differnew file mode 100644 index 0000000..e97f960 --- /dev/null +++ b/tests/ts/blkid/images-fs/reiser4.img.xz diff --git a/tests/ts/blkid/images-fs/romfs.img.xz b/tests/ts/blkid/images-fs/romfs.img.xz Binary files differnew file mode 100644 index 0000000..680eeed --- /dev/null +++ b/tests/ts/blkid/images-fs/romfs.img.xz diff --git a/tests/ts/blkid/images-fs/silicon-raid.img.xz b/tests/ts/blkid/images-fs/silicon-raid.img.xz Binary files differnew file mode 100644 index 0000000..28d6a42 --- /dev/null +++ b/tests/ts/blkid/images-fs/silicon-raid.img.xz diff --git a/tests/ts/blkid/images-fs/small-fat32.img.xz b/tests/ts/blkid/images-fs/small-fat32.img.xz Binary files differnew file mode 100644 index 0000000..7a04f42 --- /dev/null +++ b/tests/ts/blkid/images-fs/small-fat32.img.xz diff --git a/tests/ts/blkid/images-fs/swap0.img.xz b/tests/ts/blkid/images-fs/swap0.img.xz Binary files differnew file mode 100644 index 0000000..3cfea73 --- /dev/null +++ b/tests/ts/blkid/images-fs/swap0.img.xz diff --git a/tests/ts/blkid/images-fs/swap1.img.xz b/tests/ts/blkid/images-fs/swap1.img.xz Binary files differnew file mode 100644 index 0000000..6e6f539 --- /dev/null +++ b/tests/ts/blkid/images-fs/swap1.img.xz diff --git a/tests/ts/blkid/images-fs/tuxonice.img.xz b/tests/ts/blkid/images-fs/tuxonice.img.xz Binary files differnew file mode 100644 index 0000000..472cf9c --- /dev/null +++ b/tests/ts/blkid/images-fs/tuxonice.img.xz diff --git a/tests/ts/blkid/images-fs/ubi.img.xz b/tests/ts/blkid/images-fs/ubi.img.xz Binary files differnew file mode 100644 index 0000000..1a073f2 --- /dev/null +++ b/tests/ts/blkid/images-fs/ubi.img.xz diff --git a/tests/ts/blkid/images-fs/ubifs.img.xz b/tests/ts/blkid/images-fs/ubifs.img.xz Binary files differnew file mode 100644 index 0000000..2004f5b --- /dev/null +++ b/tests/ts/blkid/images-fs/ubifs.img.xz 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 Binary files differnew file mode 100644 index 0000000..9fb9a4f --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-bdr-2.60-nero.img.xz 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 Binary files differnew file mode 100644 index 0000000..1da9a28 --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-cd-mkudfiso-20100208.img.xz 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 Binary files differnew file mode 100644 index 0000000..673fa62 --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-cd-nero-6.img.xz 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 Binary files differnew file mode 100644 index 0000000..39db4be --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-1.img.xz 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 Binary files differnew file mode 100644 index 0000000..4cba447 --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.0.0-2.img.xz 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 Binary files differnew file mode 100644 index 0000000..7df36db --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-1.img.xz 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 Binary files differnew file mode 100644 index 0000000..bc0facc --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-2.img.xz 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 Binary files differnew file mode 100644 index 0000000..d774e0a --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-3.img.xz 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 Binary files differnew file mode 100644 index 0000000..047e39a --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-4.img.xz 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 Binary files differnew file mode 100644 index 0000000..291d7eb --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-5.img.xz 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 Binary files differnew file mode 100644 index 0000000..393ab9e --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-6.img.xz 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 Binary files differnew file mode 100644 index 0000000..5940009 --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-7.img.xz 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 Binary files differnew file mode 100644 index 0000000..b91180c --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-8.img.xz 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 Binary files differnew file mode 100644 index 0000000..baddc84 --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.5.img.xz 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 Binary files differnew file mode 100644 index 0000000..dfb8cdb --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.7.img.xz diff --git a/tests/ts/blkid/images-fs/udf-hdd-win7.img.xz b/tests/ts/blkid/images-fs/udf-hdd-win7.img.xz Binary files differnew file mode 100644 index 0000000..ee86115 --- /dev/null +++ b/tests/ts/blkid/images-fs/udf-hdd-win7.img.xz diff --git a/tests/ts/blkid/images-fs/udf.img.xz b/tests/ts/blkid/images-fs/udf.img.xz Binary files differnew file mode 100644 index 0000000..fdf0edf --- /dev/null +++ b/tests/ts/blkid/images-fs/udf.img.xz diff --git a/tests/ts/blkid/images-fs/ufs.img.xz b/tests/ts/blkid/images-fs/ufs.img.xz Binary files differnew file mode 100644 index 0000000..58f8b20 --- /dev/null +++ b/tests/ts/blkid/images-fs/ufs.img.xz diff --git a/tests/ts/blkid/images-fs/vdo.img.xz b/tests/ts/blkid/images-fs/vdo.img.xz Binary files differnew file mode 100644 index 0000000..08c7ecb --- /dev/null +++ b/tests/ts/blkid/images-fs/vdo.img.xz diff --git a/tests/ts/blkid/images-fs/via-raid.img.xz b/tests/ts/blkid/images-fs/via-raid.img.xz Binary files differnew file mode 100644 index 0000000..c5f6fb7 --- /dev/null +++ b/tests/ts/blkid/images-fs/via-raid.img.xz diff --git a/tests/ts/blkid/images-fs/vmfs.img.xz b/tests/ts/blkid/images-fs/vmfs.img.xz Binary files differnew file mode 100644 index 0000000..ce4544e --- /dev/null +++ b/tests/ts/blkid/images-fs/vmfs.img.xz diff --git a/tests/ts/blkid/images-fs/vmfs_volume.img.xz b/tests/ts/blkid/images-fs/vmfs_volume.img.xz Binary files differnew file mode 100644 index 0000000..93f11b4 --- /dev/null +++ b/tests/ts/blkid/images-fs/vmfs_volume.img.xz diff --git a/tests/ts/blkid/images-fs/xfs-log.img.xz b/tests/ts/blkid/images-fs/xfs-log.img.xz Binary files differnew file mode 100644 index 0000000..35ff33b --- /dev/null +++ b/tests/ts/blkid/images-fs/xfs-log.img.xz diff --git a/tests/ts/blkid/images-fs/xfs.img.xz b/tests/ts/blkid/images-fs/xfs.img.xz Binary files differnew file mode 100644 index 0000000..5576c66 --- /dev/null +++ b/tests/ts/blkid/images-fs/xfs.img.xz diff --git a/tests/ts/blkid/images-fs/zfs.img.xz b/tests/ts/blkid/images-fs/zfs.img.xz Binary files differnew file mode 100644 index 0000000..f85e536 --- /dev/null +++ b/tests/ts/blkid/images-fs/zfs.img.xz diff --git a/tests/ts/blkid/images-pt/atari-icd.img.xz b/tests/ts/blkid/images-pt/atari-icd.img.xz Binary files differnew file mode 100644 index 0000000..00a2aba --- /dev/null +++ b/tests/ts/blkid/images-pt/atari-icd.img.xz diff --git a/tests/ts/blkid/images-pt/atari-xgm.img.xz b/tests/ts/blkid/images-pt/atari-xgm.img.xz Binary files differnew file mode 100644 index 0000000..bc2b8f9 --- /dev/null +++ b/tests/ts/blkid/images-pt/atari-xgm.img.xz diff --git a/tests/ts/blkid/images-pt/bsd.img.xz b/tests/ts/blkid/images-pt/bsd.img.xz Binary files differnew file mode 100644 index 0000000..bfdb50b --- /dev/null +++ b/tests/ts/blkid/images-pt/bsd.img.xz diff --git a/tests/ts/blkid/images-pt/dos+bsd.img.xz b/tests/ts/blkid/images-pt/dos+bsd.img.xz Binary files differnew file mode 100644 index 0000000..f87dd74 --- /dev/null +++ b/tests/ts/blkid/images-pt/dos+bsd.img.xz diff --git a/tests/ts/blkid/images-pt/gpt.img.xz b/tests/ts/blkid/images-pt/gpt.img.xz Binary files differnew file mode 100644 index 0000000..9a085b4 --- /dev/null +++ b/tests/ts/blkid/images-pt/gpt.img.xz diff --git a/tests/ts/blkid/images-pt/sgi.img.xz b/tests/ts/blkid/images-pt/sgi.img.xz Binary files differnew file mode 100644 index 0000000..d5fed80 --- /dev/null +++ b/tests/ts/blkid/images-pt/sgi.img.xz diff --git a/tests/ts/blkid/images-pt/sun.img.xz b/tests/ts/blkid/images-pt/sun.img.xz Binary files differnew file mode 100644 index 0000000..a00594a --- /dev/null +++ b/tests/ts/blkid/images-pt/sun.img.xz diff --git a/tests/ts/blkid/low-probe b/tests/ts/blkid/low-probe new file mode 100755 index 0000000..38023b8 --- /dev/null +++ b/tests/ts/blkid/low-probe @@ -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="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 + + ts_init_subtest $name + + xz -dc $img > $outimg + + $TS_CMD_BLKID -p -o udev $outimg 2>&1 | sort > $TS_OUTPUT + ts_finalize_subtest +done + +ts_finalize + diff --git a/tests/ts/blkid/lowprobe-pt b/tests/ts/blkid/lowprobe-pt new file mode 100755 index 0000000..2177de9 --- /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/mbr-wholedisk b/tests/ts/blkid/mbr-wholedisk new file mode 100755 index 0000000..239592e --- /dev/null +++ b/tests/ts/blkid/mbr-wholedisk @@ -0,0 +1,42 @@ +#!/bin/bash + +# +# Copyright (C) 2015 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="mbr-wholedisk" + +. $TS_TOPDIR/functions.sh + +ts_init "$*" + +ts_check_test_command "$TS_CMD_BLKID" + +ts_skip_nonroot + +# set global variable TS_DEVICE +ts_scsi_debug_init dev_size_mb=50 + +# +# This looks like VFAT, but it's MBR +# +ts_init_subtest "fake-vfat" +dd if=${TS_SELF}/mbr-wholedisk-vfat.img of=${TS_DEVICE} &> /dev/null +udevadm settle +$TS_CMD_BLKID -p -o udev ${TS_DEVICE} >> $TS_OUTPUT +ts_finalize_subtest + +ts_finalize diff --git a/tests/ts/blkid/mbr-wholedisk-vfat.img b/tests/ts/blkid/mbr-wholedisk-vfat.img Binary files differnew file mode 100644 index 0000000..22bee6c --- /dev/null +++ b/tests/ts/blkid/mbr-wholedisk-vfat.img diff --git a/tests/ts/blkid/md-raid0-whole b/tests/ts/blkid/md-raid0-whole new file mode 100755 index 0000000..45c6ee5 --- /dev/null +++ b/tests/ts/blkid/md-raid0-whole @@ -0,0 +1,89 @@ +#!/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" + +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>&1 + +ts_log "Create partitions on RAID device" +$TS_CMD_FDISK ${MD_DEVICE} >> $TS_OUTPUT 2>&1 <<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>&1 | sort >> $TS_OUTPUT + +ts_log "Probe second RAID member" +$TS_CMD_BLKID -p -o udev $DEVICE1 2>&1 | sort >> $TS_OUTPUT + +ts_log "Stop RAID device" +mdadm -q -S ${MD_DEVICE} >> $TS_OUTPUT 2>&1 + +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..3fa6395 --- /dev/null +++ b/tests/ts/blkid/md-raid1-part @@ -0,0 +1,95 @@ +#!/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" + +# set global variable TS_DEVICE +ts_scsi_debug_init dev_size_mb=51 sector_size=512 + +ts_log "Create partitions" +$TS_CMD_FDISK ${TS_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF +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>&1 +udevadm settle + +ts_log "Probe whole-disk" +$TS_CMD_BLKID -p -o udev ${TS_DEVICE} 2>&1 | sort >> $TS_OUTPUT + +ts_log "Probe first RAID member" +$TS_CMD_BLKID -p -o udev ${TS_DEVICE}1 2>&1 | sort >> $TS_OUTPUT + +ts_log "Probe second RAID member" +$TS_CMD_BLKID -p -o udev ${TS_DEVICE}2 2>&1 | sort >> $TS_OUTPUT + +mdadm -q -S ${MD_DEVICE} >> $TS_OUTPUT 2>&1 + +udevadm settle +ts_unlock "md" + +ts_fdisk_clean $TS_DEVICE +# substitue 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..ddf4a69 --- /dev/null +++ b/tests/ts/blkid/md-raid1-whole @@ -0,0 +1,93 @@ +#!/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" + +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>&1 +udevadm settle + +ts_log "Create partitions on RAID device" +$TS_CMD_FDISK ${MD_DEVICE} >> $TS_OUTPUT 2>&1 <<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>&1 | sort >> $TS_OUTPUT + +ts_log "Probe second RAID member" +$TS_CMD_BLKID -p -o udev $DEVICE1 2>&1 | sort >> $TS_OUTPUT + +ts_log "Stop RAID device" +mdadm -q -S ${MD_DEVICE} >> $TS_OUTPUT 2>&1 + +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 |