File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,27 @@ function teardown() {
36
36
fi
37
37
}
38
38
39
+ @test " runc check stdio permission in userns [terminal=false]" {
40
+ update_config ' .process.terminal = false
41
+ | .process.args = ["sh", "-c", "echo errormsg > /dev/stderr"]'
42
+
43
+ touch log
44
+ __runc create test_busybox > log 2>&1
45
+
46
+ runc start test_busybox
47
+ [ " $status " -eq 0 ]
48
+
49
+ wait_for_container 10 1 test_busybox stopped
50
+
51
+ out=$( cat log)
52
+ # Keep this to debug is useful once we have a regression about this.
53
+ echo " $out " >&2
54
+
55
+ # We should let stdio could be accessed in user ns container.
56
+ # Please see https://github.com/opencontainers/runc/issues/4475
57
+ [[ " $out " = " errormsg" ]]
58
+ }
59
+
39
60
@test " userns with simple mount" {
40
61
update_config ' .process.args += ["-c", "stat /tmp/mount-1/foo.txt"]
41
62
| .mounts += [{"source": "source-accessible/dir", "destination": "/tmp/mount-1", "options": ["bind"]}] '
You can’t perform that action at this time.
0 commit comments