aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test.py
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-11 21:06:44 +0900
committerOphestra <cat@gensokyo.uk>2026-03-12 00:52:18 +0900
commit04e6bc3c5c99d6a99f17cfa5f69f34fe8941aee2 (patch)
tree2ad64307c13e2f967fdf17c5f02e7682189b22e1 /test/test.py
parent5c540f90aa5ac069a370cbef0ddd81fa268b43c5 (diff)
hst: expose scheduling policy
This is primarily useful for poorly written music players for now. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/test.py')
-rw-r--r--test/test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test.py b/test/test.py
index 485e475f..9071f563 100644
--- a/test/test.py
+++ b/test/test.py
@@ -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")