tests/int: amend runc exec --env test

This tests checks that "runc exec --env VAR=VAR ..." actually appends
VAR=VAL to the exec's environment.

Add additional checks that:
 - process.env from config.json is also inherited;
 - HOME is set.

Those checks do not reveal any new issues.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2026-04-29 23:07:12 -07:00
parent eb7eaf19b6
commit 6210ceb856
+6 -2
View File
@@ -100,8 +100,12 @@ function teardown() {
runc exec --env RUNC_EXEC_TEST=true test_busybox env
[ "$status" -eq 0 ]
[[ ${output} == *"RUNC_EXEC_TEST=true"* ]]
[[ "$output" == *"RUNC_EXEC_TEST=true"* ]]
# Env should inherit what's in config.json.
[[ "$output" == *'PATH='* ]]
[[ "$output" == *'TERM='* ]]
# Env should have HOME set from container's /etc/passwd.
[[ "$output" == *'HOME='* ]]
}
@test "runc exec --user" {