Dispatch returns a result envelope
dpm_execute fills a dpm_result on every call: status and error_code from the module's return value, and a payload the module hands back through dpm_set_result. The payload's layout belongs to the module and is documented per command; its release function is carried in the envelope and invoked by dpm_result_release. The context keeps a stack of the envelopes in progress, so a module calling a peer receives the peer's payload in its own envelope and its caller sees only what the module sets itself. The good fixture returns a payload and counts its releases, and the modules test covers the envelope fields, the payload round trip, single release, discard on a NULL envelope, and a payload set outside any dispatch. The prose documents describe the envelope and the payload header a module ships.
This commit is contained in:
@@ -14,6 +14,10 @@ foreach(fixture good missing_symbols bad_version)
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# The known-good fixture returns a payload through the library, so it
|
||||
# links libdpm-core.so the way a module does.
|
||||
target_link_libraries(fixture_good PRIVATE dpm-core)
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# API test binaries — one per area of the library, each its own ctest
|
||||
# case, so a failure names the area it happened in
|
||||
|
||||
Reference in New Issue
Block a user