Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions cmd/runtimetest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ const PR_GET_NO_NEW_PRIVS = 39
const specConfig = "config.json"

var (
defaultFS = map[string]string{
"/proc": "proc",
"/sys": "sysfs",
"/dev/pts": "devpts",
"/dev/shm": "tmpfs",
}

defaultSymlinks = map[string]string{
"/dev/fd": "/proc/self/fd",
"/dev/stdin": "/proc/self/fd/0",
Expand Down Expand Up @@ -271,28 +264,6 @@ func validateRootFS(spec *rspec.Spec) error {
return nil
}

func validateDefaultFS(spec *rspec.Spec) error {
logrus.Debugf("validating linux default filesystem")

mountInfos, err := mount.GetMounts()
if err != nil {
return err
}

mountsMap := make(map[string]string)
for _, mountInfo := range mountInfos {
mountsMap[mountInfo.Mountpoint] = mountInfo.Fstype
}

for fs, fstype := range defaultFS {
if !(mountsMap[fs] == fstype) {
return fmt.Errorf("%v must exist and expected type is %v", fs, fstype)
}
}

return nil
}

func validateLinuxDevices(spec *rspec.Spec) error {
logrus.Debugf("validating linux devices")

Expand Down Expand Up @@ -612,10 +583,6 @@ func validate(context *cli.Context) error {
test: validateDefaultSymlinks,
description: "default symlinks",
},
{
test: validateDefaultFS,
description: "default file system",
},
{
test: validateDefaultDevices,
description: "default devices",
Expand Down