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

Re: [Libguestfs] [PATCH] Compute MD5 of COPYING.LIB used in upload and download tests



On Wed, Aug 05, 2009 at 11:34:45PM +0100, Matthew Booth wrote:
> As suggested by rjones.
> ---
>  src/generator.ml |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/generator.ml b/src/generator.ml
> index 94dc268..7ac4ac8 100755
> --- a/src/generator.ml
> +++ b/src/generator.ml
> @@ -1756,7 +1756,8 @@ This uses the L<blockdev(8)> command.");
>     [InitBasicFS, Always, TestOutput (
>        (* Pick a file from cwd which isn't likely to change. *)
>        [["upload"; "../COPYING.LIB"; "/COPYING.LIB"];
> -       ["checksum"; "md5"; "/COPYING.LIB"]], "e3eda01d9815f8d24aae2dbd89b68b06")],
> +       ["checksum"; "md5"; "/COPYING.LIB"]],
> +        Digest.to_hex (Digest.file "COPYING.LIB"))],
>     "upload a file from the local machine",
>     "\
>  Upload local file C<filename> to C<remotefilename> on the
> @@ -1772,7 +1773,8 @@ See also C<guestfs_download>.");
>        [["upload"; "../COPYING.LIB"; "/COPYING.LIB"];
>         ["download"; "/COPYING.LIB"; "testdownload.tmp"];
>         ["upload"; "testdownload.tmp"; "/upload"];
> -       ["checksum"; "md5"; "/upload"]], "e3eda01d9815f8d24aae2dbd89b68b06")],
> +       ["checksum"; "md5"; "/upload"]],
> +        Digest.to_hex (Digest.file "COPYING.LIB"))],
>     "download a file to the local machine",
>     "\
>  Download file C<remotefilename> and save it as C<filename>

It seems like this should work.  If it passes the C API tests, then
commit it.

Please put RHBZ#1234 somewhere prominently in the commit message, so
that I remember to add that bug to the Bodhi update during the next
release.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


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