mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-05 05:04:45 +02:00
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>
This commit is contained in:
parent
495dca1010
commit
34119f3f41
|
@ -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)" %
|
||||
|
|
Loading…
Reference in New Issue
Block a user