Skip to content

Commit

Permalink
Merge pull request #4095 from kolyshkin/flake-tmpfs-perm
Browse files Browse the repository at this point in the history
tests/int: fix flaky "runc run with tmpfs perm"
  • Loading branch information
kolyshkin authored Nov 7, 2023
2 parents 0580863 + 6d27922 commit 2705c9c
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 2705c9c

Please sign in to comment.