Commit graph

21 commits

Author SHA1 Message Date
Daniel J Walsh bb4d269087
Specifying --ipc=host --pid=host is broken
For some reason we were overwriting memory when handling both
--pid=host and --ipc=host.  Simplified the code to handle this
correctly, and add test to make sure it does not happen again.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 14:53:54 -04:00
Daniel J Walsh a5e37ad280
Switch all references to github.com/containers/libpod -> podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 08:23:45 -04:00
Daniel J Walsh a75f96ae90
Turn on a bunch more remote tests
We need to be more specific about the remote tests we turn off.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-22 13:13:28 -04:00
Daniel J Walsh a10d5b42ab
Change buildtag for remoteclient to remote for testing
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-06 15:22:24 -04:00
Valentin Rothberg 8489dc4345 move go module to v2
With the advent of Podman 2.0.0 we crossed the magical barrier of go
modules.  While we were able to continue importing all packages inside
of the project, the project could not be vendored anymore from the
outside.

Move the go module to new major version and change all imports to
`github.com/containers/libpod/v2`.  The renaming of the imports
was done via `gomove` [1].

[1] https://github.com/KSubedi/gomove

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-06 15:50:12 +02:00
Brent Baude 4d2e926a2a enable run_ns integration tests
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-26 10:42:40 -05:00
Brent Baude 5c968b7693 Force integration tests to pass
Failing tests are now skipped and we should work from this.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-21 13:48:50 -05:00
Jhon Honce 60d0be17fc Refactor tests when checking for error exit codes
Rather than checking for non-zero, we need to check for >0 to
distinguish between timeouts and error exit codes.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-10-16 08:10:07 -07:00
Giuseppe Scrivano 0b57e77d7c
libpod: support for cgroup namespace
allow a container to run in a new cgroup namespace.

When running in a new cgroup namespace, the current cgroup appears to
be the root, so that there is no way for the container to access
cgroups outside of its own subtree.

By default it uses --cgroup=host to keep the previous behavior.

To create a new namespace, --cgroup=private must be provided.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-18 10:32:25 +02:00
baude f610a485c1 use imagecaches for local tests
when doing localized tests (not varlink), we can use secondary image
stores as read-only image caches.  this cuts down on test time
significantly because each test does not need to restore the images from
a tarball anymore.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-29 15:12:05 -05:00
Giuseppe Scrivano 6b9c1e2857
test: enable userns e2e tests for rootless
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-08 21:23:43 +02:00
baude c6b205be77
Enable rootless integration tests
Signed-off-by: baude <bbaude@redhat.com>
2019-03-19 15:01:48 +01:00
baude d5546008ab ginkgo status improvements
a series of improvements to our ginkgo test framework so we can
get better ideas of whats going on when run in CI

Signed-off-by: baude <bbaude@redhat.com>
2019-03-08 13:28:33 -06:00
Chris Evich f67859ffb3
Fix SystemExec completion race
Some callers assume when SystemExec returns, the command has completed.
Other callers explicitly wait for completion (as required).  However,
forgetting to do that is an incredibly easy mistake to make.  Fix this
by adding an explicit parameter to the function.  This requires
every caller to deliberately state whether or not a completion-check
is required.

Also address **many** resource naming / cleanup completion-races.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-01 09:18:45 -05:00
baude b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
Yiqiao Pu 74bcfc2f96 Separate common used test functions and structs to test/utils
Put common used test functions and structs to a separated package.
So we can use them for more testsuites.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:00 +08:00
Daniel J Walsh 28a2bf827a Add new tests for ipc namespace sharing
We seem to be having a few flakes on namespace sharing.
Adding this test to make sure sharing with the host is working correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1485
Approved by: mheon
2018-09-17 16:55:11 +00:00
Daniel J Walsh 43bcf99e6d Change shm test to be less flaky.
This tests fails a lot, I think because of a race condition. Changing to
just make sure the inode of the /dev/shm on the host is the same as inside
the container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1420
Approved by: mheon
2018-09-07 12:05:54 +00:00
baude 433cbd5254 Show duration for each ginkgo test and test speed improvements
Because our tests are getting so long, we want to be able to audit which tests are taking
the longest to complete.  This may indicate a bad test, bad CI, bad code, etc and therefore
should be auditable.

Also, make speed improvements to tests by making sure we only unpack caches images that
actually get used.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1178
Approved by: mheon
2018-07-28 22:51:08 +00:00
Daniel J Walsh 2c81a756e3 Update the version of conmon used in test
Also start using podmin in /usr/libexec/podman rather then crio.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #979
Approved by: baude
2018-06-22 13:19:08 +00:00
baude d26023e4a8 More ginkgo migration
* attach
* run_exit
* save
* tag
* version
* run_privileged -> privileged

Signed-off-by: baude <bbaude@redhat.com>
2018-02-07 14:55:20 -06:00