summaryrefslogtreecommitdiffstats
path: root/lib/talloc/testsuite.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: talloc: Test suite for the new destructor reparent logic.Jeremy Allison2015-03-081-0/+82
| | | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Mar 8 20:52:43 CET 2015 on sn-devel-104
* talloc/tests: avoid some unused variable warningsStefan Metzmacher2014-05-161-0/+13
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* talloc: Test the pooled objectVolker Lendecke2013-09-081-0/+36
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* talloc: Allow nested pools.Volker Lendecke2013-09-081-0/+26
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* Add simple limited pool tests to test_memlimit().Jeremy Allison2013-08-271-0/+27
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
* Add tests for talloc_memlimitSimo Sorce2012-10-051-0/+172
| | | | | Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Fri Oct 5 07:36:38 CEST 2012 on sn-devel-104
* talloc: use a struct for pool headers.Rusty Russell2012-07-181-1/+1
| | | | | | | | | | | | | | | | | | This neatens the code a bit (we should do a similar thing for all the TALLOC_CHUNK macros). Two subtler changes: (1) As a result of the struct, we actually pack object_count into the talloc header on 32-bit platforms (since the header is 40 bytes, but needs to be 16-byte aligned). (2) I avoid VALGRIND_MAKE_MEM_UNDEFINED on memmove when we resize the only entry in a pool; that's done later anyway. With -O2 on my 11.04 Ubuntu 32-bit x86 laptop, the talloc_pool speed as measured by testsuite.c actually increases 10%. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* talloc/testsuite: fix compiler warningsStefan Metzmacher2012-01-101-1/+2
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Jan 10 13:31:33 CET 2012 on sn-devel-104
* talloc/testsuite: remove #if _SAMBA_BUILD_==3Stefan Metzmacher2011-10-221-9/+0
| | | | | | We don't include "includes.h" anymore... metze
* talloc: check block count aftter references testAndrew Tridgell2011-08-041-0/+1
| | | | Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* talloc: added test suite for talloc_free_children()Andrew Tridgell2011-07-291-0/+44
| | | | | | | this tests the fix from Simo Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Fri Jul 29 11:30:13 CEST 2011 on sn-devel-104
* talloc: test talloc_steal out of a talloc_poolStefan Metzmacher2011-05-171-0/+69
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue May 17 09:43:01 CEST 2011 on sn-devel-104
* talloc: add memset() calls to test_pool()Stefan Metzmacher2011-05-171-0/+17
| | | | | | This way we the pool based valgrind code. metze
* talloc/testsuite: avoid memory leak reported by valgrindStefan Metzmacher2011-04-081-1/+1
| | | | | | | | | metze Signed-off-By: Andrew Tridgell <tridge@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Apr 8 10:15:41 CEST 2011 on sn-devel-104
* talloc/testsuite: test more talloc_pool related thingsStefan Metzmacher2011-04-081-0/+55
| | | | | | metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
* talloc: added a test for the use after free Rusty foundAndrew Tridgell2011-01-051-0/+17
|
* talloc: Fix warnings in test codeBrad Hards2011-01-031-1/+4
| | | | | | | | | | This should not change any behaviour - the intent is just to reduce the "nuisance" warnings. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Jan 3 11:12:39 CET 2011 on sn-devel-104
* talloc: there is no ambiguity when freeing a ptr with a null parentAndrew Tridgell2010-04-201-0/+33
| | | | | | | | when a ptr has a single reference and a NULL parent, then talloc_free(ptr) is not ambiguous, as the caller could not have done a talloc_free(NULL) to free the memory Pair-Programmed-With: Rusty Russell <rusty@samba.org>
* talloc: testsuite should use <talloc.h> not "talloc.h"Andrew Tridgell2010-03-291-1/+1
| | | | | if we are using the system talloc, the testsuite needs to use the system talloc.h
* talloc: fixed talloc_disable_null_tracking()Andrew Tridgell2009-09-201-1/+2
| | | | | | | | | | | | When we disable null tracking, we need to move any existing objects that are under the null_context to be parented by the true NULL context. We also need a new talloc_enable_null_tracking_no_autofree() function, as the talloc testsuite cannot cope with the moving of the autofree context under the null_context as it wants to check exact counts of objects under the null_context, and smbtorture has a large number of objects in the autofree_context from .init functions
* talloc/testsuite: use talloc_set_log_fn() and log to stdoutStefan Metzmacher2009-08-241-0/+6
| | | | metze
* talloc/testsuite: report __location__ of testsuite failuresStefan Metzmacher2009-08-241-6/+6
| | | | metze
* talloc/testsuite: add infrastructure to test abortsStefan Metzmacher2009-08-241-0/+20
| | | | metze
* talloc/testsuite: reset the globals after each subtestStefan Metzmacher2009-08-241-3/+29
| | | | metze
* fixed the talloc testsuite for the recent changesAndrew Tridgell2009-07-011-6/+10
|
* lib/talloc: move main() out of testsuite.cStefan Metzmacher2008-09-221-10/+0
| | | | metze
* Move common libraries from root to lib/.Jelmer Vernooij2008-09-171-0/+1152