[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Tue Jan 4 17:59:02 MST 2011


The branch, master has been updated
       via  e80b322 s4-python: Allow setting TEST_DEBUG_LEVEL to override debug level for tests.
       via  733bc1c talloc: Clarify error message on access after free.
      from  899adca s3:build: don't use cli_dssetup.c any more

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


- Log -----------------------------------------------------------------
commit e80b322077d132c8973e85d25ef40c956e8f5b54
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Jan 5 01:09:25 2011 +0100

    s4-python: Allow setting TEST_DEBUG_LEVEL to override debug level for tests.
    
    Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
    Autobuild-Date: Wed Jan  5 01:58:44 CET 2011 on sn-devel-104

commit 733bc1c1ca31df2b61d86f5ee8783ee9c3867faa
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Jan 5 01:01:28 2011 +0100

    talloc: Clarify error message on access after free.

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

Summary of changes:
 lib/talloc/talloc.c                              |    8 ++++----
 source4/scripting/python/samba/tests/__init__.py |   10 ++++++++++
 2 files changed, 14 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index ec67a46..d6115af 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -224,9 +224,9 @@ static void talloc_abort_magic(unsigned magic)
 	talloc_abort("Bad talloc magic value - wrong talloc version used/mixed");
 }
 
-static void talloc_abort_double_free(void)
+static void talloc_abort_access_after_free(void)
 {
-	talloc_abort("Bad talloc magic value - double free");
+	talloc_abort("Bad talloc magic value - access after free");
 }
 
 static void talloc_abort_unknown_value(void)
@@ -246,8 +246,8 @@ static inline struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr)
 		}
 
 		if (tc->flags & TALLOC_FLAG_FREE) {
-			talloc_log("talloc: double free error - first free may be at %s\n", tc->name);
-			talloc_abort_double_free();
+			talloc_log("talloc: access after free error - first free may be at %s\n", tc->name);
+			talloc_abort_access_after_free();
 			return NULL;
 		} else {
 			talloc_abort_unknown_value();
diff --git a/source4/scripting/python/samba/tests/__init__.py b/source4/scripting/python/samba/tests/__init__.py
index 10826ab..d0362ef 100644
--- a/source4/scripting/python/samba/tests/__init__.py
+++ b/source4/scripting/python/samba/tests/__init__.py
@@ -36,6 +36,16 @@ from testtools.testcase import (
 
 
 class TestCase(TesttoolsTestCase):
+    """A Samba test case."""
+
+    def setUp(self):
+        super(TestCase, self).setUp()
+        test_debug_level = os.getenv("TEST_DEBUG_LEVEL")
+        if test_debug_level is not None:
+            test_debug_level = int(test_debug_level)
+            self._old_debug_level = samba.get_debug_level()
+            samba.set_debug_level(test_debug_level)
+            self.addCleanup(samba.set_debug_level, test_debug_level)
 
     def get_loadparm(self):
         return env_loadparm()


-- 
Samba Shared Repository


More information about the samba-cvs mailing list