Add bats test for infra_ctr_cpuset taskset
#!/usr/bin/env bats
+# vim:set ft=bash :
load helpers
@@ -17,4 +18,11 @@ function teardown() {
output=$(crictl inspectp -o yaml "$pod_id")
[[ "$output" = *"cpus: \"0\""* ]]
check_conmon_cpuset "$pod_id" '0'
+
+ # Ensure the container gets the appropriate taskset
+ ctr_id=$(crictl create "$pod_id" "$TESTDATA"/container_redis.json "$TESTDATA"/sandbox_config.json)
+ ctr_output=$(crictl inspect -o json "$ctr_id")
+ ctr_pid=$(jq -r '.info.pid' <<< "$ctr_output")
+ ctr_taskset=$(taskset -p "$ctr_pid")
+ [[ ${ctr_taskset#*current affinity mask: } = 1 ]]
}
