From: Amos Kong <[email protected]>

utils.compare_versions returns -1 if v1 < v2.
This fix the same issue as commit d6a646bf35390bc1b98b57596b1f6b7da00c7e19

Signed-off-by: Amos Kong <[email protected]>
---
 client/bin/base_utils.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/client/bin/base_utils.py b/client/bin/base_utils.py
index 29797e6..cf8aed3 100644
--- a/client/bin/base_utils.py
+++ b/client/bin/base_utils.py
@@ -524,9 +524,9 @@ def cpu_online_map():
 def check_glibc_ver(ver):
     glibc_ver = commands.getoutput('ldd --version').splitlines()[0]
     glibc_ver = re.search(r'(\d+\.\d+(\.\d+)?)', glibc_ver).group()
-    if utils.compare_versions(glibc_ver, ver) == 1:
-        raise error.TestError("Glibc too old (%s). Glibc >= %s is needed." % \
-                                                (glibc_ver, ver))
+    if utils.compare_versions(glibc_ver, ver) == -1:
+        raise error.TestError("Glibc too old (%s). Glibc >= %s is needed." %
+                              (glibc_ver, ver))
 
 def check_kernel_ver(ver):
     kernel_ver = utils.system_output('uname -r')
-- 
1.7.0.4

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to