aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test.py
AgeCommit message (Collapse)Author
2026-04-23nix: remove all explicit timeoutsOphestra
These were useful during development because timing out is often the only indication of failure due to the terrible design of nixos vm test harness. This has become a nuisance however especially when the system is under load, so remove explicit values and fall back to the ludicrously high default. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-28cmd/hakurei: rename app to runOphestra
The run command was a legacy holdover from very early days and is only useful for testing and demonstration these days. This change also renames it to exec. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-12hst: expose scheduling priorityOphestra
This is useful when limits are configured to allow it. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-12container: expose priority and SCHED_OTHER policyOphestra
The more explicit API removes the arbitrary limit preventing use of SCHED_OTHER (referred to as SCHED_NORMAL in the kernel). This change also exposes priority value to set. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-12hst: expose scheduling policyOphestra
This is primarily useful for poorly written music players for now. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-15test: check shim private dir cleanupOphestra
This asserts that no shim private dir was left behind after all containers terminate. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-15internal/outcome: expose pipewire via pipewire-pulseOphestra
This no longer exposes the pipewire socket to the container, and instead mediates access via pipewire-pulse. This makes insecure parts of the protocol inaccessible as explained in the doc comment in hst. Closes #29. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08cmd/hakurei: exec instead of fork/exec from shellOphestra
There is no reason to keep the shell process around. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08treewide: include PipeWire op and enforce PulseAudio checkOphestra
This fully replaces PulseAudio with PipeWire and enforces the PulseAudio check and error message. The pipewire-pulse daemon is handled in the NixOS module. Closes #26. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08hst: check for insecure PulseAudio enablementOphestra
This is currently still a noop, but required for #26. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-10cmd/hakurei: expose current instance identifierOphestra
This writes the 16-byte instance identifier to file descriptor specified by --identifier-fd if set, and closes the file. This enables safely obtaining the new instance's identifier. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-04hst/grp_pwd: specify new uid formatOphestra
This leaves slots available for additional uid ranges in Rosa OS. This breaks all existing installations! Users are required to fix ownership manually. Closes #18. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-02test: print share directoryOphestra
This is more useful now that state is tracked here. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-02cmd/hakurei/print: serialise array for psOphestra
Wanted to do this for a long time, since the key is redundant. This also makes it easier to migrate to the new store interface. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-24hst/instance: embed config structOphestra
This makes the resulting json easier to parse since it can now be deserialised into the config struct. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-19test: place marker in common pathOphestra
This discontinues the dependency on shared tmpdir and xdg_runtime_dir implementation detail, for #16. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07hst/config: move container fields from toplevelOphestra
This change also moves pd behaviour to cmd/hakurei, as this does not belong in the hst API. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-25internal: remove sys packageOphestra
This package is replaced by container/stub. Remove and replace it with unexported implementation for the upcoming test suite rewrite. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-22test: check init lingering timeout behaviourOphestra
This checks init timeout on lingering process after initial process termination. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-15internal/sys: separate hsu uid cacheOphestra
This begins the effort of the removal of the sys package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14internal/app: mount /dev/shm earlyOphestra
This avoids covering /dev/shm mounts from hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-06cmd/hakurei/command: pd run dbus-verbose nil checkOphestra
This otherwise dereferences a nil pointer when dbus-verbose is set and either session or system bus are nil. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26hst: use hsu userid for share path suffixOphestra
The privileged user is identifier to hakurei through its hsu userid. Using the kernel uid here makes little sense and is a leftover design choice from before hsu was implemented. Closes #7. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-15hst/enablement: editor friendly enablement adaptorOphestra
Having the bit field value here (in decimal, no less) is unfriendly to text editors. Use a bunch of booleans here to improve ease of use. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-29app: integrate interrupt forwardingOphestra
This significantly increases usability of command line tools running through hakurei. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-28app/shim: implement signal handler outcome in GoOphestra
This needs to be done from the Go side eventually anyway to integrate the signal forwarding behaviour now supported by the container package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-25treewide: rename to hakureiOphestra
Fortify makes little sense for a container tool. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-08nix: deduplicate home-manager mergingOphestra
This becomes a problem when extraHomeConfig defines nixos module options. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-07nix: go generate in src derivationOphestra
This saves the generated files in the nix store and exposes them for use by external tools. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-15test: check xdg-dbus-proxy terminationOphestra
This process runs outside the application container's pid namespace, so it is a good idea to check whether its lifecycle becomes decoupled from the application. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-13fst: improve configOphestra
The config struct more or less "grew" to what it is today. This change moves things around to make more sense and fixes nonsensical comments describing obsolete behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-07app: improve shim process managementOphestra
This ensures a signal gets delivered to the process instead of relying on parent death behaviour. SIGCONT was chosen as it is the only signal an unprivileged process is allowed to send to processes with different credentials. A custom signal handler is installed because the Go runtime does not expose signal information other than which signal was received, and shim must check pid to ensure reasonable behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-01app: share path setup on demandOphestra
This removes the unnecessary creation and destruction of share paths when none of the enablements making use of them are set. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-30test: separate app and sandboxOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-28test/sandbox: check seccomp outcomeOphestra
This is as ugly as it is because it has to have CAP_SYS_ADMIN and not be in seccomp mode. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-26sandbox/init: clear inheritable setOphestra
Inheritable should not be able to affect anything regardless of its value, due to no_new_privs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-26sandbox/init: drop capabilitiesOphestra
During development the syscall filter caused me to make an incorrect assumption about SysProcAttr. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-26test: raise long timeout to 15 secondsOphestra
The race detector really slows down container tooling. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25test: check revert type selectionOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25app: run in native sandboxOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-24test/sandbox: fix stdout tty checkOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-23test/sandbox: check mapuid outcomeOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-23test/sandbox: check tty outcomeOphestra
This makes no difference currently but has different behaviour in the native sandbox. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-23test: format path aid offsetsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-23test/sandbox: parse full test caseOphestra
This makes declaring multiple tests much cleaner. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-16test: raise timeoutOphestra
Native container tooling is severely slowed down by race detector. Raise timeout so it reliably completes. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-13test: run go test under regular userOphestra
By default test vm commands run as root, this causes buildFHSEnv bwrap to cover some parts of /proc, making it impossible to mount proc in a mount namespace created under it. Running as a regular user gets around this issue. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-13test: print output of failed testOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-09helper/proc: expose setup fileOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-28test/sandbox: check mount outcomeOphestra
Do this at the beginning of the test for early failure. Signed-off-by: Ophestra <cat@gensokyo.uk>