aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsangeeta jain <sangeeta.jain@intel.com>2021-02-17 08:34:36 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2021-02-17 14:44:45 +0800
commit3d02bb6d0a24d388af4dbab0b0f372ebcec7c7e2 (patch)
tree5fe0643272510c296a783861988dfcbec414745c
parent1d866c58534eb1d317b7a674c6e6c57ab9594fb0 (diff)
downloadmeta-intel-3d02bb6d0a24d388af4dbab0b0f372ebcec7c7e2.tar.gz
meta-intel-3d02bb6d0a24d388af4dbab0b0f372ebcec7c7e2.tar.bz2
meta-intel-3d02bb6d0a24d388af4dbab0b0f372ebcec7c7e2.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>
-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)" %