Revert "sq talloc"
authorStefan Metzmacher <metze@samba.org>
Tue, 10 Jan 2012 09:28:51 +0000 (10:28 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 May 2012 16:46:58 +0000 (18:46 +0200)
This reverts commit 42dc6ff74624a3ad7f247e8468fb2bdc59ea4666.

lib/talloc/testsuite.c

index fb53bee68ecefda7707bbdaa8c9dbde6ab4c5f75..71917038be9f01ee466987052b44ac63fca1f192 100644 (file)
@@ -94,6 +94,7 @@ static double timeval_elapsed(struct timeval *tv)
 
 static unsigned int test_abort_count;
 
+#if 0
 static void test_abort_fn(const char *reason)
 {
        printf("# test_abort_fn(%s)\n", reason);
@@ -105,6 +106,7 @@ static void test_abort_start(void)
        test_abort_count = 0;
        talloc_set_abort_fn(test_abort_fn);
 }
+#endif
 
 static void test_abort_stop(void)
 {
@@ -396,17 +398,10 @@ static bool test_misc(void)
        CHECK_BLOCKS("misc", p1, 1);
        CHECK_BLOCKS("misc", root, 2);
        p2 = talloc_strdup(p1, "foo");
-
-       /* this is expected to abort */
-       test_abort_start();
        torture_assert("misc", talloc_unlink(root, p2) == -1,
                                   "failed: talloc_unlink() of non-reference context should return -1\n");
-       torture_assert("misc", test_abort_count == 1,
-                                  "failed: talloc_unlink() of non-reference context should abort\n");
-       test_abort_stop();
        torture_assert("misc", talloc_unlink(p1, p2) == 0,
                "failed: talloc_unlink() of parent should succeed\n");
-
        talloc_unlink(NULL, p1);
        CHECK_BLOCKS("misc", p1, 1);
        CHECK_BLOCKS("misc", root, 2);