[vlc-devel] [PATCH 2/7] test: don't test cancellation of CV wait

RĂ©mi Denis-Courmont remi at remlab.net
Tue Apr 14 21:45:39 CEST 2020


---
 src/test/thread.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/src/test/thread.c b/src/test/thread.c
index 9f48229d53..703bcc2afa 100644
--- a/src/test/thread.c
+++ b/src/test/thread.c
@@ -156,7 +156,6 @@ static void test__thread_cancelation_with_cleanup()
 /*
  * - Test broadcasting a condition, waking several threads
  * - Test waiting on condition
- * - Test thread cancelling/cleanup while its waiting on condition
  */
 static void *thread_func_cond(void *ptr)
 {
@@ -236,28 +235,6 @@ static void test__cond_wait()
     TEST_THREAD_JOIN_MAGIC(th);
 }
 
-static void test__cond_wait_cancelation_with_cleanup()
-{
-    struct cond_data data;
-    cond_data_init(&data, 1);
-
-    vlc_thread_t th;
-    TEST_THREAD_CLONE(&th, thread_func_cond, &data);
-
-    // Wait for thread to start
-    vlc_mutex_lock(&data.mutex);
-    while(data.state != 0) {
-        vlc_cond_wait(&data.cond_started, &data.mutex);
-    }
-    vlc_mutex_unlock(&data.mutex);
-
-    // Never signal that the thread may end, on purpose
-    // as thread should be waiting while we cancel it
-
-    // Cancel thread
-    TEST_THREAD_CANCEL_JOIN(th);
-}
-
 
 /*
  * Test waiting on condition and let it timeout
@@ -356,7 +333,6 @@ int main(void)
     test__thread_cancelation();
     test__thread_cancelation_with_cleanup();
     test__cond_wait();
-    test__cond_wait_cancelation_with_cleanup();
     test__cond_wait_timeout();
     test__cond_broadcast();
     test__vlc_tick_sleep_cancelation();
-- 
2.26.0



More information about the vlc-devel mailing list