search for: test_pread

Displaying 6 results from an estimated 6 matches for "test_pread".

2019 Apr 23
0
[PATCH nbdkit v2 1/2] ocaml: Change pread method to avoid leaking heap memory.
...t; flags -> unit) option; diff --git a/tests/test_ocaml_plugin.ml b/tests/test_ocaml_plugin.ml index 842f10e..f27c099 100644 --- a/tests/test_ocaml_plugin.ml +++ b/tests/test_ocaml_plugin.ml @@ -28,9 +28,11 @@ let test_close h = let test_get_size h = Int64.of_int (Bytes.length h.disk) -let test_pread h buf offset _ = - let len = Bytes.length buf in - Bytes.blit h.disk (Int64.to_int offset) buf 0 len +let test_pread h count offset _ = + let count = Int32.to_int count in + let buf = Bytes.create count in + Bytes.blit h.disk (Int64.to_int offset) buf 0 count; + Bytes.unsafe_to_string buf...
2019 Apr 23
4
[PATCH nbdkit v2 0/2] Be careful not to leak server heap memory to the client.
Version 1 was here: https://www.redhat.com/archives/libguestfs/2019-April/msg00144.html Version 2 makes a couple of much larger changes: The OCaml patch changes the API of the pread method so it matches what other language bindings are already doing, ie. get the language plugin to return a newly allocated buffer, check it is long enough, copy out the data. The server patch implements a
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...> + #def test_can_extents_false (self): > + # self.h.add_meta_context ("base:allocation") > + # self.connect ({"size": 512, "can_extents": False}) > + # assert not self.h.can_meta_context ("base:allocation") > > def test_pread (self): > """Test pread.""" > @@ -220,3 +232,60 @@ class Test (unittest.TestCase): > """Test cache.""" > self.connect ({"size": 512, "can_cache": "native"}) >...
2020 Aug 10
5
[PATCH nbdkit] python: Implement can_extents + extents.
...se:allocation") + # + #def test_can_extents_false (self): + # self.h.add_meta_context ("base:allocation") + # self.connect ({"size": 512, "can_extents": False}) + # assert not self.h.can_meta_context ("base:allocation") def test_pread (self): """Test pread.""" @@ -220,3 +232,60 @@ class Test (unittest.TestCase): """Test cache.""" self.connect ({"size": 512, "can_cache": "native"}) self.h.cache (512, 0) +...
2019 Nov 25
3
[PATCH nbdkit 0/2] python: Implement pread passing buffer for v2 API.
As suggested by Nir, here: https://www.redhat.com/archives/libguestfs/2019-November/thread.html#00220
2020 Feb 10
17
Cross-project NBD extension proposal: NBD_INFO_INIT_STATE
I will be following up to this email with four separate threads each addressed to the appropriate single list, with proposed changes to: - the NBD protocol - qemu: both server and client - libnbd: client - nbdkit: server The feature in question adds a new optional NBD_INFO_ packet to the NBD_OPT_GO portion of handshake, adding up to 16 bits of information that the server can advertise to the