uORB: join threads in unit tests

This commit is contained in:
Julian Oes
2026-02-18 21:03:34 +13:00
parent 261cc16077
commit 20669aba6f
3 changed files with 23 additions and 0 deletions
@@ -501,6 +501,8 @@ int uORBTest::UnitTest::test_multi2()
}
}
px4_task_join(pubsub_task);
for (int i = 0; i < num_instances; ++i) {
orb_unsubscribe(orb_data_fd[i]);
}
@@ -1032,6 +1034,8 @@ int uORBTest::UnitTest::test_queue_poll_notify()
}
}
px4_task_join(pubsub_task);
if (_num_messages_sent.load() != next_expected_val) {
return test_fail("number of sent and received messages mismatch (sent: %i, received: %i)",
_num_messages_sent.load(), next_expected_val);
@@ -1087,6 +1091,7 @@ int uORBTest::UnitTest::latency_test(bool print)
return test_fail("failed launching task");
}
px4_task_join(pubsub_task);
orb_unadvertise(pfd0);
return pubsubtest_res.load();