linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.27k stars 1k forks source link

open_posix_testsuite: fix pthread_cond_destroy test error. #1097

Open qinyuntan opened 7 months ago

qinyuntan commented 7 months ago

According to the description of the pthread_cond_destroy function in glibc 2.32, it is advised to ensure that all threads blocked on the condition variable have been successfully awakened before calling this function, otherwise unpredictable situations may occur.

In the glibc 2.32 version, this testcase will hang. Therefore, it is necessary to ensure that all threads have been successfully awakened before calling pthread_cond_destroy to destroy the condition variable.

[ type description here; PLEASE REMOVE THIS LINE AND THE LINES BELOW BEFORE SUBMITTING THIS PULL REQUEST ]

qinyuntan commented 7 months ago

The logs below indicate a failure in the test.

./interfaces/pthread_cond_destroy/pthread_cond_destroy_2-1.run-test

[14:25:57]Test starting [14:25:57]System abilities: [14:25:57] TPS : 200809 [14:25:57] CS : 200809 [14:25:57] MON : 200809 [14:25:57] MF : 200809 [14:27:57]Test ../../../conformance/interfaces/pthread_cond_destroy/2-1.c FAILED: Test failed (hang)