You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
os-autoinst/0001-t-Fix-regex-for-warnin...

33 lines
1.5 KiB

From c2a1e23ce3347359a868d287379710e603cff523 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tina=20M=C3=BCller?= <tina.mueller@suse.com>
Date: Tue, 18 Aug 2020 12:19:45 +0200
Subject: [PATCH] t: Fix regex for warning (multiline)
Apparently on some platforms/versions of qemu the error message is
multiline, so the regex needs an /s modifier.
'init_blockdev_images: 'create -f qcow2 raid/hd0 420G' failed after 2 tries: runcmd 'qemu-img create -f qcow2 raid/hd0 420G' failed with exit code 1: 'Formatting 'raid/hd0', fmt=qcow2 cluster_size=65536 compression_type=zlib size=450971566080 lazy_refcounts=off refcount_bits=16
qemu-img: raid/hd0: Could not create file: No such file or directory' at /home/abuild/rpmbuild/BUILD/os-autoinst-4.6.1597406683.45b10929/osutils.pm line 121.
Issue: https://progress.opensuse.org/issues/70120
---
t/18-qemu.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/18-qemu.t b/t/18-qemu.t
index dbaab45b..bee6dda4 100755
--- a/t/18-qemu.t
+++ b/t/18-qemu.t
@@ -153,7 +153,7 @@ $proc->deserialise_state(path($path)->slurp());
is_deeply(\@gcmdl, \@cmdl, 'Multipath Command line after serialisation and deserialisation');
$ENV{QEMU_IMG_CREATE_TRIES} = 2;
-my $expected = qr/failed after 2 tries.*No such.*directory/;
+my $expected = qr/failed after 2 tries.*No such.*directory/s;
my @warnings = warnings {
like exception { $proc->init_blockdev_images() }, $expected, 'init_blockdev_images can report error';
};
--
2.28.0