This is an automated email from the git hooks/post-receive script.
nsoffer pushed a commit to branch master in repository sanlock.
The following commit(s) were added to refs/heads/master by this push: new 66a409c python: Test reading unset lvb 66a409c is described below
commit 66a409c906cc56cf94ea39a367d1a55fc9712364 Author: Nir Soffer nsoffer@redhat.com AuthorDate: Wed Feb 17 22:26:52 2021 +0200
python: Test reading unset lvb
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")
sanlock-devel@lists.fedorahosted.org