aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/dispatcher_test.go
AgeCommit message (Collapse)Author
2026-06-08all: apply modernisersOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-04container/initoverlay: configure via fsconfigOphestra
This works around the page size limit at the cost of negligible performance regressions. Closes #34. 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-25internal/netlink: wrap netpoll via contextOphestra
This removes netpoll boilerplate for the most common use case. 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-02-17container/initplace: return nil for createTemp error injectionOphestra
This matches os package behaviour, and avoids adding the cleanup. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-11container/init: configure interface loOphestra
This enables loopback networking when owning the net namespace. 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/initdaemon: copy wstatus from wait4 loopOphestra
Due to the special nature of the init process, direct use of wait outside the wait4 loop is racy. This change copies the wstatus from wait4 loop state instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08container: start daemons within containerOphestra
This is useful for daemons internal to the container. The only current use case is pipewire-pulse. 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-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-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-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-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-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/dispatcher: check test errors via reflectOphestra
Using the errors package might conceal some incorrect behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25container/dispatcher: remove exit stub test logOphestra
Turns out testing.T does not like being called in defer. 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-23container/dispatcher: start goroutine in dispatcherOphestra
This allows instrumentation of calls from goroutine without relying on finalizers. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-23container/dispatcher: instrument each goroutine individuallyOphestra
Scheduler nondeterminism cannot be accounted for, so do this instead. There should not be any performance penalty as these calls are optimised out for direct. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-23container/params: pass fd instead of fileOphestra
The file is very difficult to stub. Pass fd instead as it is the value that is actually useful. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-22container/init: call lockOSThread through dispatcherOphestra
This degrades test performance if not stubbed out. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-22container/path: use syscall dispatcherOphestra
This allows path and mount functions to be instrumented. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-22container/init: wrap syscall helper functionsOphestra
This allows tests to stub all kernel behaviour, enabling measurement of all function call arguments and error injection. Signed-off-by: Ophestra <cat@gensokyo.uk>