| Age | Commit message (Collapse) | Author |
|
This is used for ensuring persistent data directories specific to the container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Turns out testing.T does not like being called in defer.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This field has been a noop for a long time. Remove it to prevent further confusion.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is for supporting overlay mounts for autoroot.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
This allows instrumentation of calls from goroutine without relying on finalizers.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This reduces the size of []kexpect in the test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
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>
|
|
This degrades test performance if not stubbed out.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
With the new instrumentation it is now possible to run init code outside integration tests.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This allows path and mount functions to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
These are pulled straight from the manpages.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Check ops early and eliminate duplicate checks.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
More checks are also added.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is more efficient and makes the call site cleaner.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This can now be done cleanly via path function wrappers.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Same problem as autoroot, never updated the checks after integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This will never return true otherwise unless the equivalent paths happen to be interned by the caller.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This significantly increases readability.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This helps with the eventual separation of all setup ops into individual files.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is unreachable, but nice to have just in case.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is only a nice to have feature as the init process has no additional privileges and the monitor process was never reachable anyway.
Closes #4.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These can quite easily be checked within the framework. The scanner fault injection might require updating at some point if the implementation changes.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
|
|
This allows some LSM setup in the parent.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This allows setup that relies on per-thread state like securebits and landlock, from the parent side.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The container test suite has always been somewhat inadequate due to the inability of coverage tooling to reach into containers. This has become an excuse for not testing non-container code as well, which lead to the general lack of confidence when working with container code. This change aims to be one of many to address that to some extent.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These keep track of some internal state, and they don't make sense to have multiple instances of anyway, so instead of dealing with that, just make them nonrepetable.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is useful for ops that need to be aware of previous instances of themselves.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
These functions do not change the absoluteness of a pathname.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
This is less error-prone, and allows pathname to be checked once.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
There are significant limitations to using the overlay mount, and the implementation in the kernel is quite quirky. For now the Op is quite robust, however a higher level interface for it has not been decided yet.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|