Thunder IDL Tags — Additional Test Coverage#298
Conversation
smanes0213
commented
Jul 13, 2026
- Add ITestAnnotations.h interface exercising: @Prefix, @deprecated, @obsolete, @alt, @alt-deprecated, @alt-obsolete, @text on struct members and enum values, @bitmask on enum declaration, @EnD sentinel, @encode:base64, @encode:hex, @extract on struct arrays, @optional on bool, @event with @index, @statuslistener
- Add ITestExtendedFormat.h validating @Extended semantics: methods use compliant-style params, properties use collapsed format Add implementations: TestAnnotationsImpl.cpp, TestExtendedFormatImpl.cpp
- Add JSON-RPC tests: TestAnnotationsJsonRpc.cpp (39 tests), TestExtendedFormatJsonRpc.cpp (7 tests)
- Add COM-RPC tests: TestAnnotations.cpp (20+ tests incl. event/notification/statuslistener), TestExtendedFormat.cpp (4 tests) Extend
- AddTestInterface CMake macro with HAS_EVENTS flag for 3-parameter Register() with no-op IHandler
Add ITestAnnotations.h interface exercising: @Prefix, @deprecated, @obsolete, @alt, @alt-deprecated, @alt-obsolete, @text on struct members and enum values, @bitmask on enum declaration, @EnD sentinel, @encode:base64, @encode:hex, @extract on struct arrays, @optional on bool, @event with @index, @statuslistener Add ITestExtendedFormat.h validating @Extended semantics: methods use compliant-style params, properties use collapsed format Add implementations: TestAnnotationsImpl.cpp, TestExtendedFormatImpl.cpp Add JSON-RPC tests: TestAnnotationsJsonRpc.cpp (39 tests), TestExtendedFormatJsonRpc.cpp (7 tests) Add COM-RPC tests: TestAnnotations.cpp (20+ tests incl. event/notification/statuslistener), TestExtendedFormat.cpp (4 tests) Extend AddTestInterface CMake macro with HAS_EVENTS flag for 3-parameter Register() with no-op IHandler Signed-off-by: smanes0213 <sankalpmaneshwar46@outlook.com>
reverse-channel conflict when interface is registered for both COM-RPC and JSON-RPC.
…nterference When 32-bit and 64-bit CI matrix jobs run concurrently on the same runner, both COM-RPC tests were binding to the same Unix socket (/tmp/comrpc_test.socket), causing one build to fail intermittently. Socket path is now configurable via COMRPC_SOCKET_PATH env variable, with the CI setting architecture-specific paths. Local runs are unaffected (falls back to the original default path).
(defined in SocketConfig.h)
There was a problem hiding this comment.
Pull request overview
This PR expands ThunderTools’ functional test suite to exercise additional Thunder IDL tags/annotations across both JSON-RPC and COM-RPC, adding new test interfaces, implementations, and build/CI wiring to enable/disable these tests.
Changes:
- Add new annotated test interfaces + implementations (annotations, extended format, prefix underscore, wrapped returns, and COM-RPC-only events).
- Add JSON-RPC and COM-RPC functional tests covering the new interfaces, plus new CMake options to toggle them.
- Add COM-RPC socket-path configurability for parallel CI runs and update the workflow to set the socket path.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/FunctionalTests/jsonrpc/tests/TestWrappedInterfaceJsonRpc.cpp | Adds JSON-RPC tests for interface-level @wrapped return behavior. |
| tests/FunctionalTests/jsonrpc/tests/TestPrefixUnderscoreJsonRpc.cpp | Adds JSON-RPC tests for @prefix ending in _ (flat method names). |
| tests/FunctionalTests/jsonrpc/tests/TestExtendedFormatJsonRpc.cpp | Adds JSON-RPC tests validating @uncompliant:extended method vs property semantics. |
| tests/FunctionalTests/jsonrpc/tests/TestEncodingMacJsonRpc.cpp | Extends JSON-RPC tests to cover variable-length @encode:mac. |
| tests/FunctionalTests/jsonrpc/tests/TestAnnotationsJsonRpc.cpp | Adds broad JSON-RPC coverage for many tags on methods/structs/enums/buffers. |
| tests/FunctionalTests/jsonrpc/tests/TestAnnotationsEventsJsonRpc.cpp | Adds JSON-RPC event subscription tests for annotation-driven events/statuslistener. |
| tests/FunctionalTests/jsonrpc/CMakeLists.txt | Wires new JSON-RPC tests behind CMake options. |
| tests/FunctionalTests/comrpc/tests/TestExtendedFormat.cpp | Adds COM-RPC tests for the extended-format interface. |
| tests/FunctionalTests/comrpc/tests/TestEncodingMac.cpp | Extends COM-RPC tests to cover variable-length @encode:mac. |
| tests/FunctionalTests/comrpc/tests/TestAnnotations.cpp | Adds COM-RPC tests for the annotations interface (non-event parts). |
| tests/FunctionalTests/comrpc/tests/TestAnnotationEvents.cpp | Adds COM-RPC-only event tests for @index, @index:deprecated, @statuslistener. |
| tests/FunctionalTests/comrpc/TestHarness.h | Uses configurable socket path for COM-RPC tests. |
| tests/FunctionalTests/comrpc/SocketConfig.h | Adds env-based socket path helper for parallel CI job isolation. |
| tests/FunctionalTests/comrpc/ComRpcServer.h | Updates server socket path and logging to use SocketConfig. |
| tests/FunctionalTests/comrpc/CMakeLists.txt | Wires new COM-RPC tests behind CMake options. |
| tests/FunctionalTests/common/interfaces/ITestWrappedInterface.h | New test interface annotated with @wrapped. |
| tests/FunctionalTests/common/interfaces/ITestPrefixUnderscore.h | New test interface annotated with underscore-terminated @prefix. |
| tests/FunctionalTests/common/interfaces/ITestExtendedFormat.h | New test interface annotated with @uncompliant:extended. |
| tests/FunctionalTests/common/interfaces/ITestEncodingMac.h | Extends interface with variable-length @encode:mac APIs. |
| tests/FunctionalTests/common/interfaces/ITestAnnotations.h | New comprehensive tag/annotation exercise interface. |
| tests/FunctionalTests/common/interfaces/ITestAnnotationEvents.h | New COM-RPC-only event-focused interface for index/statuslistener semantics. |
| tests/FunctionalTests/common/interfaces/Ids.h | Adds new interface IDs for the introduced test interfaces. |
| tests/FunctionalTests/common/implementations/TestWrappedInterfaceImpl.cpp | Implementation for wrapped interface tests. |
| tests/FunctionalTests/common/implementations/TestPrefixUnderscoreImpl.cpp | Implementation for underscore-prefix tests. |
| tests/FunctionalTests/common/implementations/TestExtendedFormatImpl.cpp | Implementation for extended-format tests. |
| tests/FunctionalTests/common/implementations/TestEncodingMacImpl.cpp | Extends implementation for variable-length MAC storage. |
| tests/FunctionalTests/common/implementations/TestAnnotationsImpl.cpp | Implementation for the comprehensive annotation interface. |
| tests/FunctionalTests/common/implementations/TestAnnotationEventsImpl.cpp | Implementation for COM-RPC-only event interface with background dispatch. |
| tests/FunctionalTests/common/CMakeLists.txt | Extends interface-registration macro/options to add the new interfaces. |
| tests/FunctionalTests/CMakeLists.txt | Adds CMake options to enable/disable the new test groups. |
| .github/workflows/ProxyStubFunctionalTests.yml | Updates CI run configuration and sets COM-RPC socket env var. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 28 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
.github/workflows/ProxyStubFunctionalTests.yml:15
- The pull_request trigger was expanded to include a hard-coded development branch with a
#temp changenote. Keeping temporary branch triggers in mainline workflows can cause unexpected CI runs and is easy to forget to clean up. If this is only for local iteration, please revert to justmaster(or use a less ad-hoc pattern).
branches: [ "master", "Development/Test-Thunder-Tags" ] #temp change
Both @uncompliant:extended and @uncompliant:collapsed are deprecated (Thunder docs/plugin/interfaces/tags.md) and tested here solely to pin existing generator behaviour against regressions Both test interfaces previously only contained a single echo method — for @uncompliant:extended this meant the test exercised zero distinguishing behaviour: the mode's only effect is on property parameter encoding, not methods, making the test identical to @compliant Added a Value read/write @Property to both interfaces so the tests actually expose what each mode does differently: @uncompliant:extended: property SET sends a bare scalar (42 not {"value":42}); methods remain wrapped — only properties are affected @uncompliant:collapsed: property SET and single-param methods both send bare scalars; collapsed tests additionally assert that sending a wrapped object to a collapsed method is rejected Signed-off-by: smanes0213 <sankalpmaneshwar46@outlook.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 38 out of 38 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
tests/FunctionalTests/jsonrpc/tests/TestAnnotationsEventsJsonRpc.cpp:25
WaitForEvents()usesstd::chrono::millisecondsbut this file doesn't include<chrono>, which can cause a compile error depending on transitive includes. Add the missing header explicitly.
tests/FunctionalTests/common/implementations/TestAnnotationEventsImpl.cpp:81_capsis written without holding_mutexinSetCaps(), and read without synchronization inGetCaps(). IfSetCaps()andGetCaps()(or statuslistener dispatch) run concurrently this is a C++ data race (UB). Protect_capsreads/writes with_mutex(or make it atomic).
Core::hresult SetCaps(const Caps caps) override
{
_caps = caps;
std::lock_guard<std::mutex> lock(_mutex);
if (_notification) {
.github/workflows/ProxyStubFunctionalTests.yml:15
- The workflow is configured to run on PRs targeting a temporary branch (
Development/Test-Thunder-Tags) and includes a#temp changenote. This is likely not intended for merge to main and can cause unexpected CI triggers; consider reverting tomasteronly (or documenting why this branch must be supported long-term).
branches: [ "master", "Development/Test-Thunder-Tags" ] #temp change