Add more tests for PFA alloc and free

This commit is contained in:
Alex Kotov 2020-12-01 04:41:17 +05:00
parent 2d8c689ac1
commit 90d2ef08dd
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 8 additions and 0 deletions

View File

@ -45,5 +45,13 @@ int main()
assert(pfa.pages[page_addr / KERNAUX_PFA_PAGE_SIZE]);
for (unsigned int index = 0; index < KERNAUX_PFA_PAGES_COUNT_MAX; ++index) {
if (pfa.pages[index]) {
assert(KernAux_PFA_alloc_page(&pfa) != 0);
}
}
assert(KernAux_PFA_alloc_page(&pfa) == 0);
return 0;
}