[Libguestfs] [PATCH 2/3] perl: silence usage of add_cdrom in test

Pino Toscano ptoscano at redhat.com
Wed Apr 24 13:32:28 UTC 2019


One test explicitly tests add_cdrom, so silence the deprecation warning
only for that function.
---
 perl/t/060-handle-properties.t | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/perl/t/060-handle-properties.t b/perl/t/060-handle-properties.t
index 6b1ee4242..8df6a68c3 100644
--- a/perl/t/060-handle-properties.t
+++ b/perl/t/060-handle-properties.t
@@ -40,5 +40,8 @@ ok ($g->get_path () ne "", "path is empty");
 
 $g->add_drive ("/dev/null");
 ok (1, "add drive");
-$g->add_cdrom ("/dev/zero");
-ok (1, "add cdrom");
+do {
+  no warnings 'deprecated';
+  $g->add_cdrom ("/dev/zero");
+  ok (1, "add cdrom");
+}
-- 
2.20.1




More information about the Libguestfs mailing list