aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsangeeta jain <sangeeta.jain@intel.com>2021-02-19 14:41:47 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2021-02-19 15:01:49 +0800
commit3e364c8d10b50b83563abfa66aef9d11052e9b92 (patch)
tree564002001b15ff109b136b86f2a8ae8c59332d68
parent4c73ef4cfa539522b5c0a3950164f745c7cb90b8 (diff)
downloadmeta-intel-3e364c8d10b50b83563abfa66aef9d11052e9b92.tar.gz
meta-intel-3e364c8d10b50b83563abfa66aef9d11052e9b92.tar.bz2
meta-intel-3e364c8d10b50b83563abfa66aef9d11052e9b92.zip
microcode.py: updated test to read microcode for exact signature
Updated testcase to read microcode versions applied for exact signature for CPU and for any microcode versions that are updated already. This change will cover scenario when there is no microcode being early loaded by OS. Signed-off-by: sangeeta jain <sangeeta.jain@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--lib/oeqa/runtime/cases/microcode.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/oeqa/runtime/cases/microcode.py b/lib/oeqa/runtime/cases/microcode.py
index 6ce36a6f..52c1cdb4 100644
--- a/lib/oeqa/runtime/cases/microcode.py
+++ b/lib/oeqa/runtime/cases/microcode.py
@@ -16,20 +16,15 @@ class MicrocodeTest(OERuntimeTestCase):
@OEHasPackage(["iucode-tool"])
def test_microcode_update(self):
- (status, output) = self.target.run('iucode_tool /lib/firmware/intel-ucode/ -tb -lS | grep rev')
- if status:
- self.skipTest("The iucode_tool detected no microcode for update.")
+ (status, output) = self.target.run('iucode_tool /lib/firmware/intel-ucode/ -tb -l --scan-system=2 | grep rev')
selected_microcodes = output.splitlines()
selected_rev_list = self.get_revision_from_microcode_string_list(selected_microcodes, "rev (\w*)")
- self.assertTrue(selected_rev_list, msg="Could not find any rev from iucode_tool selected microcode.")
- (status, output) = self.target.run('dmesg | grep microcode')
- self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
+ (status, output) = self.target.run("dmesg | grep 'microcode updated early'")
updated_microcodes = output.splitlines()
- updated_rev_list = self.get_revision_from_microcode_string_list(updated_microcodes, "revision=(\w*)")
- self.assertTrue(updated_rev_list, msg="Could not find any updated revision from microcode dmesg.")
+ updated_rev_list = self.get_revision_from_microcode_string_list(updated_microcodes, "revision (\w*)")
for ul in updated_rev_list:
self.assertTrue(ul in selected_rev_list, msg="Updated revision, %s, not in selected revision list (%s)" %