From 3e8b81e735cdb44322601ebe503bbd44aa06a3b1 Mon Sep 17 00:00:00 2001 From: Tedd Ho-Jeong An Date: Tue, 10 Mar 2020 10:00:58 -0700 Subject: [PATCH 1/2] workflow: Add workflow files This patch adds workflow files for ci: [sync.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. --- .github/workflows/ci.yml | 25 +++++++++++++++++++ .github/workflows/code_scan.yml | 26 ++++++++++++++++++++ .github/workflows/sync.yml | 43 +++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/code_scan.yml create mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..a3a54d1a1b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: [pull_request] + +jobs: + ci: + runs-on: ubuntu-latest + name: CI for Pull Request + steps: + - name: Checkout the source code + uses: actions/checkout@v3 + with: + path: src/src + + - name: CI + uses: tedd-an/bzcafe@main + with: + task: ci + base_folder: src + space: user + github_token: ${{ secrets.ACTION_TOKEN }} + email_token: ${{ secrets.EMAIL_TOKEN }} + patchwork_token: ${{ secrets.PATCHWORK_TOKEN }} + patchwork_user: ${{ secrets.PATCHWORK_USER }} + diff --git a/.github/workflows/code_scan.yml b/.github/workflows/code_scan.yml new file mode 100644 index 0000000000..181d08c32d --- /dev/null +++ b/.github/workflows/code_scan.yml @@ -0,0 +1,26 @@ +name: Code Scan + +on: + schedule: + - cron: "40 7 * * FRI" + +jobs: + code-scan: + runs-on: ubuntu-latest + steps: + - name: Checkout the source + uses: actions/checkout@v2 + with: + fetch-depth: 0 + path: src + - name: Code Scan + uses: BluezTestBot/action-code-scan@main + with: + src_path: src + github_token: ${{ secrets.GITHUB_TOKEN }} + email_token: ${{ secrets.EMAIL_TOKEN }} + - uses: actions/upload-artifact@v2 + with: + name: scan_report + path: scan_report.tar.gz + diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000000..d935cca9fa --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,43 @@ +name: Sync + +on: + schedule: + - cron: "*/30 * * * *" + +jobs: + sync_repo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: master + + - name: Sync Repo + uses: tedd-an/bzcafe@main + with: + task: sync + upstream_repo: 'https://git.kernel.org/pub/scm/bluetooth/bluez.git' + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Cleanup PR + uses: tedd-an/bzcafe@main + with: + task: cleanup + github_token: ${{ secrets.ACTION_TOKEN }} + + sync_patchwork: + needs: sync_repo + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Sync Patchwork + uses: tedd-an/bzcafe@main + with: + task: patchwork + space: user + github_token: ${{ secrets.ACTION_TOKEN }} + email_token: ${{ secrets.EMAIL_TOKEN }} + patchwork_token: ${{ secrets.PATCHWORK_TOKEN }} + patchwork_user: ${{ secrets.PATCHWORK_USER }} + From 063893e37007522ad4cfe2aa284e334a70c86b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= Date: Mon, 24 Mar 2025 12:04:29 +0100 Subject: [PATCH 2/2] obex: MAP MCE Publish supported features during connect This is required for passing MAP/MCE/MFB/BV-06-C PTS test case: Verify that the MCE sends its MapSupportedFeatures in the OBEX Connect request if the MSE declares support for the feature MapSupportedFeatures in Connect Request in its SDP record. --- obexd/client/map.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/obexd/client/map.c b/obexd/client/map.c index 7ca33cfe07..58d786ecb6 100644 --- a/obexd/client/map.c +++ b/obexd/client/map.c @@ -57,6 +57,33 @@ #define SDP_MESSAGE_TYPE_MMS 0x08 #define SDP_MESSAGE_TYPE_IM 0x10 +#define SDP_MCE_MAP_SUPPORTED_FEATURES_IN_CONNECT 0x00080000 + +#define MAP_SUPPORTED_FEATURES_TAG 0x29 + +#define NOTIFICATION_REGISTRATION_FEATURE 0x00000001 +#define NOTIFICATION_FEATURE 0x00000002 +#define BROWSING_FEATURE 0x00000004 +#define UPLOADING_FEATURE 0x00000008 +#define DELETE_FEATURE 0x00000010 +#define INSTANCE_INFORMATION_FEATURE 0x00000020 +#define EXTENDED_EVENT_REPORT_1_1 0x00000040 +#define EVENT_REPORT_1_2 0x00000080 +#define MESSAGE_FORMAT_1_1 0x00000100 +#define MESSAGE_LISTING_FORMAT_1_1 0x00000200 +#define PERSISTENT_MESSAGE_HANDLES 0x00000400 +#define DATABASE_IDENTIFIER 0x00000800 +#define FOLDER_VERSION_COUNTER 0x00001000 +#define CONVERSATION_VERSION_COUNTERS 0x00002000 +#define PARTICIPANT_PRESENCE_CHANGE 0x00004000 +#define PARTICIPANT_CHAT_STATE_CHANGE 0x00008000 +#define PBAP_CONTACT_CROSS_REFERENCE 0x00010000 +#define NOTIFICATION_FILTERING 0x00020000 +#define UTC_OFFSET_TIMESTAMP_FORMAT 0x00040000 +#define RESERVED 0x00080000 +#define CONVERSATION_LISTING 0x00100000 +#define OWNER_STATUS 0x00200000 + static const char * const filter_list[] = { "subject", "timestamp", @@ -2224,6 +2251,33 @@ static void parse_service_record(struct map_data *map) map->supported_features = 0x0000001f; } +static void *map_supported_features(struct obc_session *session) +{ + const void *data; + uint32_t features; + + /* Supported Feature Bits */ + data = obc_session_get_attribute(session, + SDP_ATTR_MAP_SUPPORTED_FEATURES); + + if (!data) + return NULL; + + features = *(uint32_t *) data; + if (!(features & SDP_MCE_MAP_SUPPORTED_FEATURES_IN_CONNECT)) + return NULL; + + return g_obex_apparam_set_uint32(NULL, MAP_SUPPORTED_FEATURES_TAG, + NOTIFICATION_REGISTRATION_FEATURE | + NOTIFICATION_FEATURE | + BROWSING_FEATURE | + UPLOADING_FEATURE | + DELETE_FEATURE | + INSTANCE_INFORMATION_FEATURE | + EXTENDED_EVENT_REPORT_1_1 | + MESSAGE_LISTING_FORMAT_1_1); +} + static int map_probe(struct obc_session *session) { struct map_data *map; @@ -2269,6 +2323,7 @@ static struct obc_driver map = { .uuid = MAS_UUID, .target = OBEX_MAS_UUID, .target_len = OBEX_MAS_UUID_LEN, + .supported_features = map_supported_features, .probe = map_probe, .remove = map_remove };