tests: BR: Add test suite sdp_server #162049
compliance.yml
on: pull_request
Run compliance checks on patch series (PR)
2m 13s
Annotations
3 errors, 11 warnings, and 5 notices
SphinxLint:
tests/classic/sdp_s/README.rst#L73
tests/classic/sdp_s/README.rst:73 No newline at end of file. (missing-final-newline)
|
Run compliance checks on patch series (PR)
Process completed with exit code 1.
|
Run compliance checks on patch series (PR)
Process completed with exit code 1.
|
Run compliance checks on patch series (PR)
No files were found with the provided path: compliance.xml. No artifacts will be uploaded.
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L110
tests/classic/sdp_s/pytest/test_sdp.py:110 In 'len(service_record_handles) is 0', use '==' when comparing constant literals not 'is' ('len(service_record_handles) == 0') (literal-comparison)
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L130
tests/classic/sdp_s/pytest/test_sdp.py:130 In 'len(service_record_handles) is not 0', use '!=' when comparing constant literals not 'is not' ('len(service_record_handles) != 0') (literal-comparison)
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L143
tests/classic/sdp_s/pytest/test_sdp.py:143 In 'len(search_result) is not 0', use '!=' when comparing constant literals not 'is not' ('len(search_result) != 0') (literal-comparison)
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L162
tests/classic/sdp_s/pytest/test_sdp.py:162 In 'len(search_result) is 0', use '==' when comparing constant literals not 'is' ('len(search_result) == 0') (literal-comparison)
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L169
tests/classic/sdp_s/pytest/test_sdp.py:169 In 'len(search_result) is 0', use '==' when comparing constant literals not 'is' ('len(search_result) == 0') (literal-comparison)
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L181
tests/classic/sdp_s/pytest/test_sdp.py:181 In 'len(service_record_handles) is not 0', use '!=' when comparing constant literals not 'is not' ('len(service_record_handles) != 0') (literal-comparison)
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L201
tests/classic/sdp_s/pytest/test_sdp.py:201 In 'len(service_record_handles) is not 0', use '!=' when comparing constant literals not 'is not' ('len(service_record_handles) != 0') (literal-comparison)
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L221
tests/classic/sdp_s/pytest/test_sdp.py:221 In 'len(service_record_handles) is not 0', use '!=' when comparing constant literals not 'is not' ('len(service_record_handles) != 0') (literal-comparison)
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L235
tests/classic/sdp_s/pytest/test_sdp.py:235 In 'len(search_result) is not 0', use '!=' when comparing constant literals not 'is not' ('len(search_result) != 0') (literal-comparison)
|
R0123:
tests/classic/sdp_s/pytest/test_sdp.py#L258
tests/classic/sdp_s/pytest/test_sdp.py:258 In 'len(service_record_handles) is not 0', use '!=' when comparing constant literals not 'is not' ('len(service_record_handles) != 0') (literal-comparison)
|
You may want to run clang-format on this change:
tests/classic/sdp_s/src/sdp_server.c#L82
tests/classic/sdp_s/src/sdp_server.c:82
- BT_SDP_LIST(
- BT_SDP_ATTR_SVCLASS_ID_LIST,
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
- BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS)
- },
- )
- ),
- BT_SDP_LIST(
- BT_SDP_ATTR_PROTO_DESC_LIST,
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 12),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
- BT_SDP_ARRAY_16(BT_SDP_PROTO_L2CAP)
- },
- )
- },
- {
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 5),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
- BT_SDP_ARRAY_16(BT_SDP_PROTO_RFCOMM)
- },
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UINT8),
- BT_SDP_ARRAY_8(BT_RFCOMM_CHAN_SPP)
- },
- )
- },
- )
- ),
- BT_SDP_LIST(
- BT_SDP_ATTR_PROFILE_DESC_LIST,
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 8),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 6),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
- BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS)
- },
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UINT16),
- BT_SDP_ARRAY_16(0x0102)
- },
- )
- },
- )
- ),
+ BT_SDP_LIST(BT_SDP_ATTR_SVCLASS_ID_LIST, BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3),
+ BT_SDP_DATA_ELEM_LIST({BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
+ BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS)}, )),
+ BT_SDP_LIST(BT_SDP_ATTR_PROTO_DESC_LIST, BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 12),
+ BT_SDP_DATA_ELEM_LIST(
+ {BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3),
+ BT_SDP_DATA_ELEM_LIST({BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
+ BT_SDP_ARRAY_16(BT_SDP_PROTO_L2CAP)}, )},
+ {BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 5),
+ BT_SDP_DATA_ELEM_LIST({BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
+ BT_SDP_ARRAY_16(BT_SDP_PROTO_RFCOMM)},
+ {BT_SDP_TYPE_SIZE(BT_SDP_UINT8),
+ BT_SDP_ARRAY_8(BT_RFCOMM_CHAN_SPP)}, )}, )),
+ BT_SDP_LIST(BT_SDP_ATTR_PROFILE_DESC_LIST, BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 8),
+ BT_SDP_DATA_ELEM_LIST(
+ {BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 6),
+ BT_SDP_DATA_ELEM_LIST({BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
+ BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS)},
+ {BT_SDP_TYPE_SIZE(BT_SDP_UINT16),
+ BT_SDP_ARRAY_16(0x0102)}, )}, )),
|
You may want to run clang-format on this change:
tests/classic/sdp_s/src/sdp_server.c#L150
tests/classic/sdp_s/src/sdp_server.c:150
- BT_SDP_LIST(
- BT_SDP_ATTR_SVCLASS_ID_LIST,
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
- BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS)
- },
- )
- ),
- BT_SDP_LIST(
- BT_SDP_ATTR_PROTO_DESC_LIST,
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 12),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
- BT_SDP_ARRAY_16(BT_SDP_PROTO_L2CAP)
- },
- )
- },
- {
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 5),
- BT_SDP_DATA_ELEM_LIST(
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
- BT_SDP_ARRAY_16(BT_SDP_PROTO_RFCOMM)
- },
- {
- BT_SDP_TYPE_SIZE(BT_SDP_UINT8),
- BT_SDP_ARRAY_8(BT_RFCOMM_CHAN_SPP)
- },
- )
- },
- )
- ),
- BT_SDP_LI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BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 6),
+ BT_SDP_DATA_ELEM_LIST({BT_SDP_TYPE_SIZE(BT_SDP_UUID16),
+ BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS)},
+ {BT_SDP_TYPE_SIZE(BT_SDP_UINT16),
+ BT_SDP_ARRAY_16(0x0102)}, )}, )),
|
You may want to run clang-format on this change:
tests/classic/sdp_s/src/sdp_server.c#L230
tests/classic/sdp_s/src/sdp_server.c:230
-#define _SDP_ATTRS_DEFINE(index, sdp_attrs_name) \
-static struct bt_sdp_attribute sdp_attrs_name##index[] = { \
- BT_SDP_NEW_SERVICE, \
- BT_SDP_LIST( \
- BT_SDP_ATTR_SVCLASS_ID_LIST, \
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3), \
- BT_SDP_DATA_ELEM_LIST( \
- { \
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16), \
- BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS) \
- }, \
- ) \
- ), \
- BT_SDP_LIST( \
- BT_SDP_ATTR_PROTO_DESC_LIST, \
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 12), \
- BT_SDP_DATA_ELEM_LIST( \
- { \
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3), \
- BT_SDP_DATA_ELEM_LIST( \
- { \
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16), \
- BT_SDP_ARRAY_16(BT_SDP_PROTO_L2CAP) \
- }, \
- ) \
- }, \
- { \
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 5), \
- BT_SDP_DATA_ELEM_LIST( \
- { \
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16), \
- BT_SDP_ARRAY_16(BT_SDP_PROTO_RFCOMM) \
- }, \
- { \
- BT_SDP_TYPE_SIZE(BT_SDP_UINT8), \
- BT_SDP_ARRAY_8(BT_RFCOMM_CHAN_SPP + index + 1) \
- }, \
- ) \
- }, \
- ) \
- ), \
- BT_SDP_LIST( \
- BT_SDP_ATTR_PROFILE_DESC_LIST, \
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 8), \
- BT_SDP_DATA_ELEM_LIST( \
- { \
- BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 6), \
- BT_SDP_DATA_ELEM_LIST( \
- { \
- BT_SDP_TYPE_SIZE(BT_SDP_UUID16), \
- BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS) \
- }, \
- { \
- BT_SDP_TYPE_SIZE(BT_SDP_UINT16), \
- BT_SDP_ARRAY_16(0x0102) \
- }, \
- ) \
- }, \
- ) \
- ), \
- BT_SDP_SERVICE_NAME("Serial Port"), \
-}
+#define _SDP_ATTRS_DEFINE(index, sdp_attrs_name) \
+ static struct bt_sdp_attribute sdp_attrs_name##index[] = { \
+ BT_SDP_NEW_SERVICE, \
+ BT_SDP_LIST( \
+ BT_SDP_ATTR_SVCLASS_ID_LIST, BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3), \
+ BT_SDP_DATA_ELEM_LIST({BT_SDP_TYPE_SIZE(BT_SDP_UUID16), \
+ BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS)}, )), \
+ BT_SDP_LIST( \
+ BT_SDP_ATTR_PROTO_DESC_LIST, BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 12), \
+ BT_SDP_DATA_ELEM_LIST( \
+ {BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 3), \
+ BT_SDP_DATA_ELEM_LIST({BT_SDP_TYPE_SIZE(BT_SDP_UUID16), \
+ BT_SDP_ARRAY_16(BT_SDP_PROTO_L2CAP)}, )}, \
+ {BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 5), \
+ BT_SDP_DATA_ELEM_LIST( \
+ {BT_SDP_TYPE_SIZE(BT_SDP_UUID16), \
+ BT_SDP_ARRAY_16(BT_SDP_PROTO_RFCOMM)}, \
+ {BT_SDP_TYPE_SIZE(BT_SDP_UINT8), \
+ BT_SDP_ARRAY_8(BT_RFCOMM_CHAN_SPP + index + 1)}, )}, )), \
+ BT_SDP_LIST(BT_SDP_ATTR_PROFILE_DESC_LIST, BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 8), \
+ BT_SDP_DATA_ELEM_LIST( \
+ {BT_SDP_TYPE_SIZE_VAR(BT_SDP_SEQ8, 6), \
+ BT_SDP_DATA_ELEM_LIST( \
+ {BT_SDP_TYPE_SIZE(BT_SDP_UUID16), \
+ BT_SDP_ARRAY_16(BT_SDP_SERIAL_PORT_SVCLASS)}, \
+ {BT_SDP_TYPE_SIZE(BT_SDP_UINT16), \
+ BT_SDP_ARRAY_16(0x0102)}, )}, )), \
+ BT_SDP_SERVICE_NAME("Serial Port"), \
+ }
#define SDP_ATTRS_DEFINE(index, ...) _SDP_ATTRS_DEFINE(index, ##__VA_ARGS__)
LISTIFY(MAX_SDP_RECORD_COUNT, SDP_ATTRS_DEFINE, (;), spp_attrs);
#define _SDP_REC_DEFINE(index, sdp_attrs_name) BT_SDP_RECORD(sdp_attrs_name##index)
-#define SDP_REC_DEFINE(index, ...) _SDP_REC_DEFINE(index, ##__VA_ARGS__)
+#define SDP_REC_DEFINE(index, ...) _SDP_REC_DEFINE(index, ##__VA_ARGS__)
|
You may want to run clang-format on this change:
tests/classic/sdp_s/src/sdp_server.c#L310
tests/classic/sdp_s/src/sdp_server.c:310
-SHELL_STATIC_SUBCMD_SET_CREATE(sdp_server_cmds,
+SHELL_STATIC_SUBCMD_SET_CREATE(
+ sdp_server_cmds,
SHELL_CMD_ARG(register_sdp, NULL, "<SDP Record Index>", cmd_register_sdp, 2, 0),
SHELL_CMD_ARG(register_sdp_all, NULL, "", cmd_register_sdp_all, 1, 0),
SHELL_CMD_ARG(register_sdp_large, NULL, "", cmd_register_sdp_large, 1, 0),
SHELL_CMD_ARG(register_sdp_large_valid, NULL, "", cmd_register_sdp_large_valid, 1, 0),
- SHELL_SUBCMD_SET_END
-);
+ SHELL_SUBCMD_SET_END);
|
You may want to run clang-format on this change:
tests/classic/sdp_s/src/sdp_server.c#L324
tests/classic/sdp_s/src/sdp_server.c:324
-SHELL_CMD_REGISTER(sdp_server, &sdp_server_cmds, "Bluetooth classic SDP server shell commands", cmd_default_handler);
+SHELL_CMD_REGISTER(sdp_server, &sdp_server_cmds, "Bluetooth classic SDP server shell commands",
+ cmd_default_handler);
|