Skip to contentSkip to conversation

tests: lscpu: add CPU max MHz to test results

PATCH Applied Sami Kerola 2 participants 4 messages Sep 10, 2013 – Sep 12, 2013 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tests: lscpu: add CPU max MHz to test results

Commit 44320710bdb98a3036e8297d0e0af043fb72d702 changed default output.

---
 tests/expected/lscpu/lscpu-armv7             | 1 +
 tests/expected/lscpu/lscpu-x86_64-64cpu      | 1 +
 tests/expected/lscpu/lscpu-x86_64-dell_e4310 | 1 +
 3 files changed, 3 insertions(+)
tests/expected/lscpu/lscpu-armv7 +1 -0
index a1b691c..373e115 100644
@@ -3,6 +3,7 @@ On-line CPU(s) list:   0,1
 Thread(s) per core:    1
 Core(s) per socket:    2
 Socket(s):             1
+CPU max MHz:           1700.0000
 
 # The following is the parsable format, which can be fed to other
 # programs. Each different item in every column has an unique ID
tests/expected/lscpu/lscpu-x86_64-64cpu +1 -0
index 45890b5..db625cf 100644
@@ -11,6 +11,7 @@ Model:                 46
 Model name:            Intel(R) Xeon(R) CPU           X7550  @ 2.00GHz
 Stepping:              6
 CPU MHz:               1064.000
+CPU max MHz:           1996.0000
 BogoMIPS:              3989.44
 Virtualization:        VT-x
 L1d cache:             32K
tests/expected/lscpu/lscpu-x86_64-dell_e4310 +1 -0
index a81878d..2506c9b 100644
@@ -11,6 +11,7 @@ Model:                 37
 Model name:            Intel(R) Core(TM) i5 CPU       M 560  @ 2.67GHz
 Stepping:              5
 CPU MHz:               1199.000
+CPU max MHz:           2667.0000
 BogoMIPS:              5319.97
 Virtualization:        VT-x
 L1d cache:             32K
Signature · 1 line
1.8.4
#1 lore raw

PATCH 2/2 rev: fix new line regression

Commit 4b4eb34004378fe70259acd8f2f859e7b5cc3726 made output incorrect for input lines that does not have new line. For example

$ printf "a b c\n1 2 3" | rev
c b a
 2 13
---
 text-utils/rev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
text-utils/rev.c +3 -1
index 85e1630..f1341cb 100644
@@ -163,7 +163,9 @@ int main(int argc, char *argv[])
 
 				len = wcslen(buf);
 			}
-			reverse_str(buf, len - 1);
+			if (buf[len - 1] == '\n')
+				buf[len--] = '\0';
+			reverse_str(buf, len);
 			fputws(buf, stdout);
 		}
 		if (ferror(fp)) {
Signature · 1 line
1.8.4
maintainer Applied
#2 lore raw

Re: [PATCH 2/2] rev: fix new line regression

Quoted 2 lines · Sami Kerola
 text-utils/rev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
maintainer Applied
#3 lore raw
In reply to Sami Kerola
Quoted 4 lines · Sami Kerola
 tests/expected/lscpu/lscpu-armv7             | 1 +
 tests/expected/lscpu/lscpu-x86_64-64cpu      | 1 +
 tests/expected/lscpu/lscpu-x86_64-dell_e4310 | 1 +
 3 files changed, 3 insertions(+)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com