Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hardware/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,9 @@ def _maybe_int(v):
('l1i cache', 'L1i cache', None),
('l2 cache', 'L2 cache', None),
('l3 cache', 'L3 cache', None),
('min_Mhz', 'CPU min MHz', float),
('max_Mhz', 'CPU max MHz', float),
('current_Mhz', 'CPU MHz', float),
('min_Mhz', 'CPU min MHz', ''),
('max_Mhz', 'CPU max MHz', ''),
('current_Mhz', 'CPU MHz', ''),
('flags', 'Flags', None)]:
value = None
if d_key in lscpu:
Expand Down
22 changes: 11 additions & 11 deletions hardware/tests/test_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def test_get_cpus(self, mock_output_lines, mock_os_path_exists):
('cpu', 'physical_0', 'l1i cache', '64K'),
('cpu', 'physical_0', 'l2 cache', '512K'),
('cpu', 'physical_0', 'l3 cache', '8192K'),
('cpu', 'physical_0', 'min_Mhz', 1200.0),
('cpu', 'physical_0', 'max_Mhz', 2300.0),
('cpu', 'physical_0', 'current_Mhz', 1197.549),
('cpu', 'physical_0', 'min_Mhz', '1200.0000'),
('cpu', 'physical_0', 'max_Mhz', '2300.0000'),
('cpu', 'physical_0', 'current_Mhz', '1197.549'),
('cpu', 'physical_0', 'flags',
'fpu vme de pse tsc msr pae mce cx8 apic sep mtrr '
'pge mca cmov pat pse36 clflush mmx fxsr sse sse2 '
Expand Down Expand Up @@ -105,9 +105,9 @@ def test_get_cpus(self, mock_output_lines, mock_os_path_exists):
('cpu', 'physical_1', 'l1i cache', '64K'),
('cpu', 'physical_1', 'l2 cache', '512K'),
('cpu', 'physical_1', 'l3 cache', '8192K'),
('cpu', 'physical_1', 'min_Mhz', 1200.0),
('cpu', 'physical_1', 'max_Mhz', 2300.0),
('cpu', 'physical_1', 'current_Mhz', 1197.549),
('cpu', 'physical_1', 'min_Mhz', '1200.0000'),
('cpu', 'physical_1', 'max_Mhz', '2300.0000'),
('cpu', 'physical_1', 'current_Mhz', '1197.549'),
('cpu', 'physical_1', 'flags',
'fpu vme de pse tsc msr pae mce cx8 apic sep mtrr '
'pge mca cmov pat pse36 clflush mmx fxsr sse sse2 '
Expand Down Expand Up @@ -189,7 +189,7 @@ def test_get_cpus_vm(self, mock_output_lines, mock_os_path_exists):
('cpu', 'physical_0', 'l1i cache', '32K'),
('cpu', 'physical_0', 'l2 cache', '256K'),
('cpu', 'physical_0', 'l3 cache', '8192K'),
('cpu', 'physical_0', 'current_Mhz', 2112.002),
('cpu', 'physical_0', 'current_Mhz', '2112.002'),
('cpu', 'physical_0', 'flags',
'fpu vme de pse tsc msr pae mce cx8 apic sep '
'mtrr pge mca cmov pat pse36 clflush mmx fxsr '
Expand Down Expand Up @@ -307,18 +307,18 @@ def test_get_cpus_ppc64le(self, mock_output_lines, mock_os_path_exists):
('cpu', 'physical_0', 'l1i cache', '32K'),
('cpu', 'physical_0', 'l2 cache', '512K'),
('cpu', 'physical_0', 'l3 cache', '10240K'),
('cpu', 'physical_0', 'min_Mhz', 2300.0),
('cpu', 'physical_0', 'max_Mhz', 3800.0),
('cpu', 'physical_1', 'product', 'POWER9, altivec supported'),
('cpu', 'physical_0', 'min_Mhz', '2300.0000'),
('cpu', 'physical_0', 'max_Mhz', '3800.0000'),
('cpu', 'physical_1', 'cores', 18),
('cpu', 'physical_1', 'threads', 72),
('cpu', 'physical_1', 'model', '2.2 (pvr 004e 1202)'),
('cpu', 'physical_1', 'l1d cache', '32K'),
('cpu', 'physical_1', 'l1i cache', '32K'),
('cpu', 'physical_1', 'l2 cache', '512K'),
('cpu', 'physical_1', 'l3 cache', '10240K'),
('cpu', 'physical_1', 'min_Mhz', 2300.0),
('cpu', 'physical_1', 'max_Mhz', 3800.0),
('cpu', 'physical_1', 'min_Mhz', '2300.0000'),
('cpu', 'physical_1', 'max_Mhz', '3800.0000'),
('cpu', 'logical', 'number', 144),
('numa', 'nodes', 'count', 6),
('numa', 'node_0', 'cpu_count', 72),
Expand Down