Merge pull request #8023 from fuweid/fix-7965
deflake: TestContainerPids
This commit is contained in:
commit
aef75c4183
@ -30,7 +30,19 @@ var (
|
||||
testImage = images.Get(images.BusyBox)
|
||||
testMultiLayeredImage = images.Get(images.VolumeCopyUp)
|
||||
shortCommand = withProcessArgs("true")
|
||||
longCommand = withProcessArgs("/bin/sh", "-c", "while true; do sleep 1; done")
|
||||
// NOTE: The TestContainerPids needs two running processes in one
|
||||
// container. But busybox:1.36 sh shell, the `sleep` is a builtin.
|
||||
//
|
||||
// /bin/sh -c "type sleep"
|
||||
// sleep is a shell builtin
|
||||
//
|
||||
// We should use `/bin/sleep` instead of `sleep`. And busybox sh shell
|
||||
// will execve directly instead of clone-execve if there is only one
|
||||
// command. There will be only one process in container if we use
|
||||
// '/bin/sh -c "/bin/sleep inf"'.
|
||||
//
|
||||
// So we append `&& exit 0` to force sh shell uses clone-execve.
|
||||
longCommand = withProcessArgs("/bin/sh", "-c", "/bin/sleep inf && exit 0")
|
||||
)
|
||||
|
||||
func TestImagePullSchema1WithEmptyLayers(t *testing.T) {
|
||||
|
@ -48,7 +48,7 @@ var initOnce sync.Once
|
||||
func initImages(imageListFile string) {
|
||||
imageList = ImageList{
|
||||
Alpine: "ghcr.io/containerd/alpine:3.14.0",
|
||||
BusyBox: "ghcr.io/containerd/busybox:1.28",
|
||||
BusyBox: "ghcr.io/containerd/busybox:1.36",
|
||||
Pause: "registry.k8s.io/pause:3.8",
|
||||
ResourceConsumer: "registry.k8s.io/e2e-test-images/resource-consumer:1.10",
|
||||
VolumeCopyUp: "ghcr.io/containerd/volume-copy-up:2.1",
|
||||
|
Loading…
Reference in New Issue
Block a user