summaryrefslogtreecommitdiff
path: root/lib/talloc/testsuite.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2020-11-09 11:50:09 -0800
committerJeremy Allison <jra@samba.org>2020-11-10 19:49:33 +0000
commit6598e00e129bc8b36d6d38345b67aba48b3eb26d (patch)
treef75487dd8168576a3b22699dfd505ec5b4e3ff8a /lib/talloc/testsuite.c
parent18fdfe8c10291e04b6a54499d74a6ee15652f5db (diff)
downloadsamba-talloc-2.3.2.tar.gz
samba-talloc-2.3.2.tar.bz2
samba-talloc-2.3.2.zip
lib: talloc: Remove the ALWAYS_REALLOC code paths.talloc-2.3.2
This is now never set, and also never tested, and only makes the talloc code more complicated. Once this is gone we can start looking at the memlimit stuff. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'lib/talloc/testsuite.c')
-rw-r--r--lib/talloc/testsuite.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c
index 6f23ad4e18a..282ebc6956d 100644
--- a/lib/talloc/testsuite.c
+++ b/lib/talloc/testsuite.c
@@ -1307,7 +1307,6 @@ static bool test_pool(void)
p4 = talloc_size(p3, 1000);
memset(p4, 0x11, talloc_get_size(p4));
-#if 1 /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
p2_2 = talloc_realloc_size(pool, p2, 20+1);
torture_assert("pool realloc 20+1", p2_2 == p2, "failed: pointer changed");
memset(p2, 0x11, talloc_get_size(p2));
@@ -1372,8 +1371,6 @@ static bool test_pool(void)
torture_assert("pool alloc 800", p3 == p1, "failed: pointer changed");
memset(p3, 0x11, talloc_get_size(p3));
-#endif /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
-
talloc_free(pool);
return true;
@@ -1408,7 +1405,6 @@ static bool test_pool_steal(void)
p1_2 = p1;
-#if 1 /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
p1_2 = talloc_realloc_size(root, p1, 5 * 16);
torture_assert("pool realloc 5 * 16", p1_2 > p2, "failed: pointer not changed");
memset(p1_2, 0x11, talloc_get_size(p1_2));
@@ -1420,13 +1416,11 @@ static bool test_pool_steal(void)
p2_2 = talloc_realloc_size(root, p2, 3 * 16);
torture_assert("pool realloc 5 * 16", p2_2 == p2, "failed: pointer changed");
memset(p2_2, 0x11, talloc_get_size(p2_2));
-#endif /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
talloc_free(p1_2);
p2_2 = p2;
-#if 1 /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
/* now we should reclaim the full pool */
p2_2 = talloc_realloc_size(root, p2, 8 * 16);
torture_assert("pool realloc 8 * 16", p2_2 == p1, "failed: pointer not expected");
@@ -1438,8 +1432,6 @@ static bool test_pool_steal(void)
torture_assert("pool realloc 2 * 1024", p2_2 != p1, "failed: pointer not expected");
memset(p2_2, 0x11, talloc_get_size(p2_2));
-#endif /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
-
talloc_free(p2_2);
talloc_free(root);