diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-10-11 11:56:42 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-10-11 11:58:15 -0700 |
commit | d40d80106988e9302aaa354d4f58caa6c31429b4 (patch) | |
tree | 8542738ab1a4c879b431dd5966f3d9940c650ecc /runsc/cgroup | |
parent | f413e4b11794cd71cc3b2b64c8f6861f5394a3f1 (diff) |
Sandbox cgroup tests
Verify that cgroup is being properly set.
PiperOrigin-RevId: 216736137
Change-Id: I0e27fd604eca67e7dd2e3548dc372ca9cc416309
Diffstat (limited to 'runsc/cgroup')
-rw-r--r-- | runsc/cgroup/cgroup.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runsc/cgroup/cgroup.go b/runsc/cgroup/cgroup.go index 6a0092be8..af0252bb3 100644 --- a/runsc/cgroup/cgroup.go +++ b/runsc/cgroup/cgroup.go @@ -123,6 +123,8 @@ func fillFromAncestor(path string) (string, error) { return val, nil } +// countCpuset returns the number of CPU in a string formatted like: +// "0-2,7,12-14 # bits 0, 1, 2, 7, 12, 13, and 14 set" - man 7 cpuset func countCpuset(cpuset string) (int, error) { var count int for _, p := range strings.Split(cpuset, ",") { |