The branch, master has been updated via 84f56f2b98b ldb: change the version to 2.8.0 for Samba 4.19 via 6c4775021b5 WHATSNEW: Start release notes for Samba 4.19.0pre1. via d6634f29632 VERSION: Bump version up to 4.19.0pre1... via fbba9a24796 VERSION: Disable GIT_SNAPSHOT for the Samba 4.18.0rc1 release. via 0c9b310e239 WHATSNEW: Up to Samba 4.18.0rc1. via f972b1ea061 ldb: version 2.7.0 via 3c6d28ebae2 tevent: version 0.14.0 via c5d5ebb60d4 tevent: Call depth tracking via 07251f562c6 tevent: expose tevent_find_ops_byname() to callers via ab49d9ee4ee tevent: allow the "standard" backend to be overloaded via 147a317b7b9 tevent: remove solaris port backend via 620ad8af466 tevent: remove unused register_backend() from python bindings via eb05fe87bf7 tevent: remove unused tevent_liboop.c via 77c828e1248 tevent: Fix trailing whitespaces in tevent.c via f6a6d917e10 tevent: use samba_tevent_set_debug() in testsuite.c via 96e4be0a799 lib/util: install a tevent_abort callback using smb_panic() via a92150ed0ef s4:lib/events: let s4_event_context_init() use samba_tevent_context_init() via eab796a4f91 tdb: version 1.4.8 via 5224ed98eeb talloc: version 2.4.0 from 7105554cb05 bootstrap: Update to Ubuntu 22.04 as base default OS
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 84f56f2b98b99d6a03f26e53896298461ef66da6 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Jan 18 11:53:33 2023 +0100 ldb: change the version to 2.8.0 for Samba 4.19 Signed-off-by: Stefan Metzmacher <me...@samba.org> Signed-off-by: Jule Anger <jan...@samba.org> Autobuild-User(master): Stefan Metzmacher <me...@samba.org> Autobuild-Date(master): Wed Jan 18 17:25:51 UTC 2023 on atb-devel-224 commit 6c4775021b583517143f731314f07b2f011c8421 Author: Jule Anger <jan...@samba.org> Date: Wed Jan 18 16:50:10 2023 +0100 WHATSNEW: Start release notes for Samba 4.19.0pre1. Signed-off-by: Jule Anger <jan...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> commit d6634f296329fff11d3f0fe8bfff19719dd4c2dd Author: Jule Anger <jan...@samba.org> Date: Wed Jan 18 16:47:32 2023 +0100 VERSION: Bump version up to 4.19.0pre1... and re-enable GIT_SNAPSHOT. Signed-off-by: Jule Anger <jan...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> commit fbba9a24796c4887d42667a7bedeb4d7f2a428e5 Author: Jule Anger <jan...@samba.org> Date: Wed Jan 18 16:44:14 2023 +0100 VERSION: Disable GIT_SNAPSHOT for the Samba 4.18.0rc1 release. Signed-off-by: Jule Anger <jan...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> commit 0c9b310e239fa886c7f56bc052133f8492dc6e5f Author: Jule Anger <jan...@samba.org> Date: Wed Jan 18 16:43:03 2023 +0100 WHATSNEW: Up to Samba 4.18.0rc1. Signed-off-by: Jule Anger <jan...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> commit f972b1ea061ca451d269df9a2b0ab53c7651d908 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Jan 18 15:53:46 2023 +0100 ldb: version 2.7.0 * Support python 3.12 * Have python functions operating on DNs raise LdbError * don't call comparison() directly in LDB_TYPESAFE_QSORT * Use ldb_ascii_toupper() for case folding to support tr_TR.UTF-8 and other dotless i locales, see https://bugzilla.samba.org/show_bug.cgi?id=15248 Signed-off-by: Stefan Metzmacher <me...@samba.org> Signed-off-by: Jule Anger <jan...@samba.org> commit 3c6d28ebae27dba8e40558ae37ae8138ea0b4bdc Author: Stefan Metzmacher <me...@samba.org> Date: Wed Nov 9 13:32:04 2022 +0100 tevent: version 0.14.0 - Support python 3.12 - remove solaris port backend (it's not maintainable) - make tevent_find_ops_byname() available for callers. - allow the "standard" backend to be overloaded - add interface for request/subrequest call depth tracking: - tevent_thread_call_depth_activate - tevent_thread_call_depth_deactivate - tevent_thread_call_depth_start - tevent_thread_call_depth_stop - tevent_thread_call_depth_reset_from_req Note the changes to ABI/tevent-0.13.0.sigs only revert the temporary changes made there... Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Volker Lendecke <v...@samba.org> commit c5d5ebb60d46d7b4717d23ca8d2cf1b14c7ff7e5 Author: Pavel Filipenský <pfili...@redhat.com> Date: Thu Jun 16 16:23:22 2022 +0200 tevent: Call depth tracking The change to lib/tevent/ABI/tevent-0.13.0.sigs will be reverted in the commit for the 0.14.0 release... Signed-off-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit 07251f562c6cd777394b3ffa29525a69f5ceffc4 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Oct 28 14:10:15 2022 +0200 tevent: expose tevent_find_ops_byname() to callers This makes it more flexible and allow a caller to overload a tevent backend. Which will be used by Samba in order to glue in io_uring support. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Volker Lendecke <v...@samba.org> commit ab49d9ee4ee463f67f0986999e7da6fab72d28ed Author: Stefan Metzmacher <me...@samba.org> Date: Sat Nov 12 15:27:30 2022 +0000 tevent: allow the "standard" backend to be overloaded We'll export tevent_find_ops_byname() soon and will allow the context_init() function of backends to find that standard ops and hand over to standard_ops->context_init(). Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Volker Lendecke <v...@samba.org> commit 147a317b7b92e60c5940d875dbd7aef19824834e Author: Stefan Metzmacher <me...@samba.org> Date: Wed Nov 9 12:26:38 2022 +0100 tevent: remove solaris port backend There's no way to verify changes we would have to do tevent_port.c, as we don't have access to a solaris build machine. So better use the poll backend instead. In performance critical code we typically don't deal with a lot of file descriptors so the impact should be fairly minimal. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Volker Lendecke <v...@samba.org> commit 620ad8af4661e32eb0fb27aff632305a3def04dc Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 23 08:27:37 2022 +0200 tevent: remove unused register_backend() from python bindings Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Volker Lendecke <v...@samba.org> commit eb05fe87bf77839fa0e83e6ba5ec4ab9a3fdcef1 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 23 08:24:33 2022 +0200 tevent: remove unused tevent_liboop.c Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Volker Lendecke <v...@samba.org> commit 77c828e1248d1f302885a41c67aab7da7d452926 Author: Pavel Filipenský <pfili...@redhat.com> Date: Thu Jun 16 19:09:03 2022 +0200 tevent: Fix trailing whitespaces in tevent.c Signed-off-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> commit f6a6d917e10c560b1b953be99ec8a99d6209b8dc Author: Stefan Metzmacher <me...@samba.org> Date: Tue Jan 10 12:57:58 2023 +0100 tevent: use samba_tevent_set_debug() in testsuite.c Note testsuite.c is only used in Samba's smbtorture as 'smbtorture //a/b local.event' Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Volker Lendecke <v...@samba.org> commit 96e4be0a799666414add1a3e80830832dc6f7cb9 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Nov 9 14:05:59 2022 +0100 lib/util: install a tevent_abort callback using smb_panic() Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Volker Lendecke <v...@samba.org> commit a92150ed0ef25623bc2f2476060fc845f673d29f Author: Stefan Metzmacher <me...@samba.org> Date: Thu Oct 27 22:17:55 2022 +0200 s4:lib/events: let s4_event_context_init() use samba_tevent_context_init() This is no real change, but it makes sure we only have to change samba_tevent_context_init() in future in order to distribute the change to all places. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Pavel Filipenský <pfili...@redhat.com> Reviewed-by: Volker Lendecke <v...@samba.org> commit eab796a4f9172e602dc262f3c99ead35b35929e7 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Jan 18 11:53:02 2023 +0100 tdb: version 1.4.8 * Support python 3.12 Signed-off-by: Stefan Metzmacher <me...@samba.org> Signed-off-by: Jule Anger <jan...@samba.org> commit 5224ed98eeba43f22b5f5f87de5947fbb1c1c7c1 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Jan 18 11:52:33 2023 +0100 talloc: version 2.4.0 * Add talloc_asprintf_addbuf() * Support python 3.12 Signed-off-by: Stefan Metzmacher <me...@samba.org> Signed-off-by: Jule Anger <jan...@samba.org> ----------------------------------------------------------------------- Summary of changes: VERSION | 2 +- WHATSNEW.txt | 72 +- lib/ldb/ABI/{ldb-2.6.1.sigs => ldb-2.8.0.sigs} | 0 ...pyldb-util-2.1.0.sigs => pyldb-util-2.8.0.sigs} | 0 lib/ldb/wscript | 4 +- ...oc-util-2.3.0.sigs => pytalloc-util-2.4.0.sigs} | 0 .../ABI/{talloc-2.3.5.sigs => talloc-2.4.0.sigs} | 0 lib/talloc/talloc.h | 2 +- lib/talloc/wscript | 2 +- lib/tdb/ABI/{tdb-1.3.17.sigs => tdb-1.4.8.sigs} | 0 lib/tdb/wscript | 2 +- .../ABI/{tevent-0.13.0.sigs => tevent-0.14.0.sigs} | 5 + lib/tevent/pytevent.c | 130 ---- lib/tevent/testsuite.c | 50 +- lib/tevent/tevent.c | 15 +- lib/tevent/tevent.h | 164 +++++ lib/tevent/tevent_debug.c | 38 + lib/tevent/tevent_internal.h | 8 +- lib/tevent/tevent_liboop.c | 292 -------- lib/tevent/tevent_port.c | 804 --------------------- lib/tevent/tevent_queue.c | 2 + lib/tevent/tevent_req.c | 10 + lib/tevent/tevent_standard.c | 2 +- lib/tevent/wscript | 2 +- lib/util/tevent_debug.c | 18 + source4/lib/events/tevent_s4.c | 2 +- 26 files changed, 295 insertions(+), 1331 deletions(-) copy lib/ldb/ABI/{ldb-2.6.1.sigs => ldb-2.8.0.sigs} (100%) copy lib/ldb/ABI/{pyldb-util-2.1.0.sigs => pyldb-util-2.8.0.sigs} (100%) copy lib/talloc/ABI/{pytalloc-util-2.3.0.sigs => pytalloc-util-2.4.0.sigs} (100%) copy lib/talloc/ABI/{talloc-2.3.5.sigs => talloc-2.4.0.sigs} (100%) copy lib/tdb/ABI/{tdb-1.3.17.sigs => tdb-1.4.8.sigs} (100%) copy lib/tevent/ABI/{tevent-0.13.0.sigs => tevent-0.14.0.sigs} (97%) delete mode 100644 lib/tevent/tevent_liboop.c delete mode 100644 lib/tevent/tevent_port.c Changeset truncated at 500 lines: diff --git a/VERSION b/VERSION index ba39cbcaacb..a850ffa9b9a 100644 --- a/VERSION +++ b/VERSION @@ -24,7 +24,7 @@ # -> "3.0.0" # ######################################################## SAMBA_VERSION_MAJOR=4 -SAMBA_VERSION_MINOR=18 +SAMBA_VERSION_MINOR=19 SAMBA_VERSION_RELEASE=0 ######################################################## diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 4a40b7147dd..d63da177595 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,12 +1,12 @@ Release Announcements ===================== -This is the first pre release of Samba 4.18. This is *not* +This is the first pre release of Samba 4.19. This is *not* intended for production environments and is designed for testing purposes only. Please report any defects via the Samba bug reporting system at https://bugzilla.samba.org/. -Samba 4.18 will be the next version of the Samba suite. +Samba 4.19 will be the next version of the Samba suite. UPGRADING @@ -16,72 +16,6 @@ UPGRADING NEW FEATURES/CHANGES ==================== -More succinct samba-tool error messages ---------------------------------------- - -Historically samba-tool has reported user error or misconfiguration by -means of a Python traceback, showing you where in its code it noticed -something was wrong, but not always exactly what is amiss. Now it -tries harder to identify the true cause and restrict its output to -describing that. Particular cases include: - - * a username or password is incorrect - * an ldb database filename is wrong (including in smb.conf) - * samba-tool dns: various zones or records do not exist - * samba-tool ntacl: certain files are missing - * the network seems to be down - * bad --realm or --debug arguments - -Accessing the old samba-tool messages -------------------------------------- - -This is not new, but users are reminded they can get the full Python -stack trace, along with other noise, by using the argument '-d3'. -This may be useful when searching the web. - -The intention is that when samba-tool encounters an unrecognised -problem (especially a bug), it will still output a Python traceback. -If you encounter a problem that has been incorrectly identified by -samba-tool, please report it on https://bugzilla.samba.org. - -Colour output with samba-tool --color -------------------------------------- - -For some time a few samba-tool commands have had a --color=yes|no|auto -option, which determines whether the command outputs ANSI colour -codes. Now all samba-tool commands support this option, which now also -accepts 'always' and 'force' for 'yes', 'never' and 'none' for 'no', -and 'tty' and 'if-tty' for 'auto' (this more closely matches -convention). With --color=auto, or when --color is omitted, colour -codes are only used when output is directed to a terminal. - -Most commands have very little colour in any case. For those that -already used it, the defaults have changed slightly. - - * samba-tool drs showrepl: default is now 'auto', not 'no' - - * samba-tool visualize: the interactions between --color-scheme, - --color, and --output have changed slightly. When --color-scheme is - set it overrides --color for the purpose of the output diagram, but - not for other output like error messages. - -No colour with NO_COLOR environment variable --------------------------------------------- - -With both samba-tool --color=auto (see above) and some other places -where we use ANSI colour codes, the NO_COLOR environment variable will -disable colour output. See https://no-color.org/ for a description of -this variable. `samba-tool --color=always` will use colour regardless -of NO_COLOR. - -New wbinfo option --change-secret-at ------------------------------------- - -The wbinfo command has a new option, --change-secret-at=<DOMAIN CONTROLLER> -which forces the trust account password to be changed at a specified domain -controller. If the specified domain controller cannot be contacted the -password change fails rather than trying other DCs. - REMOVED FEATURES ================ @@ -97,7 +31,7 @@ smb.conf changes KNOWN ISSUES ============ -https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.18#Release_blocking_bugs +https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.19#Release_blocking_bugs ####################################### diff --git a/lib/ldb/ABI/ldb-2.6.1.sigs b/lib/ldb/ABI/ldb-2.8.0.sigs similarity index 100% copy from lib/ldb/ABI/ldb-2.6.1.sigs copy to lib/ldb/ABI/ldb-2.8.0.sigs diff --git a/lib/ldb/ABI/pyldb-util-2.1.0.sigs b/lib/ldb/ABI/pyldb-util-2.8.0.sigs similarity index 100% copy from lib/ldb/ABI/pyldb-util-2.1.0.sigs copy to lib/ldb/ABI/pyldb-util-2.8.0.sigs diff --git a/lib/ldb/wscript b/lib/ldb/wscript index 2dfac46403f..7e1d9a39ee6 100644 --- a/lib/ldb/wscript +++ b/lib/ldb/wscript @@ -1,8 +1,8 @@ #!/usr/bin/env python APPNAME = 'ldb' -# For Samba 4.18.x -VERSION = '2.7.0' +# For Samba 4.19.x +VERSION = '2.8.0' import sys, os diff --git a/lib/talloc/ABI/pytalloc-util-2.3.0.sigs b/lib/talloc/ABI/pytalloc-util-2.4.0.sigs similarity index 100% copy from lib/talloc/ABI/pytalloc-util-2.3.0.sigs copy to lib/talloc/ABI/pytalloc-util-2.4.0.sigs diff --git a/lib/talloc/ABI/talloc-2.3.5.sigs b/lib/talloc/ABI/talloc-2.4.0.sigs similarity index 100% copy from lib/talloc/ABI/talloc-2.3.5.sigs copy to lib/talloc/ABI/talloc-2.4.0.sigs diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index dba9a3e9db9..c466c36406b 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -56,7 +56,7 @@ extern "C" { */ #define TALLOC_VERSION_MAJOR 2 -#define TALLOC_VERSION_MINOR 3 +#define TALLOC_VERSION_MINOR 4 _PUBLIC_ int talloc_version_major(void); _PUBLIC_ int talloc_version_minor(void); diff --git a/lib/talloc/wscript b/lib/talloc/wscript index 5a9779cf2d8..1c54a7c653a 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -1,7 +1,7 @@ #!/usr/bin/env python APPNAME = 'talloc' -VERSION = '2.3.5' +VERSION = '2.4.0' import os import sys diff --git a/lib/tdb/ABI/tdb-1.3.17.sigs b/lib/tdb/ABI/tdb-1.4.8.sigs similarity index 100% copy from lib/tdb/ABI/tdb-1.3.17.sigs copy to lib/tdb/ABI/tdb-1.4.8.sigs diff --git a/lib/tdb/wscript b/lib/tdb/wscript index 71ada311dc2..9c9bf77f115 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -1,7 +1,7 @@ #!/usr/bin/env python APPNAME = 'tdb' -VERSION = '1.4.7' +VERSION = '1.4.8' import sys, os diff --git a/lib/tevent/ABI/tevent-0.13.0.sigs b/lib/tevent/ABI/tevent-0.14.0.sigs similarity index 97% copy from lib/tevent/ABI/tevent-0.13.0.sigs copy to lib/tevent/ABI/tevent-0.14.0.sigs index 68722a0e62f..f2a11902a80 100644 --- a/lib/tevent/ABI/tevent-0.13.0.sigs +++ b/lib/tevent/ABI/tevent-0.14.0.sigs @@ -60,6 +60,7 @@ tevent_fd_set_auto_close: void (struct tevent_fd *) tevent_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t) tevent_fd_set_flags: void (struct tevent_fd *, uint16_t) tevent_fd_set_tag: void (struct tevent_fd *, uint64_t) +tevent_find_ops_byname: const struct tevent_ops *(const char *) tevent_get_trace_callback: void (struct tevent_context *, tevent_trace_callback_t *, void *) tevent_get_trace_fd_callback: void (struct tevent_context *, tevent_trace_fd_callback_t *, void *) tevent_get_trace_immediate_callback: void (struct tevent_context *, tevent_trace_immediate_callback_t *, void *) @@ -128,6 +129,10 @@ tevent_set_trace_timer_callback: void (struct tevent_context *, tevent_trace_tim tevent_signal_get_tag: uint64_t (const struct tevent_signal *) tevent_signal_set_tag: void (struct tevent_signal *, uint64_t) tevent_signal_support: bool (struct tevent_context *) +tevent_thread_call_depth_activate: void (size_t *) +tevent_thread_call_depth_deactivate: void (void) +tevent_thread_call_depth_reset_from_req: void (struct tevent_req *) +tevent_thread_call_depth_start: void (struct tevent_req *) tevent_thread_proxy_create: struct tevent_thread_proxy *(struct tevent_context *) tevent_thread_proxy_schedule: void (struct tevent_thread_proxy *, struct tevent_immediate **, tevent_immediate_handler_t, void *) tevent_threaded_context_create: struct tevent_threaded_context *(TALLOC_CTX *, struct tevent_context *) diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c index 62dfe2419ff..6e8c8b72e1c 100644 --- a/lib/tevent/pytevent.c +++ b/lib/tevent/pytevent.c @@ -73,134 +73,6 @@ static PyTypeObject TeventSignal_Type; static PyTypeObject TeventTimer_Type; static PyTypeObject TeventFd_Type; -static int py_context_init(struct tevent_context *ev) -{ - /* FIXME */ - return 0; -} - -static struct tevent_fd *py_add_fd(struct tevent_context *ev, - TALLOC_CTX *mem_ctx, - int fd, uint16_t flags, - tevent_fd_handler_t handler, - void *private_data, - const char *handler_name, - const char *location) -{ - /* FIXME */ - return NULL; -} - -static void py_set_fd_close_fn(struct tevent_fd *fde, - tevent_fd_close_fn_t close_fn) -{ - /* FIXME */ -} - -static uint16_t py_get_fd_flags(struct tevent_fd *fde) -{ - /* FIXME */ - return 0; -} - -static void py_set_fd_flags(struct tevent_fd *fde, uint16_t flags) -{ - /* FIXME */ -} - -/* timed_event functions */ -static struct tevent_timer *py_add_timer(struct tevent_context *ev, - TALLOC_CTX *mem_ctx, - struct timeval next_event, - tevent_timer_handler_t handler, - void *private_data, - const char *handler_name, - const char *location) -{ - /* FIXME */ - return NULL; -} - -/* immediate event functions */ -static void py_schedule_immediate(struct tevent_immediate *im, - struct tevent_context *ev, - tevent_immediate_handler_t handler, - void *private_data, - const char *handler_name, - const char *location) -{ - /* FIXME */ -} - -/* signal functions */ -static struct tevent_signal *py_add_signal(struct tevent_context *ev, - TALLOC_CTX *mem_ctx, - int signum, int sa_flags, - tevent_signal_handler_t handler, - void *private_data, - const char *handler_name, - const char *location) -{ - /* FIXME */ - return NULL; -} - -/* loop functions */ -static int py_loop_once(struct tevent_context *ev, const char *location) -{ - /* FIXME */ - return 0; -} - -static int py_loop_wait(struct tevent_context *ev, const char *location) -{ - /* FIXME */ - return 0; -} - -const static struct tevent_ops py_tevent_ops = { - .context_init = py_context_init, - .add_fd = py_add_fd, - .set_fd_close_fn = py_set_fd_close_fn, - .get_fd_flags = py_get_fd_flags, - .set_fd_flags = py_set_fd_flags, - .add_timer = py_add_timer, - .schedule_immediate = py_schedule_immediate, - .add_signal = py_add_signal, - .loop_wait = py_loop_wait, - .loop_once = py_loop_once, -}; - -static PyObject *py_register_backend(PyObject *self, PyObject *args) -{ - PyObject *name, *py_backend; - - if (!PyArg_ParseTuple(args, "O", &py_backend)) - return NULL; - - name = PyObject_GetAttrString(py_backend, "name"); - if (name == NULL) { - PyErr_SetNone(PyExc_AttributeError); - return NULL; - } - - if (!PyUnicode_Check(name)) { - PyErr_SetNone(PyExc_TypeError); - Py_DECREF(name); - return NULL; - } - - if (!tevent_register_backend(PyUnicode_AsUTF8(name), &py_tevent_ops)) { /* FIXME: What to do with backend */ - PyErr_SetNone(PyExc_RuntimeError); - Py_DECREF(name); - return NULL; - } - - Py_DECREF(name); - - Py_RETURN_NONE; -} - static PyObject *py_tevent_context_reinitialise(TeventContext_Object *self, PyObject *Py_UNUSED(ignored)) { @@ -855,8 +727,6 @@ err: } static PyMethodDef tevent_methods[] = { - { "register_backend", (PyCFunction)py_register_backend, METH_VARARGS, - "register_backend(backend)" }, { "set_default_backend", (PyCFunction)py_set_default_backend, METH_VARARGS, "set_default_backend(backend)" }, { "backend_list", (PyCFunction)py_backend_list, diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c index 8894e445203..492b8807996 100644 --- a/lib/tevent/testsuite.c +++ b/lib/tevent/testsuite.c @@ -37,6 +37,32 @@ #include <assert.h> #endif +static struct tevent_context * +test_tevent_context_init(TALLOC_CTX *mem_ctx) +{ + struct tevent_context *ev = NULL; + + ev = tevent_context_init(mem_ctx); + if (ev != NULL) { + samba_tevent_set_debug(ev, "<default>"); + } + + return ev; +} + +static struct tevent_context * +test_tevent_context_init_byname(TALLOC_CTX *mem_ctx, const char *name) +{ + struct tevent_context *ev = NULL; + + ev = tevent_context_init_byname(mem_ctx, name); + if (ev != NULL) { + samba_tevent_set_debug(ev, name); + } + + return ev; +} + static int fde_count; static void do_read(int fd, void *buf, size_t count) @@ -143,7 +169,7 @@ static bool test_event_context(struct torture_context *test, struct timeval t; int ret; - ev_ctx = tevent_context_init_byname(test, backend); + ev_ctx = test_tevent_context_init_byname(test, backend); if (ev_ctx == NULL) { torture_comment(test, "event backend '%s' not supported\n", backend); return true; @@ -383,7 +409,7 @@ static bool test_event_fd1(struct torture_context *tctx, state.tctx = tctx; state.backend = (const char *)test_data; - state.ev = tevent_context_init_byname(tctx, state.backend); + state.ev = test_tevent_context_init_byname(tctx, state.backend); if (state.ev == NULL) { torture_skip(tctx, talloc_asprintf(tctx, "event backend '%s' not supported\n", @@ -391,7 +417,6 @@ static bool test_event_fd1(struct torture_context *tctx, return true; } - tevent_set_debug_stderr(state.ev); torture_comment(tctx, "backend '%s' - %s\n", state.backend, __FUNCTION__); @@ -623,7 +648,7 @@ static bool test_event_fd2(struct torture_context *tctx, state.tctx = tctx; state.backend = (const char *)test_data; - state.ev = tevent_context_init_byname(tctx, state.backend); + state.ev = test_tevent_context_init_byname(tctx, state.backend); if (state.ev == NULL) { torture_skip(tctx, talloc_asprintf(tctx, "event backend '%s' not supported\n", @@ -631,7 +656,6 @@ static bool test_event_fd2(struct torture_context *tctx, return true; } - tevent_set_debug_stderr(state.ev); torture_comment(tctx, "backend '%s' - %s\n", state.backend, __FUNCTION__); @@ -956,7 +980,7 @@ static bool test_wrapper(struct torture_context *tctx, bool ok = false; bool ret2; - ev = tevent_context_init_byname(tctx, backend); + ev = test_tevent_context_init_byname(tctx, backend); if (ev == NULL) { torture_skip(tctx, talloc_asprintf(tctx, "event backend '%s' not supported\n", @@ -964,7 +988,6 @@ static bool test_wrapper(struct torture_context *tctx, return true; } - tevent_set_debug_stderr(ev); torture_comment(tctx, "tevent backend '%s'\n", backend); wrap_ev = tevent_context_wrapper_create( @@ -1130,7 +1153,7 @@ static bool test_free_wrapper(struct torture_context *tctx, int ret; bool ok = false; - ev = tevent_context_init_byname(frame, backend); + ev = test_tevent_context_init_byname(frame, backend); if (ev == NULL) { torture_skip(tctx, talloc_asprintf(tctx, "event backend '%s' not supported\n", @@ -1138,7 +1161,6 @@ static bool test_free_wrapper(struct torture_context *tctx, return true; } - tevent_set_debug_stderr(ev); torture_comment(tctx, "tevent backend '%s'\n", backend); wrap_ev = tevent_context_wrapper_create( @@ -1294,7 +1316,7 @@ static bool test_event_context_threaded(struct torture_context *test, int ret; char c = 0; - ev = tevent_context_init_byname(test, "poll_mt"); + ev = test_tevent_context_init_byname(test, "poll_mt"); torture_assert(test, ev != NULL, "poll_mt not supported"); tevent_set_trace_callback(ev, test_event_threaded_trace, NULL); @@ -1411,11 +1433,10 @@ static bool test_multi_tevent_threaded(struct torture_context *test, thread_test_ctx = test; thread_counter = 0; - master_ev = tevent_context_init(NULL); + master_ev = test_tevent_context_init(NULL); if (master_ev == NULL) { return false; } - tevent_set_debug_stderr(master_ev); tp = tevent_thread_proxy_create(master_ev); if (tp == NULL) { @@ -1612,11 +1633,10 @@ static bool test_multi_tevent_threaded_1(struct torture_context *test, thread_test_ctx = test; -- Samba Shared Repository