View | Details | Raw Unified | Return to bug 247293
Collapse All | Expand All

(-)benchmarks/unixbench/files/patch-Run (-6 / +25 lines)
Lines 1-4 Link Here
1
--- Run.orig	2017-09-04 20:35:19 UTC
1
--- Run.orig	2020-06-11 08:18:10 UTC
2
+++ Run
2
+++ Run
3
@@ -91,10 +91,10 @@ chomp($BASEDIR);
3
@@ -91,10 +91,10 @@ chomp($BASEDIR);
4
 my $BINDIR = getDir('UB_BINDIR', $BASEDIR . "/pgms");
4
 my $BINDIR = getDir('UB_BINDIR', $BASEDIR . "/pgms");
Lines 13-20 Link Here
13
 
13
 
14
 # Directory where the tests are executed.
14
 # Directory where the tests are executed.
15
 my $TESTDIR = getDir('UB_TESTDIR', $BASEDIR . "/testdir");
15
 my $TESTDIR = getDir('UB_TESTDIR', $BASEDIR . "/testdir");
16
@@ -735,12 +735,10 @@ sub getSystemInfo {
16
@@ -672,6 +672,18 @@ sub processCpuFlags {
17
 # these fields:
18
 # describing the model etc.  Returns undef if the information can't be got.
19
 sub getCpuInfo {
20
+    my $ncpu = getCmdOutput("sysctl -n hw.ncpu");
21
+    my $cpus = [ ];
22
+    my $i;
23
+    for ($i=0;$i<$ncpu;$i++) {
24
+       $cpus->[$i]{'model'} = getCmdOutput("sysctl -n hw.model");
25
+       $cpus->[$i]{'bogo'} = 0;
26
+       $cpus->[$i]{'flags'} = getCmdOutput("sysctl -n hw.machine");
27
+    }
28
+    $cpus;
29
+}
30
+
31
+sub getCpuInfoBak {
32
     open(my $fd, "<", "/proc/cpuinfo") || return undef;
17
 
33
 
34
     my $cpus = [ ];
35
@@ -735,12 +747,10 @@ sub getSystemInfo {
36
 
18
     # Get the language info.
37
     # Get the language info.
19
     my $lang = getCmdOutput("printenv LANG");
38
     my $lang = getCmdOutput("printenv LANG");
20
-    my $map = getCmdOutput("locale -k LC_CTYPE | grep charmap");
39
-    my $map = getCmdOutput("locale -k LC_CTYPE | grep charmap");
Lines 29-35 Link Here
29
 
48
 
30
     # Get details on the CPUs, if possible.
49
     # Get details on the CPUs, if possible.
31
     my $cpus = getCpuInfo();
50
     my $cpus = getCpuInfo();
32
@@ -750,10 +748,9 @@ sub getSystemInfo {
51
@@ -750,10 +760,9 @@ sub getSystemInfo {
33
     }
52
     }
34
 
53
 
35
     # Get graphics hardware info.
54
     # Get graphics hardware info.
Lines 41-47 Link Here
41
     $info->{'load'} = getCmdOutput("uptime");
60
     $info->{'load'} = getCmdOutput("uptime");
42
     $info->{'numUsers'} = getCmdOutput("who | wc -l");
61
     $info->{'numUsers'} = getCmdOutput("who | wc -l");
43
 
62
 
44
@@ -781,6 +778,7 @@ sub abortRun {
63
@@ -781,6 +790,7 @@ sub abortRun {
45
 
64
 
46
 # Do checks that everything's ready for testing.
65
 # Do checks that everything's ready for testing.
47
 sub preChecks {
66
 sub preChecks {
Lines 49-55 Link Here
49
     # Set the language.
68
     # Set the language.
50
     $ENV{'LANG'} = $language;
69
     $ENV{'LANG'} = $language;
51
 
70
 
52
@@ -1386,7 +1384,7 @@ sub displaySystem {
71
@@ -1386,7 +1396,7 @@ sub displaySystem {
53
     }
72
     }
54
 
73
 
55
     # Display system load and usage info.
74
     # Display system load and usage info.
Lines 58-64 Link Here
58
 }
77
 }
59
 
78
 
60
 
79
 
61
@@ -1603,8 +1601,8 @@ sub displaySystemHtml {
80
@@ -1603,8 +1613,8 @@ sub displaySystemHtml {
62
     # Display system runlevel, load and usage info.
81
     # Display system runlevel, load and usage info.
63
     printf $fd "<tr>\n";
82
     printf $fd "<tr>\n";
64
     printf $fd "   <td><b>Uptime:</b></td>\n";
83
     printf $fd "   <td><b>Uptime:</b></td>\n";

Return to bug 247293