mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests/int: introduce the concept of unsafe tests
Some of runc integration tests may do something that I would not like when running those on my development laptop. Examples include - changing the root mount propagation [1]; - replacing /root/runc [2]; - changing the file in /etc (see checkpoint.bats). Yet it is totally fine to do all that in a throwaway CI environment, or inside a Docker container. Introduce a mechanism to skip specific "unsafe" tests unless an environment variable, RUNC_ALLOW_UNSAFE_TESTS, is set. Use it from a specific checkpoint/restore test which modifies /etc/criu/default.conf. [1]: https://github.com/opencontainers/runc/pull/5200 [2]: https://github.com/opencontainers/runc/pull/5207 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -18,6 +18,8 @@ env:
|
||||
LIBPATHRS_VERSION: "0.2.4"
|
||||
# Don't ignore C warnings. Note that the output of "go env CGO_CFLAGS" by default is "-g -O2", so we keep them.
|
||||
CGO_CFLAGS: -g -O2 -Werror
|
||||
# Allow potentially unsafe tests.
|
||||
RUNC_ALLOW_UNSAFE_TESTS: yes
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
Reference in New Issue
Block a user