The branch, v4-18-test has been updated
       via  dea4cb70045 dsdb/tests: Double number of expressions in 
large_ldap.py ldap_timeout test
       via  330958ae804 dsdb/tests: Move SD modification on class-created 
objects to classSetUp
      from  7e6dc45f7e6 selftest: fix flapping samba-tool drs showrepl test

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-18-test


- Log -----------------------------------------------------------------
commit dea4cb70045503fe882c2d4d24bfc07ce502c673
Author: Andrew Bartlett <abart...@samba.org>
Date:   Thu Apr 6 08:59:17 2023 +1200

    dsdb/tests: Double number of expressions in large_ldap.py ldap_timeout test
    
    By slowing the filter down more this makes the test reliable on the
    autobuild host.
    
    This is not a long-term solution, but is a quick tweak that can be done
    today to address current issues with getting commits past the host-based
    (compared with cloud-based) autobuild.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15351
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Joseph Sutton <josephsut...@catalyst.net.nz>
    (cherry picked from commit 479634e4cd6543d489eb4700aebde1a479b94fe5)
    
    Autobuild-User(v4-18-test): Jule Anger <jan...@samba.org>
    Autobuild-Date(v4-18-test): Tue Apr 11 08:36:03 UTC 2023 on atb-devel-224

commit 330958ae80495311ae1718bfe021c05ecec77e05
Author: Andrew Bartlett <abart...@samba.org>
Date:   Thu Apr 6 08:54:02 2023 +1200

    dsdb/tests: Move SD modification on class-created objects to classSetUp
    
    These modifications persist, so should be done at the class level,
    not in the test.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15351
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Joseph Sutton <josephsut...@catalyst.net.nz>
    (cherry picked from commit e1c0c2066c2f29bb614e3386b796eec3cb289aea)

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

Summary of changes:
 source4/dsdb/tests/python/large_ldap.py | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/tests/python/large_ldap.py 
b/source4/dsdb/tests/python/large_ldap.py
index 0da79da6f73..cd8176363b5 100644
--- a/source4/dsdb/tests/python/large_ldap.py
+++ b/source4/dsdb/tests/python/large_ldap.py
@@ -146,6 +146,14 @@ class LargeLDAPTest(samba.tests.TestCase):
                 "sAMAccountName": user_name,
                 "jpegPhoto": b'a' * (2 * 1024 * 1024)})
 
+            ace = "(OD;;RP;{6bc69afa-7bd9-4184-88f5-28762137eb6a};;S-1-%d)" % x
+            dn = ldb.Dn(cls.ldb, "cn=" + user_name + "," + str(cls.ou_dn))
+
+            # add an ACE that denies access to the above random attr
+            # for a not-existing user.  This makes each SD distinct
+            # and so will slow SD parsing.
+            cls.sd_utils.dacl_add_ace(dn, ace)
+
     @classmethod
     def tearDownClass(cls):
         # Remake the connection for tear-down (old Samba drops the socket)
@@ -290,19 +298,9 @@ class LargeLDAPTest(samba.tests.TestCase):
                       session_info=system_session(lp),
                       lp=lp)
 
-        for x in range(200):
-            user_name = self.USER_NAME + format(x, "03")
-            ace = "(OD;;RP;{6bc69afa-7bd9-4184-88f5-28762137eb6a};;S-1-%d)" % x
-            dn = ldb.Dn(self.ldb, "cn=" + user_name + "," + str(self.ou_dn))
-
-            # add an ACE that denies access to the above random attr
-            # for a not-existing user.  This makes each SD distinct
-            # and so will slow SD parsing.
-            self.sd_utils.dacl_add_ace(dn, ace)
-
         # Create a large search expression that will take a long time to
         # evaluate.
-        expression = f'(jpegPhoto=*X*)' * 1000
+        expression = '(jpegPhoto=*X*)' * 2000
         expression = f'(|{expression})'
 
         # Perform the LDAP search.


-- 
Samba Shared Repository

Reply via email to