aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
AgeCommit message (Collapse)Author
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>
2025-10-11internal/app/spaccount: check behaviourOphestra
This begins the effort of fully covering internal/app. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-11internal/app/spaccount: apply default in shimOphestra
The original code clobbers hst.Config, and was not changed when being ported over. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: relocate params state initialisationOphestra
This is useful for testing. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: relocate state initialisationOphestra
This is useful for testing. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: hold path hiding in opOphestra
This makes no sense to be part of the global state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10hst/config: negative WaitDelay bypasses defaultOphestra
This behaviour might be useful, so do not lock it out. This change also fixes an oversight where the unchecked value is used to determine ForwardCancel. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: copy parts of config to stateOphestra
This is less error-prone than passing the address to the entire hst.Config struct, and reduces the likelihood of accidentally clobbering hst.Config. This also improves ease of testing. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: filter ops in implementationOphestra
This is cleaner and less error-prone, and should also result in negligibly less memory allocation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: hold config address in stateOphestra
This can be removed eventually as it is barely used. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-09message: relocate from containerOphestra
This package is quite useful. This change allows it to be imported without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-09internal/app: do not encode config earlyOphestra
Finalise no longer clobbers hst.Config. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: build container state in shimOphestra
This significantly decreases ipc overhead. Closes #3. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: check transmitted opsOphestra
This simulates params to shim and this is the last step before params to shim is merged. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: relocate ops conditionOphestra
This allows reuse and finer grained testing of fromConfig. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: relocate dynamic exported stateOphestra
This allows reuse of the populateEarly method in test instrumentation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: relocate late sys/params outcomeOphestra
This will end up merged with another op after reordering. For now relocate it into its dedicated op for test instrumentation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07hst/fs: access ops through interfaceOphestra
This removes the final hakurei.app/container import from hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07container/bits: move bind bitsOphestra
This allows referring to the bits without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07container/fhs: move pathname constantsOphestra
This allows referencing FHS pathnames without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07container/check: move absolute pathnameOphestra
This allows use of absolute pathname values without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>