On Tue, Jun 30, 2015 at 05:45:14PM +0800, Chen Hanxiao wrote:
"my" variable $output masks earlier declaration in same
scope at /home/libguestfs/tests/daemon/test-btrfs.pl line 66.
"my" variable @r masks earlier declaration in same scope at
/home/libguestfs/tests/daemon/test-btrfs.pl line 72.
Also remove some redundant whitespace.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
tests/daemon/test-btrfs.pl | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/daemon/test-btrfs.pl b/tests/daemon/test-btrfs.pl
index 815ab1d..1430231 100755
--- a/tests/daemon/test-btrfs.pl
+++ b/tests/daemon/test-btrfs.pl
@@ -63,13 +63,13 @@ EOF
die unless $r[2]->{btrfssubvolume_path} eq "test3";
# Test btrfs_qgroup_show.
- my $output = <<EOF;
-qgroupid rfer excl
--------- ---- ----
-0/5 4096 4096
+ $output = <<EOF;
+qgroupid rfer excl
+-------- ---- ----
+0/5 4096 4096
EOF
set_btrfs_output ($output);
- my @r = $g->btrfs_qgroup_show ("/");
+ @r = $g->btrfs_qgroup_show ("/");
die unless @r == 1;
die unless $r[0]->{btrfsqgroup_id} == "0/5";
die unless $r[0]->{btrfsqgroup_rfer} == 4096;
Partial ACK. The whitespace is actually included in the output of the
real btrfs command, so I wanted to check the btrfs code in the daemon
could parse it.
I will push a modified patch shortly.
Thanks,
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/