On Sun, May 12, 2019 at 6:54 PM Nir Soffer <nirsof(a)gmail.com> wrote:
Add the missing align and sector arguments to read_resource_owners()
and
add infrastructue for testing 4k storage and initial tests.
The tests for using wrong sector size revealed that
read_resouce_owners() ignores wrong align and sector size. Make it more
strict to be consistent with other APIs.
Changes since v1:
- Update python/example.py (Vojta)
- Improve test infrastructure for testing 4k storage (Amit, Pavel)
- Improve comments and commit messages (Pavel)
- Make the validation code in read_resource_owners more clear (Pavel)
- Add test for read_resource_owners with invalid align value
- Don't override align_size if sector_size is not set
- Reject invalid align in sanlock_read_resource_owners()
v1 was here:
https://lists.fedorahosted.org/archives/list/sanlock-devel@lists.fedoraho...
Nir Soffer (6):
python: Add align and sector arguments to read_resource_owners()
tests: Start tests for 4k storage
tests: Test wrong sector size with 4k storage
sanlock: Fail read_resource_owners() with wrong sector size
tests: Add failing test for invalid align size
sanlock: Fail read_resource_owners with incorrect align size
README.dev | 44 +++++++++++++
python/example.py | 2 +-
python/sanlock.c | 24 +++++--
src/resource.c | 37 ++++++++---
tests/conftest.py | 36 +++++++++++
tests/python_test.py | 148 ++++++++++++++++++++++++++++++++++++++++++-
tests/util.py | 34 ++++++----
tox.ini | 2 +-
8 files changed, 299 insertions(+), 28 deletions(-)
--
2.17.2
I forgot to mention that the changes are available in
https://github.com/nirs/sanlock/tree/4k
commit: 5a84b82d670ca644af0a6246d1a927ae14f73743