qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 3/3] tests/migration:fix unreachable path in stress


From: Mao Zhongyi
Subject: [Qemu-devel] [PATCH 3/3] tests/migration:fix unreachable path in stress test
Date: Tue, 10 Sep 2019 20:09:27 +0800

if stress function always return 0, the path
'if (stress(ramsizeGB, ncpus) < 0)' is nerver unreachable,
so fix it to allow the test failed.

Cc: address@hidden
Cc: address@hidden
Cc: address@hidden

Signed-off-by: Mao Zhongyi <address@hidden>
---
 tests/migration/stress.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/migration/stress.c b/tests/migration/stress.c
index 4bc3a249e6..36f7d71d37 100644
--- a/tests/migration/stress.c
+++ b/tests/migration/stress.c
@@ -232,6 +232,8 @@ static int stressone(unsigned long long ramsizeMB)
 
     free(data);
     free(ram);
+
+    return 0;
 }
 
 
@@ -256,9 +258,7 @@ static int stress(unsigned long long ramsizeGB, int ncpus)
                        stressthread,   &ramsizeMB);
     }
 
-    stressone(ramsizeMB);
-
-    return 0;
+    return stressone(ramsizeMB);
 }
 
 
-- 
2.17.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]