Signed-off-by: Nir Soffer nsoffer@redhat.com --- tests/python_test.py | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/tests/python_test.py b/tests/python_test.py index d86ba50..58a22c7 100644 --- a/tests/python_test.py +++ b/tests/python_test.py @@ -746,6 +746,14 @@ def test_lvb(tmpdir, sanlock_daemon):
fd = sanlock.register()
+ # Test reading unset lvb. + + sanlock.acquire(b"ls_name", b"res_name", disks, slkfd=fd, lvb=True) + result = sanlock.get_lvb(b"ls_name", b"res_name", disks, 512) + sanlock.release(b"ls_name", b"res_name", disks, slkfd=fd) + + assert result == b"\0" * 512 + lvb_data = b"first\0second" lvb_sector = lvb_data.ljust(512, b"\0")
LGTM
On Wed, Feb 17, 2021 at 10:30 PM Nir Soffer nirsof@gmail.com wrote:
Signed-off-by: Nir Soffer nsoffer@redhat.com
tests/python_test.py | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/tests/python_test.py b/tests/python_test.py index d86ba50..58a22c7 100644 --- a/tests/python_test.py +++ b/tests/python_test.py @@ -746,6 +746,14 @@ def test_lvb(tmpdir, sanlock_daemon):
fd = sanlock.register()
- # Test reading unset lvb.
- sanlock.acquire(b"ls_name", b"res_name", disks, slkfd=fd, lvb=True)
- result = sanlock.get_lvb(b"ls_name", b"res_name", disks, 512)
- sanlock.release(b"ls_name", b"res_name", disks, slkfd=fd)
- assert result == b"\0" * 512
- lvb_data = b"first\0second" lvb_sector = lvb_data.ljust(512, b"\0")
-- 2.26.2
On Wednesday, 17 February 2021 21:39:51 CET Benny Zlotnik wrote:
LGTM
+1
On Wed, Feb 17, 2021 at 10:30 PM Nir Soffer nirsof@gmail.com wrote:
Signed-off-by: Nir Soffer nsoffer@redhat.com
tests/python_test.py | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/tests/python_test.py b/tests/python_test.py index d86ba50..58a22c7 100644 --- a/tests/python_test.py +++ b/tests/python_test.py
@@ -746,6 +746,14 @@ def test_lvb(tmpdir, sanlock_daemon): fd = sanlock.register()
# Test reading unset lvb.
sanlock.acquire(b"ls_name", b"res_name", disks, slkfd=fd, lvb=True)
result = sanlock.get_lvb(b"ls_name", b"res_name", disks, 512)
sanlock.release(b"ls_name", b"res_name", disks, slkfd=fd)
assert result == b"\0" * 512
lvb_data = b"first\0second" lvb_sector = lvb_data.ljust(512, b"\0")
-- 2.26.2
Thanks, pushed
On Thu, Feb 18, 2021 at 10:00 AM Vojtech Juranek vjuranek@redhat.com wrote:
On Wednesday, 17 February 2021 21:39:51 CET Benny Zlotnik wrote:
LGTM
+1
On Wed, Feb 17, 2021 at 10:30 PM Nir Soffer nirsof@gmail.com wrote:
Signed-off-by: Nir Soffer nsoffer@redhat.com
tests/python_test.py | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/tests/python_test.py b/tests/python_test.py index d86ba50..58a22c7 100644 --- a/tests/python_test.py +++ b/tests/python_test.py
@@ -746,6 +746,14 @@ def test_lvb(tmpdir, sanlock_daemon): fd = sanlock.register()
# Test reading unset lvb.
sanlock.acquire(b"ls_name", b"res_name", disks, slkfd=fd, lvb=True)
result = sanlock.get_lvb(b"ls_name", b"res_name", disks, 512)
sanlock.release(b"ls_name", b"res_name", disks, slkfd=fd)
assert result == b"\0" * 512
lvb_data = b"first\0second" lvb_sector = lvb_data.ljust(512, b"\0")
-- 2.26.2
sanlock-devel@lists.fedorahosted.org