similar to: [PATCH for discussion only] New event API (RHBZ#664558).

Displaying 20 results from an estimated 4000 matches similar to: "[PATCH for discussion only] New event API (RHBZ#664558)."

2015 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
Since each ACQUIRE_LOCK/RELEASE_LOCK call must balance, this code is difficult to debug. Enable DEBUG_LOCK to add some prints which can help. The only definitive list of public APIs is found indirectly in the generator (in generator/c.ml : globals). --- generator/c.ml | 18 ++++++++++++++ src/errors.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++---- src/events.c
2010 Dec 22
2
Callbacks, log messages etc.
Inspired by but not completely related to: https://bugzilla.redhat.com/show_bug.cgi?id=664558 "RFE: Allow to set log callback in Ruby bindings" How can we make callbacks useful? First off what are we talking about? There are several callbacks that can be registered through the C API: (a) error callback http://libguestfs.org/guestfs.3.html#guestfs_set_error_handler (b) out
2019 Jul 30
0
Re: [PATCH] Rust bindings: Implement Event features
On Tue, Jul 30, 2019 at 02:51:37PM +0900, Hiroyuki Katsura wrote: >This patch includes: > >- Event callback handlers >- Tests related to events(410-430) >--- > generator/rust.ml | 38 ++++++- > rust/src/base.rs | 24 +++-- > rust/src/error.rs | 8 +- > rust/src/event.rs | 158
2016 Mar 19
1
[PATCH] tests/qemu: Add program for tracing and analyzing boot times.
--- .gitignore | 1 + tests/qemu/Makefile.am | 22 +- tests/qemu/boot-analysis.c | 1098 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1118 insertions(+), 3 deletions(-) create mode 100644 tests/qemu/boot-analysis.c diff --git a/.gitignore b/.gitignore index 1493011..9306a19 100644 --- a/.gitignore +++ b/.gitignore @@ -510,6 +510,7 @@ Makefile.in
2012 Oct 13
0
[PATCH] New APIs: Model libvirt authentication events through the API.
From: "Richard W.M. Jones" <rjones at redhat.com> This commit models libvirt authentication events through the API, adding one new event (GUESTFS_EVENT_LIBVIRT_AUTH) and several new APIs: guestfs_set_libvirt_supported_credentials guestfs_get_libvirt_requested_credentials guestfs_get_libvirt_requested_credential_prompt guestfs_get_libvirt_requested_credential_challenge
2019 Jul 30
1
Re: [PATCH] Rust bindings: Implement Event features
> So this has a lifetime same as the whole handle? Yes. > Why do you then need to keep > it in the list of callbacks then? Because I want to make sure that callbacks must exist while they are running. > Also you explicitly leak it here, so even > without a lifetime it will not get freed. If you do not explicly write lifetime here, the pointer will have static lifetime.
2019 Aug 05
2
[PATCH 2/2] Rust bindings: Implement callback handlers
This patch includes: - Event callback handlers - Tests related to events(410-430) src/bin/event.rs and src/bin/event_leak.rs are the PoCs that Boxes related to callbacks are not leaked. --- rust/src/bin/.gitkeep | 0 rust/src/bin/event.rs | 29 ++++++ rust/src/bin/event_leak.rs | 30 ++++++ rust/src/error.rs | 6 ++ rust/src/event.rs
2019 Jul 30
4
[PATCH] Rust bindings: Implement Event features
This patch includes: - Event callback handlers - Tests related to events(410-430) --- generator/rust.ml | 38 ++++++- rust/src/base.rs | 24 +++-- rust/src/error.rs | 8 +- rust/src/event.rs | 158 ++++++++++++++++++++++++++++ rust/src/lib.rs | 2 + rust/tests/040_create_multiple.rs | 2 +-
2012 Oct 13
2
Proposed libguestfs API for implementing libvirt virConnectOpenAuth
As in the example code below. static void do_auth (guestfs_h *g, void *opaque, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len) { char **creds; size_t i; char *prompt; char *reply; size_t replylen; // buf will be the libvirt URI. It is always \0-terminated so
2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
- fix the syntax of hyperlinks - replace the deprecation text with a simplier named list item, so it's more visible - use a named list item for the pointer to the C documentation of each API - add a named list item for the version of each API --- generator/ruby.ml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/generator/ruby.ml
2017 Feb 14
0
[PATCH v2 1/2] GCC 7: Add __attribute__((noreturn)) to some usage functions which call exit.
This happens with GCC 7.0.1. The errors were all of the form: qemu-speed-test.c: In function 'main': qemu-speed-test.c:153:7: error: this statement may fall through [-Werror=implicit-fallthrough=] usage (EXIT_SUCCESS); ^~~~~~~~~~~~~~~~~~~~ qemu-speed-test.c:155:5: note: here default: ^~~~~~~ --- builder/index-validate.c | 2 +-
2023 Jun 27
1
[PATCH libguestfs 1/4] ocaml: Replace old enter/leave_blocking_section calls
Since OCaml 4 the old and confusing caml_enter_blocking_section and caml_leave_blocking_section calls have been replaced with caml_release_runtime_system and caml_acquire_runtime_system (in that order). Use the new names. --- generator/OCaml.ml | 5 +++-- ocaml/guestfs-c.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/generator/OCaml.ml b/generator/OCaml.ml index
2023 Feb 12
1
Issue with downloading files whose path contains multi-byte utf-8 characters
Hey, When downloading a file whose path contains multi-byte utf-8, libguestfs sometimes crashes. This reproduces when using python, and not when using guestfish. Code to reproduce: for i in range(2000): g.download ('/xxx?', '/tmp/1') #0 raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007ffff7fac140 in <signal handler called> () at
2023 May 27
2
[PATCH libguestfs 2/2] Only leave/enter blocking_section when OCaml lock is not held
Fixes deadlocks on OCaml5 when trying to get the lock that is already held: Fatal error during lock: Resource deadlock avoided --- ocaml/guestfs-c.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c index 3888c9456..bcf8e6ab3 100644 --- a/ocaml/guestfs-c.c +++ b/ocaml/guestfs-c.c @@ -395,12 +395,16 @@ event_callback_wrapper
2019 Nov 18
0
[PATCH] Python: Fix GIL usage in guestfs_int_py_event_callback_wrapper (RHBZ#1773520)
All Py_* functions should be protected by the GIL. Otherwise internal python data structures can get corrupted. Move PyGILState_Ensure to the beginning of the block and PyGILState_Release to the bottom. Signed-off-by: Sam Eiderman <sameid@google.com> --- python/handle.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/python/handle.c b/python/handle.c
2023 Feb 13
3
Issue with downloading files whose path contains multi-byte utf-8 characters
On Sun, Feb 12, 2023 at 03:31:08PM +0200, Yonatan Shtarkman wrote: > Hey, > When downloading a file whose path contains multi-byte utf-8, libguestfs > sometimes crashes. > This reproduces when using python, and not when using guestfish. > > Code to reproduce: > for i in range(2000): > ? ? g.download ('/xxx?', '/tmp/1') 'i' is not used inside the
2017 Feb 14
2
[PATCH 1/2] GCC 7: Add __attribute__((noreturn)) to some usage functions which call exit.
This happens with GCC 7.0.1. The errors were all of the form: qemu-speed-test.c: In function 'main': qemu-speed-test.c:153:7: error: this statement may fall through [-Werror=implicit-fallthrough=] usage (EXIT_SUCCESS); ^~~~~~~~~~~~~~~~~~~~ qemu-speed-test.c:155:5: note: here default: ^~~~~~~ --- builder/index-validate.c | 2 +-
2016 Mar 07
2
[PATCH v2] Use less stack.
GCC has two warnings related to large stack frames. We were already using the -Wframe-larger-than warning, but this reduces the threshold from 10000 to 5000 bytes. However that warning only covers the static part of frames (not alloca). So this change also enables -Wstack-usage=10000 which covers both the static and dynamic usage (alloca and variable length arrays). Multiple changes are made
2023 Feb 14
2
[PATCH 2/2] python: Use bytes instead of str for event callback buffer
The event callback gets a buffer parameter which is usually something like a log message. However as it comes from C it is not necessarily well-formed (eg) UTF-8 but could contain any old byte sequence. In the test case provided by the reported, we failed to encode the buffer as str with this error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 137: unexpected
2015 Jun 06
7
[PATCH 0/5] Add support for thread-safe handle.
This patch isn't ready to go upstream. In fact, I think we might do a quick 1.30 release soon, and save this patch, and also the extensive changes proposed for the test suite[1], to after 1.30. Currently it is not safe to use the same handle from multiple threads, unless you implement your own mutexes. See: http://libguestfs.org/guestfs.3.html#multiple-handles-and-multiple-threads These