Skip to content

Commit 7042b4a

Browse files
committed
test: execInSubprocess: pass current env
Otherwise the LD_PRELOAD, set in a CI job, is not being used, leading to distro libseccomp version being used instead of the one we prepared. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent ef6d1b6 commit 7042b4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

seccomp_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ func execInSubprocess(t *testing.T, f func(t *testing.T)) {
3030
cmd.Args = append(cmd.Args, arg)
3131
}
3232
}
33-
cmd.Env = []string{subprocessEnvKey + "=1"}
33+
cmd.Env = append(os.Environ(),
34+
subprocessEnvKey+"=1",
35+
)
3436
cmd.Stdin = os.Stdin
3537

3638
var b strings.Builder

0 commit comments

Comments
 (0)