The Samba-Bugzilla – Attachment 8218 Details for
Bug 9421
Build fixes for samba4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
v4-0-test patch
look (text/plain), 45.33 KB, created by
Andreas Schneider
on 2012-11-22 13:52:30 UTC
(
hide
)
Description:
v4-0-test patch
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2012-11-22 13:52:30 UTC
Size:
45.33 KB
patch
obsolete
>From 59b79e2d672a5183f345a3aae45bb615d495d122 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Mon, 19 Nov 2012 23:25:45 +1100 >Subject: [PATCH 1/7] lib/replace: Do not use STRERROR_R_PROTO_COMPATIBLE as > only roken.h sets this > >Currently, we put strerror_r into libreplace even on systems with strerror_r. > >Andrew Bartlett > >Reviewed-by: Andreas Schneider <asn@samba.org> >--- > lib/replace/replace.c | 2 +- > lib/replace/replace.h | 4 +--- > 2 files changed, 2 insertions(+), 4 deletions(-) > >diff --git a/lib/replace/replace.c b/lib/replace/replace.c >index 7ee5f4b..f37d69f 100644 >--- a/lib/replace/replace.c >+++ b/lib/replace/replace.c >@@ -785,7 +785,7 @@ char *rep_get_current_dir_name(void) > } > #endif > >-#if !defined(HAVE_STRERROR_R) || !defined(STRERROR_R_PROTO_COMPATIBLE) >+#if !defined(HAVE_STRERROR_R) && !defined(strerror_r) > int rep_strerror_r(int errnum, char *buf, size_t buflen) > { > char *s = strerror(errnum); >diff --git a/lib/replace/replace.h b/lib/replace/replace.h >index cb412c2..4cdc362 100644 >--- a/lib/replace/replace.h >+++ b/lib/replace/replace.h >@@ -570,9 +570,7 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset) > char *rep_get_current_dir_name(void); > #endif > >-#if !defined(HAVE_STRERROR_R) || !defined(STRERROR_R_PROTO_COMPATIBLE) >-#undef strerror_r >-#define strerror_r rep_strerror_r >+#if !defined(HAVE_STRERROR_R) && !defined(strerror_r) > int rep_strerror_r(int errnum, char *buf, size_t buflen); > #endif > >-- >1.8.0 > > >From 4ee75e3b9a6fb2e52aa1030d447002469b147742 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Wed, 21 Nov 2012 15:34:43 +1100 >Subject: [PATCH 2/7] build: Use ntlm_auth from source3 as the only ntlm_auth > installed on the system > >The ntlm_auth4 binary is untested, and is missing major features compared with >the source3 binary. The two are being slowly merged, but I have not finished >that. > >Andrew Bartlett > >Reviewed-by: Andreas Schneider <asn@samba.org> >--- > selftest/wscript | 2 +- > source3/wscript_build | 2 +- > source4/utils/wscript_build | 14 ++++++++------ > 3 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/selftest/wscript b/selftest/wscript >index a5b2e53..4733dc1 100644 >--- a/selftest/wscript >+++ b/selftest/wscript >@@ -121,7 +121,7 @@ def cmd_testonly(opt): > 'smbclient3:smbclient,' + > 'smbclient4:smbclient4,' + > 'smbtorture4:smbtorture,' + >- 'ntlm_auth3:ntlm_auth3') >+ 'ntlm_auth3:ntlm_auth') > > env.OPTIONS = '--binary-mapping=%s' % binary_mapping > if not Options.options.SLOWTEST: >diff --git a/source3/wscript_build b/source3/wscript_build >index 351d22d..d21aa7b 100755 >--- a/source3/wscript_build >+++ b/source3/wscript_build >@@ -1568,7 +1568,7 @@ bld.SAMBA3_BINARY('versiontest', > param''', > vars=locals()) > >-bld.SAMBA3_BINARY('ntlm_auth' + bld.env.suffix3, >+bld.SAMBA3_BINARY('ntlm_auth', > source=NTLM_AUTH_SRC, > deps=''' > talloc >diff --git a/source4/utils/wscript_build b/source4/utils/wscript_build >index da937dd..3b21eda 100644 >--- a/source4/utils/wscript_build >+++ b/source4/utils/wscript_build >@@ -1,11 +1,13 @@ > #!/usr/bin/env python > >-bld.SAMBA_BINARY('ntlm_auth', >- source='ntlm_auth.c', >- manpages='man/ntlm_auth.1', >- deps='''samba-hostconfig samba-util popt POPT_SAMBA POPT_CREDENTIALS gensec LIBCLI_RESOLVE >- auth4 NTLMSSP_COMMON MESSAGING events service''', >- pyembed=True >+bld.SAMBA_BINARY('ntlm_auth4', >+ source='ntlm_auth.c', >+ manpages='man/ntlm_auth.1', >+ deps='''samba-hostconfig samba-util popt >+ POPT_SAMBA POPT_CREDENTIALS gensec LIBCLI_RESOLVE >+ auth4 NTLMSSP_COMMON MESSAGING events service''', >+ pyembed=True, >+ install=False > ) > > >-- >1.8.0 > > >From a272bd5a3c33485cafffd26a2e4307a7cae0cc22 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Wed, 21 Nov 2012 16:00:53 +1100 >Subject: [PATCH 3/7] torture: remove source3 locktest and masktest > >We now just build these in waf, using the source4/torture code. > >The source4 versions of these are tested in make test. > >Andrew Bartlett > >Reviewed-by: Andreas Schneider <asn@samba.org> >--- > source3/Makefile.in | 9 - > source3/torture/locktest.c | 692 --------------------------------------------- > source3/wscript_build | 21 -- > 3 files changed, 722 deletions(-) > delete mode 100644 source3/torture/locktest.c > >diff --git a/source3/Makefile.in b/source3/Makefile.in >index 759ee5a..03a6ab3 100644 >--- a/source3/Makefile.in >+++ b/source3/Makefile.in >@@ -221,7 +221,6 @@ BIN_PROGS3 = bin/smbpasswd bin/rpcclient bin/smbcacls \ > bin/smbcquotas bin/eventlogadm > > TORTURE_PROGS = bin/smbtorture bin/msgtest \ >- bin/masktest bin/locktest \ > bin/locktest2 bin/nsstest bin/vfstest \ > $(TALLOCTORT) bin/replacetort \ > $(TDBTORTURE) $(PTHREADPOOLTEST) \ >@@ -1278,18 +1277,10 @@ SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) $(TLDAP_OBJ) \ > lib/filename_util.o \ > $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBCLI_ECHO_OBJ) > >-MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ >- $(LIB_NONSMBD_OBJ) \ >- $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) >- > MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_ERR_OBJ) \ > $(LIB_NONSMBD_OBJ) \ > $(LIBNDR_GEN_OBJ0) > >-LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \ >- $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \ >- $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(FNAME_UTIL_OBJ) >- > NSSTEST_OBJ = ../nsswitch/nsstest.o ../lib/util/setid.o $(LIBSAMBAUTIL_OBJ) > > VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OBJ) \ >diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c >deleted file mode 100644 >index 04928f2..0000000 >--- a/source3/torture/locktest.c >+++ /dev/null >@@ -1,692 +0,0 @@ >-/* >- Unix SMB/CIFS implementation. >- randomised byte range lock tester >- Copyright (C) Andrew Tridgell 1999 >- >- This program is free software; you can redistribute it and/or modify >- it under the terms of the GNU General Public License as published by >- the Free Software Foundation; either version 3 of the License, or >- (at your option) any later version. >- >- This program is distributed in the hope that it will be useful, >- but WITHOUT ANY WARRANTY; without even the implied warranty of >- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >- GNU General Public License for more details. >- >- You should have received a copy of the GNU General Public License >- along with this program. If not, see <http://www.gnu.org/licenses/>. >-*/ >- >-#include "includes.h" >-#include "libsmb/libsmb.h" >-#include "system/filesys.h" >-#include "locking/proto.h" >-#include "libsmb/nmblib.h" >-#include "../libcli/smb/smbXcli_base.h" >- >-static fstring password[2]; >-static fstring username[2]; >-static int got_user; >-static int got_pass; >-static bool use_kerberos; >-static int numops = 1000; >-static bool showall; >-static bool analyze; >-static bool hide_unlock_fails; >-static bool use_oplocks; >-static unsigned lock_range = 100; >-static unsigned lock_base = 0; >-static unsigned min_length = 0; >-static bool exact_error_codes; >-static bool zero_zero; >- >-extern char *optarg; >-extern int optind; >- >-#define FILENAME "\\locktest.dat" >- >-#define READ_PCT 50 >-#define LOCK_PCT 45 >-#define UNLOCK_PCT 70 >-#define RANGE_MULTIPLE 1 >-#define NSERVERS 2 >-#define NCONNECTIONS 2 >-#define NFILES 2 >-#define LOCK_TIMEOUT 0 >- >-#define NASTY_POSIX_LOCK_HACK 0 >- >-enum lock_op {OP_LOCK, OP_UNLOCK, OP_REOPEN}; >- >-static const char *lock_op_type(int op) >-{ >- if (op == WRITE_LOCK) return "write"; >- else if (op == READ_LOCK) return "read"; >- else return "other"; >-} >- >-static const char *lock_op_name(enum lock_op op) >-{ >- if (op == OP_LOCK) return "lock"; >- else if (op == OP_UNLOCK) return "unlock"; >- else return "reopen"; >-} >- >-struct record { >- enum lock_op lock_op; >- enum brl_type lock_type; >- char conn, f; >- uint64_t start, len; >- char needed; >-}; >- >-#define PRESETS 0 >- >-#if PRESETS >-static struct record preset[] = { >-{OP_LOCK, WRITE_LOCK, 0, 0, 2, 0, 1}, >-{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, >-{OP_LOCK, WRITE_LOCK, 0, 0, 3, 0, 1}, >-{OP_UNLOCK, 0 , 0, 0, 2, 0, 1}, >-{OP_REOPEN, 0, 0, 0, 0, 0, 1}, >- >-{OP_LOCK, READ_LOCK, 0, 0, 2, 0, 1}, >-{OP_LOCK, READ_LOCK, 0, 0, 1, 1, 1}, >-{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, >-{OP_REOPEN, 0, 0, 0, 0, 0, 1}, >- >-{OP_LOCK, READ_LOCK, 0, 0, 2, 0, 1}, >-{OP_LOCK, WRITE_LOCK, 0, 0, 3, 1, 1}, >-{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, >-{OP_REOPEN, 0, 0, 0, 0, 0, 1}, >- >-{OP_LOCK, READ_LOCK, 0, 0, 2, 0, 1}, >-{OP_LOCK, WRITE_LOCK, 0, 0, 1, 1, 1}, >-{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, >-{OP_REOPEN, 0, 0, 0, 0, 0, 1}, >- >-{OP_LOCK, WRITE_LOCK, 0, 0, 2, 0, 1}, >-{OP_LOCK, READ_LOCK, 0, 0, 1, 1, 1}, >-{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, >-{OP_REOPEN, 0, 0, 0, 0, 0, 1}, >- >-{OP_LOCK, WRITE_LOCK, 0, 0, 2, 0, 1}, >-{OP_LOCK, READ_LOCK, 0, 0, 3, 1, 1}, >-{OP_LOCK, WRITE_LOCK, 0, 0, 0, 0, 1}, >-{OP_REOPEN, 0, 0, 0, 0, 0, 1}, >- >-}; >-#endif >- >-static struct record *recorded; >- >-static void print_brl(struct file_id id, >- struct server_id pid, >- enum brl_type lock_type, >- enum brl_flavour lock_flav, >- br_off start, >- br_off size, >- void *private_data) >-{ >-#if NASTY_POSIX_LOCK_HACK >- { >- static SMB_INO_T lastino; >- >- if (lastino != ino) { >- char *cmd; >- if (asprintf(&cmd, >- "egrep POSIX.*%u /proc/locks", (int)ino) > 0) { >- system(cmd); >- SAFE_FREE(cmd); >- } >- } >- lastino = ino; >- } >-#endif >- >- printf("%s %s %s %.0f:%.0f(%.0f)\n", >- procid_str_static(&pid), file_id_string_tos(&id), >- lock_type==READ_LOCK?"R":"W", >- (double)start, (double)start+size-1,(double)size); >- >-} >- >- >-static void show_locks(void) >-{ >- brl_forall(print_brl, NULL); >- /* system("cat /proc/locks"); */ >-} >- >- >-/***************************************************** >-return a connection to a server >-*******************************************************/ >-static struct cli_state *connect_one(char *share, int snum) >-{ >- struct cli_state *c; >- char *server_n; >- fstring server; >- fstring myname; >- static int count; >- NTSTATUS status; >- int flags = 0; >- >- fstrcpy(server,share+2); >- share = strchr_m(server,'\\'); >- if (!share) return NULL; >- *share = 0; >- share++; >- >- server_n = server; >- >- slprintf(myname,sizeof(myname), "lock-%lu-%u", (unsigned long)getpid(), count++); >- >- /* have to open a new connection */ >- >- if (use_kerberos) { >- flags |= CLI_FULL_CONNECTION_USE_KERBEROS; >- } >- if (use_oplocks) { >- flags |= CLI_FULL_CONNECTION_OPLOCKS; >- } >- >- status = cli_connect_nb(server_n, NULL, 0, 0x20, myname, >- SMB_SIGNING_DEFAULT, flags, &c); >- if (!NT_STATUS_IS_OK(status)) { >- DEBUG(0, ("Connection to %s failed. Error %s\n", server_n, >- nt_errstr(status))); >- return NULL; >- } >- >- status = smbXcli_negprot(c->conn, c->timeout, PROTOCOL_CORE, >- PROTOCOL_NT1); >- if (!NT_STATUS_IS_OK(status)) { >- DEBUG(0, ("protocol negotiation failed: %s\n", >- nt_errstr(status))); >- cli_shutdown(c); >- return NULL; >- } >- >- if (!got_pass) { >- char *pass = getpass("Password: "); >- if (pass) { >- fstrcpy(password[0], pass); >- fstrcpy(password[1], pass); >- } >- } >- >- if (got_pass == 1) { >- strlcpy(password[1], password[0],sizeof(password[1])); >- strlcpy(username[1], username[0],sizeof(username[1])); >- } >- >- status = cli_session_setup(c, username[snum], >- password[snum], strlen(password[snum]), >- password[snum], strlen(password[snum]), >- lp_workgroup()); >- if (!NT_STATUS_IS_OK(status)) { >- DEBUG(0,("session setup failed: %s\n", nt_errstr(status))); >- return NULL; >- } >- >- /* >- * These next two lines are needed to emulate >- * old client behaviour for people who have >- * scripts based on client output. >- * QUESTION ? Do we want to have a 'client compatibility >- * mode to turn these on/off ? JRA. >- */ >- >- if (*c->server_domain || *c->server_os || *c->server_type) >- DEBUG(1,("Domain=[%s] OS=[%s] Server=[%s]\n", >- c->server_domain,c->server_os,c->server_type)); >- >- DEBUG(4,(" session setup ok\n")); >- >- status = cli_tree_connect(c, share, "?????", password[snum], >- strlen(password[snum])+1); >- if (!NT_STATUS_IS_OK(status)) { >- DEBUG(0,("tree connect failed: %s\n", nt_errstr(status))); >- cli_shutdown(c); >- return NULL; >- } >- >- DEBUG(4,(" tconx ok\n")); >- >- return c; >-} >- >- >-static void reconnect(struct cli_state *cli[NSERVERS][NCONNECTIONS], uint16_t fnum[NSERVERS][NCONNECTIONS][NFILES], >- char *share[NSERVERS]) >-{ >- int server, conn, f; >- >- for (server=0;server<NSERVERS;server++) >- for (conn=0;conn<NCONNECTIONS;conn++) { >- if (cli[server][conn]) { >- for (f=0;f<NFILES;f++) { >- if (fnum[server][conn][f] != (uint16_t)-1) { >- cli_close(cli[server][conn], fnum[server][conn][f]); >- fnum[server][conn][f] = (uint16_t)-1; >- } >- } >- cli_ulogoff(cli[server][conn]); >- cli_shutdown(cli[server][conn]); >- } >- cli[server][conn] = connect_one(share[server], server); >- if (!cli[server][conn]) { >- DEBUG(0,("Failed to connect to %s\n", share[server])); >- exit(1); >- } >- } >-} >- >- >- >-static bool test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS], >- uint16_t fnum[NSERVERS][NCONNECTIONS][NFILES], >- struct record *rec) >-{ >- unsigned conn = rec->conn; >- unsigned f = rec->f; >- uint64_t start = rec->start; >- uint64_t len = rec->len; >- enum brl_type op = rec->lock_type; >- int server; >- NTSTATUS status[NSERVERS]; >- >- switch (rec->lock_op) { >- case OP_LOCK: >- /* set a lock */ >- for (server=0;server<NSERVERS;server++) { >- status[server] = cli_lock64(cli[server][conn], >- fnum[server][conn][f], >- start, len, LOCK_TIMEOUT, >- op); >- if (!exact_error_codes && >- NT_STATUS_EQUAL(status[server], >- NT_STATUS_FILE_LOCK_CONFLICT)) { >- status[server] = NT_STATUS_LOCK_NOT_GRANTED; >- } >- } >- if (showall || !NT_STATUS_EQUAL(status[0],status[1])) { >- printf("lock conn=%u f=%u range=%.0f(%.0f) op=%s -> %s:%s\n", >- conn, f, >- (double)start, (double)len, >- op==READ_LOCK?"READ_LOCK":"WRITE_LOCK", >- nt_errstr(status[0]), nt_errstr(status[1])); >- } >- if (showall || !NT_STATUS_EQUAL(status[0],status[1])) show_locks(); >- if (!NT_STATUS_EQUAL(status[0],status[1])) return False; >- break; >- >- case OP_UNLOCK: >- /* unset a lock */ >- for (server=0;server<NSERVERS;server++) { >- status[server] = cli_unlock64(cli[server][conn], >- fnum[server][conn][f], >- start, len); >- } >- if (showall || >- (!hide_unlock_fails && !NT_STATUS_EQUAL(status[0],status[1]))) { >- printf("unlock conn=%u f=%u range=%.0f(%.0f) -> %s:%s\n", >- conn, f, >- (double)start, (double)len, >- nt_errstr(status[0]), nt_errstr(status[1])); >- } >- if (showall || !NT_STATUS_EQUAL(status[0],status[1])) show_locks(); >- if (!hide_unlock_fails && !NT_STATUS_EQUAL(status[0],status[1])) >- return False; >- break; >- >- case OP_REOPEN: >- /* reopen the file */ >- for (server=0;server<NSERVERS;server++) { >- cli_close(cli[server][conn], fnum[server][conn][f]); >- fnum[server][conn][f] = (uint16_t)-1; >- } >- for (server=0;server<NSERVERS;server++) { >- fnum[server][conn][f] = (uint16_t)-1; >- if (!NT_STATUS_IS_OK(cli_openx(cli[server][conn], FILENAME, >- O_RDWR|O_CREAT, >- DENY_NONE, &fnum[server][conn][f]))) { >- printf("failed to reopen on share%d\n", server); >- return False; >- } >- } >- if (showall) { >- printf("reopen conn=%u f=%u\n", >- conn, f); >- show_locks(); >- } >- break; >- } >- >- return True; >-} >- >-static void close_files(struct cli_state *cli[NSERVERS][NCONNECTIONS], >- uint16_t fnum[NSERVERS][NCONNECTIONS][NFILES]) >-{ >- int server, conn, f; >- >- for (server=0;server<NSERVERS;server++) >- for (conn=0;conn<NCONNECTIONS;conn++) >- for (f=0;f<NFILES;f++) { >- if (fnum[server][conn][f] != (uint16_t)-1) { >- cli_close(cli[server][conn], fnum[server][conn][f]); >- fnum[server][conn][f] = (uint16_t)-1; >- } >- } >- for (server=0;server<NSERVERS;server++) { >- cli_unlink(cli[server][0], FILENAME, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN); >- } >-} >- >-static void open_files(struct cli_state *cli[NSERVERS][NCONNECTIONS], >- uint16_t fnum[NSERVERS][NCONNECTIONS][NFILES]) >-{ >- int server, conn, f; >- >- for (server=0;server<NSERVERS;server++) >- for (conn=0;conn<NCONNECTIONS;conn++) >- for (f=0;f<NFILES;f++) { >- fnum[server][conn][f] = (uint16_t)-1; >- if (!NT_STATUS_IS_OK(cli_openx(cli[server][conn], FILENAME, >- O_RDWR|O_CREAT, >- DENY_NONE, >- &fnum[server][conn][f]))) { >- fprintf(stderr,"Failed to open fnum[%u][%u][%u]\n", >- server, conn, f); >- exit(1); >- } >- } >-} >- >- >-static int retest(struct cli_state *cli[NSERVERS][NCONNECTIONS], >- uint16_t fnum[NSERVERS][NCONNECTIONS][NFILES], >- int n) >-{ >- int i; >- printf("testing %u ...\n", n); >- for (i=0; i<n; i++) { >- if (i && i % 100 == 0) { >- printf("%u\n", i); >- } >- >- if (recorded[i].needed && >- !test_one(cli, fnum, &recorded[i])) return i; >- } >- return n; >-} >- >- >-/* each server has two connections open to it. Each connection has two file >- descriptors open on the file - 8 file descriptors in total >- >- we then do random locking ops in tamdem on the 4 fnums from each >- server and ensure that the results match >- */ >-static void test_locks(char *share[NSERVERS]) >-{ >- struct cli_state *cli[NSERVERS][NCONNECTIONS]; >- uint16_t fnum[NSERVERS][NCONNECTIONS][NFILES]; >- int n, i, n1, skip, r1, r2; >- >- ZERO_STRUCT(fnum); >- ZERO_STRUCT(cli); >- >- recorded = SMB_MALLOC_ARRAY(struct record, numops); >- >- for (n=0; n<numops; n++) { >-#if PRESETS >- if (n < sizeof(preset) / sizeof(preset[0])) { >- recorded[n] = preset[n]; >- } else { >-#endif >- recorded[n].conn = random() % NCONNECTIONS; >- recorded[n].f = random() % NFILES; >- recorded[n].start = lock_base + ((unsigned)random() % (lock_range-1)); >- recorded[n].len = min_length + >- random() % (lock_range-(recorded[n].start-lock_base)); >- recorded[n].start *= RANGE_MULTIPLE; >- recorded[n].len *= RANGE_MULTIPLE; >- r1 = random() % 100; >- r2 = random() % 100; >- if (r1 < READ_PCT) { >- recorded[n].lock_type = READ_LOCK; >- } else { >- recorded[n].lock_type = WRITE_LOCK; >- } >- if (r2 < LOCK_PCT) { >- recorded[n].lock_op = OP_LOCK; >- } else if (r2 < UNLOCK_PCT) { >- recorded[n].lock_op = OP_UNLOCK; >- } else { >- recorded[n].lock_op = OP_REOPEN; >- } >- recorded[n].needed = True; >- if (!zero_zero && recorded[n].start==0 && recorded[n].len==0) { >- recorded[n].len = 1; >- } >-#if PRESETS >- } >-#endif >- } >- >- reconnect(cli, fnum, share); >- open_files(cli, fnum); >- n = retest(cli, fnum, numops); >- >- if (n == numops || !analyze) return; >- n++; >- >- skip = n/2; >- >- while (1) { >- n1 = n; >- >- close_files(cli, fnum); >- reconnect(cli, fnum, share); >- open_files(cli, fnum); >- >- for (i=0;i<n-skip;i+=skip) { >- int m, j; >- printf("excluding %d-%d\n", i, i+skip-1); >- for (j=i;j<i+skip;j++) { >- recorded[j].needed = False; >- } >- >- close_files(cli, fnum); >- open_files(cli, fnum); >- >- m = retest(cli, fnum, n); >- if (m == n) { >- for (j=i;j<i+skip;j++) { >- recorded[j].needed = True; >- } >- } else { >- if (i+(skip-1) < m) { >- memmove(&recorded[i], &recorded[i+skip], >- (m-(i+skip-1))*sizeof(recorded[0])); >- } >- n = m-(skip-1); >- i--; >- } >- } >- >- if (skip > 1) { >- skip = skip/2; >- printf("skip=%d\n", skip); >- continue; >- } >- >- if (n1 == n) break; >- } >- >- close_files(cli, fnum); >- reconnect(cli, fnum, share); >- open_files(cli, fnum); >- showall = True; >- n1 = retest(cli, fnum, n); >- if (n1 != n-1) { >- printf("ERROR - inconsistent result (%u %u)\n", n1, n); >- } >- close_files(cli, fnum); >- >- for (i=0;i<n;i++) { >- printf("{%s, %s, conn = %u, file = %u, start = %.0f, len = %.0f, %u},\n", >- lock_op_name(recorded[i].lock_op), >- lock_op_type(recorded[i].lock_type), >- recorded[i].conn, >- recorded[i].f, >- (double)recorded[i].start, >- (double)recorded[i].len, >- recorded[i].needed); >- } >-} >- >- >- >-static void usage(void) >-{ >- printf( >-"Usage:\n\ >- locktest //server1/share1 //server2/share2 [options..]\n\ >- options:\n\ >- -U user%%pass (may be specified twice)\n\ >- -k use kerberos\n\ >- -s seed\n\ >- -o numops\n\ >- -u hide unlock fails\n\ >- -a (show all ops)\n\ >- -A analyse for minimal ops\n\ >- -O use oplocks\n\ >- -E enable exact error code checking\n\ >- -Z enable the zero/zero lock\n\ >- -R range set lock range\n\ >- -B base set lock base\n\ >- -M min set min lock length\n\ >-"); >-} >- >-/**************************************************************************** >- main program >-****************************************************************************/ >- int main(int argc,char *argv[]) >-{ >- char *share[NSERVERS]; >- int opt; >- char *p; >- int seed, server; >- >- setlinebuf(stdout); >- >- load_case_tables(); >- >- if (argc < 3 || argv[1][0] == '-') { >- usage(); >- exit(1); >- } >- >- setup_logging(argv[0], DEBUG_STDOUT); >- >- for (server=0;server<NSERVERS;server++) { >- share[server] = argv[1+server]; >- all_string_sub(share[server],"/","\\",0); >- } >- >- argc -= NSERVERS; >- argv += NSERVERS; >- >- lp_load_global(get_dyn_CONFIGFILE()); >- load_interfaces(); >- >- if (getenv("USER")) { >- fstrcpy(username[0],getenv("USER")); >- fstrcpy(username[1],getenv("USER")); >- } >- >- seed = time(NULL); >- >- while ((opt = getopt(argc, argv, "U:s:ho:aAW:OkR:B:M:EZ")) != EOF) { >- switch (opt) { >- case 'k': >-#ifdef HAVE_KRB5 >- use_kerberos = True; >-#else >- d_printf("No kerberos support compiled in\n"); >- exit(1); >-#endif >- break; >- case 'U': >- got_user = 1; >- if (got_pass == 2) { >- d_printf("Max of 2 usernames\n"); >- exit(1); >- } >- fstrcpy(username[got_pass],optarg); >- p = strchr_m(username[got_pass],'%'); >- if (p) { >- *p = 0; >- fstrcpy(password[got_pass], p+1); >- got_pass++; >- } >- break; >- case 'R': >- lock_range = strtol(optarg, NULL, 0); >- break; >- case 'B': >- lock_base = strtol(optarg, NULL, 0); >- break; >- case 'M': >- min_length = strtol(optarg, NULL, 0); >- break; >- case 's': >- seed = atoi(optarg); >- break; >- case 'u': >- hide_unlock_fails = True; >- break; >- case 'o': >- numops = atoi(optarg); >- break; >- case 'O': >- use_oplocks = True; >- break; >- case 'a': >- showall = True; >- break; >- case 'A': >- analyze = True; >- break; >- case 'Z': >- zero_zero = True; >- break; >- case 'E': >- exact_error_codes = True; >- break; >- case 'h': >- usage(); >- exit(1); >- default: >- printf("Unknown option %c (%d)\n", (char)opt, opt); >- exit(1); >- } >- } >- >- if(use_kerberos && !got_user) got_pass = True; >- >- argc -= optind; >- argv += optind; >- >- DEBUG(0,("seed=%u\n", seed)); >- srandom(seed); >- >- test_locks(share); >- >- return(0); >-} >diff --git a/source3/wscript_build b/source3/wscript_build >index d21aa7b..fc8496c 100755 >--- a/source3/wscript_build >+++ b/source3/wscript_build >@@ -562,12 +562,8 @@ SMBTORTURE_SRC1 = '''torture/torture.c torture/nbio.c torture/scanner.c torture/ > SMBTORTURE_SRC = '''${SMBTORTURE_SRC1} > torture/wbc_async.c''' > >-MASKTEST_SRC = '''torture/masktest.c''' >- > MSGTEST_SRC = '''torture/msgtest.c''' > >-LOCKTEST_SRC = '''torture/locktest.c''' >- > PDBTEST_SRC = '''torture/pdbtest.c''' > > VFSTEST_SRC = '''torture/cmd_vfs.c torture/vfstest.c >@@ -1457,14 +1453,6 @@ bld.SAMBA3_BINARY('replacetort', > deps='replace replace-test', > install=False) > >-bld.SAMBA3_BINARY('masktest' + bld.env.suffix3, >- source=MASKTEST_SRC, >- deps=''' >- talloc >- param >- libsmb''', >- vars=locals()) >- > bld.SAMBA3_BINARY('msgtest', > source=MSGTEST_SRC, > deps=''' >@@ -1507,15 +1495,6 @@ bld.SAMBA3_BINARY('sharesec', > popt_samba3''', > vars=locals()) > >-bld.SAMBA3_BINARY('locktest' + bld.env.suffix3, >- source=LOCKTEST_SRC, >- deps=''' >- talloc >- param >- libsmb >- LOCKING''', >- vars=locals()) >- > bld.SAMBA3_BINARY('pdbtest', > source=PDBTEST_SRC, > deps=''' >-- >1.8.0 > > >From 0c34f404514468b561f804b1b80964b4d8c1e888 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Wed, 21 Nov 2012 16:32:38 +1100 >Subject: [PATCH 4/7] build: Be consistent with the name of smbtorture > binaries > >This ensures that in both build systems, smbtorture3 is the source3 binary, and >smbtoture is our main smbtorture binary, built with waf. > >Also included in this is the removal of bin/ndrdump4 as a special case. > >This removes the last cases of binaries with different names in >each build system. > >Andrew Bartlett > >Reviewed-by: Andreas Schneider <asn@samba.org> >--- > packaging/RHEL-CTDB/configure.rpm | 2 +- > packaging/RHEL-CTDB/samba.spec.tmpl | 2 +- > script/autobuild.py | 4 ++-- > .../{Makefile-smbtorture4 => Makefile-smbtorture} | 14 ++++---------- > source3/Makefile.in | 17 +++++++---------- > source3/configure.in | 22 +++++++++++----------- > source3/selftest/s3-selftest.sh | 4 ++-- > 7 files changed, 28 insertions(+), 37 deletions(-) > rename source3/{Makefile-smbtorture4 => Makefile-smbtorture} (70%) > >diff --git a/packaging/RHEL-CTDB/configure.rpm b/packaging/RHEL-CTDB/configure.rpm >index 4387da1..d0ae8b5 100755 >--- a/packaging/RHEL-CTDB/configure.rpm >+++ b/packaging/RHEL-CTDB/configure.rpm >@@ -66,7 +66,7 @@ CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C \ > --without-dnsupdate \ > --with-aio-support \ > --disable-merged-build \ >- --disable-smbtorture4 \ >+ --disable-smbtorture \ > --disable-external-libtalloc \ > --disable-external-libtdb \ > $* >diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl >index 16d2fa4..a57269e 100644 >--- a/packaging/RHEL-CTDB/samba.spec.tmpl >+++ b/packaging/RHEL-CTDB/samba.spec.tmpl >@@ -184,7 +184,7 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ > --without-dnsupdate \ > --with-aio-support \ > --disable-merged-build \ >- --disable-smbtorture4 \ >+ --disable-smbtorture \ > --disable-external-libtalloc \ > --disable-external-libtdb > >diff --git a/script/autobuild.py b/script/autobuild.py >index efef2f4..1182d7f 100755 >--- a/script/autobuild.py >+++ b/script/autobuild.py >@@ -39,10 +39,10 @@ tasks = { > "samba3" : [ ("autogen", "./autogen.sh", "text/plain"), > ("configure", "./configure.developer ${PREFIX}", "text/plain"), > ("make basics", "make basics", "text/plain"), >- # we split 'make -j 4', 'make bin/smbtorture4' and 'make -j 4 everything' >+ # we split 'make -j 4', 'make bin/smbtorture' and 'make -j 4 everything' > # because it makes it much easier to find errors. > ("make", "make -j 4", "text/plain"), # don't use too many processes >- ("make bin/smbtorture4", "make bin/smbtorture4", "text/plain"), >+ ("make bin/smbtorture", "make bin/smbtorture", "text/plain"), > ("make everything", "make -j 4 everything", "text/plain"), > ("install", "make install", "text/plain"), > ("test", "make test FAIL_IMMEDIATELY=1", "text/plain"), >diff --git a/source3/Makefile-smbtorture4 b/source3/Makefile-smbtorture >similarity index 70% >rename from source3/Makefile-smbtorture4 >rename to source3/Makefile-smbtorture >index dbc0e6d..4b5b143 100644 >--- a/source3/Makefile-smbtorture4 >+++ b/source3/Makefile-smbtorture >@@ -1,7 +1,7 @@ > WAF_BINARY=buildtools/bin/waf > WAF=$(WAF_BINARY) > WAF_BUILD=WAF_MAKE=1 $(WAF_BINARY) >-SAMBA4_BINARIES="smbtorture,ndrdump" >+SAMBA4_BINARIES="smbtorture" > > samba4-configure: > @(cd .. && \ >@@ -10,17 +10,11 @@ samba4-configure: > > .PHONY: samba4-configure > >-bin/smbtorture4: $(BINARY_PREREQS) samba4-configure samba4-config-compare >+bin/smbtorture: $(BINARY_PREREQS) samba4-configure samba4-config-compare > cd .. && $(WAF_BUILD) --targets=smbtorture >- cp ../bin/smbtorture bin/smbtorture4 >+ cp ../bin/smbtorture bin/smbtorture > >-.PHONY: bin/smbtorture4 >- >-bin/ndrdump4: $(BINARY_PREREQS) samba4-configure >- cd .. && $(WAF_BUILD) --targets=ndrdump >- cp ../bin/ndrdump bin/ndrdump4 >- >-.PHONY: bin/ndrdump4 >+.PHONY: bin/smbtorture > > samba4-config-compare: samba4-configure > @echo "Comparing config.h from autoconf and waf" >diff --git a/source3/Makefile.in b/source3/Makefile.in >index 03a6ab3..772a590 100644 >--- a/source3/Makefile.in >+++ b/source3/Makefile.in >@@ -220,7 +220,7 @@ BIN_PROGS3 = bin/smbpasswd bin/rpcclient bin/smbcacls \ > bin/profiles bin/ntlm_auth bin/sharesec \ > bin/smbcquotas bin/eventlogadm > >-TORTURE_PROGS = bin/smbtorture bin/msgtest \ >+TORTURE_PROGS = bin/smbtorture3 bin/msgtest \ > bin/locktest2 bin/nsstest bin/vfstest \ > $(TALLOCTORT) bin/replacetort \ > $(TDBTORTURE) $(PTHREADPOOLTEST) \ >@@ -1601,9 +1601,9 @@ pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@ > > gpext_modules:: $(GPEXT_MODULES) > >-torture:: SHOWFLAGS basics $(TORTURE_PROGS) @SMBTORTURE4@ >+torture:: SHOWFLAGS basics $(TORTURE_PROGS) @SMBTORTURE@ > >-smbtorture : SHOWFLAGS bin/smbtorture >+smbtorture3 : SHOWFLAGS bin/smbtorture3 > > masktest : SHOWFLAGS bin/masktest > >@@ -1954,7 +1954,7 @@ bin/nmblookup: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LI > @$(CC) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ > $(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) > >-bin/smbtorture: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) $(IDMAP_UTIL_OBJ) >+bin/smbtorture3: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) $(IDMAP_UTIL_OBJ) > @echo Linking $@ > @$(CC) -o $@ $(SMBTORTURE_OBJ) $(IDMAP_UTIL_OBJ) $(LDFLAGS) $(DYNEXP) \ > $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \ >@@ -3350,13 +3350,10 @@ libnetapi_examples: libnetapi > clean_libnetapi_examples: > $(MAKE) -C lib/netapi/examples clean > >-.PHONY: bin/smbtorture4 bin/ndrdump4 >+.PHONY: bin/smbtorture > >-bin/smbtorture4: $(BINARY_PREREQS) >- $(MAKE) -f Makefile-smbtorture4 bin/smbtorture4 >- >-bin/ndrdump4: $(BINARY_PREREQS) >- $(MAKE) -f Makefile-smbtorture4 bin/ndrdump4 >+bin/smbtorture: $(BINARY_PREREQS) >+ $(MAKE) -f Makefile-smbtorture bin/smbtorture > > .PHONY: vfs_examples > >diff --git a/source3/configure.in b/source3/configure.in >index 2dfc388..b8e76de 100644 >--- a/source3/configure.in >+++ b/source3/configure.in >@@ -203,13 +203,13 @@ AC_ARG_WITH(profiling-data, > ) > > dnl Checks for programs. >-AC_ARG_ENABLE(smbtorture4, >- [AS_HELP_STRING([--enable-smbtorture4], [Enable building smbtorture4 (default=auto)])]) >+AC_ARG_ENABLE(smbtorture, >+ [AS_HELP_STRING([--enable-smbtorture], [Enable building smbtorture (default=auto)])]) > >-if test x$enable_smbtorture4 != xno; then >- smbtorture4_possible=yes >+if test x$enable_smbtorture != xno; then >+ smbtorture_possible=yes > else >- smbtorture4_possible=no >+ smbtorture_possible=no > fi > > AC_PROG_INSTALL >@@ -220,11 +220,11 @@ AC_SAMBA_GNU_MAKE([true], [true]) > > # Check for perl > m4_include(../m4/check_perl.m4) >-AC_SAMBA_PERL([true], [smbtorture4_possible=no]) >+AC_SAMBA_PERL([true], [smbtorture_possible=no]) > > # Check for python > m4_include(../m4/check_python.m4) >-AC_SAMBA_PYTHON_DEVEL([true], [smbtorture4_possible=no]) >+AC_SAMBA_PYTHON_DEVEL([true], [smbtorture_possible=no]) > > AC_CHECK_TOOL(AR, ar) > >@@ -1710,7 +1710,7 @@ if test x"$BLDSHARED" != x"true"; then > SHLD="shared-libraries-disabled" > PICFLAG="${PIE_CFLAGS}" > SHLIBEXT="shared_libraries_disabled" >- smbtorture4_possible=no >+ smbtorture_possible=no > fi > > AC_MSG_CHECKING([used PICFLAG]) >@@ -6525,9 +6525,9 @@ fi > > m4_include(../lib/zlib/zlib.m4) > >-if test x$smbtorture4_possible = xyes; then >- SMBTORTURE4="bin/smbtorture4" >- AC_SUBST(SMBTORTURE4) >+if test x$smbtorture_possible = xyes; then >+ SMBTORTURE="bin/smbtorture" >+ AC_SUBST(SMBTORTURE) > fi > > AC_SUBST(ZLIB_LIBS) >diff --git a/source3/selftest/s3-selftest.sh b/source3/selftest/s3-selftest.sh >index 335398a..10cf115 100755 >--- a/source3/selftest/s3-selftest.sh >+++ b/source3/selftest/s3-selftest.sh >@@ -24,7 +24,7 @@ st_test_done() { > if [ "x${RUN_FROM_BUILD_FARM}" = "xyes" ]; then > ( rm -f ${SELFTESTPREFIX}/st_done && \ > ${PERL} ${SELFTESTDIR}/selftest.pl \ >- --binary-mapping=smbtorture3:smbtorture,nmblookup3:nmblookup,nmblookup4:nmblookup4,smbclient3:smbclient,smbclient4:smbclient4,ntlm_auth3:ntlm_auth \ >+ --binary-mapping=smbtorture3:smbtorture3,nmblookup3:nmblookup,nmblookup4:nmblookup4,smbclient3:smbclient,smbclient4:smbclient4,ntlm_auth3:ntlm_auth,smbtorture4:smbtorture \ > --prefix=${SELFTESTPREFIX} --target=samba3 \ > --testlist="${PYTHON} ${SOURCEDIR}/selftest/tests.py|" \ > --exclude=${SELFTESTDIR}/skip \ >@@ -38,7 +38,7 @@ if [ "x${RUN_FROM_BUILD_FARM}" = "xyes" ]; then > else > ( rm -f ${SELFTESTPREFIX}/st_done && \ > ${PERL} ${SELFTESTDIR}/selftest.pl \ >- --binary-mapping=smbtorture3:smbtorture,nmblookup3:nmblookup,nmblookup4:nmblookup4,smbclient3:smbclient,smbclient4:smbclient4,ntlm_auth3:ntlm_auth \ >+ --binary-mapping=smbtorture3:smbtorture3,nmblookup3:nmblookup,nmblookup4:nmblookup4,smbclient3:smbclient,smbclient4:smbclient4,ntlm_auth3:ntlm_auth,smbtorture4:smbtorture \ > --prefix=${SELFTESTPREFIX} --target=samba3 \ > --testlist="${PYTHON} ${SOURCEDIR}/selftest/tests.py|" \ > --exclude=${SELFTESTDIR}/skip \ >-- >1.8.0 > > >From 1da30c2ebce7406f106fa355edda14d9f9227da8 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Wed, 21 Nov 2012 17:52:35 +1100 >Subject: [PATCH 5/7] build: Remove --enable-smbtorture, require > bin/smbtorture (from waf) for make test > >This simply moves this to being a side-effect of --enable-selftest. > >The flag was renamed from --enable-smbtorture4 in a recent patch. > >Make test now relies on smbtorture4, and so this code to make the dependency >optional for the tests is not required any more. > >Andrew Bartlett > >Reviewed-by: Andreas Schneider <asn@samba.org> >--- > packaging/RHEL-CTDB/configure.rpm | 1 - > packaging/RHEL-CTDB/samba.spec.tmpl | 1 - > source3/Makefile.in | 6 +++--- > source3/configure.in | 24 +++++++----------------- > source3/m4/check_path.m4 | 1 + > 5 files changed, 11 insertions(+), 22 deletions(-) > >diff --git a/packaging/RHEL-CTDB/configure.rpm b/packaging/RHEL-CTDB/configure.rpm >index d0ae8b5..d6d7c5b 100755 >--- a/packaging/RHEL-CTDB/configure.rpm >+++ b/packaging/RHEL-CTDB/configure.rpm >@@ -66,7 +66,6 @@ CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C \ > --without-dnsupdate \ > --with-aio-support \ > --disable-merged-build \ >- --disable-smbtorture \ > --disable-external-libtalloc \ > --disable-external-libtdb \ > $* >diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl >index a57269e..978f1a6 100644 >--- a/packaging/RHEL-CTDB/samba.spec.tmpl >+++ b/packaging/RHEL-CTDB/samba.spec.tmpl >@@ -184,7 +184,6 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ > --without-dnsupdate \ > --with-aio-support \ > --disable-merged-build \ >- --disable-smbtorture \ > --disable-external-libtalloc \ > --disable-external-libtdb > >diff --git a/source3/Makefile.in b/source3/Makefile.in >index 772a590..c729e20 100644 >--- a/source3/Makefile.in >+++ b/source3/Makefile.in >@@ -1601,7 +1601,7 @@ pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@ > > gpext_modules:: $(GPEXT_MODULES) > >-torture:: SHOWFLAGS basics $(TORTURE_PROGS) @SMBTORTURE@ >+torture:: SHOWFLAGS basics $(TORTURE_PROGS) > > smbtorture3 : SHOWFLAGS bin/smbtorture3 > >@@ -3277,7 +3277,7 @@ test_pam_modules:: pam_modules > ## Targets for 'make test' > ## > >-valgrindtest:: all torture timelimit >+valgrindtest:: all torture timelimit bin/smbtorture > @echo Running Test suite with valgrind > @$(MAKE) test \ > NMBD_VALGRIND="xterm -n nmbd -e valgrind -q --db-attach=yes --num-callers=30" \ >@@ -3289,7 +3289,7 @@ selftestdir = ../selftest > > S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)="$(builddir)/bin:$$$(LIB_PATH_VAR)" > >-test:: all torture timelimit >+test:: all torture timelimit bin/smbtorture > @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \ > NSS_WRAPPER_WINBIND_SO_PATH="$(srcdir)/../nsswitch/libnss_winbind.so" \ > SELFTESTDIR="$(selftestdir)" SELFTESTPREFIX="$(selftest_prefix)" \ >diff --git a/source3/configure.in b/source3/configure.in >index b8e76de..b97dba8 100644 >--- a/source3/configure.in >+++ b/source3/configure.in >@@ -202,29 +202,21 @@ AC_ARG_WITH(profiling-data, > AC_MSG_RESULT(no) > ) > >-dnl Checks for programs. >-AC_ARG_ENABLE(smbtorture, >- [AS_HELP_STRING([--enable-smbtorture], [Enable building smbtorture (default=auto)])]) >- >-if test x$enable_smbtorture != xno; then >- smbtorture_possible=yes >-else >- smbtorture_possible=no >-fi >- > AC_PROG_INSTALL > AC_PROG_AWK > # Check for GNU make > m4_include(../m4/check_make.m4) > AC_SAMBA_GNU_MAKE([true], [true]) > >+selftest_possible="yes" >+ > # Check for perl > m4_include(../m4/check_perl.m4) >-AC_SAMBA_PERL([true], [smbtorture_possible=no]) >+AC_SAMBA_PERL([true], [selftest_possible=no]) > > # Check for python > m4_include(../m4/check_python.m4) >-AC_SAMBA_PYTHON_DEVEL([true], [smbtorture_possible=no]) >+AC_SAMBA_PYTHON_DEVEL([true], [selftest_possible=no]) > > AC_CHECK_TOOL(AR, ar) > >@@ -6447,6 +6439,9 @@ AC_MSG_CHECKING(whether to enable features for selftest) > if test x"$selftest" = x"yes"; then > AC_MSG_RESULT(yes) > AC_DEFINE(ENABLE_SELFTEST, 1, [Support features needed for selftest]) >+ if test x"$selftest_possible" != xyes; then >+ AC_MSG_ERROR(selftest support only possible with python, including development headers, and perl installed) >+ fi > else > AC_MSG_RESULT(no) > fi >@@ -6525,11 +6520,6 @@ fi > > m4_include(../lib/zlib/zlib.m4) > >-if test x$smbtorture_possible = xyes; then >- SMBTORTURE="bin/smbtorture" >- AC_SUBST(SMBTORTURE) >-fi >- > AC_SUBST(ZLIB_LIBS) > AC_SUBST(ZLIB_OBJS) > AC_ZLIB([ZLIB_OBJS=""], [ >diff --git a/source3/m4/check_path.m4 b/source3/m4/check_path.m4 >index 1932a33..94c36bc 100644 >--- a/source3/m4/check_path.m4 >+++ b/source3/m4/check_path.m4 >@@ -42,6 +42,7 @@ AC_ARG_ENABLE(developer, [AS_HELP_STRING([--enable-developer], [Turn on develope > [if eval "test x$enable_developer = xyes"; then > debug=yes > developer=yes >+ selftest=yes > fi]) > > AC_SUBST(selftest) >-- >1.8.0 > > >From bd1b408226803a4b8d925358f93f5e76a1f014dd Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Wed, 21 Nov 2012 19:52:50 +1100 >Subject: [PATCH 6/7] packaging: Remove long-gone --disable-merged-build from > RHEL-CTDB packaging > >Reviewed-by: Andreas Schneider <asn@samba.org> >--- > packaging/RHEL-CTDB/configure.rpm | 1 - > packaging/RHEL-CTDB/samba.spec.tmpl | 1 - > 2 files changed, 2 deletions(-) > >diff --git a/packaging/RHEL-CTDB/configure.rpm b/packaging/RHEL-CTDB/configure.rpm >index d6d7c5b..f16b352 100755 >--- a/packaging/RHEL-CTDB/configure.rpm >+++ b/packaging/RHEL-CTDB/configure.rpm >@@ -65,7 +65,6 @@ CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C \ > --without-ldb \ > --without-dnsupdate \ > --with-aio-support \ >- --disable-merged-build \ > --disable-external-libtalloc \ > --disable-external-libtdb \ > $* >diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl >index 978f1a6..e79674f 100644 >--- a/packaging/RHEL-CTDB/samba.spec.tmpl >+++ b/packaging/RHEL-CTDB/samba.spec.tmpl >@@ -183,7 +183,6 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ > --without-ldb \ > --without-dnsupdate \ > --with-aio-support \ >- --disable-merged-build \ > --disable-external-libtalloc \ > --disable-external-libtdb > >-- >1.8.0 > > >From 8bbfc19542da2d767f1cd72aa7cc22883c145470 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Wed, 21 Nov 2012 20:20:46 +1100 >Subject: [PATCH 7/7] build: Do not install testing binaries > >These binaries are for developer or selftest use, and are not >supported for installation onto the system. The autoconf build does >not install these binaries, and so neither should the waf build. > >Andrew Bartlett > >Reviewed-by: Andreas Schneider <asn@samba.org> > >Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> >Autobuild-Date(master): Thu Nov 22 12:00:36 CET 2012 on sn-devel-104 >--- > nsswitch/wscript_build | 7 ++++--- > source3/lib/asys/wscript_build | 3 ++- > source3/lib/pthreadpool/wscript_build | 3 ++- > source3/wscript_build | 16 ++++++++++++++++ > 4 files changed, 24 insertions(+), 5 deletions(-) > >diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build >index a94c02c..1efee55 100644 >--- a/nsswitch/wscript_build >+++ b/nsswitch/wscript_build >@@ -12,9 +12,10 @@ bld.SAMBA_LIBRARY('winbind-client', > > > bld.SAMBA_BINARY('nsstest', >- source='nsstest.c', >- deps='replace dl' >- ) >+ source='nsstest.c', >+ deps='replace dl', >+ install=False >+ ) > > # The nss_wrapper code relies strictly on the linux implementation and > # name, so compile but do not install a copy under this name. >diff --git a/source3/lib/asys/wscript_build b/source3/lib/asys/wscript_build >index 7b6d236..15de977 100644 >--- a/source3/lib/asys/wscript_build >+++ b/source3/lib/asys/wscript_build >@@ -6,4 +6,5 @@ bld.SAMBA3_SUBSYSTEM('LIBASYS', > > bld.SAMBA3_BINARY('asystest', > source='tests.c', >- deps='LIBASYS') >+ deps='LIBASYS', >+ install=False) >diff --git a/source3/lib/pthreadpool/wscript_build b/source3/lib/pthreadpool/wscript_build >index 2cdd2ab..bdd5f53 100644 >--- a/source3/lib/pthreadpool/wscript_build >+++ b/source3/lib/pthreadpool/wscript_build >@@ -13,4 +13,5 @@ else: > bld.SAMBA3_BINARY('pthreadpooltest', > source='tests.c', > deps='PTHREADPOOL', >- enabled=bld.env.WITH_PTHREADPOOL) >+ enabled=bld.env.WITH_PTHREADPOOL, >+ install=False) >diff --git a/source3/wscript_build b/source3/wscript_build >index fc8496c..b87b4d1 100755 >--- a/source3/wscript_build >+++ b/source3/wscript_build >@@ -1438,6 +1438,7 @@ bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3, > NDR_OPEN_FILES > idmap > ''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('smbconftort', >@@ -1446,6 +1447,7 @@ bld.SAMBA3_BINARY('smbconftort', > talloc > param > popt_samba3''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('replacetort', >@@ -1458,6 +1460,7 @@ bld.SAMBA3_BINARY('msgtest', > deps=''' > talloc > param''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('smbcacls', >@@ -1503,6 +1506,7 @@ bld.SAMBA3_BINARY('pdbtest', > popt_samba3 > AUTH_COMMON > auth''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('vfstest', >@@ -1511,11 +1515,13 @@ bld.SAMBA3_BINARY('vfstest', > vfs > popt_samba3 > SMBREADLINE''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('log2pcap', > source=LOG2PCAP_SRC, > deps='''talloc popt''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('locktest2', >@@ -1525,11 +1531,13 @@ bld.SAMBA3_BINARY('locktest2', > param > libsmb > LOCKING''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('debug2html', > source=DEBUG2HTML_SRC, > deps='''talloc popt''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('smbfilter', >@@ -1538,6 +1546,7 @@ bld.SAMBA3_BINARY('smbfilter', > talloc > param > LIBNMB''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('versiontest', >@@ -1545,6 +1554,7 @@ bld.SAMBA3_BINARY('versiontest', > deps=''' > SAMBA_VERSION > param''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('ntlm_auth', >@@ -1560,6 +1570,7 @@ bld.SAMBA3_BINARY('ntlm_auth', > > bld.SAMBA3_BINARY('timelimit', > source='script/tests/timelimit.c', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('rpc_open_tcp', >@@ -1567,6 +1578,7 @@ bld.SAMBA3_BINARY('rpc_open_tcp', > deps=''' > talloc > msrpc3''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('test_lp_load', >@@ -1575,6 +1587,7 @@ bld.SAMBA3_BINARY('test_lp_load', > talloc > param > popt_samba3''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('dbwrap_tool', >@@ -1589,6 +1602,7 @@ bld.SAMBA3_BINARY('dbwrap_torture', > deps=''' > talloc > popt_samba3''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('split_tokens', >@@ -1596,6 +1610,7 @@ bld.SAMBA3_BINARY('split_tokens', > deps=''' > talloc > popt_samba3''', >+ install=False, > vars=locals()) > > bld.SAMBA3_BINARY('vlp', >@@ -1603,6 +1618,7 @@ bld.SAMBA3_BINARY('vlp', > deps=''' > talloc > param''', >+ install=False, > vars=locals()) > > bld.SAMBA3_PYTHON('pysmbd', >-- >1.8.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review?
(
ddiss
)
asn
:
review?
(
abartlet
)
kseeger
:
review+
metze
:
review+
Actions:
View
Attachments on
bug 9421
: 8218