aboutsummaryrefslogtreecommitdiffhomepage
path: root/container
AgeCommit message (Collapse)Author
2025-11-06container/std: syscall JSON adapterOphestra
This provides cross-platform JSON adapter for syscall number. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container: add 386 constantsOphestra
While it is unlikely a use case for hakurei on i686 exists, it does not hurt to have this support. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05treewide: fit test untyped int literals in 32-bitOphestra
This enables hakurei test suite to run on 32-bit targets. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container/std: relocate rule typesOphestra
This enables its use in hst for #15. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container/seccomp: use native typesOphestra
This prepares NativeRule for relocation to std for #15. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container/seccomp: alias libseccomp typesOphestra
This enables tests to refer to these types and check its size. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05std: relocate seccomp lookup tablesOphestra
This should enable resolving NativeRule in hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container/seccomp/pnr: define pseudo syscallsOphestra
This eliminates the cgo dependency from syscall lookup. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05std: rename from compOphestra
Seccomp lookup tables are going to be relocated here, and PNR constants. 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-03message: rename NewMsg to NewOphestra
Should have done this when relocating this from container. Now is a good time to rename it before v0.3.x. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-31container/params: expose pipeOphestra
This increases flexibility of how caller wants to handle the I/O. Also makes it no longer rely on finalizer. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-25container/executable: handle nil msgOphestra
This is useful in some tests. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-23container/init: do not suspend outputOphestra
Init is not very talkative after process start even when verbose. Suspending output here is pointless and does more harm than good. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-23container/init: improve signal handlingOphestra
The SIGTERM signal is delivered in many other cases and can lead to strange behaviour. The unconditional resume of the logger also causes strange behaviour in the cancellation forwarding path. This change also passes through additional signals. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-22container/syscall: export prctl wrapperOphestra
This is useful as package "syscall" does not provide such a wrapper. This change also improves error handling to fully conform to the manpage. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-22container/init: check msg in entrypointOphestra
This covers invalid call to Init. 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-21container/init: check use constants for open flagsOphestra
These bits are arch-specific. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-21container/syscall: dot-import syscallOphestra
This avoids having arch-specific constants for arm64. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-15container/init: use one channel for wait4Ophestra
When using two channels it is possible for the other case to be reached before all pending winfo are consumed, causing incorrect reporting. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-13container: synchronise after notifyOphestra
This should eliminate intermittent failures in the forward test. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-13container/seccomp: remove export pipeOphestra
This was only useful when wrapping bwrap. 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-13container/initplace: remove indirect methodOphestra
This is no longer useful and is highly error-prone. 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-10container/stub: mark test overrides as helperOphestra
This fixes line information in test reporting messages. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-09container/init: unwrap descriptive fatal errorOphestra
These errors are printed with a descriptive message prefixed to them, so it is more readable to expose the underlying errno. 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-07container/check: relocate overlay escapeOphestra
This is used in hst to format strings. 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>
2025-10-07container: move seccomp preset bitsOphestra
This allows holding the bits without cgo. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-29container: remove global msgOphestra
This frees all container instances of side effects. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-28container/init: reduce verbose noiseOphestra
This makes it possible to optionally omit the identifying verbose message, for when the Op implementation can provide a much more useful message in its case, using information not yet available to the String method. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-27container/output: move global output to msgOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-27container/output: export suspendable writerOphestra
This is quite useful for other packages as well. This change prepares internal/hlog for removal. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-13container: initialise cmd earlyOphestra
This allows use of more cmd methods. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-04container/dispatcher: optional stub wait4 signal associationOphestra
This synchronises the wait4 return after the toplevel signal call in lowlastcap_signaled_cancel_forward_error. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-04container/stub: remove function call in handleExitOphestra
This gets inlined and does not cause problems usually but turns out -coverpkg uninlines it and breaks the recovery. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-04container/dispatcher: remove wait4 test logOphestra
Turns out the reporting methods are not safe for concurrent use, despite the claim in testing.T doc comment. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-04container/stub: override goexit methodsOphestra
FailNow, Fatal, Fatalf, SkipNow, Skip and Skipf must be called from the goroutine created by the test. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-02container/dispatcher: stub.Call initialisation helper functionOphestra
This keeps composites analysis happy without making the test cases (too) bloated. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-31container/stub: export stub helpersOphestra
These are very useful in many packages containing relatively large amount of code making calls to difficult or impossible to stub functions. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-31container/msg: optionally provide error messagesOphestra
This makes handling of fatal errors a lot less squirmy. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-30container: wrap container init start errorsOphestra
This helps indicate the exact origin and nature of the error. This eliminates generic WrapErr from container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-29container/mount: unwrap vfs decoder errorsOphestra
These are now handled by init. This eliminates generic WrapErr from mount and procPaths. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-29container/dispatcher: check simple test errors via reflectOphestra
Again, avoids the errors package concealing unexpected behaviours. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-29container/vfs: wrap decoder errorsOphestra
This passes line information and handles strconv errors so it reads better. Signed-off-by: Ophestra <cat@gensokyo.uk>