On 10/1/18 2:07 PM, Laine Stump wrote:
Commit 3836a38c added a $secret-undefine call at the end of
100-disk-encryption.t because the presence of the secret was
reportedly causing an error when the test was run a 2nd
time. Unfortunately the definition of "my $secret" was inside a SKIP:
{ ... } block, but the $secret->undefine was added just outside that
block, so the test failed when it was run.
Signed-off-by: Laine Stump <laine(a)laine.org>
---
NB: this test is disabled unconditionally at the start of the SKIP
block anyway, so I'm not sure how Jim encountered the error leading to
the original patch.
Grrrr, because I have an old, downstream patch that tweaked this test and it
wasn't rebased properly. FYI the relevant hunks look like this
--- Sys-Virt-TCK-v1.0.0.orig/scripts/qemu/100-disk-encryption.t
+++ Sys-Virt-TCK-v1.0.0/scripts/qemu/100-disk-encryption.t
@@ -29,7 +29,7 @@ configuration enabling it to be tracked
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More;
use Sys::Virt::TCK;
use Test::Exception;
@@ -40,9 +40,12 @@ my $conn = eval { $tck->setup(); };
BAIL_OUT "failed to setup test harness: $@" if $@;
END { $tck->cleanup if $tck; }
-SKIP: {
- skip "Only relevant to QEMU driver", 8 unless $conn->get_type() eq
"QEMU";
- skip "Libvirt LUKS support isn't ready", 8;
+if ( $conn->get_type() ne "QEMU") {
+ $tck->cleanup if $tck;
+ eval "use Test::More skip_all => \"Only relevant to QEMU
driver\";";
+} else {
+ eval "use Test::More tests => 8";
+}
my $dir = $tck->bucket_dir("300-disk-encryption");
my $disk = catfile($dir, "demo.qcow2");
So in my setup the test was being run. And sadly there is yet another patch that
changes the test to use raw format for luks encryption, which I suppose makes
the test pass :-/. I've slowly been upstreaming or dropping these types of
downstream hacks. Sorry for letting them get in the way of "fixing" this test.
Regards,
Jim