Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PW_SID:642899] [BlueZ,1/6] settings: Add btd_settings_gatt_db_{store,load} #1273

Closed
wants to merge 7 commits into from

Conversation

BluezTestBot
Copy link
Owner

From: Luiz Augusto von Dentz luiz.von.dentz@intel.com

This adds helper functions to store and load from/to file so they can
get reused by the likes of gatt-database.c and btmon.

Makefile.am | 3 +-
src/device.c | 499 ++---------------------------------------------
src/settings.c | 510 +++++++++++++++++++++++++++++++++++++++++++++++++
src/settings.h | 11 ++
4 files changed, 534 insertions(+), 489 deletions(-)
create mode 100644 src/settings.c
create mode 100644 src/settings.h

tedd-an and others added 7 commits May 13, 2022 22:27
This patch adds workflow files for ci:

[schedule_work.yml]
  - runs every 30 mins.
  - sync repo with upstream repo and rebase workflow branch to tip of
    master.
  - creates PR after reading patches from patchwork.kernel.org

[ci.yml]
  - Tests the following checks:
    - checkpatch
    - gitlint
    - make
    - make check

[code_scan.yml]
    - Static code checker: Coverity and Clang
    - Coverity: Submit the result to the coverity website
    - Clang Code Scan: Send email with result file to the internal team

To simplify the history, new change will amend to this patch without
creating new patch.
This adds helper functions to store and load from/to file so they can
get reused by the likes of gatt-database.c and btmon.
This enables storing the local (adapter) GATT database which later will
be used by btmon to decode GATT handles.
This moves print_hex_field to display.h and removes the duplicated code
from packet.c and l2cap.c.
This moves ATT decoding function from l2cap.c to att.c.
This caches connection information including the device addres so it can
be printed alongside the handle:

> HCI Event: Disconnect Complete (0x05) plen 4
        Status: Success (0x00)
        Handle: 3585 Address: 68:79:12:XX:XX:XX (OUI 68-79-12)
        Reason: Connection Terminated By Local Host (0x16)
This attempt to decode the attribute type if its gatt_db can be loaded:

< ACL Data TX: Handle 3585 flags 0x00 dlen 9
      ATT: Write Request (0x12) len 4
        Handle: 0x000b Type: Client Characteristic Configuration (0x2902)
          Data: 0200
@BluezTestBot
Copy link
Owner Author

CheckPatch
Test ID: checkpatch
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Duration: 7.67 seconds
Result: FAIL

Output:

[BlueZ,4/6] monitor: Move ATT decoding function into its own file
WARNING:SPACING: Unnecessary space before function pointer arguments
#618: FILE: monitor/att.c:501:
+	void (*func) (const struct l2cap_frame *frame);

ERROR:SPACING: space prohibited before that ',' (ctx:WxE)
#657: FILE: monitor/att.c:540:
+	{ 0x12, "Write Request"	,
 	                       	^

/github/workspace/src/12854194.patch total: 1 errors, 1 warnings, 1316 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/12854194.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

[BlueZ,5/6] monitor: Cache connection information
WARNING:TYPO_SPELLING: 'addres' may be misspelled - perhaps 'address'?
#82: 
This caches connection information including the device addres so it can
                                                        ^^^^^^

WARNING:SPACING: Unnecessary space before function pointer arguments
#3958: FILE: monitor/packet.c:8833:
+	void (*cmd_func) (uint16_t index, const void *data, uint8_t size);

WARNING:SPACING: Unnecessary space before function pointer arguments
#3962: FILE: monitor/packet.c:8836:
+	void (*rsp_func) (uint16_t index, const void *data, uint8_t size);

WARNING:SPACING: Unnecessary space before function pointer arguments
#4943: FILE: monitor/packet.c:11433:
+	void (*func) (uint16_t index, const void *data, uint8_t size);

WARNING:SPACING: Unnecessary space before function pointer arguments
#5001: FILE: monitor/packet.c:11617:
+	void (*func) (uint16_t index, const void *data, uint8_t size);

WARNING:SPACING: Unnecessary space before function pointer arguments
#5055: FILE: monitor/vendor.h:17:
+	void (*cmd_func) (uint16_t index, const void *data, uint8_t size);

WARNING:SPACING: Unnecessary space before function pointer arguments
#5059: FILE: monitor/vendor.h:20:
+	void (*rsp_func) (uint16_t index, const void *data, uint8_t size);

WARNING:SPACING: Unnecessary space before function pointer arguments
#5068: FILE: monitor/vendor.h:28:
+	void (*evt_func) (uint16_t index, const void *data, uint8_t size);

/github/workspace/src/12854196.patch total: 0 errors, 8 warnings, 4552 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/12854196.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

@BluezTestBot
Copy link
Owner Author

GitLint
Test ID: gitlint
Desc: Run gitlint with rule in .gitlint
Duration: 2.82 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Prep - Setup ELL
Test ID: setupell
Desc: Clone, build, and install ELL
Duration: 51.73 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build - Prep
Test ID: buildprep
Desc: Prepare environment for build
Duration: 0.64 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build - Configure
Test ID: build
Desc: Configure the BlueZ source tree
Duration: 10.19 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build - Make
Test ID: buildmake
Desc: Build the BlueZ source tree
Duration: 1707.88 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Make Check
Test ID: makecheck
Desc: Run 'make check'
Duration: 12.58 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Make Check w/Valgrind
Test ID: makecheckvalgrind
Desc: Run 'make check' with Valgrind
Duration: 528.47 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Make Distcheck
Test ID: makedistcheck
Desc: Run distcheck to check the distribution
Duration: 288.81 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build w/ext ELL - Configure
Test ID: build_extell
Desc: Configure BlueZ source with '--enable-external-ell' configuration
Duration: 10.30 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Build w/ext ELL - Make
Test ID: build_extell_make
Desc: Build BlueZ source with '--enable-external-ell' configuration
Duration: 1702.73 seconds
Result: PASS

@BluezTestBot
Copy link
Owner Author

Incremental Build with patches
Test ID: incremental_build
Desc: Incremental build per patch in the series
Duration: 10363.18 seconds
Result: PASS

@BluezTestBot BluezTestBot deleted the 642899 branch May 20, 2022 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants