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

Supporting running kernel mode unit test in kernel threads #748

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

grief8
Copy link
Contributor

@grief8 grief8 commented Apr 10, 2024

This pull request enhances the execution of ktests within a task-based context by performing the following steps:

  1. Introducing a straightforward FIFO Scheduler to manage task execution sequence.
  2. Incorporating the run_ktests function into the task context.
  3. Integrating the ktests specific to Task within this pull request for comprehensive functionality.

The development of capabilities to facilitate the concurrent execution of multiple ktest tasks is still an ongoing effort. Despite Asterinas currently only supporting a single core, the parallelization of unit tests is a more logical approach, promising improved efficiency and performance. This feature will involve a lot of code in libs/ktest and requires further discussion.

@tatetian
Copy link
Contributor

This is an important missing feature of the ktest mechanism. Very excited to see this PR. I skimmed over the changes. Looks fine to me.

@junyang-zh As the author of ktest, your opinion would be highly appreciated.

@tatetian tatetian mentioned this pull request Apr 12, 2024
Copy link
Collaborator

@junyang-zh junyang-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is just the first step to run ktests in parallel. If you are uninterested in implementing the following features, I am OK to take and I am OK with the scope of this PR.

@grief8
Copy link
Contributor Author

grief8 commented Apr 15, 2024

Yes this is just the first step to run ktests in parallel. If you are uninterested in implementing the following features, I am OK to take and I am OK with the scope of this PR.

Considering that we currently do not support multi-threading and cannot conduct complete testing even after implementation, I think the current PR should be enough.

framework/aster-frame/src/boot/mod.rs Outdated Show resolved Hide resolved
framework/aster-frame/src/task/scheduler.rs Outdated Show resolved Hide resolved
framework/aster-frame/src/task/task.rs Outdated Show resolved Hide resolved
framework/aster-frame/src/task/scheduler.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@tatetian tatetian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for contribution!

@tatetian tatetian merged commit c335873 into asterinas:main Apr 22, 2024
7 checks passed
@grief8 grief8 deleted the ktest branch April 22, 2024 05:58
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.

None yet

4 participants