summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarian Csontos <mcsontos@redhat.com>2016-03-22 09:15:40 +0100
committerMarian Csontos <mcsontos@redhat.com>2016-03-23 12:27:34 +0100
commit82d92009ae37bea3cd6a3f754c25d56b12959676 (patch)
tree9c04f4860893db1fd0cbdb4ed07d37e65e2c8618
parent1b0775916b78e1270872d3649a2c9abf0a1bb790 (diff)
downloadlvm2-82d92009ae37bea3cd6a3f754c25d56b12959676.tar.gz
test: Move bus configuration to prepare function
-rw-r--r--test/api/dbustest.sh9
-rw-r--r--test/lib/aux.sh8
2 files changed, 8 insertions, 9 deletions
diff --git a/test/api/dbustest.sh b/test/api/dbustest.sh
index 79e3224c4..8741eb93c 100644
--- a/test/api/dbustest.sh
+++ b/test/api/dbustest.sh
@@ -16,16 +16,7 @@ SKIP_WITH_CLVMD=1
. lib/inittest
-# Will default to skip until we can get this reviewed
-#skip
-
aux prepare_pvs 6
-# Copy the needed file to run on the system bus if it doesn't
-# already exist
-if [ ! -f /etc/dbus-1/system.d/com.redhat.lvmdbus1.conf ]; then
- install -m 644 $abs_top_builddir/scripts/com.redhat.lvmdbus1.conf /etc/dbus-1/system.d/.
-fi
-
aux prepare_lvmdbusd
$test_data_dir/dbus/lvmdbustest.py -v
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 276788054..9fd1922e3 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -306,6 +306,7 @@ prepare_lvmdbusd() {
kill_sleep_kill_ LOCAL_LVMDBUSD 0
+ # FIXME: This is not correct! Daemon is auto started.
echo "checking lvmdbusd is NOT running..."
if ps -elf | grep lvmdbusd | grep python3; then
echo "Cannot run while existing lvmdbusd process exists"
@@ -327,6 +328,13 @@ prepare_lvmdbusd() {
which python3 >/dev/null || skip "Missing python3"
python3 -c "import pyudev, dbus, gi.repository" || skip "Missing python modules"
+ # TODO: Tests should use session bus instead of system bus
+ # Copy the needed file to run on the system bus if it doesn't
+ # already exist
+ if [ ! -f /etc/dbus-1/system.d/com.redhat.lvmdbus1.conf ]; then
+ install -m 644 $abs_top_builddir/scripts/com.redhat.lvmdbus1.conf /etc/dbus-1/system.d/
+ fi
+
echo "preparing lvmdbusd..."
"$daemon" --debug --udev > debug.log_LVMDBUSD_out 2>&1 &
local pid=$!