Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unittest That Stress-Tests the VMM and PMM #341

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

jcjgraf
Copy link
Contributor

@jcjgraf jcjgraf commented Nov 29, 2024

Adds a testcase to the unittest that repeatedly allocate and map, deallocate and unmape a number of pages/frames. With the current mainline version, this test either causes an assertion in the PMM (#342) or locks-up (deadlock?) (#343)

The two macros can be used to configure the allocation pattern. Most importantly, changing it to KT2_ROUNDS 1, KT2_CHUNKS 1000 still leads to the same error, indicating that unmaping/dealocation is not the cause of the issue.

EDIT: CI compilation fails due to -Werror of unrelated code.

@jcjgraf jcjgraf requested a review from a team as a code owner November 29, 2024 13:27
@jcjgraf jcjgraf changed the title Unittst That Stress-Tests the VMM and PMM Unittest That Stress-Tests the VMM and PMM Nov 29, 2024
This was referenced Nov 29, 2024
tests/unittests.c Outdated Show resolved Hide resolved
tests/unittests.c Outdated Show resolved Hide resolved
tests/unittests.c Outdated Show resolved Hide resolved
@wipawel
Copy link
Contributor

wipawel commented Dec 2, 2024

The code LGTM. Just some nitpicks for the commit message. Please sign-off commits. Squash the second commit into the first. And try not to use long line in the commit message (max 80-100 chars). After these changes I will merge the test. Thank a lot!

Repeatedly allocate and map, deallocate and unmape a number of
pages/frames. With the current mainline version, this test either causes
an assertion in the PMM or locks-up (deadlock?).

Signed-off-by: Jean-Claude Graf <[email protected]>
@jcjgraf
Copy link
Contributor Author

jcjgraf commented Dec 2, 2024

Shoud be ready to merge now. I am trying to fix the compilation errors in the meantime. So that the pipeline does not break anymore

@wipawel wipawel merged commit 41645bb into KernelTestFramework:mainline Dec 3, 2024
3 of 4 checks passed
@jcjgraf jcjgraf deleted the test_memalloc branch December 3, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants