[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Thu Nov 22 04:01:04 MST 2012


The branch, master has been updated
       via  f22e15d build: Do not install testing binaries
       via  895cc9a packaging: Remove long-gone --disable-merged-build from RHEL-CTDB packaging
       via  7626b5d build: Remove --enable-smbtorture, require bin/smbtorture (from waf) for make test
       via  8a2ef49 build: Be consistent with the name of smbtorture binaries
       via  ef195a1 torture: remove source3 locktest and masktest
       via  1000da9 build: Use ntlm_auth from source3 as the only ntlm_auth installed on the system
       via  c704f0d lib/replace: Do not use STRERROR_R_PROTO_COMPATIBLE as only roken.h sets this
      from  831a9f8 s4/web_server: Fix typo in URL.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit f22e15d9d5a3d4744982265363c357ef277ba31e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Nov 21 20:20:46 2012 +1100

    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 at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Thu Nov 22 12:00:36 CET 2012 on sn-devel-104

commit 895cc9a9157d51f768d35f888795e8af7efed781
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Nov 21 19:52:50 2012 +1100

    packaging: Remove long-gone --disable-merged-build from RHEL-CTDB packaging
    
    Reviewed-by: Andreas Schneider <asn at samba.org>

commit 7626b5d9045c2b490b38dee7dd45ba7763740f83
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Nov 21 17:52:35 2012 +1100

    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 at samba.org>

commit 8a2ef49dea36b103a87cf2aa63417737dd754ce6
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Nov 21 16:32:38 2012 +1100

    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 at samba.org>

commit ef195a18aac1f2b1ebfd34741d2242f659896549
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Nov 21 16:00:53 2012 +1100

    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 at samba.org>

commit 1000da933534f1148f5b6f9db2029a5074917968
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Nov 21 15:34:43 2012 +1100

    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 at samba.org>

commit c704f0daa5e81911ea2b507323b5005303f61e91
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Nov 19 23:25:45 2012 +1100

    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 at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/replace/replace.c                              |    2 +-
 lib/replace/replace.h                              |    4 +-
 nsswitch/wscript_build                             |    7 +-
 packaging/RHEL-CTDB/configure.rpm                  |    2 -
 packaging/RHEL-CTDB/samba.spec.tmpl                |    2 -
 script/autobuild.py                                |    4 +-
 selftest/wscript                                   |    2 +-
 .../{Makefile-smbtorture4 => Makefile-smbtorture}  |   14 +-
 source3/Makefile.in                                |   30 +-
 source3/configure.in                               |   26 +-
 source3/lib/asys/wscript_build                     |    3 +-
 source3/lib/pthreadpool/wscript_build              |    3 +-
 source3/m4/check_path.m4                           |    1 +
 source3/selftest/s3-selftest.sh                    |    4 +-
 source3/torture/locktest.c                         |  692 --------------------
 source3/wscript_build                              |   39 +-
 source4/utils/wscript_build                        |   14 +-
 17 files changed, 62 insertions(+), 787 deletions(-)
 rename source3/{Makefile-smbtorture4 => Makefile-smbtorture} (70%)
 delete mode 100644 source3/torture/locktest.c


Changeset truncated at 500 lines:

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
 
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/packaging/RHEL-CTDB/configure.rpm b/packaging/RHEL-CTDB/configure.rpm
index 4387da1..f16b352 100755
--- a/packaging/RHEL-CTDB/configure.rpm
+++ b/packaging/RHEL-CTDB/configure.rpm
@@ -65,8 +65,6 @@ CC="$CC" CFLAGS="-Wall -g -D_GNU_SOURCE -O3" ./configure -C \
 	--without-ldb \
 	--without-dnsupdate \
 	--with-aio-support \
-	--disable-merged-build \
-	--disable-smbtorture4 \
 	--disable-external-libtalloc \
 	--disable-external-libtdb \
 	$*
diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl
index 16d2fa4..e79674f 100644
--- a/packaging/RHEL-CTDB/samba.spec.tmpl
+++ b/packaging/RHEL-CTDB/samba.spec.tmpl
@@ -183,8 +183,6 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
 	--without-ldb \
 	--without-dnsupdate \
 	--with-aio-support \
-	--disable-merged-build \
-	--disable-smbtorture4 \
 	--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/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/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 990217c..a2d7906 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -220,8 +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 \
-	bin/masktest bin/locktest \
+TORTURE_PROGS = bin/smbtorture3 bin/msgtest \
 	bin/locktest2 bin/nsstest bin/vfstest \
 	$(TALLOCTORT) bin/replacetort \
 	$(TDBTORTURE) $(PTHREADPOOLTEST) \
@@ -1279,18 +1278,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) \
@@ -1611,9 +1602,9 @@ pam_winbind: SHOWFLAGS bin/pam_winbind. at SHLIBEXT@
 
 gpext_modules:: $(GPEXT_MODULES)
 
-torture:: SHOWFLAGS basics $(TORTURE_PROGS) @SMBTORTURE4@
+torture:: SHOWFLAGS basics $(TORTURE_PROGS)
 
-smbtorture : SHOWFLAGS bin/smbtorture
+smbtorture3 : SHOWFLAGS bin/smbtorture3
 
 masktest : SHOWFLAGS bin/masktest
 
@@ -1964,7 +1955,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) \
@@ -3283,7 +3274,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" \
@@ -3295,7 +3286,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)" \
@@ -3356,13 +3347,10 @@ libnetapi_examples: libnetapi
 clean_libnetapi_examples:
 	$(MAKE) -C lib/netapi/examples clean
 
-.PHONY: bin/smbtorture4 bin/ndrdump4
-
-bin/smbtorture4: $(BINARY_PREREQS)
-	$(MAKE) -f Makefile-smbtorture4 bin/smbtorture4
+.PHONY: bin/smbtorture
 
-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 179d12d..b872ab7 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(smbtorture4,
-	[AS_HELP_STRING([--enable-smbtorture4], [Enable building smbtorture4 (default=auto)])])
-
-if test x$enable_smbtorture4 != xno; then
-	smbtorture4_possible=yes
-else
-	smbtorture4_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], [smbtorture4_possible=no])
+AC_SAMBA_PERL([true], [selftest_possible=no])
 
 # Check for python
 m4_include(../m4/check_python.m4)
-AC_SAMBA_PYTHON_DEVEL([true], [smbtorture4_possible=no])
+AC_SAMBA_PYTHON_DEVEL([true], [selftest_possible=no])
 
 AC_CHECK_TOOL(AR, ar)
 
@@ -1710,7 +1702,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])
@@ -6441,6 +6433,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
@@ -6519,11 +6514,6 @@ fi
 
 m4_include(../lib/zlib/zlib.m4)
 
-if test x$smbtorture4_possible = xyes; then
-	SMBTORTURE4="bin/smbtorture4"
-	AC_SUBST(SMBTORTURE4)
-fi
-
 AC_SUBST(ZLIB_LIBS)
 AC_SUBST(ZLIB_OBJS)
 AC_ZLIB([ZLIB_OBJS=""], [
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/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)
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 \
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);
-			}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list