Change in vdsm[master]: tests: Add RWLock tests

danken at redhat.com danken at redhat.com
Tue Aug 18 13:57:21 UTC 2015


Dan Kenigsberg has submitted this change and it was merged.

Change subject: tests: Add RWLock tests
......................................................................


tests: Add RWLock tests

Current RWLock looks too complex and has no tests. This patch fixes the
later issue, so we can safely simplify the implementation later.

Only one statement is not covered by the tests, handling of Queue.Full -
this can never happen since we use unbounded queue. This code should
be removed.

The new tests reveal that lock demotion is broken; when replacing an
exclusive lock with shared lock, we actually continue to hold an
exclusive lock until we release the lock. This test is marked as broken
so to avoid breaking the build.  I think we don't use lock demotion in
the current code and this should be fixed by not supporting demotion.

Change-Id: If404f0e8c68fcdb2f7643bdd6d5c1f97f230a227
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/42907
Continuous-Integration: Jenkins CI
Reviewed-by: Adam Litke <alitke at redhat.com>
---
M tests/Makefile.am
A tests/rwlock_test.py
M tests/testlib.py
3 files changed, 385 insertions(+), 0 deletions(-)

Approvals:
  Adam Litke: Looks good to me, approved
  Nir Soffer: Verified
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/42907
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If404f0e8c68fcdb2f7643bdd6d5c1f97f230a227
Gerrit-PatchSet: 18
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list