]> git.proxmox.com Git - qemu-server.git/blobdiff - test/run_config2command_tests.pl
remove left-over mentions of to-be-dropped, outdated QMP commands
[qemu-server.git] / test / run_config2command_tests.pl
index 341709705d7e064080efbe1c2fdf275174b1105d..c49669028033a7030efbc01f7c156a63c28a0564 100755 (executable)
@@ -30,6 +30,13 @@ my $base_env = {
                type => 'dir',
                shared => 0,
            },
+           'btrfs-store' => {
+               content => {
+                   images => 1,
+               },
+               path => '/butter/bread',
+               type => 'btrfs',
+           },
            'cifs-store' => {
                shared => 1,
                path => '/mnt/pve/cifs-store',
@@ -43,6 +50,7 @@ my $base_env = {
            },
            'rbd-store' => {
                monhost => '127.0.0.42,127.0.0.21,::1',
+               fsid => 'fc4181a6-56eb-4f68-b452-8ba1f381ca2a',
                content => {
                    images => 1
                },
@@ -170,6 +178,21 @@ $qemu_server_config->mock(
     },
 );
 
+my $qemu_server_memory;
+$qemu_server_memory = Test::MockModule->new('PVE::QemuServer::Memory');
+$qemu_server_memory->mock(
+    hugepages_chunk_size_supported => sub {
+       return 1;
+    },
+    host_numanode_exists => sub {
+       my ($id) = @_;
+       return 1;
+    },
+    get_host_phys_address_bits => sub {
+       return 46;
+    }
+);
+
 my $pve_common_tools;
 $pve_common_tools = Test::MockModule->new('PVE::Tools');
 $pve_common_tools->mock(
@@ -288,7 +311,7 @@ sub diff($$) {
     my $ha = IO::Handle->new_from_fd($wa, 'w');
     my $hb = IO::Handle->new_from_fd($wb, 'w');
 
-    open my $diffproc, '-|', 'diff', '-up', "/proc/self/fd/$ra", "/proc/self/fd/$rb"
+    open my $diffproc, '-|', 'diff', '-up', "/proc/self/fd/$ra", "/proc/self/fd/$rb" ## no critic
        or die "failed to run program 'diff': $!";
     POSIX::close($ra);
     POSIX::close($rb);
@@ -401,7 +424,7 @@ print "testing config to command stabillity\n";
 if (my $file = shift) {
     do_test $file;
 } else {
-    foreach my $file (<cfg2cmd/*.conf>) {
+    while (my $file = <cfg2cmd/*.conf>) {
        do_test $file;
     }
 }