Skip to content

RDKEMW-14533: MRG - Coverity inclusion changes#92

Open
PreethiLakshmi91 wants to merge 1 commit intordkcentral:developfrom
PreethiLakshmi91:RDKEMW-14533_changes
Open

RDKEMW-14533: MRG - Coverity inclusion changes#92
PreethiLakshmi91 wants to merge 1 commit intordkcentral:developfrom
PreethiLakshmi91:RDKEMW-14533_changes

Conversation

@PreethiLakshmi91
Copy link
Copy Markdown

Reason for change: Crash fix
Test Procedure: Device deepsleep causing the crash
Risks: Low
Priority: P2

Copilot AI review requested due to automatic review settings April 22, 2026 12:00
@PreethiLakshmi91 PreethiLakshmi91 requested a review from a team as a code owner April 22, 2026 12:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new GitHub Actions workflow intended to build the project on Ubuntu (and, per naming, support a Coverity incremental scan flow).

Changes:

  • Add .github/workflows/native_full_build.yml to run autotools configure/build/install on ubuntu-22.04.
  • Upload the install prefix (output/) as a workflow artifact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

LDFLAGS="-L$PREFIX_PATH/lib" \
./configure \
--enable-gstreamer1=yes \
--enable-pi-build=yes \
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow configures without enabling either --enable-rpc or --enable-rbusrpc. In this repo, src/main/Makefile.am only defines btMgrBus_SOURCES inside USE_RPC_IARM / USE_RPC_RBUS conditionals, and configure.ac defaults both conditionals to false when these flags aren’t provided. As-is, the build is likely to fail due to btMgrBus being built with no sources/objects; pass the appropriate enable flag (and install any needed deps) for the intended build variant.

Suggested change
--enable-pi-build=yes \
--enable-pi-build=yes \
--enable-rpc=yes \

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/native_full_build.yml Outdated
Comment on lines +1 to +16
name: BT-Core Coverity Incremental Analysis Scan

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main

jobs:
native-build:
runs-on: ubuntu-22.04

Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflow name/PR intent indicates a "Coverity Incremental Analysis Scan", but this workflow only builds and uploads artifacts and contains no Coverity invocation (e.g., cov-build/analysis/upload). Either add the missing Coverity steps or rename the workflow/job/file to match what it actually does to avoid confusion and incorrect CI expectations.

Copilot uses AI. Check for mistakes.
uses: actions/upload-artifact@v4
with:
name: bluetooth_mgr-native-build
path: output
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow defines PREFIX_PATH as "${{ github.workspace }}/output", but the artifact upload step hardcodes "path: output". Use the same variable/path in both places so the upload stays correct if PREFIX_PATH changes (and to make the intent clearer).

Suggested change
path: output
path: ${{ env.PREFIX_PATH }}

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/native_full_build.yml Outdated
Comment on lines +1 to +8
name: BT-Core Coverity Incremental Analysis Scan

on:
push:
branches:
- develop
- main
pull_request:
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description mentions a device deepsleep crash fix and related test procedure, but the only change in this PR is a new GitHub Actions workflow. If the workflow change is the intended fix, the PR description should be updated to reflect that; otherwise the code change(s) for the crash fix appear to be missing from this PR.

Copilot uses AI. Check for mistakes.
Comment on lines +48 to +57
- name: Configure
run: |
mkdir -p $PREFIX_PATH
CPPFLAGS="-I$PREFIX_PATH/include -I$PREFIX_PATH/include/cjson" \
LIBCJSON_CFLAGS="-I/usr/include/cjson" \
LDFLAGS="-L$PREFIX_PATH/lib" \
./configure \
--enable-gstreamer1=yes \
--enable-pi-build=yes \
--prefix=$PREFIX_PATH
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow runs ./configure without first providing libbtrCore headers/libs. configure.ac hard-requires libbtrCore (AC_CHECK_LIB(btrCore, ...) will error) and README.txt describes building/installing btcore first and passing LDFLAGS/CPPFLAGS (including -lbtrCore). Add a step to build/install btcore (or install a package providing libbtrCore) and update CPPFLAGS/LDFLAGS accordingly so the workflow can actually configure/build successfully.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 22, 2026 12:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

branches:
- develop
- main

Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider explicitly setting minimal permissions: for this workflow (e.g., contents: read) to follow GitHub Actions least-privilege defaults, especially since this runs on pull_request events.

Suggested change
permissions:
contents: read

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,72 @@
name: BT-Mgr Coverity Incremental Analysis Scan
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description mentions a crash fix (device deepsleep) and Coverity inclusion changes, but this PR only adds a GitHub Actions native build workflow and does not change runtime code. Please update the PR title/description (or include the missing functional changes) so reviewers and release notes accurately reflect the change.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,72 @@
name: BT-Mgr Coverity Incremental Analysis Scan
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflow is named "BT-Mgr Coverity Incremental Analysis Scan", but there are no Coverity steps (no cov-build/cov-analyze, token/secrets, etc.). Either add the actual Coverity analysis steps or rename the workflow/job/file to reflect that it only performs a native build + artifact upload.

Suggested change
name: BT-Mgr Coverity Incremental Analysis Scan
name: BT-Mgr Native Full Build

Copilot uses AI. Check for mistakes.
- name: Prepare autotools
run: |
libtoolize --force
aclocal
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aclocal is invoked twice back-to-back; the first call is redundant and can also mask the intent to include the m4 macro dir. Consider keeping only the aclocal -I m4 invocation (or use autoreconf -fi if you want the standard one-shot regeneration) to reduce CI time and confusion.

Suggested change
aclocal

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 22, 2026 12:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +51 to +52
git clone https://github.com/rdkcentral/bluetooth.git

Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git clone https://github.com/rdkcentral/bluetooth.git pulls whatever the current default branch HEAD is, which makes builds non-reproducible and creates a supply-chain risk. Prefer pinning to a specific tag/commit, or (as other workflows here do) attempting to checkout the same branch as the PR/commit (with a fallback if the branch doesn’t exist). Also consider --depth 1 to avoid cloning full history.

Suggested change
git clone https://github.com/rdkcentral/bluetooth.git
BTRCORE_REPO="https://github.com/rdkcentral/bluetooth.git"
BTRCORE_BRANCH="${{ github.head_ref || github.ref_name }}"
BTRCORE_FALLBACK_BRANCH="main"
if git ls-remote --exit-code --heads "$BTRCORE_REPO" "$BTRCORE_BRANCH" >/dev/null 2>&1; then
git clone --depth 1 --branch "$BTRCORE_BRANCH" "$BTRCORE_REPO"
else
git clone --depth 1 --branch "$BTRCORE_FALLBACK_BRANCH" "$BTRCORE_REPO"
fi

Copilot uses AI. Check for mistakes.
Reason for change: Crash fix
Test Procedure: Device deepsleep causing the crash
Risks: Low
Priority: P2

Signed-off-by: ppalan289 <preethi_palanisamy@comcast.com>
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.

3 participants