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

test the schedulers in the github workflow using virtme-ng #51

Merged
merged 3 commits into from
Jan 2, 2024

Conversation

arighi
Copy link
Collaborator

@arighi arighi commented Dec 28, 2023

Use virtme-ng to test the schedulers in the github workflow.

Keep in mind that I've only tested this locally (using gh act), so in the actual github workflow it may behave differently and it probably requires more testing / planning.

I've opened the PR to start some discussions / suggestions / ideas for now.

Overall, I think it can be really useful, I've already triggered a few bugs with this (see #49, sched-ext/sched_ext#101 and sched-ext/sched_ext#74 (comment)).

@arighi arighi force-pushed the virtme-ng-github-workflow branch 2 times, most recently from a7320e7 to 8950aed Compare December 28, 2023 10:18
Periodically flush stdout to help following the scheduler progress
during testing.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Periodically flush stdout to help following the scheduler progress
during testing.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Use virtme-ng to run the schedulers after they're built; virtme-ng
allows to pick an arbitrary sched-ext enabled kernel and run it
virtualizing the entire user-space root filesystem, so we can basically
exceute the recompiled schedulers inside such kernel.

This should allow to catch potential run-time issue in advance (both in
the kernel and the schedulers).

The sched-ext kernel is taken from the Ubuntu ppa (ppa:arighi/sched-ext)
at the moment, since it is the easiest / fastest way to get a
precompiled sched-ext kernel to run inside the Ubuntu 22.04 testing
environment.

The schedulers are tested using the new meson target "test_sched", the
specific actions are defined in meson-scripts/test_sched.

By default each test has a timeout of 30 sec, after the virtme-ng
completes the boot (that should be enough to initialize the scheduler
and run the scheduler for some seconds), while the total lifetime of the
virtme-ng guest is set to 60 sec, after this time the guest will be
killed (this allows to catch potential kernel crashes / hangs).

If a single scheduler fails the test, the entire "test_sched" action
will be interrupted and the overall test result will be considered a
failure.

At the moment scx_layered is excluded from the tests, because it
requires a special configuration (we should probably pre-generate a
default config in the workflow actions and change the scheduler to use
the default config if it's executed without any argument).

Moreover, scx_flatcg is also temporarily excluded from the tests,
because of these known issues:
 - sched-ext#49
 - sched-ext/sched_ext#101

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
@Byte-Lab
Copy link
Contributor

Byte-Lab commented Jan 2, 2024

Wow, awesome, thanks Andrea!

@Byte-Lab Byte-Lab merged commit d05c7cf into sched-ext:main Jan 2, 2024
1 check passed
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

2 participants