[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Tue Jan 31 10:58:02 UTC 2017
The branch, master has been updated
via 39ac4ae ctdb-tests: Use replace headers instead of system headers
via 08b4a5f ctdb-tests: Do not build mutex test if robust mutexes are not supported
from 76a2999 libcli/smb: outbuf length is a IVAL ie a uint32_t
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 39ac4ae65eb3b8d4d3574987eab47eb7a290f2e4
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Jan 31 16:49:14 2017 +1100
ctdb-tests: Use replace headers instead of system headers
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12469
This ensures that PTHREAD_MUTEX_ROBUST, pthread_mutexattr_setrobust()
and pthread_mutex_consistent() are always defined.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Tue Jan 31 11:57:01 CET 2017 on sn-devel-144
commit 08b4a5f9f1575c882ab7174eb3249b574df6976f
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Jan 31 14:50:53 2017 +1100
ctdb-tests: Do not build mutex test if robust mutexes are not supported
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12469
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
-----------------------------------------------------------------------
Summary of changes:
ctdb/tests/src/test_mutex_raw.c | 24 +++++++-----------------
ctdb/wscript | 9 +++++----
2 files changed, 12 insertions(+), 21 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/tests/src/test_mutex_raw.c b/ctdb/tests/src/test_mutex_raw.c
index 8e3cae3..ab7aff9 100644
--- a/ctdb/tests/src/test_mutex_raw.c
+++ b/ctdb/tests/src/test_mutex_raw.c
@@ -38,21 +38,11 @@
* If no pid is printed, then no process is holding the mutex.
*/
-#include <stdio.h>
-#include <unistd.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <sched.h>
-#include <sys/mman.h>
-#include <pthread.h>
-#include <errno.h>
-#include <stdbool.h>
-
-int pthread_mutex_consistent_np(pthread_mutex_t *);
+#include "replace.h"
+#include "system/filesys.h"
+#include "system/wait.h"
+#include "system/shmem.h"
+#include "system/threads.h"
static void set_realtime(void)
{
@@ -99,7 +89,7 @@ static void run_child(const char *filename)
again:
ret = pthread_mutex_lock(mutex);
if (ret == EOWNERDEAD) {
- ret = pthread_mutex_consistent_np(mutex);
+ ret = pthread_mutex_consistent(mutex);
} else if (ret == EAGAIN) {
goto again;
}
@@ -172,7 +162,7 @@ int main(int argc, const char **argv)
if (strcmp(argv[2], "debug") == 0) {
ret = pthread_mutex_trylock(mutex);
if (ret == EOWNERDEAD) {
- ret = pthread_mutex_consistent_np(mutex);
+ ret = pthread_mutex_consistent(mutex);
if (ret == 0) {
pthread_mutex_unlock(mutex);
}
diff --git a/ctdb/wscript b/ctdb/wscript
index b9a3072..446bd8d 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -830,10 +830,11 @@ def build(bld):
ib_deps,
install_path='${CTDB_TEST_LIBEXECDIR}')
- bld.SAMBA_BINARY('test_mutex_raw',
- source='tests/src/test_mutex_raw.c',
- deps='pthread',
- install_path='${CTDB_TEST_LIBEXECDIR}')
+ if bld.env.HAVE_ROBUST_MUTEXES:
+ bld.SAMBA_BINARY('test_mutex_raw',
+ source='tests/src/test_mutex_raw.c',
+ deps='pthread',
+ install_path='${CTDB_TEST_LIBEXECDIR}')
test_subdirs = [
'complex',
--
Samba Shared Repository
More information about the samba-cvs
mailing list