On Wed, Aug 14, 2019 at 01:54:34PM -0500, Eric Blake wrote:
let callback user_data err = - if user_data <= 43 then + if fst user_data = 42 then assert (!err = 0) else assert (!err = 100); err := 101; - assert (user_data = 42); + assert (snd user_data = 42);
Actually I think this change is wrong? It seems to need this I think. Rich. diff --git a/ocaml/tests/test_505_aio_pread_structured_callback.ml b/ocaml/tests/test_505_aio_pread_structured_callback.ml index 5474b2e..fed493d 100644 --- a/ocaml/tests/test_505_aio_pread_structured_callback.ml +++ b/ocaml/tests/test_505_aio_pread_structured_callback.ml @@ -50,7 +50,8 @@ let callback user_data err = else assert (!err = 100); err := 101; - assert (snd user_data = 42); + if snd user_data <> 42 then + invalid_arg "this should be turned into NBD.Error"; 0 let () = -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/