mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 22:37:14 +08:00
7b4c3fc111
Signed-off-by: WangXiaoSong <wang.xiaosong1@zte.com.cn>
30 lines
577 B
Bash
30 lines
577 B
Bash
#!/usr/bin/env bats
|
|
|
|
load helpers
|
|
|
|
function setup() {
|
|
setup_busybox
|
|
}
|
|
|
|
function teardown() {
|
|
teardown_bundle
|
|
}
|
|
|
|
@test "umask" {
|
|
update_config '.process.user += {"umask":63}'
|
|
|
|
# run busybox detached
|
|
runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox
|
|
[ "$status" -eq 0 ]
|
|
|
|
runc exec test_busybox grep '^Umask:' "/proc/1/status"
|
|
[ "$status" -eq 0 ]
|
|
# umask 63 decimal = umask 77 octal
|
|
[[ "${output}" == *"77"* ]]
|
|
|
|
runc exec test_busybox grep '^Umask:' "/proc/self/status"
|
|
[ "$status" -eq 0 ]
|
|
# umask 63 decimal = umask 77 octal
|
|
[[ "${output}" == *"77"* ]]
|
|
}
|