]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
unit tests for ObjectContext read/write locks 407/head
authorLoic Dachary <loic@dachary.org>
Mon, 8 Jul 2013 14:18:08 +0000 (16:18 +0200)
committerLoic Dachary <loic@dachary.org>
Mon, 8 Jul 2013 14:45:12 +0000 (16:45 +0200)
commit7b7f752c69299d8d9623892a1480ddc6a71b3ccc
tree5658c3d346f4c8e9b5c5386e8045d973959cb935
parent8bc50626c51c9d45017cb0fed1f542ec7706323f
unit tests for ObjectContext read/write locks

unit tests for the ObjectContext methods ondisk_write_lock,
ondisk_write_unlock, ondisk_read_lock and ondisk_read_unlock.

A class derived from ::testing::Test is created with two sub-classes (
Thread_read_lock & Thread_write_lock ) to provide a separate thread
that can block with cond.Wait(). usleep(3) is used in the main thread
to wait for the expected side effect with increasing delays ( up to
MAX_DELAY ).

http://tracker.ceph.com/issues/5487 refs #5487

Signed-off-by: Loic Dachary <loic@dachary.org>
src/test/test_osd_types.cc