summaryrefslogtreecommitdiffstats
path: root/lib/oeqa
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oeqa')
-rw-r--r--lib/oeqa/runtime/cases/jhi.py41
-rw-r--r--lib/oeqa/runtime/cases/microcode.py11
-rw-r--r--lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt9
-rw-r--r--lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt14
-rw-r--r--lib/oeqa/runtime/cases/thermald.py8
5 files changed, 31 insertions, 52 deletions
diff --git a/lib/oeqa/runtime/cases/jhi.py b/lib/oeqa/runtime/cases/jhi.py
deleted file mode 100644
index 7a24b6da..00000000
--- a/lib/oeqa/runtime/cases/jhi.py
+++ /dev/null
@@ -1,41 +0,0 @@
1import os
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.runtime.case import OERuntimeTestCase
4from oeqa.core.decorator.depends import OETestDepends
5
6class JhiTest(OERuntimeTestCase):
7
8 @classmethod
9 def tearDownClass(cls):
10 _, output = cls.tc.target.run('pidof jhid')
11 cls.tc.target.run('kill %s' % output)
12
13 @OEHasPackage(['openssh-sshd'])
14 @OEHasPackage(['jhi'])
15 def test_jhi_mei_driver(self):
16 command = 'ls /dev/mei*'
17 (status, output) = self.target.run(command)
18 self.assertEqual(status, 0, msg="Error messages: %s" % output)
19
20 @OETestDepends(['jhi.JhiTest.test_jhi_mei_driver'])
21 def test_jhi_daemon_version(self):
22 command = 'jhid -v'
23 (status, output) = self.target.run(command)
24 self.assertEqual(status, 0, msg="Error messages: %s" % output)
25
26 @OETestDepends(['jhi.JhiTest.test_jhi_mei_driver'])
27 def test_jhi_daemon_can_initialized(self):
28 command = 'jhid -d'
29 (status, output) = self.target.run(command)
30 self.assertEqual(status, 0, msg="Error messages: %s" % output)
31
32 @OEHasPackage(['jhi-test'])
33 @OETestDepends(['jhi.JhiTest.test_jhi_daemon_can_initialized'])
34 def test_jhi_bist(self):
35 (status, output) = self.target.run('uname -m')
36 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
37 if 'x86_64' not in output:
38 self.skipTest("Skipped jhi bist test if not x86_64 machine (current machine: %s)." % output)
39 command = 'bist'
40 (status, output) = self.target.run(command)
41 self.assertEqual(status, 0, msg="Error messages: %s" % output)
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):
16 16
17 @OEHasPackage(["iucode-tool"]) 17 @OEHasPackage(["iucode-tool"])
18 def test_microcode_update(self): 18 def test_microcode_update(self):
19 (status, output) = self.target.run('iucode_tool /lib/firmware/intel-ucode/ -tb -lS | grep rev') 19 (status, output) = self.target.run('iucode_tool /lib/firmware/intel-ucode/ -tb -l --scan-system=2 | grep rev')
20 if status:
21 self.skipTest("The iucode_tool detected no microcode for update.")
22 20
23 selected_microcodes = output.splitlines() 21 selected_microcodes = output.splitlines()
24 selected_rev_list = self.get_revision_from_microcode_string_list(selected_microcodes, "rev (\w*)") 22 selected_rev_list = self.get_revision_from_microcode_string_list(selected_microcodes, "rev (\w*)")
25 self.assertTrue(selected_rev_list, msg="Could not find any rev from iucode_tool selected microcode.")
26 23
27 (status, output) = self.target.run('dmesg | grep microcode') 24 (status, output) = self.target.run("dmesg | grep 'microcode updated early'")
28 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
29 25
30 updated_microcodes = output.splitlines() 26 updated_microcodes = output.splitlines()
31 updated_rev_list = self.get_revision_from_microcode_string_list(updated_microcodes, "revision=(\w*)") 27 updated_rev_list = self.get_revision_from_microcode_string_list(updated_microcodes, "revision (\w*)")
32 self.assertTrue(updated_rev_list, msg="Could not find any updated revision from microcode dmesg.")
33 28
34 for ul in updated_rev_list: 29 for ul in updated_rev_list:
35 self.assertTrue(ul in selected_rev_list, msg="Updated revision, %s, not in selected revision list (%s)" % 30 self.assertTrue(ul in selected_rev_list, msg="Updated revision, %s, not in selected revision list (%s)" %
diff --git a/lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt b/lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt
new file mode 100644
index 00000000..84ce8168
--- /dev/null
+++ b/lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt
@@ -0,0 +1,9 @@
1# These should be reviewed to see if they are still needed
2ACPI: No _BQC method, cannot determine initial brightness
3[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness
4(EE) Failed to load module "psb"
5(EE) Failed to load module "psbdrv"
6(EE) open /dev/fb0: No such file or directory
7(EE) AIGLX: reverting to software rendering
8dmi: Firmware registration failed.
9ioremap error for 0x78
diff --git a/lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt b/lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt
new file mode 100644
index 00000000..5c9b4bc7
--- /dev/null
+++ b/lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt
@@ -0,0 +1,14 @@
1# These should be reviewed to see if they are still needed
2can't set Max Payload Size to 256
3intel_punit_ipc: can't request region for resource
4[drm] parse error at position 4 in video mode 'efifb'
5ACPI Error: Could not enable RealTimeClock event
6ACPI Warning: Could not enable fixed event - RealTimeClock
7hci_intel INT33E1:00: Unable to retrieve gpio
8hci_intel: probe of INT33E1:00 failed
9can't derive routing for PCI INT A
10failed to read out thermal zone
11Bluetooth: hci0: Setting Intel event mask failed
12ttyS2 - failed to request DMA
13Bluetooth: hci0: Failed to send firmware data (-38)
14atkbd serio0: Failed to enable keyboard on isa0060/serio0
diff --git a/lib/oeqa/runtime/cases/thermald.py b/lib/oeqa/runtime/cases/thermald.py
index b0efecd8..a0b6a92b 100644
--- a/lib/oeqa/runtime/cases/thermald.py
+++ b/lib/oeqa/runtime/cases/thermald.py
@@ -19,7 +19,7 @@ class ThermaldTest(OERuntimeTestCase):
19 def run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process(self, run_args): 19 def run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process(self, run_args):
20 time.sleep(2) 20 time.sleep(2)
21 self.target.run('echo 106000 > /sys/class/thermal/thermal_zone%s/emul_temp' % run_args) 21 self.target.run('echo 106000 > /sys/class/thermal/thermal_zone%s/emul_temp' % run_args)
22 time.sleep(2) 22 time.sleep(5)
23 __, output = self.target.run('pidof thermald') 23 __, output = self.target.run('pidof thermald')
24 self.target.run('kill -9 %s' % output) 24 self.target.run('kill -9 %s' % output)
25 25
@@ -27,7 +27,8 @@ class ThermaldTest(OERuntimeTestCase):
27 # Thermald test depend on thermal emulation, where CONFIG_THERMAL_EMULATION=y was required 27 # Thermald test depend on thermal emulation, where CONFIG_THERMAL_EMULATION=y was required
28 # To enable thermal emulation, refer to https://github.com/intel/thermal_daemon/blob/master/test/readme_test.txt 28 # To enable thermal emulation, refer to https://github.com/intel/thermal_daemon/blob/master/test/readme_test.txt
29 (status, output) = self.target.run('gzip -dc /proc/config.gz | grep CONFIG_THERMAL_EMULATION=y') 29 (status, output) = self.target.run('gzip -dc /proc/config.gz | grep CONFIG_THERMAL_EMULATION=y')
30 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) 30 if status:
31 self.skipTest("CONFIG_THERMAL_EMULATION is not set")
31 32
32 @OEHasPackage(['thermald']) 33 @OEHasPackage(['thermald'])
33 @OETestDepends(['thermald.ThermaldTest.test_thermald_emulation_mode']) 34 @OETestDepends(['thermald.ThermaldTest.test_thermald_emulation_mode'])
@@ -38,7 +39,8 @@ class ThermaldTest(OERuntimeTestCase):
38 td_thread = threading.Thread(target=self.run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process, 39 td_thread = threading.Thread(target=self.run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process,
39 args=(x86_thermal_zone_index,)) 40 args=(x86_thermal_zone_index,))
40 td_thread.start() 41 td_thread.start()
41 status, output = self.target.run('thermald --no-daemon --loglevel=info') 42 td_thread.join()
43 status, output = self.target.run('timeout 3s thermald --no-daemon --loglevel=info')
42 regex_search = ".*thd_cdev_set_state.*106000" 44 regex_search = ".*thd_cdev_set_state.*106000"
43 regex_comp = re.compile(regex_search) 45 regex_comp = re.compile(regex_search)
44 m = regex_comp.search(output) 46 m = regex_comp.search(output)