[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: openpty: Skip test if no pty is available

From: Bruno Haible
Subject: Re: openpty: Skip test if no pty is available
Date: Sat, 11 Feb 2017 19:07:38 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-62-generic; KDE/5.18.0; x86_64; ; )


Guido Günther wrote:
> In chroots for package builds there may be no ptys or they might not be
> accessible. This both manifests as ENOENT on Linux. Skip tests in this
> case.

I'm not a fan of this patch, because it reduces the value of the test:
It would only test whether the openpty() function could open a pty or
maybe could not open a pty. Pretty worthless. If a future change to
the implementation would break the openpty() function, the unit test would
no longer notice it.

Can you search for alternatives?

One possibility is that you find how to identify such "chroot environments".
Are there some environment variables which signal it? Are there some system
calls (not related to ptys) that would give a hint?

Another possibility is that, for those packages which you intend to test in a
chroot environment, you omit the test, i.e. use gnulib-tool with argument
--avoid=openpty-tests. I would find this better than to destroy the value of
the test for everyone.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]