tests: add libblkid regression tests (images from e2fsprogs)

- adds basic infrastructure for blkid regression tests
- imports test images from e2fsprogs (all tests PASS!:-)

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2009-01-20 23:43:56 +01:00
parent 425ca40aa2
commit 8df5195f1a
37 changed files with 138 additions and 0 deletions

View File

@ -43,5 +43,6 @@ TS_CMD_ISLOCAL=${TS_CMD_ISLOCAL-"$TOPDIR/login-utils/islocal_test"}
TS_CMD_HWCLOCK=${TS_CMD_HWCLOCK-"$TOPDIR/hwclock/hwclock"}
TS_CMD_LSCPU=${TS_CMD_LSCPU-"$TOPDIR/sys-utils/lscpu"}
TS_CMD_BLKID=${TS_CMD_BLKID-"$TOPDIR/libs/blkid/bin/blkid.sh"}

View File

@ -0,0 +1,4 @@
ID_FS_LABEL_ENC=test-cram
ID_FS_LABEL=test-cram
ID_FS_TYPE=cramfs
ID_FS_USAGE=filesystem

View File

@ -0,0 +1,7 @@
ID_FS_LABEL_ENC=test-ext2
ID_FS_LABEL=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

View File

@ -0,0 +1,8 @@
ID_FS_LABEL_ENC=test-ext3
ID_FS_LABEL=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

View File

@ -0,0 +1,8 @@
ID_FS_LABEL_ENC=TEST-FAT
ID_FS_LABEL=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

View File

@ -0,0 +1,7 @@
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

View File

@ -0,0 +1,5 @@
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

View File

@ -0,0 +1,6 @@
ID_FS_LABEL_ENC=test-jfs
ID_FS_LABEL=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

View File

@ -0,0 +1,3 @@
ID_FS_TYPE=minix
ID_FS_USAGE=filesystem
ID_FS_VERSION=1

View File

@ -0,0 +1,6 @@
ID_FS_LABEL_ENC=test-ocfs2
ID_FS_LABEL=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

View File

@ -0,0 +1,6 @@
ID_FS_LABEL_ENC=TESTREISER
ID_FS_LABEL=TESTREISER
ID_FS_TYPE=reiser
ID_FS_USAGE=filesystem
ID_FS_UUID=9efe7863-b124-46dc-ad68-8ecd04230a7b
ID_FS_UUID_ENC=9efe7863-b124-46dc-ad68-8ecd04230a7b

View File

@ -0,0 +1,6 @@
ID_FS_LABEL_ENC=TESTR4
ID_FS_LABEL=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

View File

@ -0,0 +1,4 @@
ID_FS_LABEL_ENC=test-romfs
ID_FS_LABEL=test-romfs
ID_FS_TYPE=romfs
ID_FS_USAGE=filesystem

View File

@ -0,0 +1,7 @@
ID_FS_LABEL_ENC=TESTVFAT
ID_FS_LABEL=TESTVFAT
ID_FS_TYPE=vfat
ID_FS_USAGE=filesystem
ID_FS_UUID=1423-AAE1
ID_FS_UUID_ENC=1423-AAE1
ID_FS_VERSION=FAT32

View File

@ -0,0 +1,3 @@
ID_FS_TYPE=swap
ID_FS_USAGE=other
ID_FS_VERSION=1

View File

@ -0,0 +1,7 @@
ID_FS_LABEL_ENC=SWAP-TEST
ID_FS_LABEL=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=2

View File

@ -0,0 +1,4 @@
ID_FS_LABEL_ENC=test-udf
ID_FS_LABEL=test-udf
ID_FS_TYPE=udf
ID_FS_USAGE=filesystem

View File

@ -0,0 +1,6 @@
ID_FS_LABEL_ENC=test-xfs
ID_FS_LABEL=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

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

40
tests/ts/blkid/low-probe Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
#
# Copyright (C) 2009 Karel Zak <kzak@redhat.com>
#
# This file is part of util-linux-ng.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
TS_TOPDIR="$(dirname $0)/../.."
TS_DESC="low-probe"
. $TS_TOPDIR/functions.sh
ts_init "$*"
mkdir -p $TS_OUTDIR/images
for img in $(ls $TS_SELF/images/*.img.bz2 | sort); do
name=$(basename $img .img.bz2)
outimg=$TS_OUTDIR/images/${name}.img
ts_init_subtest $name
bunzip2 < $img > $outimg
$TS_CMD_BLKID -p -o udev $outimg | sort > $TS_OUTPUT 2>&1
ts_finalize_subtest
done
ts_finalize