summaryrefslogtreecommitdiffstats
path: root/tests/ts/blkid
diff options
context:
space:
mode:
authorSami Kerola2014-02-16 16:22:56 +0100
committerKarel Zak2014-03-07 11:52:57 +0100
commit2f791546395cb43f3f93de6c095c812c7cd5237f (patch)
tree0fe025270e9c5acbb15ef7d433c553a72fdfdf1e /tests/ts/blkid
parenttools: make config-gen to require build target argument (diff)
downloadkernel-qcow2-util-linux-2f791546395cb43f3f93de6c095c812c7cd5237f.tar.gz
kernel-qcow2-util-linux-2f791546395cb43f3f93de6c095c812c7cd5237f.tar.xz
kernel-qcow2-util-linux-2f791546395cb43f3f93de6c095c812c7cd5237f.zip
tests: check commands needed for running a test exist
Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts/blkid')
-rwxr-xr-xtests/ts/blkid/low-probe4
-rwxr-xr-xtests/ts/blkid/lowprobe-pt4
-rwxr-xr-xtests/ts/blkid/md-raid0-whole4
-rwxr-xr-xtests/ts/blkid/md-raid1-part4
-rwxr-xr-xtests/ts/blkid/md-raid1-whole4
5 files changed, 14 insertions, 6 deletions
diff --git a/tests/ts/blkid/low-probe b/tests/ts/blkid/low-probe
index e22d6c849..eaee08982 100755
--- a/tests/ts/blkid/low-probe
+++ b/tests/ts/blkid/low-probe
@@ -23,9 +23,7 @@ TS_DESC="low-level superblocks probing"
ts_init "$*"
-if [ ! -x "$TS_CMD_BLKID" ]; then
- ts_skip "blkid disabled"
-fi
+ts_check_test_command "$TS_CMD_BLKID"
mkdir -p $TS_OUTDIR/images-fs
diff --git a/tests/ts/blkid/lowprobe-pt b/tests/ts/blkid/lowprobe-pt
index 8def673f9..4e9927b51 100755
--- a/tests/ts/blkid/lowprobe-pt
+++ b/tests/ts/blkid/lowprobe-pt
@@ -23,9 +23,7 @@ TS_DESC="partitions probing"
ts_init "$*"
-if [ ! -x "$TS_HELPER_PARTITIONS" ]; then
- ts_skip "blkid disabled"
-fi
+ts_check_test_command "$TS_HELPER_PARTITIONS"
mkdir -p $TS_OUTDIR/images-pt
diff --git a/tests/ts/blkid/md-raid0-whole b/tests/ts/blkid/md-raid0-whole
index 07ffc584a..46442bb2a 100755
--- a/tests/ts/blkid/md-raid0-whole
+++ b/tests/ts/blkid/md-raid0-whole
@@ -21,6 +21,10 @@ 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
[ -x /sbin/mdadm ] || ts_skip "missing mdadm"
diff --git a/tests/ts/blkid/md-raid1-part b/tests/ts/blkid/md-raid1-part
index 43140728c..0257e15a8 100755
--- a/tests/ts/blkid/md-raid1-part
+++ b/tests/ts/blkid/md-raid1-part
@@ -21,6 +21,10 @@ 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
DEVICE=$(ts_scsi_debug_init dev_size_mb=51 sector_size=512)
diff --git a/tests/ts/blkid/md-raid1-whole b/tests/ts/blkid/md-raid1-whole
index 8743d3d66..fcb55c2a4 100755
--- a/tests/ts/blkid/md-raid1-whole
+++ b/tests/ts/blkid/md-raid1-whole
@@ -21,6 +21,10 @@ 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
[ -x /sbin/mdadm ] || ts_skip "missing mdadm"