Displaying 20 results from an estimated 20000 matches similar to: "Re: Go bindings for libnbd"
2020 Mar 17
0
[PATCH libnbd] Add outline framework for Go language bindings (golang).
This simply compiles, passes tests, but is only able open a handle.
This commit does not contain the full bindings.
---
Makefile.am | 2 +
configure.ac | 32 +++++
generator/GoLang.ml | 116 ++++++++++++++++++
generator/GoLang.mli | 19 +++
generator/Makefile.am
2020 Mar 25
1
Re: [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
On Wed, Mar 25, 2020 at 10:14:30AM +0000, Daniel P. Berrangé wrote:
> On Wed, Mar 25, 2020 at 10:01:02AM +0000, Richard W.M. Jones wrote:
> > On Wed, Mar 25, 2020 at 09:48:02AM +0000, Daniel P. Berrangé wrote:
> > > On Wed, Mar 25, 2020 at 09:42:19AM +0000, Richard W.M. Jones wrote:
> > > > Now runs a complete set of tests, notably including the AIO test.
> >
2020 Mar 17
0
[PATCH libnbd v2 2/3] Add outline framework for Go language bindings (golang).
This simply compiles, passes tests, but is only able open a handle.
This commit does not contain the full bindings.
---
Makefile.am | 2 +
configure.ac | 32 ++++
generator/GoLang.ml | 150 ++++++++++++++++++
generator/GoLang.mli | 19 +++
generator/Makefile.am
2020 Mar 25
0
Re: [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
On Wed, Mar 25, 2020 at 09:42:19AM +0000, Richard W.M. Jones wrote:
> Now runs a complete set of tests, notably including the AIO test.
>
> File descriptors are passed in and out as plain ints (instead of
> *os.File) for a couple of reasons: (1) We have to pass the plain int
> to syscall.Select. (2) Turning an fd into an os.File causes golang to
> set the blocking flag which is
2020 Mar 25
0
Re: [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
On Wed, Mar 25, 2020 at 10:01:02AM +0000, Richard W.M. Jones wrote:
> On Wed, Mar 25, 2020 at 09:48:02AM +0000, Daniel P. Berrangé wrote:
> > On Wed, Mar 25, 2020 at 09:42:19AM +0000, Richard W.M. Jones wrote:
> > > Now runs a complete set of tests, notably including the AIO test.
> > >
> > > File descriptors are passed in and out as plain ints (instead of
>
2020 Mar 25
2
Re: [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
On Wed, Mar 25, 2020 at 09:48:02AM +0000, Daniel P. Berrangé wrote:
> On Wed, Mar 25, 2020 at 09:42:19AM +0000, Richard W.M. Jones wrote:
> > Now runs a complete set of tests, notably including the AIO test.
> >
> > File descriptors are passed in and out as plain ints (instead of
> > *os.File) for a couple of reasons: (1) We have to pass the plain int
> > to
2023 Aug 04
1
[libnbd PATCH] golang: Optionally use gofmt on generated .go files
Combine my recent work on improving the generated Go output with
Tage's work on using a canonical formatter for Rust. If gofmt is
available during the build, then the generated .go files will now use
TAB indents and have proper columnar alignment; if it is not
available, the project still compiles.
Signed-off-by: Eric Blake <eblake at redhat.com>
---
Followup to this earlier series:
2023 Aug 11
2
[libnbd PATCH] golang: Bump minimum Go version to 1.17
Go 1.17 or newer is required to use unsafe.Slice(), which in turn
allows us to write a simpler conversion from a C array to a Go object
during callbacks.
To check if this makes sense, look at
https://repology.org/project/go/versions compared to our list in
ci/manifest.yml, at the time I made this commit:
Alpine 3.15: 1.17.10
AlmaLinux 8: 1.19.10
CentOS Stream 8: 1.20.4
Debian 10: 1.11.6
Debian
2020 Mar 17
0
[PATCH libnbd v2 3/3] golang: Add straightforward bindings, without callbacks.
---
generator/GoLang.ml | 336 +++++++++++++++++-
.../libnbd/libnbd_200_connect_command_test.go | 35 ++
2 files changed, 367 insertions(+), 4 deletions(-)
diff --git a/generator/GoLang.ml b/generator/GoLang.ml
index 1b8f20b..e5fb97c 100644
--- a/generator/GoLang.ml
+++ b/generator/GoLang.ml
@@ -23,6 +23,304 @@ open Printf
open API
open Utils
+let go_name_of_arg =
2020 Oct 17
2
Re: Build failure of libnbd
On Sat, Oct 17, 2020 at 09:00:30AM +0100, Richard W.M. Jones wrote:
>On Sat, Oct 17, 2020 at 08:48:40AM +0100, Richard W.M. Jones wrote:
>> [Adding libguestfs mailing list]
>>
>> I reproduced it locally - the difference was installing "gcc-go".
>> I only had golang-bin installed previously. With gcc-go installed:
>>
>> ../run go install
2020 Sep 11
0
[libnbd PATCH v2 1/5] api: Add xxx_MASK constant for each Flags type
Document and make it easier for applications to determine which
bitmask values were supported at compile time. Also, generating
bitmask values in hex tends to be more legible than in decimal, as it
makes it obvious that the values are intended for bitwise operations.
And it doesn't hurt that this reduces churn in some of the tests if
new bits are added.
---
docs/libnbd.pod
2020 Oct 17
0
Re: Build failure of libnbd
On Sat, Oct 17, 2020 at 10:48:13PM +0200, Martin Kletzander wrote:
> The list of packages is something I will have to go through anyway,
> for not it is just a list taken from libvirt CI container with bunch
> of things added for libnbd.
Ideally it should be driven from ”dnf builddep libnbd”, directly or
indirectly. For golang ...
> The ultimate goal with this is to have
>
2020 Oct 17
2
Re: Build failure of libnbd
On Sat, Oct 17, 2020 at 10:08:26PM +0100, Richard W.M. Jones wrote:
>On Sat, Oct 17, 2020 at 10:48:13PM +0200, Martin Kletzander wrote:
>> The list of packages is something I will have to go through anyway,
>> for not it is just a list taken from libvirt CI container with bunch
>> of things added for libnbd.
>
>Ideally it should be driven from ”dnf builddep libnbd”,
2020 Sep 06
0
[libnbd PATCH 2/3] golang: Typesafe returns for REnum/RFlags
Now that we have a distinct branch in the generator when returning an
enum or bitmask that cannot fail, we can use it in Golang for
symmetry, so that the result of a get function can be plugged into a
set function without a trip through other types.
---
generator/GoLang.ml | 12 ++++++------
.../libnbd/libnbd_110_defaults_test.go | 6 +++---
2020 Sep 07
0
Re: [libnbd PATCH 0/3] Improve type-safety of ocaml/golang getters
On Sat, Sep 05, 2020 at 08:40:57PM -0500, Eric Blake wrote:
> Natural fallout after my recent testsuite additions that fixed a
> couple of ocaml bugs in the setters. However, on at least the OCaml
> code, I'm not sure what we should do if a newer libnbd ever returns a
> bit that an older NBD.mli was not expecting at the time the OCaml
> compiler ran (see below). I'm also
2020 Oct 17
0
Re: Build failure of libnbd
On Sat, Oct 17, 2020 at 08:48:40AM +0100, Richard W.M. Jones wrote:
> [Adding libguestfs mailing list]
>
> I reproduced it locally - the difference was installing "gcc-go".
> I only had golang-bin installed previously. With gcc-go installed:
>
> ../run go install libguestfs.org/libnbd
> write of Go pointer 0xc000016060 to non-Go memory 0x7f5fe8297390
>
2020 Mar 24
1
[PATCH libnbd v3] Add Go language bindings (golang) (RHBZ#1814538).
This feature is roughly finished now, although it needs a few more
tests and some examples.
It's pretty much up to par with all the other bindings, but it lacks a
completely safe AIO buffer. It won't stop you from freeing the buffer
too early) because golang's GC inexplicably lacks a way to declare a
root from C. I can probably do it with a global variable and ref
counting on the
2023 Aug 08
1
[libnbd PATCH v4 05/25] golang: Change logic of copy_uint32_array
On Tue, Aug 08, 2023 at 02:36:12PM +0300, Nir Soffer wrote:
> On Thu, Aug 3, 2023 at 4:57?AM Eric Blake <eblake at redhat.com> wrote:
> > func copy_uint32_array(entries *C.uint32_t, count C.size_t) []uint32 {
> > + if (uint64(count) > 64*1024*1024) {
> > + panic(\"violation of state machine guarantee\")
>
> This is unwanted in a library, it
2023 Aug 03
2
[libnbd PATCH v4 05/25] golang: Change logic of copy_uint32_array
Commit 6725fa0e12 changed copy_uint32_array() to utilize a Go hack for
accessing a C array as a Go slice in order to potentially benefit from
any optimizations in Go's copy() for bulk transfer of memory over
naive one-at-a-time iteration. But that commit also acknowledged that
no benchmark timings were performed, which would have been useful to
demonstrat an actual benefit for using hack in
2018 Sep 11
1
Running libvirtd outside of a shell results in qemu defunct processes
Hi,
In KubeVirt we are right now starting libvirt via a wrapper shell
script. I want to remove that wrapper and directly start libvirtd from
our golang code. This means that our golang code is PID 1 in the
container and we start libvirtd as a fork from there.
When I did this, strange things started to happen. Libvirt was still
able to start and manage qemu processes, but stopping the qemu