1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00
Commit Graph

54 Commits

Author SHA1 Message Date
Jeremy Allison
9a012df08e r25175: Change to talloc_asprintf_append_buffer().
Jeremy.
(This used to be commit 0844dbf597)
2007-10-10 15:06:46 -05:00
Jelmer Vernooij
dfc0fd9eec r24688: Make output subunit-parseable.
(This used to be commit 2585c6feb2)
2007-10-10 15:02:44 -05:00
Andrew Tridgell
6c973f4e8c r23798: updated old Temple Place FSF addresses to new URL
(This used to be commit 40c0919aaa)
2007-10-10 14:59:15 -05:00
Andrew Tridgell
b8d69a7ea2 r23795: more v2->v3 conversion
(This used to be commit 84b468b2f8)
2007-10-10 14:59:14 -05:00
Stefan Metzmacher
aa4ab6d3c1 r22757: test if calling talloc_free() works on parent elements from within a destrutor
metze
(This used to be commit 305117fae0)
2007-10-10 14:52:15 -05:00
Stefan Metzmacher
361e0b0bd7 r22365: prepare merge to samba3
metze
(This used to be commit 6780c23427)
2007-10-10 14:51:07 -05:00
Andrew Tridgell
1c211a2e43 r20650: revert a bunch of code I didn't mean to commit yet
(This used to be commit b3e2d49087)
2007-10-10 14:37:26 -05:00
Andrew Tridgell
f6274959ba r20647: add cluster code
(This used to be commit 5870830b99)
2007-10-10 14:37:24 -05:00
Andrew Tridgell
5438fc6c62 r19498: the autofree test cannot be run as part of smbtorture
(This used to be commit ebf1d523da)
2007-10-10 14:24:39 -05:00
Jelmer Vernooij
bc596cf917 r19495: Stop linking binaries twice (once before installation, once during build).
Make TORTURE-TALLOC and TORTURE-REPLACE builtin again rather than
separate binaries.
(This used to be commit 8913d60c72)
2007-10-10 14:24:39 -05:00
Andrew Tridgell
5ce18f91e0 r19434: we need to force line buffering as the new torture code doesn't create
a pty in the piped_child() code

Jelmer, if you want to fix this on platforms that support it, see the
forkpty() call, or see
http://junkcode.samba.org/ftp/unpacked/junkcode/rline/
(This used to be commit 35908a2992)
2007-10-10 14:21:30 -05:00
Andrew Tridgell
cd2bc5854c r19405: the talloc speed test suite was not giving an accurate picture of the
cost of talloc versus malloc. The size parameter in the test suite was
constantly increasing, leading to a worst case for malloc. It is far
more common to have talloc calls of 100 bytes or lower, so change the
benchmark to reflect this.

This makes talloc look much worse - on my laptop I now get:

talloc: 5615164 ops/sec
malloc: 14337130 ops/sec

I'm working on improving that.
(This used to be commit db273ef4dd)
2007-10-10 14:21:27 -05:00
Jelmer Vernooij
4517b7af0e r19381: Print out the specific tests that failed after a smbtorture run.
Support listing known failures as a list of wildcards in the file
`KNOWN_FAILURES'.
(This used to be commit 23f66efd56)
2007-10-10 14:21:22 -05:00
Jelmer Vernooij
52e3f69a36 r19343: Add support for external scripts/binaries that write results using the
'subunit' protocol. This allows us to easily plug EJS scripts or binaries that
can't depend on -ltorture into smbtorture. The protocol is very simple:

- write "comments" to stderr

Example output on stdout:
test: foo
success: foo
test: bar
success: bar
test: blah
failure: blah [
dummy.c:30: Expression 1 != 2 failed!
]
test: blie
skip: blie [
Iconv support not built in
]

I've already converted the talloc testsuite.
(This used to be commit e1742c14a2)
2007-10-10 14:21:13 -05:00
Jelmer Vernooij
8773e743c5 r19339: Merge my 4.0-unittest branch. This adds an API for more fine-grained
output in the testsuite rather than just True or False for a
set of tests.

The aim is to use this for:
 * known failure lists (run all tests and detect tests that
						started working or started failing). This
   would allow us to get rid of the RPC-SAMBA3-* tests
 * nicer torture output
 * simplification of the testsuite system
 * compatibility with other unit testing systems
 * easier usage of smbtorture (being able to run one test
						and automatically set up the environment for that)

This is still a work-in-progress; expect more updates over the next couple of
days.
(This used to be commit 0eb6097305)
2007-10-10 14:21:12 -05:00
Andrew Tridgell
18278a5560 r19118: get rid of a bunch of bool misuse warnings
(This used to be commit e620f44643)
2007-10-10 14:20:36 -05:00
Stefan Metzmacher
4ccdd53704 r18995: - fix bug 4078
- talloc_free(talloc_autofree_context()); should not result
  in a SIGABORT on exit
- add a test for this, but this test can also pass in the standalone build
  and samba3, as samba4 uses talloc_autofree_context()

metze
(This used to be commit 2be48c1b03)
2007-10-10 14:20:27 -05:00
Andrew Tridgell
05cdd9ccaf r18439: 2nd try at a talloc_move() api. This type with the ** ptr interface
exposed.

Unfortunately this generates a large number of type punning
warnings. We'll have to find some magic to hide those.
(This used to be commit 254cbf09de)
2007-10-10 14:18:29 -05:00
Andrew Tridgell
1a59784451 r18435: added a function talloc_move() which is like talloc_steal(), but is
meant for moving pointers between structures. The difference is that
talloc_move() will zero the source pointer, thus ensuring you don't
reference the pointer in the old context.

talloc_move() is appropriate in some, but not all cases where we use
talloc_steal() now. The interface came out of a discussion with
Jeremy.
(This used to be commit 200756017e)
2007-10-10 14:18:29 -05:00
Jelmer Vernooij
1869a8cc66 r18163: Remove defines for BOOL, False and True
(This used to be commit 6f5e7df6f2)
2007-10-10 14:17:44 -05:00
Andrew Tridgell
a983b06d37 r18129: moved the system includes into libreplace - this gives much more
isolation of our portability environment from the main code, and also
simplifies the includes system (no separate #ifdef _SAMBA_BUILD for
tdb. ldb etc now)
(This used to be commit 77d1a468e0)
2007-10-10 14:17:36 -05:00
Stefan Metzmacher
7a29fb6dd7 r18096: try to make tcc happy and don't the same struct names in a global and
a local scope

metze
(This used to be commit b787259365)
2007-10-10 14:17:16 -05:00
Stefan Metzmacher
10d58661be r18064: merge from samba3
metze
(This used to be commit c60deff667)
2007-10-10 14:17:10 -05:00
Volker Lendecke
f6f4d868ea r18027: Fix some 64-bit warnings
(This used to be commit cd495d8931)
2007-10-10 14:17:04 -05:00
Stefan Metzmacher
722d20f4dd r17958: as talloc_init() enabled null tracking, we should avoid to use it
in smbtorture, and in the LOCAL-TALLOC we should reset the null tracking

also make bin/smbtorture //url/foo LOCAL-TALLOC LOCAL-TALLOC possible

metze
(This used to be commit d1dd3df5e4)
2007-10-10 14:16:57 -05:00
Stefan Metzmacher
930edaaba7 r17952: merge changes from samba3
metze
(This used to be commit ff8d044c2e)
2007-10-10 14:16:56 -05:00
Stefan Metzmacher
3caba85623 r17905: fix c++ warnings
metze
(This used to be commit 972a84f220)
2007-10-10 14:16:53 -05:00
Stefan Metzmacher
5ed074715a r17886: add talloc_ptrtype() and talloc_array_ptrtype(),
see the manpage what they do:-)

metze
(This used to be commit bfca83c91e)
2007-10-10 14:16:51 -05:00
Stefan Metzmacher
200619b368 r17883: check if talloc_asprintf() works correct
metze
(This used to be commit bb79542edb)
2007-10-10 14:16:50 -05:00
Stefan Metzmacher
31356c0283 r17712: fix compiler warning
metze
(This used to be commit 669d1e5f92)
2007-10-10 14:16:29 -05:00
Stefan Metzmacher
14d3223321 r17413: add a new case for the this:
top->level1->level2->level3

level3 has a deny destructor
talloc_free(level1)

result: top->level3

metze
(This used to be commit 3be930b81d)
2007-10-10 14:15:22 -05:00
Stefan Metzmacher
cab68a413b r17061: - remove the currect talloc chunk from it's parent before freeing the children
this fixes an endless loop bug!
- reenable the test for this

should I merge this to samba3?

metze
(This used to be commit 0559222b62)
2007-10-10 14:10:09 -05:00
Stefan Metzmacher
3cd96fd4f9 r16447: print the result of talloc_set_parent()
trying to find the bug on HPUX

metze
(This used to be commit 3db6bd8715)
2007-10-10 14:09:15 -05:00
Stefan Metzmacher
3a0a00f1b9 r16445: print out values
metze
(This used to be commit 972634b202)
2007-10-10 14:09:15 -05:00
Stefan Metzmacher
ca17b875b3 r16442: if we want to use CHECK_SIZE(NULL, 3)
we need null tracking, so enable it explicit before running any tests

metze
(This used to be commit f3cd971ab7)
2007-10-10 14:09:14 -05:00
Andrew Tridgell
a665cccd2e r15852: patch from Rusty to make talloc_set_destructor() and talloc_steal()
type safe. This only works on recent gcc versions. With other
compilers it reverts to a non-typesafe cast

The patch also ensures that talloc_free() does not change error on
systems where free() can change errno
(This used to be commit babbff5f77)
2007-10-10 14:08:32 -05:00
Andrew Tridgell
5da75f5c36 r15824: fixed a subtle talloc bug to do with memory context loops. When you
have a structure that references one of its parents, and a parent of
that parent is freed, then the whole structure should be freed, not
just the reference.

this was found by the change notify code, as a side effect of fixing
the memory leak yesterday
(This used to be commit 70531dcaee)
2007-10-10 14:08:28 -05:00
Jelmer Vernooij
909b111f58 r14720: Add torture_context argument to all torture tests
(This used to be commit 3c7a5ce291)
2007-10-10 13:59:13 -05:00
Andrew Tridgell
4476dfd3bd r11984: LGPL on header and testsuite as well
(This used to be commit ed90975bf5)
2007-10-10 13:46:55 -05:00
Andrew Tridgell
9cfe2d83f1 r8032: added loop detection into talloc. Robert Collins found a way to make a
memory loop with talloc_unlink(), so now we detect it and handle it
(This used to be commit 563058e78b)
2007-10-10 13:19:00 -05:00
Andrew Tridgell
9e044848e3 r6808: - test for gcov not needed
- samba malloc wrapper avoidance not needed now we don't use includes.h

- make testsuite work when BOOL, True, False already defined
(This used to be commit c8a274c873)
2007-10-10 13:16:46 -05:00
Jelmer Vernooij
5251703764 r6807: Fix in-tree build of talloc testsuite
(This used to be commit 3541ebe31b)
2007-10-10 13:16:46 -05:00
Jelmer Vernooij
1f474c2692 r6804: Add config.h for talloc (and use it)
(This used to be commit c2ce09d380)
2007-10-10 13:16:45 -05:00
Volker Lendecke
c1d31ac8fc r6660: Sorry for the spam... I think now I've got a version that should compile on
trunk, 3_0 and 4_0.

Volker
(This used to be commit 777c489cad)
2007-10-10 13:16:32 -05:00
Stefan Metzmacher
dd0d8b2a89 r5142: fix compiler warning
metze
(This used to be commit d8aeb69ea8)
2007-10-10 13:09:27 -05:00
Andrew Tridgell
7b79694ead r4790: added type checking helper macros in talloc. These take advantage of
the type names that talloc already keeps around for pointers, and
allows the user to type check void* private pointers. It can also be
used to implement polymorphism in C, as I'm sure someone would have
pointed out to me sooner or later :-)
(This used to be commit c283e1a3ef)
2007-10-10 13:08:55 -05:00
Andrew Tridgell
4b73689468 r4711: - deprecate talloc_destroy()
- expanded the talloc_realloc() test a little (I was concerned about a
  possible bug, which turned out to be an illusion)

- don't enable gcov by default in Makefile.talloc
(This used to be commit 4ec47cc108)
2007-10-10 13:08:46 -05:00
Andrew Tridgell
35a2ced64a r4593: don't use the _p function in the testsuite, as when built standalone it doesn't
use TALLOC_DEPRECATED
(This used to be commit 2fe0e2528f)
2007-10-10 13:08:30 -05:00
Andrew Tridgell
8b1512fc9b r4592: fixed typo from talloc testsuite fixup for the new syntax
(This used to be commit 1177200dd9)
2007-10-10 13:08:30 -05:00
Andrew Tridgell
11ce2cfd70 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
(This used to be commit 6e7754abd0)
2007-10-10 13:08:30 -05:00