[libvirt PATCH 1/2] vircgroupmock: fix cgroup v1 mocking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The `legacy` mode is also valid so we need to take it into account as
well.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 tests/vircgroupmock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c
index 8a0e3aec0f..777d60b152 100644
--- a/tests/vircgroupmock.c
+++ b/tests/vircgroupmock.c
@@ -317,7 +317,7 @@ static int make_controller(const char *path, mode_t mode)
             unified = true;
         } else if (STREQ(mock, "hybrid")) {
             hybrid = true;
-        } else {
+        } else if (STRNEQ(mock, "legacy")) {
             fprintf(stderr, "invalid mode '%s'\n", mock);
             abort();
         }
@@ -355,7 +355,7 @@ static void init_sysfs(void)
             unified = true;
         } else if (STREQ(mock, "hybrid")) {
             hybrid = true;
-        } else {
+        } else if (STRNEQ(mock, "legacy")) {
             fprintf(stderr, "invalid mode '%s'\n", mock);
             abort();
         }
-- 
2.37.3




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux