[LTP] [PATCH 07/12] posix/pthread_key_create/2-1: Remove invalid part of test
Joerg Vehlow
lkml@jv-coder.de
Fri Nov 19 08:45:57 CET 2021
From: Joerg Vehlow <joerg.vehlow@aox-tech.de>
The first step accroding to the test description is: "Create a key", but the
code was "get the value for an unitialized key". This was undefined behavior.
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
---
.../conformance/interfaces/pthread_key_create/2-1.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/2-1.c
index f150f3443..51c89f376 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/2-1.c
@@ -28,13 +28,6 @@ int main(void)
pthread_key_t key;
void *rc;
- /* Verify that the value associated with "key" in a new thread is NULL */
- rc = pthread_getspecific(key);
- if (rc != NULL) {
- printf("Test FAILED\n");
- return PTS_FAIL;
- }
-
if (pthread_key_create(&key, NULL) != 0) {
printf("Error: pthread_key_create() failed\n");
return PTS_UNRESOLVED;
--
2.25.1
More information about the ltp
mailing list