[pve-devel] [PATCH qemu-server 8/12] test: mock log_warn warnings

Daniel Herzig d.herzig at proxmox.com
Fri Oct 25 17:02:39 CEST 2024


Strip log_warn wrapper for catching warnings on testruns.

Signed-off-by: Daniel Herzig <d.herzig at proxmox.com>
---
 test/run_config2command_tests.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl
index 3414eea7..dd6717e2 100755
--- a/test/run_config2command_tests.pl
+++ b/test/run_config2command_tests.pl
@@ -214,6 +214,10 @@ $qemu_server_module->mock(
 	my $file_path = shift;
 	return 1 if !($file_path =~ m|I_DO_NOT_EXIST|);
     },
+    log_warn => sub {
+	my $logwarn = shift;
+	return warn("${logwarn}\n");
+    },
 );
 
 my $qemu_server_config;
-- 
2.39.5





More information about the pve-devel mailing list