[Libguestfs] [PATCH nbdkit 2/6] tests/test_ocaml_plugin.ml: Print a message when test plugin initializes

Richard W.M. Jones rjones at redhat.com
Wed Jun 21 21:08:53 UTC 2023


It's useful to have a message which is printed as the top level
statements in the plugin module are being initialized, for debugging
purposes.
---
 tests/test_ocaml_plugin.ml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/test_ocaml_plugin.ml b/tests/test_ocaml_plugin.ml
index 561a8690f..f8eed4f7f 100644
--- a/tests/test_ocaml_plugin.ml
+++ b/tests/test_ocaml_plugin.ml
@@ -30,6 +30,11 @@
  * SUCH DAMAGE.
  *)
 
+(* Print something during module initialization, useful for debugging
+ * obscure OCaml startup issues.
+ *)
+let () = Printf.eprintf "test_ocaml_plugin.ml: module initializing\n%!"
+
 let sector_size = 512
 let nr_sectors = 2048
 
-- 
2.41.0



More information about the Libguestfs mailing list