From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: dev-next - tests: dbus update
Date: Wed, 31 Mar 2021 21:49:22 +0000 (GMT) [thread overview]
Message-ID: <20210331214922.6E36D3857C6F@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=25c665d5559e77c1eb0f67527fa95419a84b7553
Commit: 25c665d5559e77c1eb0f67527fa95419a84b7553
Parent: 6db533c4393e1e8ca02e957c529afaf67fa7e20b
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Fri Mar 26 13:13:26 2021 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Mar 26 13:13:26 2021 +0100
tests: dbus update
Always use PREFIX for vg header - all tests must use this prefix,
VGs without are not allowed.
Modify pv_symlink test - as the test was checking unsupportable
combination - since lvm2 commands withing testsuite are only
allowed to manipulate with /dev/mapper/LVMTESTXXXX path -
nothing else allowed and fails on being filtered.
---
test/dbus/lvmdbustest.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index efa1afb26..6dab312c0 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -59,7 +59,7 @@ if pv_device_list:
def vg_n(prefix=None):
- name = rs(8, '_vg')
+ name = g_prefix + '_vg'
if prefix:
name = prefix + name
return name
@@ -1838,7 +1838,6 @@ class TestDbusService(unittest.TestCase):
# typically utilizes loopback, this test is skipped in
# those environments.
pv_object_path = self.objs[PV_INT][0].object_path
-
if not self.objs[PV_INT][0].Pv.Name.startswith("/dev"):
raise unittest.SkipTest('test not running in /dev')
@@ -1867,8 +1866,9 @@ class TestDbusService(unittest.TestCase):
# Lets locate a symlink for it
devices = glob('/dev/disk/*/*')
+ rp_pv_device_path = os.path.realpath(pv_device_path)
for d in devices:
- if pv_device_path == os.path.realpath(d):
+ if rp_pv_device_path == os.path.realpath(d):
symlink = d
break
@@ -1878,14 +1878,16 @@ class TestDbusService(unittest.TestCase):
rc = self._lookup(symlink)
self.assertEqual(rc, '/')
- pv_object_path = self._pv_create(symlink)
+ ### pv_object_path = self._pv_create(symlink)
+ ### Test is limited by filter rules and must use /dev/mapper/LVMTEST path
+ pv_object_path = self._pv_create(pv_device_path)
+
self.assertNotEqual(pv_object_path, '/')
pv_proxy = ClientProxy(self.bus, pv_object_path, interfaces=(PV_INT, ))
self.assertEqual(pv_proxy.Pv.Name, pv_device_path)
# Lets check symlink lookup
- self.assertEqual(pv_object_path, self._lookup(symlink))
self.assertEqual(pv_object_path, self._lookup(pv_device_path))
def _create_vdo_pool_and_lv(self, vg_prefix="vdo_"):
reply other threads:[~2021-03-31 21:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210331214922.6E36D3857C6F@sourceware.org \
--to=teigland@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.