Repository navigation
[1.5] tests/int: make "run runc" work, add assert helpers - #5590
Merged
kolyshkin merged 2 commits intoNov 2, 2026
Merged
Conversation
When a test fails on a string comparison, all we see is the failed expression, which usually means adding some debug output and rerunning the test to find out what the actual value was. The bats-assert library solves this, but it (together with its bats-support dependency) has to be installed separately on every distro we test on, which is more trouble than it's worth for a few functions. Add assert_output, refute_output, and assert_line, implementing a subset of the bats-assert API (so that the tests read the same way, and this code can be dropped should bats-assert ever be added as a dependency), and use them for the comparisons against an exact value. Now, when such a check fails, the test log shows what was expected and what was there: -- output does not match (exact) -- expected: '/override' actual: $'\0/override' -- [This is a partial backport: only the helpers are added, the existing tests are not converted to use them.] (cherry picked from commit 2c7405b) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
In main branch, runc is no longer a bash function wrapping bats' run, and tests call it as run -0 runc ... In this branch, the same code results in a nested run, and the outer run checks the exit status of the inner one (always 0), not of runc. So, a test backported from main as is checks nothing, and a failure like "run ! runc ..." is reported for a runc call that actually failed. Make runc wrapper call runc directly when called via run, so that the tests written in either style work as expected. Assisted-by: Claude Opus 5.5 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Contributor
Author
|
To clarify: with this, both old style ( |
kolyshkin
requested review from
AkihiroSuda,
cyphar,
lifubang,
rata and
thaJeztah
and removed request for
thaJeztah
October 29, 2026 09:01
thaJeztah
approved these changes
Oct 29, 2026
thaJeztah
left a comment
Member
There was a problem hiding this comment.
seems reasonable to me (agreed back porting the whole would be rather large)
LGTM
kolyshkin
enabled auto-merge
November 2, 2026 19:01
Contributor
Author
|
This needs a second LGTM and will unblock porting #5588 to release-1.5; PTAL @opencontainers/runc-maintainers 🙏 |
AkihiroSuda
approved these changes
Nov 2, 2026
Merged
via the queue into
opencontainers:release-1.5
with commit Nov 2, 2026
eeb30e2
58 checks passed
Maks1mS
pushed a commit
to stplr-dev/stplr
that referenced
this pull request
Nov 14, 2026
This PR contains the following updates: | Package | Type | Update | Change | OpenSSF | |---|---|---|---|---| | [github.com/opencontainers/runc](https://github.com/opencontainers/runc) | require | patch | `v1.5.2` → `v1.5.3` | [](https://securityscorecards.dev/viewer/?uri=github.com/opencontainers/runc) | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/23) for more information. --- ### Release Notes <details> <summary>opencontainers/runc (github.com/opencontainers/runc)</summary> ### [`v1.5.3`](https://github.com/opencontainers/runc/releases/tag/v1.5.3): runc v1.5.3 -- "Let me hear you make decisions without your television." [Compare Source](opencontainers/runc@v1.5.2...v1.5.3) This is the third patch release in the 1.5.z release series of runc. It includes a fix for a high-severity vulnerability (CVE-2026-119101) affecting users who checkpoint and restore containers, as well as a few other fixes. Users are encouraged to update. ##### Security This release includes a fix for the following high-severity security issue: - [CVE-2026-119101][] allowed a malicious image, using crafted symlinks in its rootfs, to confuse the way runc names external mounts for CRIU, and so make `runc restore` bind-mount an arbitrary host directory into the restored container, read-write. Only users who both checkpoint and later restore containers running untrusted images are affected (checkpoint/restore requires root, so rootless runc is not affected). The same issue was found in crun ([CVE-2026-115520][]); CRIU itself is fixed in [CVE-2026-119614][]. In addition, `runc restore` no longer makes read-only bind mounts writable, even temporarily, while preparing the container mounts. [CVE-2026-119101]: GHSA-g2c3-j8g3-7gpw [CVE-2026-115520]: GHSA-2mxx-58qc-p466 [CVE-2026-119614]: GHSA-7ww7-53q2-wrwx ##### Fixed - Running a container which does not have its own mount namespace no longer changes the propagation of host's `/` and of the parent mount of the container rootfs (they were made private or slave). ([#​5537](opencontainers/runc#5537), [#​5581](opencontainers/runc#5581)) - When making the container rootfs read-only (`root.readonly`), runc no longer clears the `nosuid`, `nodev`, `noexec` and `nosymfollow` flags of the rootfs mount (this only happened when not using a user namespace). ([#​5588](opencontainers/runc#5588), [#​5601](opencontainers/runc#5601)) - The `defaults` mount option is no longer passed to the kernel as filesystem-specific mount data, which made mounting filesystems that do not accept it (such as `tmpfs`) fail. ([#​5500](opencontainers/runc#5500), [#​5520](opencontainers/runc#5520), [#​5602](opencontainers/runc#5602)) ##### Changed - Updated github.com/moby/sys/capability to v0.5.0. ([#​5598](opencontainers/runc#5598), [#​5600](opencontainers/runc#5600)) - Various CI improvements. ([#​5481](opencontainers/runc#5481), [#​5482](opencontainers/runc#5482), [#​5488](opencontainers/runc#5488), [#​5574](opencontainers/runc#5574), [#​5586](opencontainers/runc#5586), [#​5590](opencontainers/runc#5590), [#​5609](opencontainers/runc#5609), [#​5615](opencontainers/runc#5615)) ##### Static Linking Notices The `runc` binaries distributed with this release are *statically linked* with the following [GNU LGPL-2.1][lgpl-2.1] licensed libraries, with `runc` acting as a "work that uses the Library": [lgpl-2.1]: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html - [libseccomp](https://github.com/seccomp/libseccomp) Similarly, the `runc` binaries distributed with this release are also *statically linked* with the following [MPLv2][mpl-2.0] licensed libraries, with `runc` acting as a "Larger Work": - [libpathrs](https://github.com/cyphar/libpathrs) [mpl-2.0]: https://www.mozilla.org/en-US/MPL/2.0/ The versions of these libraries were not modified from their upstream versions, but in order to comply with their corresponding licenses, we have attached the complete source code for those libraries which (when combined with the attached runc source code) may be used to exercise your rights under their respective licenses. However, we strongly suggest that you make use of your distribution's packages or download them from the authoritative upstream sources, especially since these libraries are related to the security of your containers. *** Thanks to the following contributors who made this release possible: - Kir Kolyshkin <kolyshkin@gmail.com> - Li Fu Bang <lifubang@acmcoder.com> - Lucas Sotomayor <sotomayorlucas@pm.me> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday (`* 0-4,22-23 * * 1-5`) - Only on Sunday and Saturday (`* * * * 0,6`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjMuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJLaW5kL0RlcGVuZGVuY2llcyJdfQ==--> Reviewed-on: https://altlinux.space/stapler/stplr/pulls/522
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since we've changed the way we call
runcin main branch integration tests (see #5429), the backports from the main branch to 1.5 will have issues with tests. One such example is recently merged #5590, which has this:Looks fine but in fact runc exit code is actually ignored (because in release-1.5
runcis a wrapper which uses run, which returns 0).One solution would be to backport #5429 but it's a massive change. This is an alternative, doing two things:
This is quite minimal (I would even say elegant) and allows for worry-free test backporting.