tests: dump/restore a container with cgroups

Signed-off-by: Andrey Vagin <avagin@openvz.org>
This commit is contained in:
Andrew Vagin 2015-07-30 08:24:27 +03:00 committed by Andrey Vagin
parent b40c790184
commit e2e6a73b62
1 changed files with 8 additions and 0 deletions

View File

@ -5,9 +5,11 @@ import (
"io/ioutil"
"os"
"strings"
"syscall"
"testing"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/configs"
)
func TestCheckpoint(t *testing.T) {
@ -28,6 +30,12 @@ func TestCheckpoint(t *testing.T) {
config := newTemplateConfig(rootfs)
config.Mounts = append(config.Mounts, &configs.Mount{
Destination: "/sys/fs/cgroup",
Device: "cgroup",
Flags: defaultMountFlags | syscall.MS_RDONLY,
})
factory, err := libcontainer.New(root, libcontainer.Cgroupfs)
if err != nil {