aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app
AgeCommit message (Collapse)Author
2025-10-29internal/outcome: rename from appOphestra
This is less ambiguous, and more accurately describes the purpose of the package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-29internal/env: relocate from appOphestra
This package is much cleaner to stub independently, and makes no sense to lump into app. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-29internal/validate: relocate from appOphestra
These are free of the dispatcher from internal/app. This change relocates them into their own package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-29internal/app/state: improve store internalsOphestra
This fully exposes the store internals for #19 and are final preparations for removing the legacy store interface. This change also fixes a potential deadlock in the handle initialisation mkdir failure path. This however is never reachable in hakurei as the store is never accessed concurrently. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-28internal/app/state: improve handles internalsOphestra
This replaces the Store interface with something better reflecting the underlying data format for #19. An implementation of Store is provided on top of the new code to ease transition. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-26internal/app/state: use absolute pathnamesOphestra
This is less error-prone and fits better into internal/app which already uses check.Absolute for all pathnames. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-26internal/app/state: acquire big lock for toplevel operationsOphestra
This avoids getting into an inconsistent state for simultaneous calls to List and Do on a previously unknown identity. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-26treewide: update doc commentsOphestra
Some internal/app/state types were relocated to hst as part of the API. This change updates doc comments referring to them. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-26internal/app/state/data: check full entry behaviourOphestra
This eventually gets relocated to internal/app. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-25internal/app/state: include et headerOphestra
This is the initial step of implementing #19. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-25internal/app/state: use internal/lockedfileOphestra
This is a pretty solid implementation backed by robust tests, with a much cleaner interface. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-25internal/app/state: export correct backend valueOphestra
This references the underlying multiBackend due to a typo, making the whole dance with c a noop. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-25internal/app/state: fixed size et-only headerOphestra
This header improves the robustness of the format and significantly reduces cleanup overhead. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-23hst/instance: store priv side pidOphestra
This can receive signals, so is more useful to the caller. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-23hst/instance: define instance stateOphestra
This is now part of the hst API. This change also improves identifier generation and serialisation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-23internal/app/shim: check behaviourOphestra
This does not yet have full coverage. Test cases covering failsafe paths and error injection will be added eventually. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-23internal/app: test case for hst templateOphestra
This helps with other areas of the test suite as they're all based on hst.Template. This also helps contributors understand the behaviour of internal/app as hst.Template covers almost every aspect of it. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-22internal/app: reduce test case indentationOphestra
This improves readability on narrower displays. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-22internal/app/shim: use syscall dispatcherOphestra
This enables instrumented testing of the shim. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-21container/comp: rename from bitsOphestra
This package will also hold syscall lookup tables for seccomp. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-19hst/container: optional runtime and tmpdir sharingOphestra
Sharing and persisting these directories do not always make sense. Make it optional here. Closes #16. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-19internal/app: remove spfinalOphestra
This no longer needs to be an independent outcomeOp since spFilesystemOp is moved late. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-19internal/app/outcome: apply configured filesystems lateOphestra
This enables configured filesystems to cover system mount points. Closes #8. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-19internal/app/spx11: check behaviourOphestra
This outcomeOp will likely never change. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-19internal/app/spwayland: check behaviourOphestra
This op is quite clean. Might get slightly more complex at some point passing socket fd. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-18internal/app/dispatcher: report correct fieldOphestra
This was mistakenly reporting sharePath on inequivalence causing very confusing output. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-18internal/app/sptmpdir: check behaviourOphestra
Another simple one. This will change when shared tmpdir and xdg runtime dir becomes optional. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-18internal/app/hsu: check behaviourOphestra
The stub exec.ExitError is hairy as usual, but internal/app is not cross-platform, so this is okay. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-18internal/app/hsu: remove wrapper methodOphestra
This was added to reduce the size of diffs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-18internal/app/spruntime: emulate pam_systemd typeOphestra
This sets XDG_SESSION_TYPE to the corresponding values specified in pam_systemd(8) according to enablements. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-18internal/app/spruntime: check behaviourOphestra
This one is quite simple and has no state. Needs to emulate pam_systemd behaviour so that will change. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-18internal/app/sppulse: check cookie discoveryOphestra
There's quite a bit of code duplication here, but since this is already quite simple it is best to leave it as is for now. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-18internal/app/sppulse: check buf error injectionOphestra
The loadFile behaviour does not guarantee the buffer to be zeroed or not clobbered if an error is returned, but for the current implementation it is good to check. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-17internal/app/sppulse: correctly handle small cookieOphestra
The trailing zero bytes need to be sliced off, so send cookie size alongside buffer content. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-17internal/app/sppulse: check behaviourOphestra
Still needs to check the relocated functions separately. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-17internal/app/dispatcher: reduce check code duplicationOphestra
This also improves readability of test cases. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-16internal/app/sppulse: relocate hard to test codeOphestra
These are better tested separately instead of creating many op test cases. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-16internal/app/spfinal: check behaviourOphestra
This will be merged with spFilesystemOp eventually. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-16hst/container: rename constantsOphestra
The shim is an implementation detail and should not be mentioned in the API. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-15hst/container: additional shim exit codesOphestra
These are now considered stable, defined behaviour and can be used by external programs to determine shim outcome. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-14hst/config: hold acl struct by valueOphestra
Doc comments are also reworded for clarity. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-14hst/container: pack boolean optionsOphestra
The memory saving is relatively insignificant, however this increases serialisation efficiency. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-14internal/app/spdbus: check behaviourOphestra
This is not done very cleanly, however this op is pending removal for the in-process dbus proxy so not worth spending too much effort here. As long as it checks all paths it is good enough. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-14system/dbus: remove builder state leakOphestra
This enables external testing of system.I state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-13treewide: parallel testsOphestra
Most tests already had no global state, however parallel was never enabled. This change enables it for all applicable tests. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-12internal/app/spcontainer: check fs init behaviourOphestra
This covers every statement. Some of them are unreachable unless the kernel returns garbage. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-11internal/app/spcontainer: resolve path through dispatcherOphestra
This prevents state from os tainting the test data. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-11system/dbus: use well-known address in specOphestra
The session bus still performs non-standard formatting since it makes no sense for hakurei to start the session bus. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-11hst: rename /.hakurei constantOphestra
This provides disambiguation from fhs.AbsTmp. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-11internal/app/spcontainer: check params init behaviourOphestra
This change also significantly reduces duplicate information in test case. Signed-off-by: Ophestra <cat@gensokyo.uk>