From 6210ceb85675546a89e60417e26bd8929a553c58 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 29 Apr 2026 23:07:12 -0700 Subject: [PATCH] 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 --- tests/integration/exec.bats | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/integration/exec.bats b/tests/integration/exec.bats index 11e4bb473..5d936f402 100644 --- a/tests/integration/exec.bats +++ b/tests/integration/exec.bats @@ -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" {