This is an automated email from the git hooks/post-receive script.
firstyear pushed a commit to branch master
in repository 389-ds-base.
commit 5680cc1025f2eb3d58e2ba547d4d9e83d104dcff
Author: William Brown <firstyear(a)redhat.com>
Date: Wed Apr 19 08:34:47 2017 +1000
Ticket 49222 - Resolve various test issues on rawhide
Bug Description: On rawhide we had a number of test issues related
to changes to libraries, missing packages in minimal environments
and more.
Fix Description: Resolve the test case issues.
https://pagure.io/389-ds-base/issue/49222
Author: wibrown
Review by: mreynolds (Thanks!)
---
dirsrvtests/tests/tickets/ticket1347760_test.py | 20 +++---
dirsrvtests/tests/tickets/ticket47823_test.py | 42 ++++++------
dirsrvtests/tests/tickets/ticket47838_test.py | 86 ++++++-------------------
dirsrvtests/tests/tickets/ticket48194_test.py | 63 +-----------------
dirsrvtests/tests/tickets/ticket48226_test.py | 3 +-
dirsrvtests/tests/tickets/ticket48784_test.py | 21 ++----
dirsrvtests/tests/tickets/ticket49008_test.py | 6 +-
dirsrvtests/tests/tickets/ticket49104_test.py | 16 +++--
8 files changed, 76 insertions(+), 181 deletions(-)
diff --git a/dirsrvtests/tests/tickets/ticket1347760_test.py
b/dirsrvtests/tests/tickets/ticket1347760_test.py
index 70ad9c4..3ca84da 100644
--- a/dirsrvtests/tests/tickets/ticket1347760_test.py
+++ b/dirsrvtests/tests/tickets/ticket1347760_test.py
@@ -214,19 +214,15 @@ def test_ticket1347760(topology_st):
log.info(
'Bind case 2-2. the bind user\'s suffix does not exist, bind should fail
with error %s' % ldap.INVALID_CREDENTIALS.__name__)
log.info('Bind as {%s,%s} who does not exist.' % (BOGUSSUFFIX,
'bogus'))
- try:
+ with pytest.raises(ldap.INVALID_CREDENTIALS):
topology_st.standalone.simple_bind_s(BOGUSSUFFIX, 'bogus')
- except ldap.LDAPError as e:
- log.info("Exception (expected): %s" % type(e).__name__)
- log.info('Desc ' + e.message['desc'])
- assert isinstance(e, ldap.INVALID_CREDENTIALS)
- regex = re.compile('No such suffix')
- cause = pattern_accesslog(file_obj, regex)
- if cause == None:
- log.fatal('Cause not found - %s' % cause)
- assert False
- else:
- log.info('Cause found - %s' % cause)
+ regex = re.compile('No suffix for bind')
+ cause = pattern_accesslog(file_obj, regex)
+ if cause == None:
+ log.fatal('Cause not found - %s' % cause)
+ assert False
+ else:
+ log.info('Cause found - %s' % cause)
time.sleep(1)
log.info(
diff --git a/dirsrvtests/tests/tickets/ticket47823_test.py
b/dirsrvtests/tests/tickets/ticket47823_test.py
index f5d4e53..7f4aa86 100644
--- a/dirsrvtests/tests/tickets/ticket47823_test.py
+++ b/dirsrvtests/tests/tickets/ticket47823_test.py
@@ -609,14 +609,14 @@ def test_ticket47823_invalid_config_1(topology_st):
# Check the server did not restart
topology_st.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE,
'nsslapd-errorlog-level', '65536')])
try:
- topology_st.standalone.restart(timeout=5)
+ topology_st.standalone.restart()
ent = topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)",
ALL_CONFIG_ATTRS)
if ent:
# be sure to restore a valid config before assert
_config_file(topology_st, action='restore')
assert not ent
- except subprocess.CalledProcessError:
+ except:
pass
# Check the expected error message
@@ -629,7 +629,7 @@ def test_ticket47823_invalid_config_1(topology_st):
# Check we can restart the server
_config_file(topology_st, action='restore')
- topology_st.standalone.start(timeout=5)
+ topology_st.standalone.start()
try:
topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)", ALL_CONFIG_ATTRS)
except ldap.NO_SUCH_OBJECT:
@@ -662,14 +662,14 @@ def test_ticket47823_invalid_config_2(topology_st):
# Check the server did not restart
try:
- topology_st.standalone.restart(timeout=5)
+ topology_st.standalone.restart()
ent = topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)",
ALL_CONFIG_ATTRS)
if ent:
# be sure to restore a valid config before assert
_config_file(topology_st, action='restore')
assert not ent
- except subprocess.CalledProcessError:
+ except:
pass
# Check the expected error message
@@ -682,7 +682,7 @@ def test_ticket47823_invalid_config_2(topology_st):
# Check we can restart the server
_config_file(topology_st, action='restore')
- topology_st.standalone.start(timeout=5)
+ topology_st.standalone.start()
try:
topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)", ALL_CONFIG_ATTRS)
except ldap.NO_SUCH_OBJECT:
@@ -717,14 +717,14 @@ def test_ticket47823_invalid_config_3(topology_st):
# Check the server did not restart
topology_st.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE,
'nsslapd-errorlog-level', '65536')])
try:
- topology_st.standalone.restart(timeout=5)
+ topology_st.standalone.restart()
ent = topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)",
ALL_CONFIG_ATTRS)
if ent:
# be sure to restore a valid config before assert
_config_file(topology_st, action='restore')
assert not ent
- except subprocess.CalledProcessError:
+ except:
pass
# Check the expected error message
@@ -737,7 +737,7 @@ def test_ticket47823_invalid_config_3(topology_st):
# Check we can restart the server
_config_file(topology_st, action='restore')
- topology_st.standalone.start(timeout=5)
+ topology_st.standalone.start()
try:
topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)", ALL_CONFIG_ATTRS)
except ldap.NO_SUCH_OBJECT:
@@ -771,14 +771,14 @@ def test_ticket47823_invalid_config_4(topology_st):
# Check the server did not restart
try:
- topology_st.standalone.restart(timeout=5)
+ topology_st.standalone.restart()
ent = topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)",
ALL_CONFIG_ATTRS)
if ent:
# be sure to restore a valid config before assert
_config_file(topology_st, action='restore')
assert not ent
- except subprocess.CalledProcessError:
+ except:
pass
# Check the expected error message
@@ -791,7 +791,7 @@ def test_ticket47823_invalid_config_4(topology_st):
# Check we can restart the server
_config_file(topology_st, action='restore')
- topology_st.standalone.start(timeout=5)
+ topology_st.standalone.start()
try:
topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)", ALL_CONFIG_ATTRS)
except ldap.NO_SUCH_OBJECT:
@@ -824,14 +824,14 @@ def test_ticket47823_invalid_config_5(topology_st):
# Check the server did not restart
try:
- topology_st.standalone.restart(timeout=5)
+ topology_st.standalone.restart()
ent = topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)",
ALL_CONFIG_ATTRS)
if ent:
# be sure to restore a valid config before assert
_config_file(topology_st, action='restore')
assert not ent
- except subprocess.CalledProcessError:
+ except:
pass
# Check the expected error message
@@ -844,7 +844,7 @@ def test_ticket47823_invalid_config_5(topology_st):
# Check we can restart the server
_config_file(topology_st, action='restore')
- topology_st.standalone.start(timeout=5)
+ topology_st.standalone.start()
try:
topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)", ALL_CONFIG_ATTRS)
except ldap.NO_SUCH_OBJECT:
@@ -877,14 +877,14 @@ def test_ticket47823_invalid_config_6(topology_st):
# Check the server did not restart
try:
- topology_st.standalone.restart(timeout=5)
+ topology_st.standalone.restart()
ent = topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)",
ALL_CONFIG_ATTRS)
if ent:
# be sure to restore a valid config before assert
_config_file(topology_st, action='restore')
assert not ent
- except subprocess.CalledProcessError:
+ except:
pass
# Check the expected error message
@@ -897,7 +897,7 @@ def test_ticket47823_invalid_config_6(topology_st):
# Check we can restart the server
_config_file(topology_st, action='restore')
- topology_st.standalone.start(timeout=5)
+ topology_st.standalone.start()
try:
topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)", ALL_CONFIG_ATTRS)
except ldap.NO_SUCH_OBJECT:
@@ -930,14 +930,14 @@ def test_ticket47823_invalid_config_7(topology_st):
# Check the server did not restart
try:
- topology_st.standalone.restart(timeout=5)
+ topology_st.standalone.restart()
ent = topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)",
ALL_CONFIG_ATTRS)
if ent:
# be sure to restore a valid config before assert
_config_file(topology_st, action='restore')
assert not ent
- except subprocess.CalledProcessError:
+ except:
pass
# Check the expected error message
@@ -950,7 +950,7 @@ def test_ticket47823_invalid_config_7(topology_st):
# Check we can restart the server
_config_file(topology_st, action='restore')
- topology_st.standalone.start(timeout=5)
+ topology_st.standalone.start()
try:
topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE,
"(objectclass=nsSlapdPlugin)", ALL_CONFIG_ATTRS)
except ldap.NO_SUCH_OBJECT:
diff --git a/dirsrvtests/tests/tickets/ticket47838_test.py
b/dirsrvtests/tests/tickets/ticket47838_test.py
index 50924b7..2da485b 100644
--- a/dirsrvtests/tests/tickets/ticket47838_test.py
+++ b/dirsrvtests/tests/tickets/ticket47838_test.py
@@ -9,6 +9,7 @@
import logging
import time
+import socket
import ldap
import pytest
from lib389 import Entry
@@ -39,6 +40,7 @@ NSS321 = '3.21.0' # RHEL6
NSS323 = '3.23.0' # F22
NSS325 = '3.25.0' # F23/F24
NSS327 = '3.27.0' # F25
+NSS330 = '3.30.0' # F27
def _header(topology_st, label):
@@ -60,66 +62,9 @@ def test_47838_init(topology_st):
global nss_version
nss_version = onss_version.readline()
- conf_dir = topology_st.standalone.confdir
-
- log.info("\n######################### Checking existing certs
######################\n")
- os.system('certutil -L -d %s -n "CA certificate"' % conf_dir)
- os.system('certutil -L -d %s -n "%s"' % (conf_dir, SERVERCERT))
-
- log.info("\n######################### Create a password file
######################\n")
- pwdfile = '%s/pwdfile.txt' % (conf_dir)
- opasswd = os.popen("(ps -ef ; w ) | sha1sum | awk '{print $1}'",
"r")
- passwd = opasswd.readline()
- pwdfd = open(pwdfile, "w")
- pwdfd.write(passwd)
- pwdfd.close()
-
- log.info("\n######################### Create a noise file
######################\n")
- noisefile = '%s/noise.txt' % (conf_dir)
- noise = os.popen("(w ; ps -ef ; date ) | sha1sum | awk '{print
$1}'", "r")
- noisewdfd = open(noisefile, "w")
- noisewdfd.write(noise.readline())
- noisewdfd.close()
- time.sleep(1)
-
- log.info("\n######################### Create key3.db and cert8.db database
######################\n")
- os.system("ls %s" % pwdfile)
- os.system("cat %s" % pwdfile)
- os.system('certutil -N -d %s -f %s' % (conf_dir, pwdfile))
-
- log.info("\n######################### Creating encryption key for CA
######################\n")
- os.system('certutil -G -d %s -z %s -f %s' % (conf_dir, noisefile, pwdfile))
-
- log.info("\n######################### Creating self-signed CA certificate
######################\n")
- os.system(
- '( echo y ; echo ; echo y ) | certutil -S -n "CA certificate" -s
"cn=CAcert" -x -t "CT,," -m 1000 -v 120 -d %s -z %s -f %s -2' %
- (conf_dir, noisefile, pwdfile))
-
- log.info("\n######################### Exporting the CA certificate to cacert.asc
######################\n")
- cafile = '%s/cacert.asc' % conf_dir
- catxt = os.popen('certutil -L -d %s -n "CA certificate" -a' %
conf_dir)
- cafd = open(cafile, "w")
- while True:
- line = catxt.readline()
- if (line == ''):
- break
- cafd.write(line)
- cafd.close()
-
- log.info("\n######################### Generate the server certificate
######################\n")
- ohostname = os.popen('hostname --fqdn', "r")
- myhostname = ohostname.readline()
- os.system(
- 'certutil -S -n "%s" -s "cn=%s,ou=389 Directory Server"
-c "CA certificate" -t "u,u,u" -m 1001 -v 120 -d %s -z %s -f %s' %
(
- SERVERCERT, myhostname.rstrip(), conf_dir, noisefile, pwdfile))
-
- log.info("\n######################### create the pin file
######################\n")
- pinfile = '%s/pin.txt' % (conf_dir)
- pintxt = 'Internal (Software) Token:%s' % passwd
- pinfd = open(pinfile, "w")
- pinfd.write(pintxt)
- pinfd.close()
- time.sleep(1)
+ topology_st.standalone.nss_ssl.reinit()
+ topology_st.standalone.nss_ssl.create_rsa_ca()
+ topology_st.standalone.nss_ssl.create_rsa_key_and_cert()
log.info("\n######################### enable SSL in the directory server with
all ciphers ######################\n")
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
@@ -336,7 +281,9 @@ def test_47838_run_4(topology_st):
log.info("Disabled ciphers: %d" % dcount)
global plus_all_ecount
global plus_all_dcount
- if nss_version >= NSS323:
+ if nss_version >= NSS330:
+ assert ecount == 26
+ elif nss_version >= NSS323:
assert ecount == 29
else:
assert ecount == 20
@@ -377,7 +324,9 @@ def test_47838_run_5(topology_st):
log.info("Disabled ciphers: %d" % dcount)
global plus_all_ecount
global plus_all_dcount
- if nss_version >= NSS323:
+ if nss_version >= NSS330:
+ assert ecount == 26
+ elif nss_version >= NSS323:
assert ecount == 29
else:
assert ecount == 23
@@ -488,7 +437,9 @@ def test_47838_run_8(topology_st):
log.info("Disabled ciphers: %d" % dcount)
global plus_all_ecount
global plus_all_dcount
- if nss_version >= NSS323:
+ if nss_version >= NSS330:
+ assert ecount == 26
+ elif nss_version >= NSS323:
assert ecount == 29
else:
assert ecount == 23
@@ -531,7 +482,9 @@ def test_47838_run_9(topology_st):
log.info("Enabled ciphers: %d" % ecount)
log.info("Disabled ciphers: %d" % dcount)
- if nss_version >= NSS327:
+ if nss_version >= NSS330:
+ assert ecount == 31
+ elif nss_version >= NSS327:
assert ecount == 34
elif nss_version >= NSS323:
assert ecount == 36
@@ -588,7 +541,10 @@ def test_47838_run_10(topology_st):
log.info("Disabled ciphers: %d" % dcount)
global plus_all_ecount
global plus_all_dcount
- assert ecount == 9
+ if nss_version >= NSS330:
+ assert ecount == 3
+ else:
+ assert ecount == 9
assert dcount == 0
weak = os.popen(
'egrep "SSL info:" %s | egrep \": enabled\" | egrep
"WEAK CIPHER" | wc -l' % topology_st.standalone.errlog)
diff --git a/dirsrvtests/tests/tickets/ticket48194_test.py
b/dirsrvtests/tests/tickets/ticket48194_test.py
index fb50251..4ca94f9 100644
--- a/dirsrvtests/tests/tickets/ticket48194_test.py
+++ b/dirsrvtests/tests/tickets/ticket48194_test.py
@@ -47,66 +47,9 @@ def test_init(topology_st):
"""
_header(topology_st, 'Testing Ticket 48194 - harden the list of ciphers available
by default')
- conf_dir = topology_st.standalone.confdir
-
- log.info("\n######################### Checking existing certs
######################\n")
- os.system('certutil -L -d %s -n "CA certificate"' % conf_dir)
- os.system('certutil -L -d %s -n "%s"' % (conf_dir, SERVERCERT))
-
- log.info("\n######################### Create a password file
######################\n")
- pwdfile = '%s/pwdfile.txt' % (conf_dir)
- opasswd = os.popen("(ps -ef ; w ) | sha1sum | awk '{print $1}'",
"r")
- passwd = opasswd.readline()
- pwdfd = open(pwdfile, "w")
- pwdfd.write(passwd)
- pwdfd.close()
-
- log.info("\n######################### Create a noise file
######################\n")
- noisefile = '%s/noise.txt' % (conf_dir)
- noise = os.popen("(w ; ps -ef ; date ) | sha1sum | awk '{print
$1}'", "r")
- noisewdfd = open(noisefile, "w")
- noisewdfd.write(noise.readline())
- noisewdfd.close()
- time.sleep(1)
-
- log.info("\n######################### Create key3.db and cert8.db database
######################\n")
- os.system("ls %s" % pwdfile)
- os.system("cat %s" % pwdfile)
- os.system('certutil -N -d %s -f %s' % (conf_dir, pwdfile))
-
- log.info("\n######################### Creating encryption key for CA
######################\n")
- os.system('certutil -G -d %s -z %s -f %s' % (conf_dir, noisefile, pwdfile))
-
- log.info("\n######################### Creating self-signed CA certificate
######################\n")
- os.system(
- '( echo y ; echo ; echo y ) | certutil -S -n "CA certificate" -s
"cn=CAcert" -x -t "CT,," -m 1000 -v 120 -d %s -z %s -f %s -2' %
- (conf_dir, noisefile, pwdfile))
-
- log.info("\n######################### Exporting the CA certificate to cacert.asc
######################\n")
- cafile = '%s/cacert.asc' % conf_dir
- catxt = os.popen('certutil -L -d %s -n "CA certificate" -a' %
conf_dir)
- cafd = open(cafile, "w")
- while True:
- line = catxt.readline()
- if (line == ''):
- break
- cafd.write(line)
- cafd.close()
-
- log.info("\n######################### Generate the server certificate
######################\n")
- ohostname = os.popen('hostname --fqdn', "r")
- myhostname = ohostname.readline()
- os.system(
- 'certutil -S -n "%s" -s "cn=%s,ou=389 Directory Server"
-c "CA certificate" -t "u,u,u" -m 1001 -v 120 -d %s -z %s -f %s'
%
- (SERVERCERT, myhostname.rstrip(), conf_dir, noisefile, pwdfile))
-
- log.info("\n######################### create the pin file
######################\n")
- pinfile = '%s/pin.txt' % (conf_dir)
- pintxt = 'Internal (Software) Token:%s' % passwd
- pinfd = open(pinfile, "w")
- pinfd.write(pintxt)
- pinfd.close()
- time.sleep(1)
+ topology_st.standalone.nss_ssl.reinit()
+ topology_st.standalone.nss_ssl.create_rsa_ca()
+ topology_st.standalone.nss_ssl.create_rsa_key_and_cert()
log.info("\n######################### enable SSL in the directory server with
all ciphers ######################\n")
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
diff --git a/dirsrvtests/tests/tickets/ticket48226_test.py
b/dirsrvtests/tests/tickets/ticket48226_test.py
index 95afd3e..b2afdea 100644
--- a/dirsrvtests/tests/tickets/ticket48226_test.py
+++ b/dirsrvtests/tests/tickets/ticket48226_test.py
@@ -125,7 +125,8 @@ def test_ticket48226_1(topology_m2):
else:
log.info('Valgrind is happy!')
finally:
- valgrind_disable(sbin_dir)
+ if not topology_m2.ms["master2"].has_asan():
+ valgrind_disable(sbin_dir)
if __name__ == '__main__':
diff --git a/dirsrvtests/tests/tickets/ticket48784_test.py
b/dirsrvtests/tests/tickets/ticket48784_test.py
index d4d7353..3833be6 100644
--- a/dirsrvtests/tests/tickets/ticket48784_test.py
+++ b/dirsrvtests/tests/tickets/ticket48784_test.py
@@ -256,19 +256,10 @@ def set_ssl_Version(server, name, version):
log.info("\n######################### Set %s on %s
######################\n" %
(version, name))
server.simple_bind_s(DN_DM, PASSWORD)
- if version.startswith('SSL'):
- server.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3',
'on'),
- (ldap.MOD_REPLACE, 'nsTLS1',
'off'),
- (ldap.MOD_REPLACE, 'sslVersionMin',
'SSL3'),
- (ldap.MOD_REPLACE, 'sslVersionMax',
'SSL3')])
- elif version.startswith('TLS'):
- server.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3',
'off'),
- (ldap.MOD_REPLACE, 'nsTLS1',
'on'),
- (ldap.MOD_REPLACE, 'sslVersionMin',
version),
- (ldap.MOD_REPLACE, 'sslVersionMax',
version)])
- else:
- log.info("Invalid version %s", version)
- assert False
+ server.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3', 'off'),
+ (ldap.MOD_REPLACE, 'nsTLS1', 'on'),
+ (ldap.MOD_REPLACE, 'sslVersionMin',
version),
+ (ldap.MOD_REPLACE, 'sslVersionMax',
version)])
def test_ticket48784(topology_m2):
@@ -277,7 +268,7 @@ def test_ticket48784(topology_m2):
master_1 <----- startTLS -----> master_2
Make sure the replication is working.
- Then, stop the servers and set only SSLv3 on master_1 while TLS1.2 on master_2
+ Then, stop the servers and set only TLS1.0 on master_1 while TLS1.2 on master_2
Replication is supposed to fail.
"""
log.info("Ticket 48784 - Allow usage of OpenLDAP libraries that don't use
NSS for crypto")
@@ -299,7 +290,7 @@ def test_ticket48784(topology_m2):
assert 10 == len(entries)
log.info("##### openldap client just accepts sslVersionMin not Max.")
- set_ssl_Version(topology_m2.ms["master1"], 'master1',
'SSL3')
+ set_ssl_Version(topology_m2.ms["master1"], 'master1',
'TLS1.0')
set_ssl_Version(topology_m2.ms["master2"], 'master2',
'TLS1.2')
log.info("##### restart master[12]")
diff --git a/dirsrvtests/tests/tickets/ticket49008_test.py
b/dirsrvtests/tests/tickets/ticket49008_test.py
index 0944eee..673b2f9 100644
--- a/dirsrvtests/tests/tickets/ticket49008_test.py
+++ b/dirsrvtests/tests/tickets/ticket49008_test.py
@@ -49,7 +49,7 @@ def test_ticket49008(T):
A.add_s(Entry((dn, {'objectclass': "top person".split(),
'sn': name, 'cn': name})))
- time.sleep(10)
+ time.sleep(15)
A_entries = A.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE,
'(objectClass=person)')
@@ -58,6 +58,10 @@ def test_ticket49008(T):
C_entries = C.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE,
'(objectClass=person)')
+ log.debug("A contains: %s", A_entries)
+ log.debug("B contains: %s", B_entries)
+ log.debug("C contains: %s", C_entries)
+
assert len(A_entries) == len(B_entries)
assert len(B_entries) == len(C_entries)
diff --git a/dirsrvtests/tests/tickets/ticket49104_test.py
b/dirsrvtests/tests/tickets/ticket49104_test.py
index f215a6e..4c74bd7 100644
--- a/dirsrvtests/tests/tickets/ticket49104_test.py
+++ b/dirsrvtests/tests/tickets/ticket49104_test.py
@@ -52,6 +52,8 @@ def test_ticket49104(topology_st):
os.remove(myvallog)
prog = os.path.join(topology_st.standalone.get_bin_dir(), 'dbscan-bin')
valcmd = 'valgrind --tool=memcheck --leak-check=yes --num-callers=40
--log-file=%s ' % myvallog
+ if topology_st.standalone.has_asan():
+ valcmd = ''
id2entry = os.path.join(topology_st.standalone.dbdir, DEFAULT_BENAME,
'id2entry.db')
for i in range(20, 30):
@@ -66,12 +68,14 @@ def test_ticket49104(topology_st):
(cmd, e.errno, e.strerror))
raise e
- grep = 'egrep "Invalid read|Invalid write" %s' % myvallog
- p = os.popen(grep, "r")
- l = p.readline()
- if 'Invalid' in l:
- log.fatal('ERROR: valgrind reported invalid read/write: %s' % l)
- assert False
+ # If we have asan, this fails in other spectacular ways instead
+ if not topology_st.standalone.has_asan():
+ grep = 'egrep "Invalid read|Invalid write" %s' % myvallog
+ p = os.popen(grep, "r")
+ l = p.readline()
+ if 'Invalid' in l:
+ log.fatal('ERROR: valgrind reported invalid read/write: %s' % l)
+ assert False
log.info('ticket 49104 - PASSED')
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.