[PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2

Tom Marek
2012-04-17T09:25:39Z

Tests number 198 and 240 could fail when aiodio-sparse2 was not build.
_require_aiodio helper was added to common.rc file to fix this.

Cc: david@fromorbit.com
Signed-off-by: Tom Marek <tmarek@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
---
V2: check for aiodio-sparse2 was moved to helper function located in
common.rc file. _require_aiodio was added to tests 198 and 240.
198 | 2 ++
240 | 1 +
common.rc | 8 ++++++++
3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/198 b/198
index e46ec8d..210b7bb 100755
--- a/198
+++ b/198
@@ -45,6 +45,8 @@ _cleanup()
_supported_fs generic
_supported_os Linux

+_require_aiodio
+
echo "Silence is golden."

# real QA test starts here
diff --git a/240 b/240
index 563449e..5b37bdc 100755
--- a/240
+++ b/240
@@ -52,6 +52,7 @@ _supported_fs generic
_supported_os Linux

_require_sparse_files
+_require_aiodio

echo "Silence is golden."

diff --git a/common.rc b/common.rc
index cab0b64..7745df1 100644
--- a/common.rc
+++ b/common.rc
@@ -770,6 +770,14 @@ _require_scratch()
fi
}

+# this test needs aio-dio-regress to be built
+#
+_require_aiodio()
+{
+ [ -x $here/src/aio-dio-regress/aiodio_sparse2 ] || \
+ _notrun "This tests requires src/aio-dio-regress/ to be built"
+}
+
# this test needs a logdev
#
_require_logdev()
--
1.7.7.6