forked from containers/podman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- run --userns=keep-id: confirm that $HOME gets set (containers#8013) - inspect: confirm that JSON output is a sane number of lines (10 or more), not an unreadable one-liner (containers#8011 and containers#8021). Do so with image, pod, network, volume because the code paths might be different. - cgroups: confirm that 'run' preserves cgroup manager (containers#7970) - sdnotify: reenable tests, and hope CI doesn't hang. This test was disabled on August 18 because CI jobs were hanging and timing out. My suspicion was that it was containers#7316, which in turn seems to have hinged on conmon containers#182. The latter was merged on Sep 16, so let's cross our fingers and see what happens. Also: remove inaccurate warning from a networking test. And, wow, fix is_cgroupsv2(), it has never actually worked. Signed-off-by: Ed Santiago <[email protected]>
- Loading branch information
1 parent
1814bac
commit 1646da8
Showing
8 changed files
with
88 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bats -*- bats -*- | ||
# | ||
# cgroups-related tests | ||
# | ||
|
||
load helpers | ||
|
||
@test "podman run, preserves initial --cgroup-manager" { | ||
skip_if_remote "podman-remote does not support --cgroup-manager" | ||
|
||
if is_rootless && is_cgroupsv1; then | ||
skip "not supported as rootless under cgroups v1" | ||
fi | ||
|
||
# Find out our default cgroup manager, and from that, get the non-default | ||
run_podman info --format '{{.Host.CgroupManager}}' | ||
case "$output" in | ||
systemd) other="cgroupfs" ;; | ||
cgroupfs) other="systemd" ;; | ||
*) die "Unknown CgroupManager '$output'" ;; | ||
esac | ||
|
||
run_podman --cgroup-manager=$other run --name myc $IMAGE true | ||
run_podman container inspect --format '{{.HostConfig.CgroupManager}}' myc | ||
is "$output" "$other" "podman preserved .HostConfig.CgroupManager" | ||
|
||
# Restart the container, without --cgroup-manager option (ie use default) | ||
# Prior to #7970, this would fail with an OCI runtime error | ||
run_podman start myc | ||
|
||
run_podman rm myc | ||
} | ||
|
||
# vim: filetype=sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters