hst: expose scheduling policy
All checks were successful
Test / ShareFS (push) Successful in 39s
Test / Sandbox (push) Successful in 45s
Test / Hakurei (push) Successful in 50s
Test / Sandbox (race detector) (push) Successful in 45s
Test / Hakurei (race detector) (push) Successful in 49s
Test / Create distribution (push) Successful in 59s
Test / Flake checks (push) Successful in 1m19s
All checks were successful
Test / ShareFS (push) Successful in 39s
Test / Sandbox (push) Successful in 45s
Test / Hakurei (push) Successful in 50s
Test / Sandbox (race detector) (push) Successful in 45s
Test / Hakurei (race detector) (push) Successful in 49s
Test / Create distribution (push) Successful in 59s
Test / Flake checks (push) Successful in 1m19s
This is primarily useful for poorly written music players for now. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -28,6 +28,15 @@
|
||||
# Automatically login on tty1 as a normal user:
|
||||
services.getty.autologinUser = "alice";
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@users";
|
||||
item = "rtprio";
|
||||
type = "-";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
# For D-Bus tests:
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
security = {
|
||||
sudo.wheelNeedsPassword = false;
|
||||
rtkit.enable = true;
|
||||
pam.loginLimits = [
|
||||
{
|
||||
domain = "@users";
|
||||
item = "rtprio";
|
||||
type = "-";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
|
||||
@@ -206,6 +206,14 @@ machine.wait_until_fails("pgrep foot", timeout=5)
|
||||
machine.wait_for_file("/tmp/shim-cont-unexpected-pid")
|
||||
print(machine.succeed('grep "shim: got SIGCONT from unexpected process$" /tmp/shim-cont-unexpected-pid'))
|
||||
|
||||
# Check setscheduler:
|
||||
sched_unset = int(machine.succeed("sudo -u alice -i hakurei -v run cat /proc/self/sched | grep '^policy' | tr -d ' ' | cut -d ':' -f 2"))
|
||||
if sched_unset != 0:
|
||||
raise Exception(f"unexpected unset policy: {sched_unset}")
|
||||
sched_idle = int(machine.succeed("sudo -u alice -i hakurei -v run --sched=idle cat /proc/self/sched | grep '^policy' | tr -d ' ' | cut -d ':' -f 2"))
|
||||
if sched_idle != 5:
|
||||
raise Exception(f"unexpected idle policy: {sched_idle}")
|
||||
|
||||
# Start app (foot) with Wayland enablement:
|
||||
swaymsg("exec ne-foot")
|
||||
wait_for_window(f"u0_a{hakurei_identity(0)}@machine")
|
||||
|
||||
Reference in New Issue
Block a user