[PATCH 6/8] urgent_replication: Use subunit reporting, remove allow_empty_output.

Stefan (metze) Metzmacher metze at samba.org
Mon Jan 26 01:12:40 MST 2015

Hi Jelmer,

I finally found the problem.

connect_samdb() used samdb_url = samdb_url.lower()

I'm using --testbase=/m/metze/W for private autobuilds...

Can someone have a look at the attached fix please.

-------------- next part --------------
From e8aa33b78ec87d1c23f947ef80526a6a1c656ac0 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Mon, 26 Jan 2015 08:31:10 +0100
Subject: [PATCH] python/samba/tests: don't lower case path names in

We should not lower case file names, because we may get a path to sam.ldb.
Now we only lower case ldap urls.

For a long time I got failing private autobuild like this:

[1623(9233)/1718 at 1h28m9s] samba4.urgent_replication.python(dc)(dc:local)
Failed to connect to ldap URL
'ldap:///memdisk/metze/w/b12985/samba/bin/ab/dc/private/sam.ldb' - LDAP client
internal error: NT_STATUS_NO_MEMORY
Failed to connect to
'ldap:///memdisk/metze/w/b12985/samba/bin/ab/dc/private/sam.ldb' with backend
'ldap': (null)
REASON: _StringException: _StringException: Content-Type:

The problem is that /memdisk/metze/W/ is my test directory instead
of /memdisk/metze/w/.

Signed-off-by: Stefan Metzmacher <metze at samba.org>
 python/samba/tests/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py
index cca82bb..2711e07 100644
--- a/python/samba/tests/__init__.py
+++ b/python/samba/tests/__init__.py
@@ -185,14 +185,14 @@ def connect_samdb(samdb_url, lp=None, session_info=None, credentials=None,
     to make proper URL for ldb.connect() while using default
     parameters for connection based on test environment
-    samdb_url = samdb_url.lower()
     if not "://" in samdb_url:
         if not ldap_only and os.path.isfile(samdb_url):
             samdb_url = "tdb://%s" % samdb_url
             samdb_url = "ldap://%s" % samdb_url
     # use 'paged_search' module when connecting remotely
-    if samdb_url.startswith("ldap://"):
+    if samdb_url.lower().startswith("ldap://"):
+        samdb_url = samdb_url.lower()
         ldb_options = ["modules:paged_searches"]
     elif ldap_only:
         raise AssertionError("Trying to connect to %s while remote "

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150126/cbf8d4ab/attachment.pgp>

More information about the samba-technical mailing list