From 8904492e21537f3b820e577964e67ad670fa640b Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 26 Mar 2019 21:20:38 +0100 Subject: [PATCH] cputest: Add support for MSR features to cpu-parse.sh MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The script just parses whatever cpu-gather.sh printed out. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- tests/cputestdata/cpu-parse.sh | 9 ++++++--- tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/cputestdata/cpu-parse.sh b/tests/cputestdata/cpu-parse.sh index a001647549..7501c57cba 100755 --- a/tests/cputestdata/cpu-parse.sh +++ b/tests/cputestdata/cpu-parse.sh @@ -23,12 +23,15 @@ fname="x86_64-cpuid-$fname" xml() { hex='\(0x[0-9a-f]\+\)' - match="$hex $hex: eax=$hex ebx=$hex ecx=$hex edx=$hex" - subst="" + matchCPUID="$hex $hex: eax=$hex ebx=$hex ecx=$hex edx=$hex" + substCPUID="" + + matchMSR="$hex: $hex\(.......[0-9a-f]\)" + substMSR="" echo "" echo "" - sed -ne "s/^ *$match$/ $subst/p" + sed -ne "s/^ *$matchCPUID$/ $substCPUID/p; s/^ *$matchMSR$/ $substMSR/p" echo "" } diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml index 75472d44fe..f1261da891 100644 --- a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml +++ b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml @@ -51,4 +51,5 @@ + -- 2.47.2