This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: tst-ttyname failure
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Thu, 23 Nov 2017 10:22:18 -0200
- Subject: Re: tst-ttyname failure
- Authentication-results: sourceware.org; auth=none
- References: <a0879626-0112-5445-ca65-c960e0895247@redhat.com>
On 17/11/2017 19:28, Florian Weimer wrote:
> I need the two attached patches in order to get tst-ttyname to succeed when running on Fedora as a non-root user.
>
> info: entering chroot 1
> info: testcase: basic smoketest
> info: ttyname: PASS {name="/dev/pts/5", errno=0}
> info: ttyname_r: PASS {name="/dev/pts/5", ret=0, errno=0}
> error: ../sysdeps/unix/sysv/linux/tst-ttyname.c:122: write (setroups, "deny"): Operation not permitted
> info: entering chroot 2
> error: ../sysdeps/unix/sysv/linux/tst-ttyname.c:122: write (setroups, "deny"): Operation not permitted
> error: 2 test failures
>
> I get the same failure when running the test on kernel-3.10.0-768.el7.x86_64 (there I tested as root).
>
> This is on top of master with commit ce003e5d4cd94c5380699b0dadeaaf825813afbe (support_become_root: Enable file creation in user namespaces). The test failure was present before I pushed that change.
>
> Would you please double-check that they do not break the test on whatever distributions you tested on and do not interfere with the test objective?
>
> Thanks,
> Florian
I am still seeing failures on Ubuntu 16.04 (4.4.0-71-generic) on master:
info: entering chroot 1
info: testcase: basic smoketest
info: ttyname: PASS {name="/dev/pts/38", errno=0}
info: ttyname_r: PASS {name="/dev/pts/38", ret=0, errno=0}
error: ../sysdeps/unix/sysv/linux/tst-ttyname.c:285: mount ("devpts", "dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, "newinstance,ptmxmode=0666,mode=620") == 0: Invalid argument
info: entering chroot 2
info: testcase: basic smoketest
info: ttyname: PASS {name="/dev/pts/38", errno=0}
info: ttyname_r: PASS {name="/dev/pts/38", ret=0, errno=0}
error: ../sysdeps/unix/sysv/linux/tst-ttyname.c:357: mount ("devpts", "dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, "newinstance,ptmxmode=0666,mode=620") == 0: Invalid argument
I noted, at least on my environment, it requires running as a more privileged user
to avoid the above failure. Is it the expected behaviour? Should we move it to
xcheck and add the a possible requirement [1]?
[1] https://sourceware.org/glibc/wiki/Testing/Testsuite#Details_about_make_xcheck_specific_tests