Fix thread priority test
authorDominique Dumont <dod@debian.org>
Wed, 19 Jun 2024 16:57:50 +0000 (18:57 +0200)
committerDominique Dumont <dod@debian.org>
Wed, 19 Jun 2024 16:57:50 +0000 (18:57 +0200)
Bug: https://github.com/libuv/libuv/issues/4382
Bug-Debian: https://bugs.debian.org/1071194
Origin: https://github.com/libuv/libuv/issues/4382
Applied-Upstream: not-needed

Test should not assume to be run at priority 0.

See upstream bug for more details.

Gbp-Pq: Name fix-thread-priority-test

test/test-thread-priority.c

index 0aaf297722b118f5faa30083f1040b0941892581..769b485e9801a57b3ce458e99836fd83906ec7bd 100644 (file)
@@ -88,8 +88,6 @@ TEST_IMPL(thread_priority) {
  * test set nice value for the calling thread with default schedule policy
 */
 #ifdef __linux__
-  ASSERT_OK(uv_thread_getpriority(pthread_self(), &priority));
-  ASSERT_EQ(priority, 0);
   ASSERT_OK(uv_thread_setpriority(pthread_self(), UV_THREAD_PRIORITY_LOWEST));
   ASSERT_OK(uv_thread_getpriority(pthread_self(), &priority));
   ASSERT_EQ(priority, (0 - UV_THREAD_PRIORITY_LOWEST * 2));
@@ -102,4 +100,4 @@ TEST_IMPL(thread_priority) {
   uv_sem_destroy(&sem);
 
   return 0;
-}
\ No newline at end of file
+}