Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
65a7559
RDKECMF-213 Add CODEOWNERS file
scthunderbolt Dec 17, 2024
f710c87
Merge pull request #125 from rdkcentral/feature/test-workflows
sbarre01 Dec 17, 2024
8efac8e
RDKEMW-254: libsoup3 support
apatel859 Feb 3, 2025
fda6ec5
Merge pull request #128 from rdkcentral/RDKEMW-254-xdial-libsoup24
apatel859 Feb 12, 2025
d16879c
Merge pull request #132 from rdkcentral/main
apatel859 Feb 20, 2025
33ed34b
Merge pull request #2 from rdkcentral/develop
yuvaramachandran-gurusamy Mar 7, 2025
55650a2
RDKTV-35185: Add sync between ssdp_http_server_callback and gdial_ssd…
yuvaramachandran-gurusamy Mar 4, 2025
f6c6d7d
Merge pull request #139 from yuvaramachandran-gurusamy/develop
apatel859 Mar 7, 2025
42da7af
Merge pull request #1 from rdkcentral/develop
hgfell683 Mar 17, 2025
84b8951
RDKEMW-2033: Fix coverity related issue
hgfell683 Mar 17, 2025
36f386d
Merge branch 'feature/RDKEMW-2033' of https://github.com/hgfell683/xd…
hgfell683 Mar 17, 2025
9257820
RDK-55044: [RDKE] Implement DIAL requirement to use on EU product
yuvaramachandran-gurusamy Mar 19, 2025
a503f9e
RDK-56672: Fix parsing issue while restrict addtionalData url per app
yuvaramachandran-gurusamy Mar 21, 2025
974beb6
Merge pull request #144 from yuvaramachandran-gurusamy/topic/RDK-5504…
apatel859 Mar 25, 2025
4a4ea54
Merge pull request #2 from rdkcentral/develop
hgfell683 Mar 26, 2025
a52d864
Merge pull request #141 from hgfell683/feature/RDKEMW-2033
apatel859 Apr 1, 2025
8e05add
RDKEMW-2278: Removal of WPEFrameworkSecurity Agent Utility
tabbas651 Apr 14, 2025
8a97f28
Merge pull request #148 from tabbas651/develop
apatel859 Apr 22, 2025
81f4b89
RDKEMW-4129: Prepare native build environment
yuvaramachandran-gurusamy Jun 5, 2025
024882a
Merge pull request #151 from yuvaramachandran-gurusamy/topic/RDKEMW-4…
apatel859 Jun 5, 2025
6750eba
RDKEMW-4129: Test
yuvaramachandran-gurusamy Jun 5, 2025
82a6e05
Merge pull request #152 from yuvaramachandran-gurusamy/topic/RDKEMW-4…
apatel859 Jun 6, 2025
83a1518
RDKEMW-4129: Prepare native build script
yuvaramachandran-gurusamy Jun 5, 2025
a1da8a4
Merge branch 'topic/RDKEMW-4129' of https://github.com/rdkcentral/xdi…
yuvaramachandran-gurusamy Jun 9, 2025
33b4866
Merge pull request #156 from yuvaramachandran-gurusamy/topic/RDKEMW-4…
apatel859 Jun 9, 2025
c66ef14
remmove duplicates from build_xxx script
apatel859 Jun 9, 2025
8cb0f37
Merge pull request #157 from rdkcentral/topic/RDKEMW-4129-2
apatel859 Jun 9, 2025
7302ede
Update gdial.cpp
ssitar583 Jun 26, 2025
25a6735
Merge pull request #161 from ssitar583/develop
apatel859 Jul 9, 2025
3202ca6
RDKEMW-5927: Crash fix during soup_uri_to_string API call (#163)
yuvaramachandran-gurusamy Aug 5, 2025
206d137
RDKEMW-6891:Coverity errors fix for xdial (#166)
mukesh972 Sep 3, 2025
c48dff7
RDKEMW-9964: Removing onStopped GDial notification (#177)
yuvaramachandran-gurusamy Nov 12, 2025
3da15c8
RDKEMW-11024 - Using copilot identify and fix the static code analysi…
srinibas15 Dec 5, 2025
29f6789
RDKEMW-12059: Fix Coverity identified issues (#183)
dkumar798 Jan 8, 2026
48461dc
RDKEMW-12555 : Fix coveirty workflow scan in xdialserver repo (#187)
agampa263 Jan 20, 2026
6500318
RDKEMW-12059: Fix Coverity identified issues (#192)
dkumar798 Mar 27, 2026
a2496f0
RDKEMW-16256: Suppress coverity false positive issue (#198)
dkumar798 Apr 7, 2026
d0acf46
RDKEMW-16911 - L1 unit tests for xdialserver (#199)
hgfell683 Apr 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @rdkcentral/xdialserver-maintainers
252 changes: 252 additions & 0 deletions .github/workflows/L1-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
name: L1-tests

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
workflow_call:
secrets:
RDKCM_RDKE:
required: true
workflow_dispatch:

permissions:
contents: read

env:
BUILD_TYPE: Debug

jobs:
L1-tests:
name: Build and run unit tests
runs-on: ubuntu-22.04

steps:
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.16.x'
github-api-token: ''

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install jsonref

- name: ACK External Trigger
run: |
echo "Message: External Trigger Received for L1 Tests"
echo "Trigger Source: ${{ inputs.caller_source }}"

- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.16.x'

- name: Install packages
run: >
sudo apt update
&&
sudo apt install -y
autoconf automake libtool pkg-config
libgtest-dev libgmock-dev
build-essential g++ cmake
valgrind lcov clang ninja-build
libglib2.0-dev libdbus-1-dev
libgssdp-1.2-dev libsoup2.4-dev libxml2-dev
uuid-dev libcurl4-openssl-dev
libsystemd-dev libboost-all-dev libwebsocketpp-dev
meson libcunit1 libcunit1-dev curl
protobuf-compiler-grpc libgrpc-dev libgrpc++-dev
libyajl-dev

- name: Build trower-base64
run: |
if [ ! -d "trower-base64" ]; then
git clone https://github.com/xmidt-org/trower-base64.git
fi
cd trower-base64
meson setup --warnlevel 3 --werror build
ninja -C build
sudo ninja -C build install

- name: Checkout xdialserver
uses: actions/checkout@v3
with:
path: xdialserver

# - name: Checkout entservices-testframework
# uses: actions/checkout@v3
# with:
# repository: rdkcentral/entservices-testframework
# path: entservices-testframework
# token: ${{ secrets.RDKCM_RDKE }}
# ref: feature/RDKEMW-14961-2

- name: Checkout googletest
uses: actions/checkout@v3
with:
repository: google/googletest
path: googletest
ref: v1.15.0

- name: Build googletest
run: |
cmake -S "$GITHUB_WORKSPACE/googletest" \
-B build/googletest \
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/usr" \
-DBUILD_GMOCK=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
cmake --build build/googletest -j$(nproc)
cmake --install build/googletest

# - name: Generate external headers
# # Empty headers to mute errors
# run: >
# cd "$GITHUB_WORKSPACE/entservices-testframework/Tests/"
# &&
# mkdir -p
# headers
# headers/WPEFramework
# headers/WPEFramework/core
# headers/WPEFramework/interfaces
# headers/rdk/iarmbus
# headers/rdk/iarmmgrs-hal
# headers/uuid
# &&
# cd headers
# &&
# touch
# WPEFramework/core.h
# WPEFramework/interfaces.h
# WPEFramework/plugins.h
# rdk/iarmbus/libIBus.h
# rdk/iarmbus/libIBusDaemon.h
# rdk/iarmmgrs-hal/iarmmgrs_hal.h
# uuid/uuid.h
# &&
# mkdir -p proc
# &&
# touch proc/readproc.h

- name: Generate stub headers
# Individual shadow headers that source files #include are generated
# here as thin wrappers so they never need to be committed.
# Truly empty stubs are created with touch.
# C++ shim definitions for gdial.cpp live in
# tests/L1Tests/stubs/gdial_cpp_test_stubs.hpp and are included by
# lightweight wrappers generated here.
run: |
STUBS="$GITHUB_WORKSPACE/xdialserver/tests/L1Tests/stubs"
WRAPPER='#pragma once'
CPP_WRAPPER='#pragma once\n#include "gdial_cpp_test_stubs.hpp"'

# Create stubs directory if it doesn't exist
mkdir -p "$STUBS"

# Shadow headers: block the real headers and redirect to the
# combined stub.
for f in \
libIBus.h libIARMCore.h; do
printf "$WRAPPER\n" > "$STUBS/$f"
done

# Empty stubs: headers from WPEFramework and IARM that are unused
# in the test paths.
touch \
"$STUBS/libIARMBus.h" \
"$STUBS/libIBusDaemon.h" \
"$STUBS/libIARMUtil.h"

# gdial.cpp wrappers: keep source definitions in a committed mock
# file and generate only include shims here.
mkdir -p "$STUBS/com" "$STUBS/json" "$STUBS/securityagent"
for f in core.h plugins.h securityagent/SecurityTokenUtil.h; do
printf "$CPP_WRAPPER\n" > "$STUBS/$f"
done

# Truly empty stubs for unused headers.
touch \
"$STUBS/com/Ids.h" \
"$STUBS/json/JsonData_Netflix.h" \
"$STUBS/json/JsonData_StateControl.h"

- name: Build xdialserver L1 tests
run: |
cd "$GITHUB_WORKSPACE/xdialserver"
autoreconf -if

# Compiler / linker flags for coverage instrumentation
export CFLAGS="-fprofile-arcs -ftest-coverage -g -O0"
export CXXFLAGS="-fprofile-arcs -ftest-coverage -g -O0"
export LDFLAGS="--coverage"

# Tell pkg-config / the build where to find googletest
export PKG_CONFIG_PATH="$GITHUB_WORKSPACE/install/usr/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
export CPPFLAGS="-I$GITHUB_WORKSPACE/install/usr/include"
export LIBRARY_PATH="$GITHUB_WORKSPACE/install/usr/lib:${LIBRARY_PATH:-}"

./configure --enable-l1tests
# TESTFRAMEWORK_DIR="$GITHUB_WORKSPACE/entservices-testframework"
make -C tests/L1Tests

- name: Run unit tests without valgrind
run: |
cd "$GITHUB_WORKSPACE/xdialserver/tests/L1Tests"
./run_L1Tests --gtest_output="json:$GITHUB_WORKSPACE/xdialserverL1TestResults.json"
cp "$GITHUB_WORKSPACE/xdialserverL1TestResults.json" \
"$GITHUB_WORKSPACE/xdialserverL1TestResultsWithoutValgrind.json"

- name: Run unit tests with valgrind
if: ${{ !env.ACT }}
run: |
cd "$GITHUB_WORKSPACE/xdialserver/tests/L1Tests"
valgrind \
--tool=memcheck \
--log-file="$GITHUB_WORKSPACE/valgrind_log" \
--leak-check=yes \
--show-reachable=yes \
--track-fds=yes \
--fair-sched=try \
./run_L1Tests --gtest_output="json:$GITHUB_WORKSPACE/xdialserverL1TestResultsWithValgrind.json"

- name: Generate coverage
if: ${{ !env.ACT }}
run: |
lcov -c \
-o coverage.info \
-d "$GITHUB_WORKSPACE/xdialserver"

lcov -r coverage.info \
'/usr/include/*' \
'*/install/usr/include/*' \
'*/googletest/*' \
'*/entservices-testframework/*' \
'*/tests/*' \
'*/mocks/*' \
'*/stubs/*' \
-o filtered_coverage.info

genhtml \
-o coverage \
-t "xdialserver L1 coverage" \
filtered_coverage.info

- name: Upload artifacts
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: artifacts-L1-xdialserver
path: |
coverage/
valgrind_log
xdialserverL1TestResultsWithoutValgrind.json
xdialserverL1TestResultsWithValgrind.json
if-no-files-found: warn
25 changes: 25 additions & 0 deletions .github/workflows/native_full_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Component in Native Environment

on:
push:
branches: [ main, 'sprint/**', 'release/**', topic/*, develop ]
pull_request:
branches: [ main, 'sprint/**', 'release/**', topic/*, develop ]

jobs:
build-entservices-on-pr:
name: Build xdialserver component in github rdkcentral
runs-on: ubuntu-latest
container:
image: ubuntu:22.04

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: native build
run: |
sh -x build_dependencies.sh
sh -x cov_build.sh
env:
GITHUB_TOKEN: ${{ secrets.RDKCM_RDKE }}
Comment on lines +11 to +25

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 4 months ago

In general, the problem is fixed by explicitly setting the least-privilege permissions for the GITHUB_TOKEN, either at the workflow root (applies to all jobs) or per job (applies only to that job). For a simple build job that only checks out code and runs shell scripts, contents: read is usually sufficient.

The best fix here, without changing existing functionality, is to add a minimal permissions block to the build-entservices-on-pr job. This ensures the GITHUB_TOKEN (if used implicitly by any actions in the job) has only read access to repo contents. Since the job uses only actions/checkout@v3 and shell commands, contents: read is enough and will not break existing behavior. Concretely, in .github/workflows/native_full_build.yml, under jobs: build-entservices-on-pr:, add:

    permissions:
      contents: read

indented to align with runs-on and container. No additional imports or definitions are required, and no other files need to be changed.

Suggested changeset 1
.github/workflows/native_full_build.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/native_full_build.yml b/.github/workflows/native_full_build.yml
--- a/.github/workflows/native_full_build.yml
+++ b/.github/workflows/native_full_build.yml
@@ -10,6 +10,8 @@
   build-entservices-on-pr:
     name: Build xdialserver component in github rdkcentral
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     container:
       image: ubuntu:22.04
 
EOF
@@ -10,6 +10,8 @@
build-entservices-on-pr:
name: Build xdialserver component in github rdkcentral
runs-on: ubuntu-latest
permissions:
contents: read
container:
image: ubuntu:22.04

Copilot is powered by AI and may make mistakes. Always verify output.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
DIRS:= server

all:
for dir in $(DIRS); do (cd $$dir && cmake $(PLATFORM_FLAGS) . && make || exit 1) || exit 1; done
for dir in $(DIRS); do (cd $$dir && cmake $(DISABLE_SECURITY_TOKEN) $(PLATFORM_FLAGS) . && make || exit 1) || exit 1; done
clean:
for dir in $(DIRS); do (cd $$dir && make clean || exit 1) || exit 1; done
20 changes: 20 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
##########################################################################
# If not stated otherwise in this file or this component's LICENSE
# file the following copyright and licenses apply:
#
# Copyright 2019 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##########################################################################

SUBDIRS = tests
Loading
Loading