aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/exec_test.go
AgeCommit message (Collapse)Author
13 hourspkg: move from internalHEADstagingmasterdevelopOphestra
Closes #43. Signed-off-by: Ophestra <cat@gensokyo.uk>
3 daysinternal/pkg: treat bare carriage return as end-of-line markerOphestra
This avoids having progress indicators mess up logging. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-08-12internal/pkg: in-flight error resolutionOphestra
The DCE is a slow and overcomplicated solution to a simple problem. This change replaces the DCE by resolving errors in-flight. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-23internal/pkg: implementation revisionsOphestra
This enables changing the behaviour of an artifact implementation without changing its IR structure. Unfortunately this changes the IR header structure resulting in many rebuilds. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-08internal/pkg: expose cure whenceOphestra
Useful for cure determinism validation of KindExec. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-22internal/pkg: arch-specific expected offline substitutedOphestra
IR includes the target architecture name. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13internal/pkg: check exec substitutionOphestra
This relies on the testtool having ident as relevant input to assert successful substitution. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13internal/pkg: verify status kindOphestra
While it is still impossible to reliably determine the expected contents of these status files, this checks their nature for expected substitution behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13internal/pkg: record cure faultsOphestra
These are useful for troubleshooting. This change records them in a separate directory. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-12internal/pkg: hold artifact in DCEOphestra
This is significantly slower but enables much better error reporting. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-12internal/pkg: optionally measure exec artifactOphestra
Useful for verifying deterministic output without enabling network access. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-12internal/pkg: content-based dependency substitutionOphestra
This change introduces a new fast path for FloodArtifact. It is taken when a curing artifact has identical-by-content controlled relevant inputs and are otherwise identical to an already-cured artifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-07internal/pkg: optionally register binfmtOphestra
This transparently supports curing foreign exec artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-06internal/pkg: centralise exec testdata checksumsOphestra
This significantly reduces maintenance burden. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-06internal/pkg: improve output measuringOphestra
This significantly improves readability and maintainability. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-03internal/pkg: cache flagsOphestra
This is cleaner for extending the API. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-26internal/pkg: isolate container paramsOphestra
This enables exporting container params for interactive troubleshooting within the cure container. 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>
2026-02-05internal/pkg: standardise artifact IROphestra
This should hopefully provide good separation between the artifact curing backend implementation and the (still work in progress) language. Making the IR parseable also guarantees uniqueness of the representation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27internal/pkg: encode checksum in identOphestra
This also rearranges the ident ir to be more predictable, and avoids an obvious and somewhat easy to get into inconsistent state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27internal/pkg: exclusive artifactsOphestra
This alleviates scheduler overhead when curing many artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-24internal/pkg: block on implementation entryOphestra
This avoids blocking while not in Cure method of the implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-19internal/pkg: make checksum available to cureOphestra
This enables deduplication by value as implemented in execArtifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-17internal/pkg: deduplicate dependency errorsOphestra
This significantly simplifies error reporting for caller. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-15internal/pkg: cache computed identifiersOphestra
This eliminates duplicate identifier computations. The new implementation also significantly reduces allocations while computing identifier for a large dependency tree. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-12internal/pkg: caller-supplied reporting name for execOphestra
This does not have a reasonable way of inferring the underlying name. For zero value it falls back to base of executable pathname. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-11internal/pkg: exec with specific timeoutOphestra
This change also updates the documentation of NewExec. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-11internal/pkg: do not discard the result of compactOphestra
This result was mistakenly unused resulting in incorrect identifiers for artifacts with duplicate dependencies. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-11internal/pkg: compare interfaces for host netOphestra
An upcoming improvement in the container init makes the current host net check return the same result for both cases. This change Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-09internal/pkg: move dependency flooding to cacheOphestra
This imposes a hard upper limit to concurrency during dependency satisfaction and moves all dependency-related code out of individual implementations of Artifact. This change also includes ctx and msg as part of Cache. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-08internal/pkg: support explicit overlay mountOphestra
This removes all but the /work/ auto overlay behaviour and enables much greater flexibility. This also renames ExecContainerPath to ExecPath so it is easier to type. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: tar optional fileOphestra
This allows tar to take a single-file directory Artifact as input. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: automatic overlay mount on workOphestra
This directly submits the upperdir to cache. It is primarily used in bootstrapping where tools are limited and should not be used unless there is a very good reason to. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: automatic overlay mount on tmpOphestra
This sets up the last Artifact to target /tmp as a writable overlay mount backed by the host side temp directory. This is useful for an Artifact containing source code to be built for another Artifact for example. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: automatic overlay mount on rootOphestra
This makes it possible to use an Artifact as root without arranging for directory creation in the Artifact ahead of time. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg/testdata: check networkOphestra
This validates hostNet state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: known checksum exec artifactOphestra
This optionally attaches an output checksum to an execArtifact and enables host networking for the resulting container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: relocate testtool workaroundOphestra
This can be reused in other test cases. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: exec nil path check during cureOphestra
This results in os.ErrInvalid instead of a panic, which hopefully improves user experience. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: implement exec artifactOphestra
This runs a program in a container environment. Artifacts can be made available to the container, they are cured concurrently and mounted in order. Signed-off-by: Ophestra <cat@gensokyo.uk>