File 5621-megaco-test-Host-analyze-tweaking.patch of Package erlang

From af39906f4de921036aa9c14f94e7e6fc78e630f8 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Wed, 22 Apr 2020 16:49:00 +0200
Subject: [PATCH 1/5] [megaco|test] Host analyze tweaking

---
 lib/megaco/test/megaco_test_lib.erl | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/megaco/test/megaco_test_lib.erl b/lib/megaco/test/megaco_test_lib.erl
index fcd8d6432b..f5bd0e3e06 100644
--- a/lib/megaco/test/megaco_test_lib.erl
+++ b/lib/megaco/test/megaco_test_lib.erl
@@ -750,8 +750,12 @@ linux_cpuinfo_bogomips() ->
 
 linux_cpuinfo_total_bogomips() ->
     case linux_cpuinfo_lookup("total bogomips") of
-        [TMB] ->
-            TMB;
+        [TBM] ->
+            try bogomips_to_int(TBM)
+            catch
+                _:_:_ ->
+                    "-"
+            end;
         _ ->
             "-"
     end.
-- 
2.26.1

openSUSE Build Service is sponsored by