selftest: Rework samba.dsdb locking test to samba.dsdb_lock
authorAndrew Bartlett <abartlet@samba.org>
Wed, 6 Dec 2017 01:31:54 +0000 (14:31 +1300)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 8 Dec 2017 20:47:55 +0000 (21:47 +0100)
commitb8d0602e598a814b8e707b50aa895d18aa3d8d6c
tree0678208b3b4ee4ae582edb56bee48ed20e2f7c9a
parent8cdb3995caf7a21d0c27a56a0bf0c1efd5b491e4
selftest: Rework samba.dsdb locking test to samba.dsdb_lock

This avoids running the test while samba is modifying and locking the same database,
as this can lead to a deadlock.

The deadlock is not seen in production as the LDB read lock is not held while
waiting for another process, but this test needs to do this to demonstrate
the locking safety.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Dec  8 21:47:55 CET 2017 on sn-devel-144
python/samba/tests/dsdb.py
python/samba/tests/dsdb_lock.py [new file with mode: 0644]
python/samba/tests/samdb.py
source4/selftest/tests.py