aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/init_test.go
AgeCommit message (Collapse)Author
2026-06-08all: apply modernisersOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-07container: improve capability handlingOphestra
This cleans up preserving caps for expansion and correctly sets privileged caps. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-06container/init: mount intermediate before earlyOphestra
This is usable as scratch space during early. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-07internal/params: relocate from package containerOphestra
This does not make sense as part of the public API, so make it internal. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17internal/stub: move from containerOphestra
This package solves a very specific stubbing use case, in a less than elegant manner. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17check: move from containerOphestra
This package is not container specific, and widely used across the project. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-14container: sync stubbed wait4 loop after notifyOphestra
This ensures consistent state observed by wait4 loop when running against stub. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08container: make wait4 loop available to opsOphestra
Due to the special nature of the init process, regular wait calls are unavailable. This change provides infrastructure to access wait4 loop state from Op. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-11container/init: close setup pipe earlyOphestra
This prevents leaking the setup pipe. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-10container/init: close initial process files on terminationOphestra
This closes them during the adopt wait delay. This also keeps them alive. 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-05std: rename from compOphestra
Seccomp lookup tables are going to be relocated here, and PNR constants. 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-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-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-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-07container/bits: move bind bitsOphestra
This allows referring to the bits 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-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-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-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/init: unwrap path errorsOphestra
These are also now handled by init properly, so wrapping them in self is meaningless and unreachable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-29container/initsymlink: unwrap mount errorsOphestra
The mount function now wraps its own errors in a much more descriptive type with proper message formatting. Wrapping them no longer makes any sense. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-24container/init: measure init behaviourOphestra
This used to be entirely done via integration tests, with almost no hope of error injection and coverage profile. These tests significantly increase confidence of future work in this area. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-22container: move integration test helpersOphestra
With the new instrumentation it is now possible to run init code outside integration tests. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-11container: use absolute for pathnameOphestra
This is simultaneously more efficient and less error-prone. This change caused minor API changes in multiple other packages. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-09container: remove PATH lookup behaviourOphestra
This is way higher level than the container package and does not even work unless every path is mounted in the exact same location. This behaviour causes nothing but confusion and problems, Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-28container: check cancel signal deliveryOphestra
This change also makes some parts of the test more robust. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-26container: access test case by index in helperOphestra
This is more elegant and allows for much easier extension of the tests. Mountinfo is still serialised however due to libPaths nondeterminism. Signed-off-by: Ophestra <cat@gensokyo.uk>