@@ -13,12 +13,9 @@ eval "$IMAGES"
1313unset IMAGES
1414
1515: " ${RUNC:= " ${INTEGRATION_ROOT} /../../runc" } "
16- RECVTTY=" ${INTEGRATION_ROOT} /../../tests/cmd/recvtty/recvtty"
17- SD_HELPER=" ${INTEGRATION_ROOT} /../../tests/cmd/sd-helper/sd-helper"
18- SECCOMP_AGENT=" ${INTEGRATION_ROOT} /../../tests/cmd/seccompagent/seccompagent"
19- FS_IDMAP=" ${INTEGRATION_ROOT} /../../tests/cmd/fs-idmap/fs-idmap"
20- PIDFD_KILL=" ${INTEGRATION_ROOT} /../../tests/cmd/pidfd-kill/pidfd-kill"
21- REMAP_ROOTFS=" ${INTEGRATION_ROOT} /../../tests/cmd/remap-rootfs/remap-rootfs"
16+
17+ # Path to binaries compiled from packages in tests/cmd by "make test-binaries").
18+ TESTBINDIR=${INTEGRATION_ROOT} /../cmd/_bin
2219
2320# Some variables may not always be set. Set those to empty value,
2421# if unset, to avoid "unbound variable" error.
@@ -143,7 +140,7 @@ function init_cgroup_paths() {
143140function create_parent() {
144141 if [ -v RUNC_USE_SYSTEMD ]; then
145142 [ ! -v SD_PARENT_NAME ] && return
146- " $SD_HELPER " --parent machine.slice start " $SD_PARENT_NAME "
143+ " $TESTBINDIR /sd-helper " --parent machine.slice start " $SD_PARENT_NAME "
147144 else
148145 [ ! -v REL_PARENT_PATH ] && return
149146 if [ -v CGROUP_V2 ]; then
@@ -163,7 +160,7 @@ function create_parent() {
163160function remove_parent() {
164161 if [ -v RUNC_USE_SYSTEMD ]; then
165162 [ ! -v SD_PARENT_NAME ] && return
166- " $SD_HELPER " --parent machine.slice stop " $SD_PARENT_NAME "
163+ " $TESTBINDIR /sd-helper " --parent machine.slice stop " $SD_PARENT_NAME "
167164 else
168165 [ ! -v REL_PARENT_PATH ] && return
169166 if [ -v CGROUP_V2 ]; then
@@ -715,7 +712,7 @@ function setup_recvtty() {
715712 export CONSOLE_SOCKET=" $dir /sock"
716713
717714 # We need to start recvtty in the background, so we double fork in the shell.
718- (" $RECVTTY " --pid-file " $dir /pid" --mode null " $CONSOLE_SOCKET " & ) &
715+ (" $TESTBINDIR /recvtty " --pid-file " $dir /pid" --mode null " $CONSOLE_SOCKET " & ) &
719716}
720717
721718function teardown_recvtty() {
@@ -732,7 +729,7 @@ function teardown_recvtty() {
732729}
733730
734731function setup_seccompagent() {
735- (" ${SECCOMP_AGENT} " -socketfile=" $SECCCOMP_AGENT_SOCKET " -pid-file " $BATS_TMPDIR /seccompagent.pid" & ) &
732+ (" $TESTBINDIR /seccompagent " -socketfile=" $SECCCOMP_AGENT_SOCKET " -pid-file " $BATS_TMPDIR /seccompagent.pid" & ) &
736733}
737734
738735function teardown_seccompagent() {
@@ -790,7 +787,7 @@ function teardown_bundle() {
790787function remap_rootfs() {
791788 [ ! -v ROOT ] && return 0 # nothing to remap
792789
793- " $REMAP_ROOTFS " " $ROOT /bundle"
790+ " $TESTBINDIR /remap-rootfs " " $ROOT /bundle"
794791}
795792
796793function is_kernel_gte() {
@@ -812,7 +809,7 @@ function requires_idmap_fs() {
812809
813810 # We need to "|| true" it to avoid CI failure as this binary may return with
814811 # something different than 0.
815- stderr=$( $FS_IDMAP " $fs " 2>&1 > /dev/null || true)
812+ stderr=$( " $TESTBINDIR /fs-idmap " " $fs " 2>&1 > /dev/null || true)
816813
817814 case $stderr in
818815 * invalid\ argument)
@@ -846,7 +843,7 @@ function setup_pidfd_kill() {
846843 mkdir " ${dir} "
847844 export PIDFD_SOCKET=" ${dir} /sock"
848845
849- (" ${PIDFD_KILL} " --pid-file " ${dir} /pid" --signal " ${signal} " " ${PIDFD_SOCKET} " & ) &
846+ (" $TESTBINDIR /pidfd-kill " --pid-file " ${dir} /pid" --signal " ${signal} " " ${PIDFD_SOCKET} " & ) &
850847
851848 # ensure socket is ready
852849 retry 10 1 stat " ${PIDFD_SOCKET} "
0 commit comments