ctdb: Improve robust mutex test
authorCarlos O'Donell <codonell@redhat.com>
Fri, 15 Jun 2018 11:32:46 +0000 (13:32 +0200)
committerAmitay Isaacs <amitay@samba.org>
Fri, 29 Jun 2018 04:47:00 +0000 (06:47 +0200)
commitb6b1226d394445c21e01fdf3010642c85dbe85dd
tree6660cb1c56f63b6786d7fac977cd4801a287b1f6
parent396f123121ddb290f4a5536a2224aa4a651c072f
ctdb: Improve robust mutex test

This avoids some of the undefined behaviour, like initializing the same mutex
twice which happens when the low and high priority processes start (both
do the initialization and that's dangerous.) Instead now we start an
"init" process to start the shared memory segment, and then everything
else just uses it without truncation or unlinking (same mutex).

Signed-off-by: Carlos O'Donell <codonell@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Jun 29 06:47:00 CEST 2018 on sn-devel-144
ctdb/tests/src/test_mutex_raw.c