Display missing memory chunks (buddyinfo) again

This commit is contained in:
Carsten Grohmann 2022-11-22 06:15:07 +01:00
parent 6ac0e86169
commit ab2905e0ae
3 changed files with 28 additions and 3 deletions

View File

@ -780,7 +780,7 @@ window.onerror = function (msg, url, lineNo, columnNo, errorObj) {
<!-- Memory Chunks --> <!-- Memory Chunks -->
<tr> <tr>
<th colspan="3" scope="row">Memory Chunks</th> <th colspan="3" scope="row">Available Memory Chunks</th>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
@ -940,6 +940,7 @@ window.onerror = function (msg, url, lineNo, columnNo, errorObj) {
<li>Fix memory calculation in summary section</li> <li>Fix memory calculation in summary section</li>
<li>Fix and rework calculation of GFP flags</li> <li>Fix and rework calculation of GFP flags</li>
<li>Add GFP flags for more kernel releases</li> <li>Add GFP flags for more kernel releases</li>
<li>Display missing memory chunks (buddyinfo) again</li>
<li>...</li> <li>...</li>
</ol> </ol>

View File

@ -267,8 +267,8 @@ class BaseKernelConfig:
r"^ free:(?P<free_pages>\d+) free_pcp:(?P<free_pcp_pages>\d+) free_cma:(?P<free_cma_pages>\d+)", r"^ free:(?P<free_pages>\d+) free_pcp:(?P<free_pcp_pages>\d+) free_cma:(?P<free_cma_pages>\d+)",
True, True,
), ),
"Memory node information": ( "Available memory chunks": (
r"(^Node \d+ (DMA|Normal|hugepages).*(:?\n))+", r"(?P<mem_node_info>(^Node \d+ ((DMA|DMA32|Normal):|(hugepages)).+(\n|$))+)",
False, False,
), ),
"Page cache": ( "Page cache": (

24
test.py
View File

@ -246,6 +246,18 @@ class TestInBrowser(TestBase):
"Used swap space in summary not found", "Used swap space in summary not found",
) )
mem_node_info = self.driver.find_element(By.CLASS_NAME, "mem_node_info")
self.assertEqual(
mem_node_info.text[:44],
"Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 2*64kB",
"Unexpected memory chunks",
)
self.assertEqual(
mem_node_info.text[-80:],
"Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB",
"Unexpected memory chunks",
)
head = self.driver.find_element(By.ID, "pstable_header") head = self.driver.find_element(By.ID, "pstable_header")
self.assertTrue( self.assertTrue(
"Page Table Entries" in head.text, "Page Table Entries" in head.text,
@ -304,6 +316,18 @@ class TestInBrowser(TestBase):
"Used physical memory in summary not found", "Used physical memory in summary not found",
) )
mem_node_info = self.driver.find_element(By.CLASS_NAME, "mem_node_info")
self.assertEqual(
mem_node_info.text[:49],
"Node 0 DMA: 1*4kB (U) 1*8kB (U) 1*16kB (U) 1*32kB",
"Unexpected memory chunks",
)
self.assertEqual(
mem_node_info.text[-80:],
"Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB",
"Unexpected memory chunks",
)
head = self.driver.find_element(By.ID, "pstable_header") head = self.driver.find_element(By.ID, "pstable_header")
self.assertTrue( self.assertTrue(
"Page Table Bytes" in head.text, "Page Table Bytes" in head.text,