From: Tony Asleson <tasleson@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - lvmdbustest: nesting improvements
Date: Mon, 19 Sep 2022 15:57:56 +0000 (GMT) [thread overview]
Message-ID: <20220919155756.B9CBB3858C2C@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cef3c75dd496961cf7f2d2509fd694b9edf28421
Commit: cef3c75dd496961cf7f2d2509fd694b9edf28421
Parent: 6b9cc7432ec70461217c081b5d38065236aec887
Author: Tony Asleson <tasleson@redhat.com>
AuthorDate: Wed Aug 10 13:59:11 2022 -0500
Committer: Tony Asleson <tasleson@redhat.com>
CommitterDate: Fri Sep 16 10:49:36 2022 -0500
lvmdbustest: nesting improvements
---
test/dbus/lvmdbustest.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index e7df238ce..4977021b1 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -1827,8 +1827,8 @@ class TestDbusService(unittest.TestCase):
cmd = ['pvcreate', target.Pv.Name]
self._verify_existence(cmd, cmd[0], target.Pv.Name)
- def _create_nested(self, pv_object_path):
- vg = self._vg_create([pv_object_path])
+ def _create_nested(self, pv_object_path, vg_suffix):
+ vg = self._vg_create([pv_object_path], vg_suffix)
pv = ClientProxy(self.bus, pv_object_path, interfaces=(PV_INT,))
self.assertEqual(pv.Pv.Vg, vg.object_path)
@@ -1838,8 +1838,12 @@ class TestDbusService(unittest.TestCase):
lv = self._create_lv(
vg=vg.Vg, size=vg.Vg.FreeBytes, suffix="_pv0")
device_path = '/dev/%s/%s' % (vg.Vg.Name, lv.LvCommon.Name)
+ dev_info = os.stat(device_path)
+ major = os.major(dev_info.st_rdev)
+ minor = os.minor(dev_info.st_rdev)
+ sysfs = "/sys/dev/block/%d:%d" % (major, minor)
+ self.assertTrue(os.path.exists(sysfs))
new_pv_object_path = self._pv_create(device_path)
-
vg.update()
self.assertEqual(lv.LvCommon.Vg, vg.object_path)
@@ -1870,7 +1874,7 @@ class TestDbusService(unittest.TestCase):
raise unittest.SkipTest('test not running in /dev')
for i in range(0, 5):
- pv_object_path = self._create_nested(pv_object_path)
+ pv_object_path = self._create_nested(pv_object_path, "nest_%d_" % i)
def test_pv_symlinks(self):
# Let's take one of our test PVs, pvremove it, find a symlink to it
reply other threads:[~2022-09-19 15:57 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=20220919155756.B9CBB3858C2C@sourceware.org \
--to=tasleson@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.