[PATCH] linux: Split tst-ttyname
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Mon Jun 5 17:11:56 GMT 2023
On 02/06/23 23:11, Carlos O'Donell wrote:
> On 6/1/23 13:44, Adhemerval Zanella via Libc-alpha wrote:
>> The tst-ttyname may fail in container environments while trying to
>> mount the procfs after the unshare (test do_in_chroot_2). It is not
>> clear why exaclty kernel returns EPERM in this case, the container
>> does have CAP_SYS_CHROOT, SELinux/AppArmor is disabled, and there is
>> no seccomp filter.
>
> I was seeing this also in our Fedora Rawhide CI/CD weekly integration.
>
> It is not a kernel issue IMO, but a system issue since I was using systemd-nspawn.
>
> Are you using systemd-nspawn?
>
> Zbignew just bisected this for me here:
> https://bugzilla.redhat.com/show_bug.cgi?id=2210335
> https://github.com/systemd/systemd/commit/57c10a5650f6bb7180f3bec31a3f24239a81be39
I am running using a docker ubuntu container with CAP_SYS_ADMIN
(for test-container) enable some tests, so there is no direct usage of
systemd-nspawn. Although the bug does seems related, the current
namespace does contain the /proc mount and I tried to change the test
to mount the procfs after support_become_root (and before the
support_enter_mount_namespace in child process); but at least on my
environment it continues to fail with EPERM.
In any case, I think splitting the test does seems an improvement since
it split the test with one that uses and another that does not. I will
rename the test as Florian asked and send a newer version.
More information about the Libc-alpha
mailing list