feat: move hal/interfaces/BleDtm -> services/ble/Dtm#1272
feat: move hal/interfaces/BleDtm -> services/ble/Dtm#1272Gabriel Santos (gabrielsantosphilips) merged 5 commits into
Conversation
Dependency ReviewThe following issues were found:
Snapshot WarningsConsider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. License Issuesexternal/crypto/micro-ecc/CMakeLists.txt
osal/freertos/CMakeLists.txt
lwip/lwip/CMakeLists.txt
osal/threadx/CMakeLists.txt
external/segger_rtt/CMakeLists.txt
cmake/emil_test_helpers.cmake
external/args/CMakeLists.txt
external/protobuf/CMakeLists.txt
external/crypto/tiny-aes128/CMakeLists.txt
infra/syntax/CMakeLists.txt
external/crypto/mbedtls/CMakeLists.txt
OpenSSF ScorecardScorecard details
Scanned Files
|
There was a problem hiding this comment.
Pull request overview
This PR relocates the BLE Direct Test Mode (DTM) interface from the HAL interface layer into the BLE services module, and updates the associated test double and build file lists accordingly.
Changes:
- Move/rename the DTM interface from
hal/interfaces/BleDtm.hpptoservices/ble/Dtm.hpp(including namespace/type rename). - Move/rename the corresponding mock from HAL test doubles to
services/ble/test_doubles/DtmMock.hpp. - Update CMake source lists to reflect the moved headers and keep targets building.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| services/ble/test_doubles/DtmMock.hpp | Updates mock to include/inherit from services::Dtm and live under BLE service test doubles. |
| services/ble/test_doubles/CMakeLists.txt | Adds DtmMock.hpp to the services.ble_test_doubles interface target sources. |
| services/ble/Dtm.hpp | Introduces the services::Dtm interface (renamed from HAL-layer BleDtm). |
| services/ble/CMakeLists.txt | Adds Dtm.hpp to services.ble sources and reorders nearby entries. |
| hal/interfaces/test_doubles/CMakeLists.txt | Removes the old BleDtmMock.hpp from HAL test doubles sources. |
| hal/interfaces/CMakeLists.txt | Removes the old BleDtm.hpp from HAL interface sources. |
Comments suppressed due to low confidence (3)
services/ble/Dtm.hpp:2
- Include guard name is inconsistent with other headers in services/ble (e.g., SERVICES_GAP_HPP, SERVICES_GATT_HPP) and adds an extra "BLE" segment. Consider aligning the guard to the common pattern to avoid unnecessary divergence.
services/ble/test_doubles/DtmMock.hpp:2 - This mock header's include guard naming doesn’t match the established pattern used by other services/ble test doubles (e.g., SERVICES_GAP_CENTRAL_MOCK_HPP, SERVICES_GATT_CLIENT_MOCK_HPP). Aligning the guard improves consistency and reduces the risk of accidental mismatches during refactors.
services/ble/test_doubles/DtmMock.hpp:7 - The and includes are redundant here because services/ble/Dtm.hpp already includes them. Other mocks in this folder typically only include the interface header plus gmock; removing the extra includes keeps the header consistent and slightly reduces compile overhead.
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ ACTION | actionlint | 11 | 0 | 0 | 0.29s | |
| ✅ ACTION | zizmor | 11 | 0 | 0 | 0 | 4.32s |
| ✅ CPP | clang-format | 1098 | 8 | 0 | 0 | 10.33s |
| ✅ DOCKERFILE | hadolint | 2 | 0 | 0 | 0.05s | |
| ✅ JSON | jsonlint | 7 | 0 | 0 | 0.33s | |
| ✅ JSON | prettier | 7 | 0 | 0 | 0 | 0.49s |
| markdownlint | 8 | 0 | 5 | 0 | 1.38s | |
| ✅ MARKDOWN | markdown-table-formatter | 8 | 0 | 0 | 0 | 0.24s |
| ✅ REPOSITORY | checkov | yes | no | no | 34.12s | |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.16s | |
| ✅ REPOSITORY | grype | yes | no | no | 64.74s | |
| ✅ REPOSITORY | ls-lint | yes | no | no | 0.02s | |
| osv-scanner | yes | 1 | no | 0.76s | ||
| ✅ REPOSITORY | secretlint | yes | no | no | 16.98s | |
| ✅ REPOSITORY | syft | yes | no | no | 2.06s | |
| ✅ REPOSITORY | trivy | yes | no | no | 19.77s | |
| ✅ REPOSITORY | trivy-sbom | yes | no | no | 0.27s | |
| ✅ REPOSITORY | trufflehog | yes | no | no | 9.66s | |
| lychee | 140 | 1 | 0 | 121.3s | ||
| prettier | 21 | 1 | 1 | 0 | 0.67s | |
| ✅ YAML | v8r | 21 | 0 | 0 | 10.41s | |
| ✅ YAML | yamllint | 21 | 0 | 0 | 0.88s |
Detailed Issues
⚠️ SPELL / lychee - 1 error
📝 Summary
---------------------
🔍 Total..........697
🔗 Unique.........661
✅ Successful.....691
⏳ Timeouts.........0
🔀 Redirected.....310
👻 Excluded.........5
❓ Unknown..........0
🚫 Errors...........1
⛔ Unsupported......1
Errors in external/protoc/CMakeLists.txt
[404] https://github.com/protocolbuffers/protobuf/releases/download/v$%7Bprotobuf_tag%7D/protoc-$%7Bprotobuf_version%7D-$%7Bos_postfix%7D.zip (at 18:13) | Rejected status code: 404 Not Found
Hint: Followed 310 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: You can configure accepted/rejected response codes with `-a` or `--accept`
⚠️ MARKDOWN / markdownlint - 5 errors
.github/instructions/microtest.instructions.md:7 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Google Test Suite Coding Ru..."]
external/crypto/tiny-aes128/README.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "### Tiny AES128 in C"]
external/crypto/tiny-aes128/README.md:29 error MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
external/crypto/tiny-aes128/README.md:39 error MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
external/crypto/tiny-aes128/README.md:49 error MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
Scanned external/crypto file and found 0 packages
Scanned external/segger_rtt file and found 0 packages
Scanned external/args file and found 0 packages
Scanned external/protobuf file and found 0 packages
Scanned external/protoc file and found 0 packages
End status: 155 dirs visited, 1617 inodes visited, 5 Extract calls, 633.043274ms elapsed, 633.043585ms wall time
No package sources found, --help for usage information.
⚠️ YAML / prettier - 1 error
[error] Explicitly specified pattern "documents/modules/ROOT/examples/clangformat.yaml" is a symbolic link.
.clusterfuzzlite/project.yaml 43ms (unchanged)
.github/dependabot.yml 15ms (unchanged)
.github/workflows/ci.yml 59ms (unchanged)
.github/workflows/dependency-scanner.yml 9ms (unchanged)
.github/workflows/documentation.yml 12ms (unchanged)
.github/workflows/fuzzing-batch.yml 5ms (unchanged)
.github/workflows/fuzzing-cron.yml 6ms (unchanged)
.github/workflows/fuzzing-pr.yml 7ms (unchanged)
.github/workflows/linting-formatting.yml 17ms (unchanged)
.github/workflows/release-please.yml 12ms (unchanged)
.github/workflows/security.yml 9ms (unchanged)
.github/workflows/static-analysis.yml 11ms (unchanged)
.github/workflows/validate-pr.yml 15ms (unchanged)
.ls-lint.yml 3ms
.mega-linter.yml 2ms (unchanged)
antora-playbook-branch.yml 3ms (unchanged)
antora-playbook-site.yml 2ms (unchanged)
documents/antora.yml 1ms (unchanged)
documents/supplemental-ui/ui.yml 2ms (unchanged)
mull.yml 4ms (unchanged)
Notices
📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)
See detailed reports in MegaLinter artifacts
Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)
- Documentation: Custom Flavors
- Command:
npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,ACTION_ZIZMOR,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GRYPE,REPOSITORY_LS_LINT,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

Show us your support by starring ⭐ the repository
Co-authored-by: Fabian Gottstein <75617853+fabiangottstein@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
services/ble/Dtm.hpp:2
- Include guard macro name is inconsistent with other headers in services/ble, which use the
SERVICES_<NAME>_HPPpattern (e.g. services/ble/Gap.hpp:1, services/ble/Gatt.hpp:1). Consider renaming to avoid having this be the onlySERVICES_BLE_*guard in the directory.
services/ble/Dtm.hpp:13 - There is an empty
public:section immediately followed byprotected:. Other similar interfaces in this repo place the protected ctor/dtor first (e.g. services/util/Flushable.hpp:8) and avoid redundant access-specifier labels.
services/ble/test_doubles/DtmMock.hpp:2 - Include guard macro name is inconsistent with the other BLE test doubles, which use a
SERVICES_<NAME>_MOCK_HPPpattern (e.g. services/ble/test_doubles/GapCentralMock.hpp:1). Aligning the guard naming helps keep headers searchable and consistent.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
services/ble/test_doubles/DtmMock.hpp:2
- The include guard macro here doesn’t follow the established pattern used by other BLE test doubles (e.g. services/ble/test_doubles/GapCentralMock.hpp uses SERVICES_*_MOCK_HPP). Aligning the guard improves consistency and avoids accidental macro collisions.
services/ble/test_doubles/DtmMock.hpp:15 - DtmMock::StopTest still mocks the old signature returning std::optional<uint16_t>, but services::Dtm now declares StopTest as a void method taking an infra::Function callback. As-is this won’t compile due to the override mismatch.
services/ble/Dtm.hpp:26 - This PR is described as a move/rename of BleDtm -> Dtm, but this change also alters the public API/behavior of StopTest (sync return -> async callback). Please confirm this is intended and either update the PR description (and any downstream code/contracts) or keep the original signature for a pure rename/move.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
services/ble/test_doubles/DtmMock.hpp:2
- Header guard macro name is inconsistent with other
services/ble/test_doubles/*Mock.hppfiles (they useSERVICES_<TYPE>_MOCK_HPP, e.g.services/ble/test_doubles/GapCentralMock.hpp:1). Using a consistent prefix reduces collision risk and keeps the codebase convention uniform.
|
5c031d2
into
main



BleDTm is not a HAL interface, but a service interface. Therefor its moved to services/ble and renamed from BleDtm to just Dtm