opencontainers / runtime-tools

OCI Runtime Tools
https://www.opencontainers.org/
Apache License 2.0
434 stars 141 forks source link

Can't use TAP= to point make localvalidation to an alternate path for node-tap binary #723

Closed dgibson closed 2 years ago

dgibson commented 3 years ago

Setting this environment variable from make apparently conflicts with a different usage of the TAP environment variable somewhere down in the stack:

$ sudo make RUNTIME=runc TAP=./node_modules/.bin/tap localvalidation
RUNTIME=runc ./node_modules/.bin/tap ./validation/config_updates_without_affect/config_updates_without_affect.t ./validation/create/create.t ./validation/default/default.t ./validation/delete/delete.t ./validation/delete_only_create_resources/delete_only_create_resources.t ./validation/delete_resources/delete_resources.t ./validation/hooks/hooks.t ./validation/hooks_stdin/hooks_stdin.t ./validation/hostname/hostname.t ./validation/kill/kill.t ./validation/kill_no_effect/kill_no_effect.t ./validation/killsig/killsig.t ./validation/linux_cgroups_blkio/linux_cgroups_blkio.t ./validation/linux_cgroups_cpus/linux_cgroups_cpus.t ./validation/linux_cgroups_devices/linux_cgroups_devices.t ./validation/linux_cgroups_hugetlb/linux_cgroups_hugetlb.t ./validation/linux_cgroups_memory/linux_cgroups_memory.t ./validation/linux_cgroups_network/linux_cgroups_network.t ./validation/linux_cgroups_pids/linux_cgroups_pids.t ./validation/linux_cgroups_relative_blkio/linux_cgroups_relative_blkio.t ./validation/linux_cgroups_relative_cpus/linux_cgroups_relative_cpus.t ./validation/linux_cgroups_relative_devices/linux_cgroups_relative_devices.t ./validation/linux_cgroups_relative_hugetlb/linux_cgroups_relative_hugetlb.t ./validation/linux_cgroups_relative_memory/linux_cgroups_relative_memory.t ./validation/linux_cgroups_relative_network/linux_cgroups_relative_network.t ./validation/linux_cgroups_relative_pids/linux_cgroups_relative_pids.t ./validation/linux_devices/linux_devices.t ./validation/linux_masked_paths/linux_masked_paths.t ./validation/linux_mount_label/linux_mount_label.t ./validation/linux_ns_itype/linux_ns_itype.t ./validation/linux_ns_nopath/linux_ns_nopath.t ./validation/linux_ns_path/linux_ns_path.t ./validation/linux_ns_path_type/linux_ns_path_type.t ./validation/linux_process_apparmor_profile/linux_process_apparmor_profile.t ./validation/linux_readonly_paths/linux_readonly_paths.t ./validation/linux_rootfs_propagation/linux_rootfs_propagation.t ./validation/linux_seccomp/linux_seccomp.t ./validation/linux_sysctl/linux_sysctl.t ./validation/linux_uid_mappings/linux_uid_mappings.t ./validation/misc_props/misc_props.t ./validation/mounts/mounts.t ./validation/pidfile/pidfile.t ./validation/poststart/poststart.t ./validation/poststart_fail/poststart_fail.t ./validation/poststop/poststop.t ./validation/poststop_fail/poststop_fail.t ./validation/prestart/prestart.t ./validation/prestart_fail/prestart_fail.t ./validation/process/process.t ./validation/process_capabilities/process_capabilities.t ./validation/process_capabilities_fail/process_capabilities_fail.t ./validation/process_oom_score_adj/process_oom_score_adj.t ./validation/process_rlimits/process_rlimits.t ./validation/process_rlimits_fail/process_rlimits_fail.t ./validation/process_user/process_user.t ./validation/root_readonly_true/root_readonly_true.t ./validation/start/start.t ./validation/state/state.t
Error: Environment variable TAP must be set to 0 or 1 only
Run `tap --help` for usage information
make: *** [Makefile:44: localvalidation] Error 1
kolyshkin commented 2 years ago

Apparently, this is used by tap itself:

[kir@kir-rhat runtime-tools]$ export TAP=5
[kir@kir-rhat runtime-tools]$ tap
Error: Environment variable TAP must be set to 0 or 1 only
Run `tap --help` for usage information
dgibson commented 2 years ago

Ok, so seems like we should probably use a different name for pointing at the tap executable at the top-level then, yes?

kolyshkin commented 2 years ago

Right. See https://github.com/opencontainers/runtime-tools/pull/743