[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 07/10] bindtests: Add a test for RBufferOut



Fixup the existing test, and add an entry in actions so it's actually generated.
---
 generator/generator_actions.ml   |    1 +
 generator/generator_bindtests.ml |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml
index d2e9f67..3d8cc4b 100644
--- a/generator/generator_actions.ml
+++ b/generator/generator_actions.ml
@@ -55,6 +55,7 @@ let test_all_rets = [
   "test0rstruct",      RStruct ("valout", "lvm_pv");
   "test0rstructlist",  RStructList ("valout", "lvm_pv");
   "test0rhashtable",   RHashtable "valout";
+  "test0rbufferout",   RBufferOut "valout";
 ]
 
 let test_functions = [
diff --git a/generator/generator_bindtests.ml b/generator/generator_bindtests.ml
index 9a87c72..e64afff 100644
--- a/generator/generator_bindtests.ml
+++ b/generator/generator_bindtests.ml
@@ -181,6 +181,7 @@ print_strings (char *const *argv)
              pr "  strs[n*2] = NULL;\n";
              pr "  return strs;\n"
          | RBufferOut _ ->
+             pr "  *size_r = strlen (val);\n";
              pr "  return strdup (val);\n"
         );
         pr "}\n";
-- 
1.7.7.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]