This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] tst-ttyname: skip the test when /dev/ptmx is not available


On Tue, Dec 26, 2017 at 04:53:30PM +0300, Dmitry V. Levin wrote:
> On Tue, Dec 26, 2017 at 02:07:45PM +0100, Florian Weimer wrote:
> > * Dmitry V. Levin:
> > > On Mon, Dec 25, 2017 at 12:09:56PM -0800, Zack Weinberg wrote:
> > >> On Mon, Dec 25, 2017 at 11:12 AM, Dmitry V. Levin <ldv@altlinux.org> wrote:
> > >> > On Mon, Dec 25, 2017 at 07:19:44PM +0100, Florian Weimer wrote:
> > >> >> * Dmitry V. Levin:
> > >> >>
> > >> >> > * sysdeps/unix/sysv/linux/tst-ttyname.c (do_in_chroot_1): Skip the
> > >> >> > test instead of failing in case of an error returned by posix_openpt.
> > >> >>
> > >> >> I think the test failure is real in this case.  I wouldn't it be?
> > >> >
> > >> > No, /dev/ptmx is intentionally missing in the environment where this test
> > >> > failed.
> > >> 
> > >> Why?
> > >
> > > It's a restricted environment.
> > 
> > I don't think the glibc test suite is supposed to pass in such an
> > environment.
> 
> It used to work perfectly for at least 15 years, and it still works
> when tst-ttyname is fixed.

As tst-ttyname was backported to 2.26 stable branch recently, it
introduced this test suite regression there, too, so a fix to tst-ttyname
should also be backported.

[...]
> btw, as support_become_root is also unavailable in restricted
> environments, an alternative fix for tst-ttyname is to skip the test
> when support_become_root fails.

If /dev/ptmx is available but support_become_root is unable to become
root, tst-ttyname correctly recognizes this setup as unsupported.
It would be quite logical for tst-ttyname to return EXIT_UNSUPPORTED
as soon as support_become_root failed.


-- 
ldv

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]