From: Davidlohr Bueso <dave@xxxxxxx> Now that we can use images in partx, we can easily use the lowprobe-pt's in blkid's tests. Signed-off-by: Davidlohr Bueso <dave@xxxxxxx> --- tests/commands.sh.in | 1 + tests/expected/partx/lowprobe-pt-bsd | 2 + tests/expected/partx/lowprobe-pt-dos+bsd | 4 ++ tests/expected/partx/lowprobe-pt-gpt | 5 +++ tests/expected/partx/lowprobe-pt-sgi | 2 + tests/expected/partx/lowprobe-pt-sun | 2 + tests/ts/partx/lowprobe-pt | 45 ++++++++++++++++++++++++++++++ 7 files changed, 61 insertions(+), 0 deletions(-) create mode 100644 tests/expected/partx/lowprobe-pt-bsd create mode 100644 tests/expected/partx/lowprobe-pt-dos+bsd create mode 100644 tests/expected/partx/lowprobe-pt-gpt create mode 100644 tests/expected/partx/lowprobe-pt-sgi create mode 100644 tests/expected/partx/lowprobe-pt-sun create mode 100755 tests/ts/partx/lowprobe-pt diff --git a/tests/commands.sh.in b/tests/commands.sh.in index 94f6521..d776348 100644 --- a/tests/commands.sh.in +++ b/tests/commands.sh.in @@ -15,6 +15,7 @@ TS_HELPER_CPUSET="$TOPDIR/lib/test_cpuset" # TODO: use partx TS_HELPER_PARTITIONS="$TOPDIR/shlibs/blkid/samples/partitions" +TS_PXHELPER_PARTITIONS="$TOPDIR/partx/partx" U_L_LIBRARY_PATH="$TOPDIR/shlibs/blkid/src/.libs:$TOPDIR/shlibs/uuid/src/.libs" diff --git a/tests/expected/partx/lowprobe-pt-bsd b/tests/expected/partx/lowprobe-pt-bsd new file mode 100644 index 0000000..d4be5c5 --- /dev/null +++ b/tests/expected/partx/lowprobe-pt-bsd @@ -0,0 +1,2 @@ +# 1: 7936- 12799 ( 4864 sectors, 2 MB) +# 2: 12544- 16127 ( 3584 sectors, 1 MB) diff --git a/tests/expected/partx/lowprobe-pt-dos+bsd b/tests/expected/partx/lowprobe-pt-dos+bsd new file mode 100644 index 0000000..3242a6c --- /dev/null +++ b/tests/expected/partx/lowprobe-pt-dos+bsd @@ -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) diff --git a/tests/expected/partx/lowprobe-pt-gpt b/tests/expected/partx/lowprobe-pt-gpt new file mode 100644 index 0000000..0a1d491 --- /dev/null +++ b/tests/expected/partx/lowprobe-pt-gpt @@ -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) diff --git a/tests/expected/partx/lowprobe-pt-sgi b/tests/expected/partx/lowprobe-pt-sgi new file mode 100644 index 0000000..469d442 --- /dev/null +++ b/tests/expected/partx/lowprobe-pt-sgi @@ -0,0 +1,2 @@ +# 1: 63- 1606499 ( 1606437 sectors, 822 MB) +# 2: 1606500- 32129999 ( 30523500 sectors, 15628 MB) diff --git a/tests/expected/partx/lowprobe-pt-sun b/tests/expected/partx/lowprobe-pt-sun new file mode 100644 index 0000000..d957f58 --- /dev/null +++ b/tests/expected/partx/lowprobe-pt-sun @@ -0,0 +1,2 @@ +# 1: 0- 87379 ( 87380 sectors, 44 MB) +# 2: 87380- 131069 ( 43690 sectors, 22 MB) diff --git a/tests/ts/partx/lowprobe-pt b/tests/ts/partx/lowprobe-pt new file mode 100755 index 0000000..5c1ba96 --- /dev/null +++ b/tests/ts/partx/lowprobe-pt @@ -0,0 +1,45 @@ +#!/bin/bash + +# +# Copyright (C) 2010 Davidlohr Bueso <dave@xxxxxxx> +# +# 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_PXHELPER_PARTITIONS" ]; then + ts_skip "blkid 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_PXHELPER_PARTITIONS $outimg &> $TS_OUTPUT + ts_finalize_subtest +done + +ts_finalize \ No newline at end of file -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html