Пример #1
0
 def test_getTscFrequency_libvirt(self):
     freq = caps._getTscFrequency()
     self.assertEqual(freq, "1234000000")
Пример #2
0
 def test_getTscFrequency_no_counter(self):
     freq = caps._getTscFrequency()
     self.assertEqual(freq, "")
Пример #3
0
 def test_getTscFrequency_dmesg(self):
     with open('/tmp/test_dmesg', 'w') as d:
         d.write('[    0.000000] tsc: Detected 4321.123 MHz processor')
     freq = caps._getTscFrequency()
     self.assertEqual(freq, "4321.123")