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 /sysdeps/unix/sysv/linux/Makefile | |
parent | a09dfc19edcbac3f96d5410529b724db0a583879 (diff) | |
download | glibc-d9611e308592355718b36fe085b7b61aa52911e5.tar.gz glibc-d9611e308592355718b36fe085b7b61aa52911e5.tar.xz 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 'sysdeps/unix/sysv/linux/Makefile')
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index bf76b8773d..c6675b3aa5 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -43,7 +43,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ bits/siginfo-arch.h bits/siginfo-consts-arch.h tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ - tst-quota tst-sync_file_range test-errno-linux tst-sysconf-iov_max + tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \ + test-errno-linux # Generate the list of SYS_* macros for the system calls (__NR_* # macros). The file syscall-names.list contains all possible system |