[Pkg-libvirt-commits] [libguestfs] 247/384: perl: tests: reenable set_path tests

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 16:57:34 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 668c4784a999a9625debeb854e479a60d7228d68
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Thu Feb 5 18:18:30 2015 +0100

    perl: tests: reenable set_path tests
    
    guestfs_set_path now does a copy of the passed string, so bindings don't
    need to take care of the lifetime of strings parameters for it.
---
 perl/t/060-handle-properties.t | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/perl/t/060-handle-properties.t b/perl/t/060-handle-properties.t
index 0057503..6b1ee42 100644
--- a/perl/t/060-handle-properties.t
+++ b/perl/t/060-handle-properties.t
@@ -17,7 +17,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 7;
+use Test::More tests => 9;
 
 use Sys::Guestfs;
 
@@ -33,13 +33,10 @@ ok ($g->get_autosync () == 1, "autosync not true");
 $g->set_autosync (0);
 ok ($g->get_autosync () == 0, "autosync not false");
 
-# This probably doesn't work at the moment because
-# the binding for set_path does not ensure the string
-# remains around for the lifetime of the handle.
-#$g->set_path (".");
-#ok ($g->get_path () eq ".", "path not dot");
-#$g->set_path (undef);
-#ok ($g->get_path () ne "", "path is empty");
+$g->set_path (".");
+ok ($g->get_path () eq ".", "path not dot");
+$g->set_path (undef);
+ok ($g->get_path () ne "", "path is empty");
 
 $g->add_drive ("/dev/null");
 ok (1, "add drive");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list