diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-11-15 20:39:22 +0100 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2017-11-15 21:09:01 +0100 |
commit | d9611e308592355718b36fe085b7b61aa52911e5 (patch) | |
tree | 910a4e7cc76f0f188ba9a0ca19c3789e0d30e96a /ChangeLog | |
parent | a09dfc19edcbac3f96d5410529b724db0a583879 (diff) | |
download | glibc-d9611e308592355718b36fe085b7b61aa52911e5.tar glibc-d9611e308592355718b36fe085b7b61aa52911e5.tar.gz glibc-d9611e308592355718b36fe085b7b61aa52911e5.tar.bz2 glibc-d9611e308592355718b36fe085b7b61aa52911e5.zip |
linux ttyname{_r}: Add tests
Add a new tst-ttyname test that includes several named sub-testcases.
This patch is ordered after the patches with the fixes that it tests for (to
avoid breaking `git bisect`), but for reference, here's how each relevant change
so far affected the testcases in this commit, starting with
15e9a4f378c8607c2ae1aa465436af4321db0e23:
| | before | | make checks | don't |
| | 15e9a4f | 15e9a4f | consistent | bail |
|---------------------------------+---------+---------+-------------+-------|
| basic smoketest | PASS | PASS | PASS | PASS |
| no conflict, no match | PASS[1] | PASS | PASS | PASS |
| no conflict, console | PASS | FAIL! | FAIL | PASS! |
| conflict, no match | FAIL | PASS! | PASS | PASS |
| conflict, console | FAIL | FAIL | FAIL | PASS! |
| with readlink target | PASS | PASS | PASS | PASS |
| with readlink trap; fallback | FAIL | FAIL | FAIL | PASS! |
| with readlink trap; no fallback | FAIL | PASS! | PASS | PASS |
| with search-path trap | FAIL | FAIL | PASS! | PASS |
|---------------------------------+---------+---------+-------------+-------|
| | 4/9 | 5/9 | 6/9 | 9/9 |
[1]: 15e9a4f introduced a semantic that, under certain failure
conditions, ttyname sets errno=ENODEV, where previously it didn't
set errno; it's not quite fair to hold "before 15e9a4f" ttyname to
those new semantics. This testcase actually fails, but would have
passed if we tested for the old the semantics.
Each of the failing tests before 15e9a4f are all essentially the same bug: that
it returns a PTY slave with the correct minor device number, but from the wrong
devpts filesystem instance.
15e9a4f sought to fix this, but missed several of the cases that can cause this
to happen, and also broke the case where both the erroneous PTY and the correct
PTY exist.
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,6 +1,10 @@ 2017-11-15 Luke Shumaker <lukeshu@parabola.nu> [BZ #22145] + * sysdeps/unix/sysv/linux/tst-ttyname.c: New file. + * sysdeps/unix/sysv/linux/Makefile: Add tst-ttyname to tests. + + [BZ #22145] * sysdeps/unix/sysv/linux/ttyname.c (ttyname): Defer is_pty check until end of the function. * sysdeps/unix/sysv/linux/ttyname_r.c (__ttyname_r): Likewise. |