summaryrefslogtreecommitdiffstats
path: root/tests/ts
diff options
context:
space:
mode:
authorKarel Zak2009-09-11 13:15:18 +0200
committerKarel Zak2009-09-16 21:54:10 +0200
commit5777ba99a3b3d24ab20412828de5726c1b9daaeb (patch)
treefd12b7be9af39d43dded772c29cde74f2be7baac /tests/ts
parenttests: rename blkid/images to blkid/images-fs (diff)
downloadkernel-qcow2-util-linux-5777ba99a3b3d24ab20412828de5726c1b9daaeb.tar.gz
kernel-qcow2-util-linux-5777ba99a3b3d24ab20412828de5726c1b9daaeb.tar.xz
kernel-qcow2-util-linux-5777ba99a3b3d24ab20412828de5726c1b9daaeb.zip
tests: add partitions probing test
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts')
-rw-r--r--tests/ts/blkid/images-pt/bsd.img.bz2bin0 -> 122 bytes
-rw-r--r--tests/ts/blkid/images-pt/dos+bsd.img.bz2bin0 -> 1728 bytes
-rw-r--r--tests/ts/blkid/images-pt/gpt.img.bz2bin0 -> 494 bytes
-rw-r--r--tests/ts/blkid/images-pt/sgi.img.bz2bin0 -> 144 bytes
-rw-r--r--tests/ts/blkid/images-pt/sun.img.bz2bin0 -> 170 bytes
-rwxr-xr-xtests/ts/blkid/low-probe5
-rwxr-xr-xtests/ts/blkid/lowprobe-pt45
7 files changed, 46 insertions, 4 deletions
diff --git a/tests/ts/blkid/images-pt/bsd.img.bz2 b/tests/ts/blkid/images-pt/bsd.img.bz2
new file mode 100644
index 000000000..c4b05e432
--- /dev/null
+++ b/tests/ts/blkid/images-pt/bsd.img.bz2
Binary files differ
diff --git a/tests/ts/blkid/images-pt/dos+bsd.img.bz2 b/tests/ts/blkid/images-pt/dos+bsd.img.bz2
new file mode 100644
index 000000000..cccdd8a9b
--- /dev/null
+++ b/tests/ts/blkid/images-pt/dos+bsd.img.bz2
Binary files differ
diff --git a/tests/ts/blkid/images-pt/gpt.img.bz2 b/tests/ts/blkid/images-pt/gpt.img.bz2
new file mode 100644
index 000000000..df4de7c57
--- /dev/null
+++ b/tests/ts/blkid/images-pt/gpt.img.bz2
Binary files differ
diff --git a/tests/ts/blkid/images-pt/sgi.img.bz2 b/tests/ts/blkid/images-pt/sgi.img.bz2
new file mode 100644
index 000000000..3b1c31395
--- /dev/null
+++ b/tests/ts/blkid/images-pt/sgi.img.bz2
Binary files differ
diff --git a/tests/ts/blkid/images-pt/sun.img.bz2 b/tests/ts/blkid/images-pt/sun.img.bz2
new file mode 100644
index 000000000..adf4f02e8
--- /dev/null
+++ b/tests/ts/blkid/images-pt/sun.img.bz2
Binary files differ
diff --git a/tests/ts/blkid/low-probe b/tests/ts/blkid/low-probe
index 1dfcbed4f..ff21b3b75 100755
--- a/tests/ts/blkid/low-probe
+++ b/tests/ts/blkid/low-probe
@@ -17,7 +17,7 @@
#
TS_TOPDIR="$(dirname $0)/../.."
-TS_DESC="low-level probing"
+TS_DESC="low-level superblocks probing"
. $TS_TOPDIR/functions.sh
@@ -27,9 +27,6 @@ if [ ! -x "$TS_CMD_BLKID" ]; then
ts_skip "blkid disabled"
fi
-#
-# Superblocks
-#
mkdir -p $TS_OUTDIR/images-fs
for img in $(ls $TS_SELF/images-fs/*.img.bz2 | sort); do
diff --git a/tests/ts/blkid/lowprobe-pt b/tests/ts/blkid/lowprobe-pt
new file mode 100755
index 000000000..311def678
--- /dev/null
+++ b/tests/ts/blkid/lowprobe-pt
@@ -0,0 +1,45 @@
+#!/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="partitions probing"
+
+. $TS_TOPDIR/functions.sh
+
+ts_init "$*"
+
+if [ ! -x "$TS_HELPER_PARTITIONS" ]; then
+ ts_skip "blkid disabled"
+fi
+
+mkdir -p $TS_OUTDIR/images-pt
+
+for img in $(ls $TS_SELF/images-pt/*.img.bz2 | sort); do
+ name=$(basename $img .img.bz2)
+ outimg=$TS_OUTDIR/images-pt/${name}.img
+
+ ts_init_subtest $name
+
+ bunzip2 < $img > $outimg
+
+ $TS_HELPER_PARTITIONS $outimg &> $TS_OUTPUT
+ ts_finalize_subtest
+done
+
+ts_finalize
+