This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push: new a0f05d0c6 ostest:Fix the issue that nxevent pthread was not executed, causing case failed a0f05d0c6 is described below commit a0f05d0c620492b259296780d9c1490eaa1f8794 Author: chenrun1 <chenr...@xiaomi.com> AuthorDate: Tue Feb 11 20:22:09 2025 +0800 ostest:Fix the issue that nxevent pthread was not executed, causing case failed Summary: In the case of slow overall system response (such as when MM_KASAN is turned on), the nxevent case work thread will not be executed and will be switched back to the main thread, so that the event does not get the expected result and the case fails. By adjusting the thread priority, the work thread can be scheduled to avoid the expected result failure Signed-off-by: chenrun1 <chenr...@xiaomi.com> --- testing/ostest/nxevent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/ostest/nxevent.c b/testing/ostest/nxevent.c index e77309d16..545fca408 100644 --- a/testing/ostest/nxevent.c +++ b/testing/ostest/nxevent.c @@ -281,7 +281,7 @@ void nxevent_test(void) /* Lower priority */ - sparam.sched_priority = PTHREAD_DEFAULT_PRIORITY - 1; + sparam.sched_priority = PTHREAD_DEFAULT_PRIORITY; pthread_attr_setschedparam(&attr, &sparam); /* Create thread */ @@ -304,7 +304,7 @@ void nxevent_test(void) /* Lower priority */ - sparam.sched_priority = PTHREAD_DEFAULT_PRIORITY - 1; + sparam.sched_priority = PTHREAD_DEFAULT_PRIORITY; pthread_attr_setschedparam(&attr, &sparam); /* Create thread */