New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: test-thread-priority.c fails on Linux #4382
Comments
The test makes the (perhaps somewhat naive) assumption that the main thread is created with a priority of 0. Do you happen to know what scheduling policy and priority were used when you ran the test? The fix is probably quite simple: diff --git a/test/test-thread-priority.c b/test/test-thread-priority.c
index 0aaf2977..769b485e 100644
--- a/test/test-thread-priority.c
+++ b/test/test-thread-priority.c
@@ -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)); |
I don't know how to do this. Where should I look while tests are running? I've applied the diff and it fails with the following:
|
That -13 error suggests it's a permission error. Can you run |
Hi, sorry for the late reply. Directory named |
No, that's okay. As long as you can strace the test. |
Hi, assertion fails at
ASSERT_EQ(priority, 0)
in the following:make check output:
The text was updated successfully, but these errors were encountered: