Exemple #1
0
 def test_get_slab_major_consumers(self):
     inst = memory.KernelMemoryChecks()
     top5 = inst.get_slab_major_consumers()
     expected = ['buffer_head (87540.6796875k)',
                 'anon_vma_chain (9068.0k)',
                 'radix_tree_node (50253.65625k)',
                 'Acpi-State (5175.703125k)',
                 'vmap_area (2700.0k)']
     self.assertEqual(top5, expected)
Exemple #2
0
 def test_check_nodes_memory(self):
     inst = memory.KernelMemoryChecks()
     inst.check_nodes_memory("Normal")
     expected = {'memory-checks': "no issues found"}
     actual = self.part_output_to_actual(inst.output)
     self.assertEqual(actual, expected)
Exemple #3
0
 def test_get_node_zones(self):
     inst = memory.KernelMemoryChecks()
     ret = inst.get_node_zones("DMA32", 0)
     expected = ("Node 0, zone DMA32 1127 453 112 65 27 7 13 6 5 30 48")
     self.assertTrue(inst.plugin_runnable)
     self.assertEqual(ret, expected)
Exemple #4
0
 def test_check_mallocinfo(self):
     inst = memory.KernelMemoryChecks()
     ret = inst.check_mallocinfo(0, "Normal")
     self.assertIsNone(ret)
Exemple #5
0
 def test_numa_nodes(self):
     ret = memory.KernelMemoryChecks().numa_nodes
     expected = [0]
     self.assertEqual(ret, expected)