tests: add regression tests

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Davidlohr Bueso 2010-12-09 22:56:55 +01:00 committed by Karel Zak
parent 6e6a182ebd
commit 9894961bf9
7 changed files with 61 additions and 0 deletions

View File

@ -49,5 +49,6 @@ 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/misc-utils/blkid"}
TS_CMD_PARTX=${TS_CMD_PARTX-"$TOPDIR/partx/partx"}
TS_CMD_FDISK=${TS_CMD_FDISK-"$TOPDIR/fdisk/fdisk"}

View File

@ -0,0 +1,2 @@
# 1: 7936- 12799 ( 4864 sectors, 2 MB)
# 2: 12544- 16127 ( 3584 sectors, 1 MB)

View File

@ -0,0 +1,4 @@
# 1: 32- 7679 ( 7648 sectors, 3 MB)
# 2: 7680- 16383 ( 8704 sectors, 4 MB)
# 5: 7936- 12799 ( 4864 sectors, 2 MB)
# 6: 12544- 16127 ( 3584 sectors, 1 MB)

View File

@ -0,0 +1,5 @@
# 1: 34- 2047 ( 2014 sectors, 1 MB)
# 2: 2048- 4095 ( 2048 sectors, 1 MB)
# 3: 4096- 6143 ( 2048 sectors, 1 MB)
# 4: 6144- 8191 ( 2048 sectors, 1 MB)
# 5: 8192- 10239 ( 2048 sectors, 1 MB)

View File

@ -0,0 +1,2 @@
# 1: 63- 1606499 ( 1606437 sectors, 822 MB)
# 2: 1606500- 32129999 ( 30523500 sectors, 15628 MB)

View File

@ -0,0 +1,2 @@
# 1: 0- 87379 ( 87380 sectors, 44 MB)
# 2: 87380- 131069 ( 43690 sectors, 22 MB)

45
tests/ts/partx/partx Executable file
View File

@ -0,0 +1,45 @@
#!/bin/bash
#
# Copyright (C) 2010 Davidlohr Bueso <dave@gnu.org>
#
# 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="partitions probing"
TS_IMGDIR="$TS_TOPDIR/ts/blkid/images-pt"
. $TS_TOPDIR/functions.sh
ts_init "$*"
if [ ! -x "$TS_CMD_PARTX" ]; then
ts_skip "partx disabled"
fi
mkdir -p $TS_OUTDIR/images-pt
for img in $(ls $TS_IMGDIR/*.img.bz2 | sort); do
name=$(basename $img .img.bz2)
outimg=$TS_OUTDIR/images-pt/${name}.img
ts_init_subtest $name
bunzip2 < $img > $outimg
$TS_CMD_PARTX $outimg &> $TS_OUTPUT
ts_finalize_subtest
done
ts_finalize