Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/int: fix flaky "runc run with tmpfs perm" #4095

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/integration/run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function teardown() {

runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "$mode" ]
[ "${lines[0]}" = "$mode" ]
}

@test "runc run with tmpfs perms" {
Expand All @@ -101,13 +101,13 @@ function teardown() {
# Directory is to be created by runc.
runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "444" ]
[ "${lines[0]}" = "444" ]

# Run a 2nd time with the pre-existing directory.
# Ref: https://github.com/opencontainers/runc/issues/3911
runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "444" ]
[ "${lines[0]}" = "444" ]

# Existing directory, custom perms, no mode on the mount,
# so it should use the directory's perms.
Expand All @@ -116,15 +116,15 @@ function teardown() {
# shellcheck disable=SC2016
runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "710" ]
[ "${lines[0]}" = "710" ]

# Add back the mode on the mount, and it should use that instead.
# Just for fun, use different perms than was used earlier.
# shellcheck disable=SC2016
update_config '.mounts[-1].options = ["mode=0410"]'
runc run test_tmpfs
[ "$status" -eq 0 ]
[ "$output" = "410" ]
[ "${lines[0]}" = "410" ]
}

@test "runc run [runc-dmz]" {
Expand Down
Loading