Skip to content

Add thunder_test_support static library for plugin integration testing#2098

Draft
smanes0213 wants to merge 64 commits intomasterfrom
development/test-support
Draft

Add thunder_test_support static library for plugin integration testing#2098
smanes0213 wants to merge 64 commits intomasterfrom
development/test-support

Conversation

@smanes0213
Copy link
Copy Markdown
Contributor

Adds a static library (libthunder_test_support.a) that embeds the Thunder PluginHost::Server into a linkable archive. Test binaries link against this library to boot a real Thunder runtime without launching the standalone daemon, enabling integration testing of Thunder plugins using GTest/GMock.

volkan-aslan and others added 30 commits October 29, 2025 15:12
Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
* [Core] fix frame int_cast for 24 bit types

* [Core] fix gcc warning? (sometimes I hate this language :) )

* [Core] removing space

* [Core] Oopsie

* [Core] Make the assert in Frame actually trigger when needed
* [FIX] Update WorkerPool initialization to use correct thread count and disable assertion temporarily

* [FIX] Replace Thread::Wait with Thread::Stop in ThreadPool to improve stopping mechanism
* [JSON-RPC] Facilitate event indexes

* Update IController notifications

* Remove unnecessary lambda capture in state change
…SERT back (#1987)

* Make it possible to distinguish between ThreadPool created in Thunder and ThunderPlugin, bring the ASSERT back

* Rename the new debug param

* Adjust thread count in WorkerPool constructor

---------

Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
…#1982)

* Change a SYSLOG to TRACE_1 to avoid flooding the system, add a new SYSLOG in cases of a possible COM-RPC deadlock

* Refactor IPC communication error logging

* Improve deadlock assertion and logging messages

---------

Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
…nd MinionTester and WorkerPoolTester (#1984)

* [TESTS] Use composition instead of inheritance for ThreadPoolTester and MinionTester

* [TESTS] Use composition instead of inheritance for WorkerPoolTester

* [FIX] Ensure proper cleanup and adjust member initialization order

* [FEATURE] Add WaitForStop method to ThreadPool and assert in Stop method

* [REFINE] Improve ThreadPoolTester and MinionTester shutdown process

* [FEATURE] Add WaitForStop method to WorkerPool for graceful shutdown

* [REFINE] Adjust WorkerPoolTester initialization to handle thread count correctly

* [REFINE] Add assertion in Stop method to ensure WorkerPool stops within timeout

---------

Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
* Fix Activate reason

* Exit precondition state on error

* Add INSTANTIATION_FAILED reason

---------

Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
…#1995)

* Update the config doc with the Priority Queue related settings

* Update docs/introduction/config.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
…meant that the SocketPort class was (#2004)

closed and eligable for destruction. iThe CLosed() is always running on the ResourceMonitor thread. In a
race condition, this setting of the m_State = 0 allowed a server to "cleanup"  the children (Clients).
In the unlucky case that after the setting of the m_State =0, the kernel would preempt the ResourceMonitor
thread for later continuation, the Server cleanup thread migh have killed the whole SocketPort object.
Effectively any operation following the closed() on the ResourceMonitor threas that was preempted and
continues would happen on a dead object!

[ReourceMonitorThread]
SocketPort::Closed() {
...
m_State -> 0
[preempted]

[Server Cleanup Thread]
Delete all Clients that are Closed()
[preemted]

[ResourceMonitorThread]
m_State &= ~SocketPort::MONITOR; CRASH!
...
}

This PR prevents this race condition from happening.

As this is in the core of Thunder, the biggest risk is the Lock in the destructor. It might casue (if the
socket is used incorrectly) to ABBA locks. Request thorough testing !
Also the ASSERT to validate if the CLosed() is indeed only run on the resource monitor thread is a risk!
* cmake: Add ApplyPatch function to apply patches using git or patch utility

* cmake: Add option to remove uint24_t from bluez5 headers and apply patch

---------

Co-authored-by: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com>
* [Core] Phase 1 move code from Frame to NUmber and add numeric_limits

* [Core] custom code bit functions added

* [Core] Custom error code to string handling (draft)

* [CustomCode] Handle in PluginServer and condig

* [CustomCode] some small fixes

* [CusttomCode] Make it work on Linux

* [CustomCode] some minor fixes

* [CustomCode] small improvement

* Bump Actions

---------

Co-authored-by: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com>
* [Core] Add uint24_t (poor mans solution)

* [Core] uint24_t and int24_t as full supported types

* [Core] add new files to CMakeList.txt
* [IController] Move event index to registration

* update docs

* Use stock sendif lambdas

* Also update StateControlStateChange event

* kick actions

Add assertion to ensure callsign is not empty.

* kick actions

---------

Co-authored-by: Pierre Wielders <pierre@wielders.net>
nxtum and others added 30 commits November 25, 2025 16:08
* PSG documentation

* fix grammar

---------

Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
* [Doc] 5.3 Release notes first draft

* [ReleaseNotes] 5.3 update

* [Docs] update

* [Docs]  more release documentation

* [Docs] More release info

* [Docs] add versios function

* [Docs] even more documentation

* [Docs] add Custom Codes

* [Docs] more updates to release notes

* Update permissions for documentation preview workflow

* Change permissions to read for contents

* Fix spelling issue in config.md

* [Docs] review comments incorporated

* [Docs] update for 5.3 releasae

* [Docs] some small changes

* [Docs] update indexed events with own lambda override

---------

Co-authored-by: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com>
  calls _Exit() after RUN_ALL_TESTS() to avoid static destruction
  order crashes when external plugin .so files are loaded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.