diff options
| author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2024-11-28 06:30:40 -0500 |
|---|---|---|
| committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2024-11-28 13:19:52 -0500 |
| commit | 19a198f05802fcc05441c364ed75311ef3f6d663 (patch) | |
| tree | 40d697b7ff518b12e568425048619e722785a4ce /nptl | |
| parent | 82a3991a848958d27c19f8cce0077c1c28c57c5c (diff) | |
| download | glibc-19a198f05802fcc05441c364ed75311ef3f6d663.tar.xz glibc-19a198f05802fcc05441c364ed75311ef3f6d663.zip | |
pthread_getcpuclockid: Add descriptive comment to smoke test
Add a descriptive comment to the tst-pthread-cpuclockid-invalid test and
also drop pthread_getcpuclockid from the TODO-testing list since it now
has full coverage.
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'nptl')
| -rw-r--r-- | nptl/TODO-testing | 4 | ||||
| -rw-r--r-- | nptl/tst-pthread-getcpuclockid-invalid.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/nptl/TODO-testing b/nptl/TODO-testing index e076e5624f..f50d2ceb51 100644 --- a/nptl/TODO-testing +++ b/nptl/TODO-testing @@ -10,10 +10,6 @@ pthread_attr_[sg]etstack some more tests needed -pthread_getcpuclockid - - check that value is reset -> rt subdir - pthread_getschedparam pthread_setschedparam diff --git a/nptl/tst-pthread-getcpuclockid-invalid.c b/nptl/tst-pthread-getcpuclockid-invalid.c index e88a563427..7ac46acad8 100644 --- a/nptl/tst-pthread-getcpuclockid-invalid.c +++ b/nptl/tst-pthread-getcpuclockid-invalid.c @@ -1,5 +1,4 @@ -/* Smoke test to verify that pthread_getcpuclockid fails with ESRCH when the - thread in question has exited. +/* pthread_getcpuclockid should fail with ESRCH when the thread exits. Copyright the GNU Toolchain Authors. This file is part of the GNU C Library. @@ -17,6 +16,12 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ +/* The input thread descriptor to pthread_getcpuclockid needs to be valid when + the function is called. For the purposes of this test, this means that the + thread should not be detached, have exited, but not joined. This should be + good enough to complete coverage for pthread_getcpuclockid alongside + tst-clock2. */ + #include <errno.h> #include <pthread.h> #include <sched.h> |
