File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,26 @@ function teardown() {
36
36
fi
37
37
}
38
38
39
+ @test " runc check stdio in userns [terminal=false]" {
40
+ update_config ' (.. | select(.terminal? != null)) .terminal |= false
41
+ | (.. | select(.[]? == "sh")) += ["-c", "touch /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
+ out=$( cat log)
50
+ # We should let stdio could be accessed in user ns container.
51
+ # Please see https://github.com/opencontainers/runc/issues/4475
52
+ # We should not get error: touch: /dev/stderr: Permission denied.
53
+ [[ " $out " = " " ]]
54
+
55
+ runc kill test_busybox
56
+ runc delete test_busybox
57
+ }
58
+
39
59
@test " userns with simple mount" {
40
60
update_config ' .process.args += ["-c", "stat /tmp/mount-1/foo.txt"]
41
61
| .mounts += [{"source": "source-accessible/dir", "destination": "/tmp/mount-1", "options": ["bind"]}] '
You can’t perform that action at this time.
0 commit comments