-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: cleanups #2757
tests/int: cleanups #2757
Commits on Feb 8, 2021
-
tests/int: don't depend on BUSYBOX_BUNDLE var
All the tests are run with cd to bundle directory, so it does not make ense to explicitly specify it. This relies on the feature of functions like set_cgroups_path or update_config to use current directory by default. In those cases where we need to change the directory (runc create/run -b), save the current one and use it later. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 64d5702 - Browse repository at this point
Copy the full SHA 64d5702View commit details -
tests/int: rm wait_for_container_inroot
Since commit abd0515 it is no longed used. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 78f0e4b - Browse repository at this point
Copy the full SHA 78f0e4bView commit details -
tests/int: rm teardown_running_container_inroot
It is only used in a couple of places and is easy to replace with ROOT=xxx teardown_running_container. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0cfc2e3 - Browse repository at this point
Copy the full SHA 0cfc2e3View commit details -
tests/int/spec.bats: don't use HELLO_BUNDLE
All tests are run with cd to bundle directory, so let's just use $(pwd). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e7052dc - Browse repository at this point
Copy the full SHA e7052dcView commit details -
tests/int/helpers: reimplement wait_for_container
... by using retry, to avoid code duplication. While at it, make it check the number of arguments and error out on invalid usage. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4d6ffa3 - Browse repository at this point
Copy the full SHA 4d6ffa3View commit details -
tests/int: use wait_for_container where appropriate
... instead of more generic "retry", to simplify code. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4976614 - Browse repository at this point
Copy the full SHA 4976614View commit details -
tests/int/events: rm unneeded eval
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 76532fa - Browse repository at this point
Copy the full SHA 76532faView commit details -
tests/int: stop reusing HELLO_BUNDLE for alt root
Overloading $HELLO_BUNDLE with a second purpose of having an alternative runc root is confusing. Instead, let's create a temp directory in setup() and clean it up in teardown(). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 85d5fea - Browse repository at this point
Copy the full SHA 85d5feaView commit details -
tests/int: BATS_TMPDIR -> BATS_RUN_TMPDIR
It's a little known fact, but BATS_TMPDIR is just /tmp, and it is not being cleaned by bats after the test. BATS_RUN_TMPDIR (available since bats 1.2.1) is $BATS_TMPDIR/bats-run-$$ (i.e. it is per bats run and includes PID), and it is cleaned up after the test (unless --no-tmpdir-cleanup is given). Use BATS_RUN_TMPDIR for better isolation and cleanup. [v2: check for BATS_RUN_TMPDIR, effectively requiring bats >= 1.2.1] Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 985546b - Browse repository at this point
Copy the full SHA 985546bView commit details -
tests/int/list.bats: don't use $BUSYBOX_BUNDLE
Use the value of $(pwd) as we cd to bundle dir before running a test. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e40a369 - Browse repository at this point
Copy the full SHA e40a369View commit details -
tests/int/hooks.bats: don't use DEBIAN_BUNDLE
1. Do not depend on $DEBIAN_BUNDLE, instead use the current directory. 2. Simplify setup() by calling teardown(). 3. In teardown(), check that LIBPATH is set. 4. Move global variables into setup. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c34a9b1 - Browse repository at this point
Copy the full SHA c34a9b1View commit details
Commits on Feb 10, 2021
-
tests/int: rework/simplify setup and teardown
1. Get rid of fixed ROOT, *_BUNDLE, and CONSOLE_SOCKET dirs. Now they are temporary directories created in setup_bundle. 2. Automate containers cleanup: instead of having to specify all containers to be removed, list and destroy everything (which is now possible since every test case has its own unique root). 3. Randomize cgroup paths so two tests running in parallel won't use the same cgroup. Now it's theoretically possible to execute tests in parallel. Practically it's not possible yet because bats uses GNU parallel, which do not provide a terminal for whatever it executes, and many runc tests (all those that run containers with terminal: true) needs a tty. This may possibly be addressed later. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 41670e2 - Browse repository at this point
Copy the full SHA 41670e2View commit details