1
0
mirror of https://github.com/containers/youki synced 2024-11-23 01:11:58 +01:00
youki/tests/contest
AngrySean d07159691d
fix(libcontainer) no_pivot args is not used (#2923)
* Support setting no_pivot_root for create and run command

Signed-off-by: Vanient <xiadanni1@huawei.com>

* fix: mount move before choot

Move the rootfs to the root of the host filesystem before chrooting,
this is equivalent to pivot_root, if don't move mount first, we will
not see the new rootfs when exec into the container

Signed-off-by: xujihui1985 <xujihui1985@gmail.com>

* fix(chroot): ensure mount occurs before chroot to mimic pivot_root behavior

Move the mount operation to occur before calling chroot to better simulate the effect of pivot_root.
Add a check to confirm if the current process is running inside an isolated mount namespace, ensuring proper mount handling.

Signed-off-by: xujihui1985 <xujihui1985@gmail.com>

* implement intergration test for no-pivot

Signed-off-by: xujihui1985 <xujihui1985@gmail.com>

* fix: add comments to no-pivot related code

Signed-off-by: xujihui1985 <xujihui1985@gmail.com>

* fix(lint): fix format

Signed-off-by: xujihui1985 <xujihui1985@gmail.com>

---------

Signed-off-by: Vanient <xiadanni1@huawei.com>
Signed-off-by: xujihui1985 <xujihui1985@gmail.com>
Co-authored-by: Vanient <xiadanni1@huawei.com>
2024-10-29 09:53:05 +05:30
..
contest fix(libcontainer) no_pivot args is not used (#2923) 2024-10-29 09:53:05 +05:30
runtimetest fix(libcontainer) no_pivot args is not used (#2923) 2024-10-29 09:53:05 +05:30
test_framework Bump the patch group with 3 updates 2024-10-23 00:29:50 +00:00