pw_rpc2: Use FutureTask in C++ unit tests

Replace bespoke Future-wrapping Task subclasses (HandshakeTestTask,
DriverTask, WriteTestTask, ReadTestTask, ReserveTestTask, ControlTask,
FutureOwningTask, and VoidFutureTask) across pw_rpc2 and pw_transport
unit tests with pw::async2::FutureTask, and use RunInTaskUntilStalled()
for wrong-dispatcher checks.

Change-Id: I14520c6bdffcca725d560ce0d8a1d1dfe9c16584
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/530125
10 files changed
tree: 28d62e30a689f739f6b9294b63f287695f540493
  1. .agents/
  2. .allstar/
  3. .gemini/
  4. .github/
  5. .vscode/
  6. build_overrides/
  7. docker/
  8. docs/
  9. kudzu/
  10. pw_alignment/
  11. pw_allocator/
  12. pw_allocator_zephyr/
  13. pw_analog/
  14. pw_android_toolchain/
  15. pw_arduino_build/
  16. pw_assert/
  17. pw_assert_basic/
  18. pw_assert_fuchsia/
  19. pw_assert_log/
  20. pw_assert_tokenized/
  21. pw_assert_trap/
  22. pw_assert_zephyr/
  23. pw_async/
  24. pw_async2/
  25. pw_async_basic/
  26. pw_async_fuchsia/
  27. pw_atomic/
  28. pw_base64/
  29. pw_bloat/
  30. pw_blob_store/
  31. pw_bluetooth/
  32. pw_bluetooth_hci/
  33. pw_bluetooth_profiles/
  34. pw_bluetooth_proxy/
  35. pw_bluetooth_sapphire/
  36. pw_boot/
  37. pw_boot_cortex_m/
  38. pw_buf/
  39. pw_build/
  40. pw_build_android/
  41. pw_build_info/
  42. pw_build_mcuxpresso/
  43. pw_bytes/
  44. pw_change/
  45. pw_channel/
  46. pw_checksum/
  47. pw_chre/
  48. pw_chrono/
  49. pw_chrono_embos/
  50. pw_chrono_freertos/
  51. pw_chrono_rp2040/
  52. pw_chrono_stl/
  53. pw_chrono_threadx/
  54. pw_chrono_zephyr/
  55. pw_cli/
  56. pw_cli_analytics/
  57. pw_clock_tree/
  58. pw_clock_tree_mcuxpresso/
  59. pw_cobs/
  60. pw_codegen/
  61. pw_compilation_testing/
  62. pw_config_loader/
  63. pw_console/
  64. pw_containers/
  65. pw_cpu_exception/
  66. pw_cpu_exception_cortex_m/
  67. pw_cpu_exception_risc_v/
  68. pw_crypto/
  69. pw_daq/
  70. pw_digital_io/
  71. pw_digital_io_linux/
  72. pw_digital_io_mcuxpresso/
  73. pw_digital_io_rp2040/
  74. pw_digital_io_zephyr/
  75. pw_display/
  76. pw_dma_mcuxpresso/
  77. pw_docgen/
  78. pw_doctor/
  79. pw_elf/
  80. pw_emu/
  81. pw_enum/
  82. pw_env_setup/
  83. pw_env_setup_zephyr/
  84. pw_file/
  85. pw_flatbuffers/
  86. pw_format/
  87. pw_fortifier/
  88. pw_function/
  89. pw_fuzzer/
  90. pw_ghish/
  91. pw_grpc/
  92. pw_hal/
  93. pw_hdlc/
  94. pw_hex_dump/
  95. pw_hil/
  96. pw_i2c/
  97. pw_i2c_linux/
  98. pw_i2c_mcuxpresso/
  99. pw_i2c_rp2040/
  100. pw_i2c_zephyr/
  101. pw_ide/
  102. pw_interrupt/
  103. pw_interrupt_cortex_m/
  104. pw_interrupt_freertos/
  105. pw_interrupt_zephyr/
  106. pw_intrusive_ptr/
  107. pw_json/
  108. pw_kernel/
  109. pw_kvs/
  110. pw_libc/
  111. pw_libcxx/
  112. pw_log/
  113. pw_log_android/
  114. pw_log_basic/
  115. pw_log_fuchsia/
  116. pw_log_null/
  117. pw_log_rpc/
  118. pw_log_string/
  119. pw_log_tokenized/
  120. pw_log_zephyr/
  121. pw_malloc/
  122. pw_malloc_freelist/
  123. pw_malloc_freertos/
  124. pw_memory/
  125. pw_metric/
  126. pw_module/
  127. pw_multibuf/
  128. pw_multisink/
  129. pw_numeric/
  130. pw_package/
  131. pw_perf_test/
  132. pw_persistent_ram/
  133. pw_polyfill/
  134. pw_preprocessor/
  135. pw_presubmit/
  136. pw_protobuf/
  137. pw_protobuf_compiler/
  138. pw_random/
  139. pw_random_fuchsia/
  140. pw_result/
  141. pw_ring_buffer/
  142. pw_router/
  143. pw_rpc/
  144. pw_rpc2/
  145. pw_rpc_transport/
  146. pw_rust/
  147. pw_sensor/
  148. pw_snapshot/
  149. pw_software_update/
  150. pw_span/
  151. pw_spi/
  152. pw_spi_linux/
  153. pw_spi_mcuxpresso/
  154. pw_spi_rp2040/
  155. pw_spi_zephyr/
  156. pw_status/
  157. pw_stm32cube_build/
  158. pw_stream/
  159. pw_stream_uart_linux/
  160. pw_stream_uart_mcuxpresso/
  161. pw_string/
  162. pw_symbolizer/
  163. pw_sync/
  164. pw_sync_baremetal/
  165. pw_sync_embos/
  166. pw_sync_freertos/
  167. pw_sync_stl/
  168. pw_sync_threadx/
  169. pw_sync_zephyr/
  170. pw_sys_io/
  171. pw_sys_io_ambiq_sdk/
  172. pw_sys_io_arduino/
  173. pw_sys_io_baremetal_lm3s6965evb/
  174. pw_sys_io_baremetal_stm32f429/
  175. pw_sys_io_emcraft_sf2/
  176. pw_sys_io_mcuxpresso/
  177. pw_sys_io_rp2040/
  178. pw_sys_io_stdio/
  179. pw_sys_io_stm32cube/
  180. pw_sys_io_zephyr/
  181. pw_system/
  182. pw_target_runner/
  183. pw_thread/
  184. pw_thread_embos/
  185. pw_thread_freertos/
  186. pw_thread_stl/
  187. pw_thread_threadx/
  188. pw_thread_zephyr/
  189. pw_time/
  190. pw_tls_client/
  191. pw_tls_client_boringssl/
  192. pw_tls_client_mbedtls/
  193. pw_tokenizer/
  194. pw_toolchain/
  195. pw_trace/
  196. pw_trace_tokenized/
  197. pw_transfer/
  198. pw_transport/
  199. pw_uart/
  200. pw_uart_mcuxpresso/
  201. pw_unit_test/
  202. pw_uuid/
  203. pw_varint/
  204. pw_watch/
  205. pw_web/
  206. pw_work_queue/
  207. seed/
  208. targets/
  209. third_party/
  210. zephyr/
  211. .bazelignore
  212. .bazelrc
  213. .bazelversion
  214. .black.toml
  215. .clang-format
  216. .clang-tidy
  217. .git-blame-ignore-revs
  218. .gitattributes
  219. .gitignore
  220. .gn
  221. .mypy.ini
  222. .prettierignore
  223. .prettierrc.cjs
  224. .pw_ide.yaml
  225. .pylintrc
  226. .rgignore
  227. .ruff.toml
  228. activate.bat
  229. AGENTS.md
  230. Android.bp
  231. AUTHORS
  232. bootstrap.bat
  233. bootstrap.fish
  234. bootstrap.sh
  235. BUILD.bazel
  236. BUILD.gn
  237. BUILDCONFIG.gn
  238. CLAUDE.md
  239. CMakeLists.txt
  240. EXTENDED_OWNERS
  241. GEMINI.md
  242. gh
  243. go.mod
  244. go.sum
  245. Kconfig.zephyr
  246. LICENSE
  247. MODULE.bazel
  248. MODULE.bazel.lock
  249. modules.gni
  250. OWNERS
  251. package.json
  252. pigweed.json
  253. PIGWEED_MODULES
  254. pw
  255. README.md
  256. REPO.bazel
  257. rustfmt.toml
  258. tsconfig.json
  259. workflows.json
  260. WORKSPACE_OWNERS
README.md

Pigweed

Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.

For more information please see our website: https://pigweed.dev/.

Links