Skip to content

Commit cc1aa34

Browse files
authored
Merge pull request #599 from kinvolk/alban/rootfs-readonly
runtimetest: fix root readonly check
2 parents cb96426 + 9e919c6 commit cc1aa34

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

cmd/runtimetest/main.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,7 @@ func validateRootFS(spec *rspec.Spec) error {
328328
if err == nil {
329329
return specerror.NewError(specerror.RootReadonlyImplement, fmt.Errorf("rootfs must be readonly"), rspec.Version)
330330
}
331-
} else {
332-
err := testWriteAccess("/")
333-
if err != nil {
334-
return specerror.NewError(specerror.RootReadonlyImplement, fmt.Errorf("rootfs must not be readonly"), rspec.Version)
335-
}
336-
}
331+
} // no need to check the else case: unwriteable root is not a spec violation
337332

338333
return nil
339334
}

validation/root_readonly_false.go

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)