#!/usr/bin/env bats # Exec CPU affinity tests. For more details, see: # - https://github.com/opencontainers/runtime-spec/pull/1253 load helpers INITIAL_CPU_MASK="$(grep -F Cpus_allowed_list: /proc/self/status | awk '{ print $2 }')" function setup() { requires smp cgroups_cpuset setup_busybox echo "Initial CPU mask: $INITIAL_CPU_MASK" >&2 echo "---" >&2 } function teardown() { teardown_bundle } function first_cpu() { sed 's/[-,].*//g'