Skip to content

Commit

Permalink
get cpuset file from host as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar van Leeuwen committed Aug 20, 2024
1 parent b24c30d commit a53074e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bot/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ else
fi
# Bind mount /sys/fs/cgroup so that we can determine the amount of memory available in our cgroup for
# Reframe configuration
TEST_STEP_ARGS+=("--extra-bind-paths" "/sys/fs/cgroup:/hostsys/fs/cgroup:ro")
TEST_STEP_ARGS+=("--extra-bind-paths" "/sys/fs/cgroup:/hostsys/fs/cgroup:ro,/proc/self:/hostproc/self:ro"")
# prepare arguments to test_suite.sh (specific to test step)
declare -a TEST_SUITE_ARGS=()
Expand Down
4 changes: 2 additions & 2 deletions test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ if [[ "${cpuinfo}" =~ (Core\(s\) per socket:[^0-9]*([0-9]+)) ]]; then
else
fatal_error "Failed to get the number of cores per socket for the current test hardware with lscpu."
fi
cgroup_v1_mem_limit="/hostsys/fs/cgroup/memory/$(</proc/self/cpuset)/memory.limit_in_bytes"
cgroup_v2_mem_limit="/hostsys/fs/cgroup/$(</proc/self/cpuset)/memory.max"
cgroup_v1_mem_limit="/hostsys/fs/cgroup/memory/$(</hostproc/self/cpuset)/memory.limit_in_bytes"
cgroup_v2_mem_limit="/hostsys/fs/cgroup/$(</hostproc/self/cpuset)/memory.max"
echo "cpuset_file: $(</proc/self/cpuset)"
echo "ls -al /hostsys/fs/cgroup/memory/$(</proc/self/cpuset)"
ls -al "/hostsys/fs/cgroup/memory/$(</proc/self/cpuset)"
Expand Down

0 comments on commit a53074e

Please sign in to comment.