mirror of
https://github.com/opencontainers/runc.git
synced 2025-09-26 19:41:35 +08:00
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"* ]]
|
|
}
|