[SCM] Samba Shared Repository - branch v4-8-test updated

Karolin Seeger kseeger at samba.org
Tue Apr 2 15:17:03 UTC 2019


The branch, v4-8-test has been updated
       via  501e28cc8d6 selftest: Make setexpiry test much more reliable
       via  d1484add1fc s3:lib: Fix the debug message for adding cache entries.
      from  77b4430bd5e s3:waf: Fix the detection of makdev() macro on Linux

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


- Log -----------------------------------------------------------------
commit 501e28cc8d6e818357e5954fa66168244f4cb7e2
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue May 15 12:26:03 2018 +1200

    selftest: Make setexpiry test much more reliable
    
    Rather than setting all the expiries and expecting that they will be done within 5 seconds,
    measure and check the time individually for each record.
    
    This should make this test much less prone to flapping.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13867
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Tue May 15 23:58:17 CEST 2018 on sn-devel-144
    
    (cherry picked from commit 5ebe3183fded1ab060ed60baeedeac859d0c137e)
    
    Autobuild-User(v4-8-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-8-test): Tue Apr  2 15:16:10 UTC 2019 on sn-devel-144

commit d1484add1fc9c498f65d6afb25a2eff00f2a6df6
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Jan 17 13:58:14 2019 +0100

    s3:lib: Fix the debug message for adding cache entries.
    
    To get correct values, we need to cast 'timeout' to 'long int' first in
    order to do calculation in that integer space! Calculations are don in
    the space of the lvalue!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13848
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 5822449a7340f53987ce4c04851652427f5b49e8)

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

Summary of changes:
 python/samba/tests/samba_tool/user.py | 5 ++---
 source3/lib/gencache.c                | 8 ++++----
 2 files changed, 6 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/tests/samba_tool/user.py b/python/samba/tests/samba_tool/user.py
index 10e4f6cd839..0b84ee1f781 100644
--- a/python/samba/tests/samba_tool/user.py
+++ b/python/samba/tests/samba_tool/user.py
@@ -306,9 +306,9 @@ class UserCmdTestCase(SambaToolCmdTest):
 
 
     def test_setexpiry(self):
-        twodays = time.time() + (2 * 24 * 60 * 60)
-
         for user in self.users:
+            twodays = time.time() + (2 * 24 * 60 * 60)
+
             (result, out, err) = self.runsubcmd("user", "setexpiry", user["name"],
                                                 "--days=2",
                                                 "-H", "ldap://%s" % os.environ["DC_SERVER"],
@@ -316,7 +316,6 @@ class UserCmdTestCase(SambaToolCmdTest):
             self.assertCmdSuccess(result, out, err, "Can we run setexpiry with names")
             self.assertIn("Expiry for user '%s' set to 2 days." % user["name"], out)
 
-        for user in self.users:
             found = self._find_user(user["name"])
 
             expires = nttime2unix(int("%s" % found.get("accountExpires")))
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index ab12fc1c531..9f4e1cfcaa3 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -294,11 +294,11 @@ bool gencache_set_data_blob(const char *keystr, DATA_BLOB blob,
 	dbufs[0] = (TDB_DATA) { .dptr = (uint8_t *)hdr, .dsize = hdr_len };
 	dbufs[1] = (TDB_DATA) { .dptr = blob.data, .dsize = blob.length };
 
-	DEBUG(10, ("Adding cache entry with key=[%s] and timeout="
-	           "[%s] (%d seconds %s)\n", keystr,
+	DBG_DEBUG("Adding cache entry with key=[%s] and timeout="
+	           "[%s] (%ld seconds %s)\n", keystr,
 		   timestring(talloc_tos(), timeout),
-		   (int)(timeout - time(NULL)), 
-		   timeout > time(NULL) ? "ahead" : "in the past"));
+		   ((long int)timeout) - time(NULL),
+		   timeout > time(NULL) ? "ahead" : "in the past");
 
 	ret = tdb_storev(cache_notrans->tdb, string_term_tdb_data(keystr),
 			 dbufs, 2, 0);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list