Skip to content

Commit e963cf4

Browse files
author
Zhou Hao
authored
Merge pull request #650 from kinvolk/dongsu/test-rootfs-prop
validation: add more test cases for private & slave propagations
2 parents b13ff6a + e2d34c1 commit e963cf4

File tree

3 files changed

+35
-36
lines changed

3 files changed

+35
-36
lines changed
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package main
2+
3+
import (
4+
"github.com/mndrix/tap-go"
5+
"github.com/opencontainers/runtime-tools/validation/util"
6+
)
7+
8+
func testLinuxRootPropagation(propMode string) error {
9+
g, err := util.GetDefaultGenerator()
10+
if err != nil {
11+
util.Fatal(err)
12+
}
13+
g.SetupPrivileged(true)
14+
g.SetLinuxRootPropagation(propMode)
15+
return util.RuntimeInsideValidate(g, nil)
16+
}
17+
18+
func main() {
19+
t := tap.New()
20+
t.Header(0)
21+
defer t.AutoPlan()
22+
23+
cases := []string{
24+
"shared",
25+
"slave",
26+
"private",
27+
"unbindable",
28+
}
29+
30+
for _, c := range cases {
31+
if err := testLinuxRootPropagation(c); err != nil {
32+
t.Fail(err.Error())
33+
}
34+
}
35+
}

validation/linux_rootfs_propagation_shared.go

-18
This file was deleted.

validation/linux_rootfs_propagation_unbindable.go

-18
This file was deleted.

0 commit comments

Comments
 (0)