cgroup2: split fs2 from fs

split fs2 package from fs, as mixing up fs and fs2 is very likely to result in
unmaintainable code.

Inspired by containerd/cgroups#109

Fix #2157

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2019-11-07 17:25:49 +09:00
parent 5e63695384
commit 88e8350de2
43 changed files with 952 additions and 898 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ import (
"path/filepath"
"testing"
"github.com/opencontainers/runc/libcontainer/cgroups/fscommon"
"github.com/opencontainers/runc/libcontainer/configs"
)
@@ -59,7 +60,7 @@ func (c *cgroupTestUtil) cleanup() {
// Write the specified contents on the mock of the specified cgroup files.
func (c *cgroupTestUtil) writeFileContents(fileContents map[string]string) {
for file, contents := range fileContents {
err := writeFile(c.CgroupPath, file, contents)
err := fscommon.WriteFile(c.CgroupPath, file, contents)
if err != nil {
c.t.Fatal(err)
}