Files
runc/tests/cmd
Kir Kolyshkin bd058ff2e5 tests/int: check config.json keys in update_config
Go's encoding/json (v1) matches object keys case-insensitively, and
silently ignores unknown keys. As a result, runc happily accepts a
config.json with e.g. "CPU" instead of "cpu", or "pagesize" instead of
"pageSize", while other runtimes (which run runc integration tests,
e.g. crun) may not. In addition, runc will likely switch to
encoding/json/v2 at some point, which matches keys case-sensitively,
so such keys will be silently ignored by runc, too.

Add a simple check-config helper, which checks that all keys in
config.json are known to runtime-spec (and spelled exactly as in the
spec), and call it from update_config, so tests using wrong keys fail
right away.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-10-21 15:03:33 -07:00
..
2024-12-11 10:46:33 -08:00

These are helpers used by integration tests.

They are compiled from the top-level Makefile via make test-binaries, and the resulting binaries can be found in ./_bin.