Skip to content

Commit 7dd19fb

Browse files
committed
Add OCI store lifecycle and pull performance
Round out the store with garbage collection, caching, and a faster pull path: - origin sidecar attached to each unpacked image tree so the GC walker can attribute layer blobs back to their owning image - root-set walker that joins image trees to blob digests - mark-and-sweep `oci prune` with `--older-than` and `--keep-bytes` - per-layer raw-tar snapshot cache (APFS clonefile) so re-unpacking the same layer reuses the previous extracted tree - ChainID-keyed stack snapshot cache that materializes a full layer-stack tree in one clonefile when the chain has been seen before - `layers/` schema marker v2 + auto-migration from legacy v1 (legacy v1 entries wiped; blobs and image trees untouched) - raw-tar layer apply mode used to populate the per-layer cache - unpack orchestrator rewritten on raw + ChainID stack caches - `oci rebuild-cache` for back-filling stack snapshots on stores that were created before the cache existed - cross-image dedup metrics in `oci inspect` (layer-reuse %, bytes saved) - `oci status` (text + `--json`) summarizing blobs / layers / stacks / pinned images - `oci pull --refresh` to revalidate the top-level manifest against the registry without re-downloading unchanged layers - parallel blob fetch via curl_multi - HTTP Range resume for partial blob downloads - per-blob progress callback + TTY / non-TTY renderers - podman / skopeo-style `policy.json` schema and loader (default, per-transport, per-repository rules) - `policy.json` plumbed into fetch and the `oci pull` CLI - `registries.d/*` overlay merged with policy (per-registry insecure / ca_bundle / auth_file); CLI flags still win
1 parent b7c5b42 commit 7dd19fb

51 files changed

Lines changed: 23022 additions & 361 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,27 @@ SRCS := \
6969
oci/ref.c \
7070
oci/cli.c \
7171
oci/digest.c \
72+
oci/digest-set.c \
7273
oci/blob-store.c \
7374
oci/media-type.c \
7475
oci/manifest.c \
7576
oci/fetch.c \
7677
oci/store.c \
7778
oci/pull.c \
7879
oci/inspect.c \
80+
oci/dedup-metrics.c \
81+
oci/status.c \
82+
oci/policy.c \
7983
oci/tar.c \
8084
oci/decompress.c \
8185
oci/layer-meta.c \
8286
oci/layer-apply.c \
87+
oci/origin-meta.c \
8388
oci/volume.c \
89+
oci/volume-list.c \
8490
oci/clone-rootfs.c \
8591
oci/unpack.c \
92+
oci/rebuild-cache.c \
8693
oci/runspec.c \
8794
oci/path-resolve.c \
8895
oci/run.c
@@ -228,28 +235,64 @@ $(BUILD_DIR)/lib/oci-mock.o: CFLAGS += $(OPENSSL_CFLAGS)
228235
## test mock terminates TLS using libssl from brew openssl@3 so the ca_file
229236
## negative cases exercise a real certificate verification path.
230237
$(BUILD_DIR)/test-oci-fetch.o: CFLAGS += $(OPENSSL_CFLAGS)
231-
$(BUILD_DIR)/test-oci-fetch: $(BUILD_DIR)/test-oci-fetch.o $(BUILD_DIR)/lib/oci-mock.o $(BUILD_DIR)/oci/fetch.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
238+
$(BUILD_DIR)/test-oci-fetch: $(BUILD_DIR)/test-oci-fetch.o $(BUILD_DIR)/lib/oci-mock.o $(BUILD_DIR)/oci/fetch.o $(BUILD_DIR)/oci/policy.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
232239
@echo " LD $@"
233240
$(Q)$(CC) $(CFLAGS) -o $@ $^ -lcurl -lpthread $(OPENSSL_LDFLAGS)
234241

235242
## Build the OCI local store unit test (native macOS, no HVF). Pure C; links
236243
## against the store wrapper plus its blob-store, digest, and cJSON deps.
237244
## cJSON is required because store.c now reads / writes index.json.
238-
$(BUILD_DIR)/test-oci-store: $(BUILD_DIR)/test-oci-store.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
245+
$(BUILD_DIR)/test-oci-store: $(BUILD_DIR)/test-oci-store.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/digest-set.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/origin-meta.o $(BUILD_DIR)/oci/volume-list.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
239246
@echo " LD $@"
240247
$(Q)$(CC) $(CFLAGS) -o $@ $^
241248

242249
## Build the OCI pull pipeline unit test (native macOS, no HVF). Shares the
243250
## TLS-terminating mock server with test-oci-fetch via tests/lib/oci-mock.
244251
$(BUILD_DIR)/test-oci-pull.o: CFLAGS += $(OPENSSL_CFLAGS)
245-
$(BUILD_DIR)/test-oci-pull: $(BUILD_DIR)/test-oci-pull.o $(BUILD_DIR)/lib/oci-mock.o $(BUILD_DIR)/oci/pull.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/fetch.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
252+
$(BUILD_DIR)/test-oci-pull: $(BUILD_DIR)/test-oci-pull.o $(BUILD_DIR)/lib/oci-mock.o $(BUILD_DIR)/oci/pull.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/fetch.o $(BUILD_DIR)/oci/policy.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/digest-set.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/origin-meta.o $(BUILD_DIR)/oci/volume-list.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
246253
@echo " LD $@"
247254
$(Q)$(CC) $(CFLAGS) -o $@ $^ -lcurl -lpthread $(OPENSSL_LDFLAGS)
248255

249256
## Build the OCI inspect renderer unit test (native macOS, no HVF). Pure
250257
## offline: no fetcher, no mock server, no libcurl. Pre-populates the store
251258
## via oci_blob_store_put_bytes + oci_store_put_ref.
252-
$(BUILD_DIR)/test-oci-inspect: $(BUILD_DIR)/test-oci-inspect.o $(BUILD_DIR)/oci/inspect.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
259+
$(BUILD_DIR)/test-oci-inspect: $(BUILD_DIR)/test-oci-inspect.o $(BUILD_DIR)/oci/inspect.o $(BUILD_DIR)/oci/dedup-metrics.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/digest-set.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/origin-meta.o $(BUILD_DIR)/oci/volume-list.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
260+
@echo " LD $@"
261+
$(Q)$(CC) $(CFLAGS) -o $@ $^
262+
263+
## Build the OCI cross-image dedup metrics unit test (native macOS, no HVF).
264+
## Drives oci_dedup_metrics_compute against scratch stores hand-populated
265+
## via oci_blob_store_put_bytes + oci_store_put_ref. Same dependency set
266+
## as test-oci-inspect, plus oci/dedup-metrics.o.
267+
$(BUILD_DIR)/test-oci-dedup-metrics: $(BUILD_DIR)/test-oci-dedup-metrics.o $(BUILD_DIR)/oci/dedup-metrics.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/digest-set.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/origin-meta.o $(BUILD_DIR)/oci/volume-list.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
268+
@echo " LD $@"
269+
$(Q)$(CC) $(CFLAGS) -o $@ $^
270+
271+
## Build the OCI rebuild-cache unit test (native macOS, no HVF). Drives
272+
## oci_rebuild_cache against scratch stores hand-populated via oci_origin_write
273+
## into a fixture <volume>/images/sha256-<hex>/ tree, then asserts that
274+
## <store>/layers/stacks/sha256/<chain>/ entries are created (commit) or left
275+
## absent (dry-run). Same dependency set as test-oci-store plus oci/rebuild-
276+
## cache.o.
277+
$(BUILD_DIR)/test-oci-rebuild-cache: $(BUILD_DIR)/test-oci-rebuild-cache.o $(BUILD_DIR)/oci/rebuild-cache.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/digest-set.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/origin-meta.o $(BUILD_DIR)/oci/volume-list.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
278+
@echo " LD $@"
279+
$(Q)$(CC) $(CFLAGS) -o $@ $^
280+
281+
## Build the OCI store-wide status unit test (native macOS, no HVF). Drives
282+
## oci_status_compute against scratch stores hand-populated via
283+
## stage_image / oci_origin_write fixture helpers and asserts the aggregated
284+
## struct fields (pin entries, unpacked entries, reachable + populated
285+
## ratios, store totals). Same dependency set as test-oci-store plus
286+
## oci/status.o.
287+
$(BUILD_DIR)/test-oci-status: $(BUILD_DIR)/test-oci-status.o $(BUILD_DIR)/oci/status.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/digest-set.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/origin-meta.o $(BUILD_DIR)/oci/volume-list.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
288+
@echo " LD $@"
289+
$(Q)$(CC) $(CFLAGS) -o $@ $^
290+
291+
## Build the OCI policy.json schema and loader unit test (native macOS, no HVF).
292+
## Pure C; links against the policy translation unit plus cJSON for the JSON
293+
## parser. Drives oci_policy_load against per-test scratch HOME / XDG / override
294+
## trees under /tmp.
295+
$(BUILD_DIR)/test-oci-policy: $(BUILD_DIR)/test-oci-policy.o $(BUILD_DIR)/oci/policy.o $(CJSON_OBJ) | $(BUILD_DIR)
253296
@echo " LD $@"
254297
$(Q)$(CC) $(CFLAGS) -o $@ $^
255298

@@ -282,7 +325,7 @@ $(BUILD_DIR)/test-oci-path-resolve: $(BUILD_DIR)/test-oci-path-resolve.o $(BUILD
282325
## the test ships an in-file elfuse_launch stub that aborts when called,
283326
## and every case installs a launch hook via oci_run_set_launch_for_testing
284327
## before invoking oci_run, so the real VM bring-up never runs from a test.
285-
$(BUILD_DIR)/test-oci-run: $(BUILD_DIR)/test-oci-run.o $(BUILD_DIR)/oci/run.o $(BUILD_DIR)/oci/runspec.o $(BUILD_DIR)/oci/path-resolve.o $(BUILD_DIR)/oci/unpack.o $(BUILD_DIR)/oci/volume.o $(BUILD_DIR)/oci/clone-rootfs.o $(BUILD_DIR)/oci/layer-apply.o $(BUILD_DIR)/oci/layer-meta.o $(BUILD_DIR)/oci/decompress.o $(BUILD_DIR)/oci/tar.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/ref.o $(BUILD_DIR)/core/sysroot.o $(BUILD_DIR)/debug/log.o $(CJSON_OBJ) $(ZSTD_OBJS) | $(BUILD_DIR)
328+
$(BUILD_DIR)/test-oci-run: $(BUILD_DIR)/test-oci-run.o $(BUILD_DIR)/oci/run.o $(BUILD_DIR)/oci/runspec.o $(BUILD_DIR)/oci/path-resolve.o $(BUILD_DIR)/oci/unpack.o $(BUILD_DIR)/oci/volume.o $(BUILD_DIR)/oci/volume-list.o $(BUILD_DIR)/oci/clone-rootfs.o $(BUILD_DIR)/oci/layer-apply.o $(BUILD_DIR)/oci/layer-meta.o $(BUILD_DIR)/oci/origin-meta.o $(BUILD_DIR)/oci/decompress.o $(BUILD_DIR)/oci/tar.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/digest-set.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/ref.o $(BUILD_DIR)/core/sysroot.o $(BUILD_DIR)/debug/log.o $(CJSON_OBJ) $(ZSTD_OBJS) | $(BUILD_DIR)
286329
@echo " LD $@"
287330
$(Q)$(CC) $(CFLAGS) -o $@ $^ -lz
288331

@@ -291,7 +334,7 @@ $(BUILD_DIR)/test-oci-run: $(BUILD_DIR)/test-oci-run.o $(BUILD_DIR)/oci/run.o $(
291334
## plus image-config flags. Used by tests/test-oci-compat.sh and
292335
## available standalone for one-off "shape an image from local files"
293336
## experiments.
294-
$(BUILD_DIR)/oci-fixture-builder: $(BUILD_DIR)/lib/oci-fixture-builder.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
337+
$(BUILD_DIR)/oci-fixture-builder: $(BUILD_DIR)/lib/oci-fixture-builder.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/digest-set.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/origin-meta.o $(BUILD_DIR)/oci/volume-list.o $(BUILD_DIR)/oci/ref.o $(CJSON_OBJ) | $(BUILD_DIR)
295338
@echo " LD $@"
296339
$(Q)$(CC) $(CFLAGS) -o $@ $^
297340

@@ -307,6 +350,13 @@ $(BUILD_DIR)/test-oci-meta: $(BUILD_DIR)/test-oci-meta.o $(BUILD_DIR)/oci/layer-
307350
@echo " LD $@"
308351
$(Q)$(CC) $(CFLAGS) -o $@ $^
309352

353+
## Build the OCI origin sidecar unit test (native macOS, no HVF). Drives
354+
## oci_origin_write against a tmpdir and verifies the resulting
355+
## .elfuse-origin.json by parsing it back through cJSON.
356+
$(BUILD_DIR)/test-oci-origin: $(BUILD_DIR)/test-oci-origin.o $(BUILD_DIR)/oci/origin-meta.o $(CJSON_OBJ) | $(BUILD_DIR)
357+
@echo " LD $@"
358+
$(Q)$(CC) $(CFLAGS) -o $@ $^
359+
310360
## Build the OCI layer applier unit test (native macOS, no HVF). Builds
311361
## tar payloads in memory, drives them through oci_layer_apply into a
312362
## tmp tree, and verifies filesystem state via lstat/readlink.
@@ -331,7 +381,7 @@ $(BUILD_DIR)/test-oci-clone: $(BUILD_DIR)/test-oci-clone.o $(BUILD_DIR)/oci/clon
331381
## Build the OCI unpack orchestrator integration smoke (native macOS,
332382
## no HVF). Pulls in the full Phase 2 OCI stack so the dependency
333383
## edges between modules are exercised at link time.
334-
$(BUILD_DIR)/test-oci-unpack: $(BUILD_DIR)/test-oci-unpack.o $(BUILD_DIR)/oci/unpack.o $(BUILD_DIR)/oci/volume.o $(BUILD_DIR)/oci/clone-rootfs.o $(BUILD_DIR)/oci/layer-apply.o $(BUILD_DIR)/oci/layer-meta.o $(BUILD_DIR)/oci/decompress.o $(BUILD_DIR)/oci/tar.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/ref.o $(BUILD_DIR)/core/sysroot.o $(BUILD_DIR)/debug/log.o $(CJSON_OBJ) $(ZSTD_OBJS) | $(BUILD_DIR)
384+
$(BUILD_DIR)/test-oci-unpack: $(BUILD_DIR)/test-oci-unpack.o $(BUILD_DIR)/oci/unpack.o $(BUILD_DIR)/oci/volume.o $(BUILD_DIR)/oci/volume-list.o $(BUILD_DIR)/oci/clone-rootfs.o $(BUILD_DIR)/oci/layer-apply.o $(BUILD_DIR)/oci/layer-meta.o $(BUILD_DIR)/oci/origin-meta.o $(BUILD_DIR)/oci/decompress.o $(BUILD_DIR)/oci/tar.o $(BUILD_DIR)/oci/store.o $(BUILD_DIR)/oci/blob-store.o $(BUILD_DIR)/oci/digest.o $(BUILD_DIR)/oci/digest-set.o $(BUILD_DIR)/oci/manifest.o $(BUILD_DIR)/oci/media-type.o $(BUILD_DIR)/oci/ref.o $(BUILD_DIR)/core/sysroot.o $(BUILD_DIR)/debug/log.o $(CJSON_OBJ) $(ZSTD_OBJS) | $(BUILD_DIR)
335385
@echo " LD $@"
336386
$(Q)$(CC) $(CFLAGS) -o $@ $^ -lz
337387

mk/tests.mk

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
test-full test-multi-vcpu test-rwx \
99
test-oci-ref test-oci-digest test-oci-blob-store test-oci-manifest \
1010
test-oci-fetch test-oci-fetch-online test-oci-store test-oci-pull \
11-
test-oci-inspect test-oci-tar test-oci-decompress test-oci-meta \
11+
test-oci-inspect test-oci-dedup-metrics test-oci-rebuild-cache \
12+
test-oci-status \
13+
test-oci-policy \
14+
test-oci-tar test-oci-decompress test-oci-meta \
15+
test-oci-origin \
1216
test-oci-layer-apply test-oci-volume test-oci-clone \
1317
test-oci-unpack test-oci-runspec test-oci-path-resolve \
1418
test-oci-run test-oci-compat oci-fixture-builder \
@@ -58,12 +62,22 @@ check: $(ELFUSE_BIN) $(TEST_DEPS) check-syscall-coverage
5862
@$(MAKE) --no-print-directory test-oci-pull
5963
@printf "\n$(BLUE)━━━ OCI inspect renderer unit tests ━━━$(RESET)\n"
6064
@$(MAKE) --no-print-directory test-oci-inspect
65+
@printf "\n$(BLUE)━━━ OCI cross-image dedup metrics unit tests ━━━$(RESET)\n"
66+
@$(MAKE) --no-print-directory test-oci-dedup-metrics
67+
@printf "\n$(BLUE)━━━ OCI rebuild-cache unit tests ━━━$(RESET)\n"
68+
@$(MAKE) --no-print-directory test-oci-rebuild-cache
69+
@printf "\n$(BLUE)━━━ OCI store-wide status unit tests ━━━$(RESET)\n"
70+
@$(MAKE) --no-print-directory test-oci-status
71+
@printf "\n$(BLUE)━━━ OCI policy.json loader unit tests ━━━$(RESET)\n"
72+
@$(MAKE) --no-print-directory test-oci-policy
6173
@printf "\n$(BLUE)━━━ OCI tar reader unit tests ━━━$(RESET)\n"
6274
@$(MAKE) --no-print-directory test-oci-tar
6375
@printf "\n$(BLUE)━━━ OCI decompression dispatch unit tests ━━━$(RESET)\n"
6476
@$(MAKE) --no-print-directory test-oci-decompress
6577
@printf "\n$(BLUE)━━━ OCI sidecar metadata unit tests ━━━$(RESET)\n"
6678
@$(MAKE) --no-print-directory test-oci-meta
79+
@printf "\n$(BLUE)━━━ OCI origin sidecar unit tests ━━━$(RESET)\n"
80+
@$(MAKE) --no-print-directory test-oci-origin
6781
@printf "\n$(BLUE)━━━ OCI layer applier unit tests ━━━$(RESET)\n"
6882
@$(MAKE) --no-print-directory test-oci-layer-apply
6983
@printf "\n$(BLUE)━━━ OCI volume bootstrap unit tests ━━━$(RESET)\n"
@@ -120,6 +134,32 @@ test-oci-pull: $(BUILD_DIR)/test-oci-pull
120134
test-oci-inspect: $(BUILD_DIR)/test-oci-inspect
121135
@$(BUILD_DIR)/test-oci-inspect
122136

137+
## Run the OCI cross-image dedup metrics unit tests (native, no HVF, no network).
138+
## Phase 1 Plan 3 C3.4: validates oci_dedup_metrics_compute against pin-only
139+
## and pin + unpacked-tree scratch stores.
140+
test-oci-dedup-metrics: $(BUILD_DIR)/test-oci-dedup-metrics
141+
@$(BUILD_DIR)/test-oci-dedup-metrics
142+
143+
## Run the OCI rebuild-cache unit tests (native, no HVF, no network).
144+
## Phase 1 Plan 3 C3.5: validates oci_rebuild_cache against scratch
145+
## stores hand-populated via oci_origin_write into a fixture
146+
## <volume>/images/sha256-<hex>/ tree.
147+
test-oci-rebuild-cache: $(BUILD_DIR)/test-oci-rebuild-cache
148+
@$(BUILD_DIR)/test-oci-rebuild-cache
149+
150+
## Run the OCI store-wide status unit tests (native, no HVF, no network).
151+
## Phase 1 Plan 4 C4.1: validates oci_status_compute against scratch stores
152+
## hand-populated via stage_image + oci_origin_write fixture helpers.
153+
test-oci-status: $(BUILD_DIR)/test-oci-status
154+
@$(BUILD_DIR)/test-oci-status
155+
156+
## Run the OCI policy.json schema and loader unit tests (native, no HVF,
157+
## no network). Phase 1 Plan 6 C6.1: validates oci_policy_load against
158+
## scratch HOME / XDG / override trees, the load-order chain, and the
159+
## per-host effective view returned by oci_policy_lookup.
160+
test-oci-policy: $(BUILD_DIR)/test-oci-policy
161+
@$(BUILD_DIR)/test-oci-policy
162+
123163
## Run the OCI tar reader unit tests (native, no HVF, no network)
124164
test-oci-tar: $(BUILD_DIR)/test-oci-tar
125165
@$(BUILD_DIR)/test-oci-tar
@@ -132,6 +172,13 @@ test-oci-decompress: $(BUILD_DIR)/test-oci-decompress
132172
test-oci-meta: $(BUILD_DIR)/test-oci-meta
133173
@$(BUILD_DIR)/test-oci-meta
134174

175+
## Run the OCI origin sidecar unit tests (native, no HVF, no network).
176+
## Covers oci_origin_write + cJSON parse-back round-trips. Phase 3 sees
177+
## the file in unpacked image directories; Plan 1's root-set walker
178+
## consumes it to attribute layer blobs back to live sysroots.
179+
test-oci-origin: $(BUILD_DIR)/test-oci-origin
180+
@$(BUILD_DIR)/test-oci-origin
181+
135182
## Run the OCI layer applier unit tests (native, no HVF, no network)
136183
test-oci-layer-apply: $(BUILD_DIR)/test-oci-layer-apply
137184
@$(BUILD_DIR)/test-oci-layer-apply

0 commit comments

Comments
 (0)