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

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



On Fri, Jan 20, 2012 at 11:07:50AM +0000, Matthew Booth wrote:
> 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

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v


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