Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b12ff0c
Merge branch 'release/1.1.0'
shibu-kv Feb 10, 2025
0397413
Merge branch 'release/1.2.0'
shibu-kv Jul 24, 2025
1128aaf
Logupload - script migration
Dec 1, 2025
81a7e47
Update context_manager.c
Abhinavpv28 Dec 4, 2025
c67d58a
Update path_handler.c
Abhinavpv28 Dec 4, 2025
a9a2e33
Update path_handler.c
Abhinavpv28 Dec 4, 2025
f0f0918
Logupload migration
Dec 10, 2025
4f0a608
Update L1-Test.yml
Abhinavpv28 Dec 10, 2025
9b4d346
Update unit_test.sh to include new tests
Abhinavpv28 Dec 10, 2025
9fb8d96
Add files via upload
Abhinavpv28 Dec 12, 2025
1ae54b6
Add files via upload
Abhinavpv28 Dec 15, 2025
e082b1d
Delete uploadstblogs/src/strategy_selector_gtest.cpp
Abhinavpv28 Dec 15, 2025
642a75d
Update strategy_selector_gtest.cpp
Abhinavpv28 Dec 15, 2025
d2185c8
Update strategy_selector_gtest.cpp
Abhinavpv28 Dec 16, 2025
50d4d0b
Update mock_curl.h
Abhinavpv28 Dec 16, 2025
599cc7a
Update mock_curl.cpp
Abhinavpv28 Dec 16, 2025
2c09efb
Update mock_rdk_utils.h
Abhinavpv28 Dec 16, 2025
5fdc686
Update archive_manager_gtest.cpp
Abhinavpv28 Dec 16, 2025
6a508b9
Update cleanup_manager_gtest.cpp
Abhinavpv28 Dec 16, 2025
a52b7a1
Update context_manager_gtest.cpp
Abhinavpv28 Dec 16, 2025
34c5372
Update event_manager_gtest.cpp
Abhinavpv28 Dec 16, 2025
7abc8bb
Update log_collector_gtest.cpp
Abhinavpv28 Dec 16, 2025
e79c549
Update md5_utils_gtest.cpp
Abhinavpv28 Dec 16, 2025
f073ad9
Update path_handler_gtest.cpp
Abhinavpv28 Dec 16, 2025
3b5a101
Update rbus_interface_gtest.cpp
Abhinavpv28 Dec 16, 2025
1b28d45
Delete uploadstblogs/unittest/run_retry_logic_test.sh
Abhinavpv28 Dec 16, 2025
4e70b3b
Update verification_gtest.cpp
Abhinavpv28 Dec 16, 2025
d518bb3
Update validation_gtest.cpp
Abhinavpv28 Dec 16, 2025
157828c
Update uploadstblogs_gtest.cpp
Abhinavpv28 Dec 16, 2025
6f493a6
Updating copyright header
Dec 16, 2025
a3d5836
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Jan 6, 2026
ffd0993
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Jan 12, 2026
5b4bc88
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Jan 13, 2026
d68ca8c
Enable breakpad support for analyzing any crashes
Abhinavpv28 Jan 14, 2026
a0586db
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Jan 21, 2026
6e7c40d
Changelog updates for 2.0.0 release
shibu-kv Jan 21, 2026
99acb75
Merge branch 'release/2.0.0'
shibu-kv Jan 21, 2026
8696fdc
Merge branch 'release/2.0.0' into develop
shibu-kv Jan 21, 2026
52ad7e1
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Feb 3, 2026
c4a4a53
DCM Agent 2.0.1 release changelog updates
naveenkumarhanasi Feb 3, 2026
6af7b08
Merge branch 'release/2.0.1'
naveenkumarhanasi Feb 3, 2026
835a632
Merge tag '2.0.1' into develop
naveenkumarhanasi Feb 3, 2026
9a67596
RDK-59919 : [RDKE] Port Ops Support Upload Scripts to Source code (#59)
Abhinavpv28 Feb 10, 2026
24893c3
Changelog updates for 2.0.2 release
shibu-kv Feb 10, 2026
0c95175
Merge branch 'release/2.0.2'
shibu-kv Feb 10, 2026
f6aea55
Merge branch 'release/2.0.2' into develop
shibu-kv Feb 10, 2026
6097556
Update context_manager.c (#73)
Abhinavpv28 Feb 11, 2026
45018b7
DCM Agent 2.0.3 release changelog updates
naveenkumarhanasi Feb 11, 2026
4489cc7
Merge branch 'release/2.0.3'
naveenkumarhanasi Feb 11, 2026
86c4755
Merge tag '2.0.3' into develop
naveenkumarhanasi Feb 11, 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
48 changes: 39 additions & 9 deletions .github/workflows/L1-Test.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

name: Unit tests dcm-agent
name: L1 Unit Tests

on:
pull_request:
branches: [ develop, main ]
Expand All @@ -9,21 +10,50 @@ env:
AUTOMATICS_PASSCODE: ${{ secrets.AUTOMATICS_PASSCODE }}

jobs:
execute-unit-tests-on-pr:
name: Execute unit tests in dcm-agent GTest suite
execute-L1-tests-on-pr:
name: Execute L1 test suite in test container environment
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest

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

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull test container image
run: docker pull ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest

- name: Start test container
run: |
docker run -d --name native-platform -v ${{ github.workspace }}:/mnt/L1_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest

- name: Run unit tests
run: sh unit_test.sh
- name: Run L1 Unit Tests inside container
run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh unit_test.sh"

- name: Upload test results to automatic test result management system
- name: Copy L1 test results to runner
run: |
docker cp native-platform:/tmp/Gtest_Report /tmp/Gtest_Report
ls -l /tmp/Gtest_Report

upload-test-results:
name: Upload L1 test results to automatic test result management system
needs: execute-L1-tests-on-pr
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest
volumes:
- /tmp/Gtest_Report:/tmp/Gtest_Report

steps:
- name: Upload results
if: github.repository_owner == 'rdkcentral'
run: |
echo "Contents in /tmp/Gtest_Report:"
ls -l /tmp/Gtest_Report
git config --global --add safe.directory `pwd`
gtest-json-result-push.py /tmp/Gtest_Report https://rdkeorchestrationservice.apps.cloud.comcast.net/rdke_orchestration_api/push_unit_test_results `pwd`
2 changes: 1 addition & 1 deletion .github/workflows/L2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Enter Inside Platform native container and run L2 Test
run: |
docker exec -i native-platform /bin/bash -c "cd /mnt/L2_CONTAINER_SHARED_VOLUME/ && sh cov_build.sh && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/lib/aarch64-linux-gnu:/usr/local/lib: && sh test/run_l2.sh"
docker exec -i native-platform /bin/bash -c "cd /mnt/L2_CONTAINER_SHARED_VOLUME/ && sh cov_build.sh && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/lib/aarch64-linux-gnu:/usr/local/lib: && sh test/run_l2.sh && sh test/run_uploadstblogs_l2.sh"

- name: Copy l2 test results to runner
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Code Coverage

on:
pull_request:
branches: [ main ]
branches: [ main develop ]

jobs:
execute-unit-code-coverage-report-on-release:
Expand Down
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,48 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [2.0.3](https://github.com/rdkcentral/dcm-agent/compare/2.0.2...2.0.3)

- Update context_manager.c [`#73`](https://github.com/rdkcentral/dcm-agent/pull/73)

#### [2.0.2](https://github.com/rdkcentral/dcm-agent/compare/2.0.1...2.0.2)

> 10 February 2026

- RDK-59919 : [RDKE] Port Ops Support Upload Scripts to Source code [`#59`](https://github.com/rdkcentral/dcm-agent/pull/59)
- Changelog updates for 2.0.2 release [`24893c3`](https://github.com/rdkcentral/dcm-agent/commit/24893c35de4d09950f4eaf673e801a1844dce227)
- Merge tag '2.0.1' into develop [`835a632`](https://github.com/rdkcentral/dcm-agent/commit/835a632f9bbde3e6b406d9d4bc7afdfbc2e96edc)

#### [2.0.1](https://github.com/rdkcentral/dcm-agent/compare/2.0.0...2.0.1)

> 3 February 2026

- RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scripts To C Implementation [`#60`](https://github.com/rdkcentral/dcm-agent/pull/60)
- DCM Agent 2.0.1 release changelog updates [`c4a4a53`](https://github.com/rdkcentral/dcm-agent/commit/c4a4a53423089a2d765f34aa40d75a9423f52661)

### [2.0.0](https://github.com/rdkcentral/dcm-agent/compare/1.2.0...2.0.0)

> 21 January 2026

- RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scripts To C Implementation [`#54`](https://github.com/rdkcentral/dcm-agent/pull/54)
- RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scripts To C Implementation [`#51`](https://github.com/rdkcentral/dcm-agent/pull/51)
- RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scripts To C Implementation [`#49`](https://github.com/rdkcentral/dcm-agent/pull/49)
- RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scripts To C Implementation [`#35`](https://github.com/rdkcentral/dcm-agent/pull/35)
- RDK-59278 - [RDKE][DCM-Agent] Achieve 80% L1 Coverage [`#24`](https://github.com/rdkcentral/dcm-agent/pull/24)
- Deploy fossid_integration_stateless_diffscan_target_repo action [`#18`](https://github.com/rdkcentral/dcm-agent/pull/18)
- Deploy cla action [`#12`](https://github.com/rdkcentral/dcm-agent/pull/12)
- RDK-58899: Enable logupload test cases in dcm-agent [`#17`](https://github.com/rdkcentral/dcm-agent/pull/17)
- RDK-58899: Add L2 test cases for dcm-agent [`#16`](https://github.com/rdkcentral/dcm-agent/pull/16)
- Logupload migration [`f0f0918`](https://github.com/rdkcentral/dcm-agent/commit/f0f09185f2675ace883f4bf4151c59eb9755c32d)
- Logupload - script migration [`1128aaf`](https://github.com/rdkcentral/dcm-agent/commit/1128aaf4cc68c4fc1f3d91da2995adc6f949862c)
- Add files via upload [`9fb8d96`](https://github.com/rdkcentral/dcm-agent/commit/9fb8d961283814007b3f5843c7f0b8e1e12dedcd)

#### [1.2.0](https://github.com/rdkcentral/dcm-agent/compare/1.1.0...1.2.0)

> 24 July 2025

- RDKEMW-3584: Load Default config during the start of dcm-agent [`#13`](https://github.com/rdkcentral/dcm-agent/pull/13)
- Changelog updates for release 1.2.0 [`7910046`](https://github.com/rdkcentral/dcm-agent/commit/7910046cd61f619731b87b7217b14d8021252a0a)

#### 1.1.0

Expand Down
4 changes: 3 additions & 1 deletion Makefile.am
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
##########################################################################

AUTOMAKE_OPTIONS = foreign
SUBDIRS = uploadstblogs/src

dcmd_CFLAGS += -fPIC -pthread

Expand All @@ -32,12 +33,13 @@ dcmd_SOURCES = dcm.c \
$(NULL)

dcmd_LDFLAGS += -shared -fPIC $(GLIB_LIBS)
dcmd_LDADD = ${top_builddir}/uploadstblogs/src/libuploadstblogs.la

dcmd_CFLAGS += -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/dbus-1.0 \
-I${PKG_CONFIG_SYSROOT_DIR}$(libdir)/dbus-1.0/include \
-I${top_srcdir}/include \
-I${top_srcdir}/uploadstblogs/include \
-I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/rbus \
-I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/rdk/iarmbus \
-I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/rdk/iarmmgrs/sysmgr \
-I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/rdk/iarmmgrs-hal

76 changes: 75 additions & 1 deletion configure.ac
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,79 @@ AC_SUBST([dcmd_CFLAGS])

# Checks for typedefs, structures, and compiler characteristics.

AC_CONFIG_FILES([Makefile])
AC_ARG_ENABLE([iarmevent],
AS_HELP_STRING([--enable-iarmevent],[enables IARM event]),
[
case "${enableval}" in
yes) IS_IARMEVENT_ENABLED=true
IARM_EVENT_FLAG=" -DIARM_ENABLED ";;
no) IS_IARMEVENT_ENABLED=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-iarmevent]) ;;
esac
],
[echo "iarm is disabled"])
AM_CONDITIONAL([IS_IARMEVENT_ENABLED], [test x$IS_IARMEVENT_ENABLED = xtrue])
AC_SUBST(IARM_EVENT_FLAG)

AC_ARG_ENABLE([t2api],
AS_HELP_STRING([--enable-t2api],[enables telemetry]),
[
case "${enableval}" in
yes) IS_TELEMETRY2_ENABLED=true
T2_EVENT_FLAG=" -DT2_EVENT_ENABLED ";;
no) IS_TELEMETRY2_ENABLED=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-t2enable]) ;;
esac
],
[echo "telemetry is disabled"])
AM_CONDITIONAL([IS_TELEMETRY2_ENABLED], [test x$IS_TELEMETRY2_ENABLED = xtrue])
AC_SUBST(T2_EVENT_FLAG)

IS_LIBRDKCERTSEL_ENABLED=""
IS_LIBRDKCERTSEL_ENABLED=""

AC_ARG_ENABLE([rdkcertselector],
AS_HELP_STRING([--enable-rdkcertselector],[enables rdkcertselector replacement (default is no)]),
[
case "${enableval}" in
yes) IS_LIBRDKCERTSEL_ENABLED=true
LIBRDKCERTSEL_FLAG=" -DLIBRDKCERTSELECTOR ";;
no) IS_LIBRDKCERTSEL_ENABLED=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-rdkcertselector]) ;;
esac
],
[echo "rdkcertselector is disabled"])
AM_CONDITIONAL([IS_LIBRDKCERTSEL_ENABLED], [test x$IS_LIBRDKCERTSEL_ENABLED = xtrue])
AC_SUBST(LIBRDKCERTSEL_FLAG)

AC_ARG_ENABLE([mountutils],
AS_HELP_STRING([--enable-mountutils],[enables mountutils replacement (default is no)]),
[
case "${enableval}" in
yes) IS_LIBRDKCONFIG_ENABLED=true
LIBRDKCONFIG_FLAG=" -DLIBRDKCONFIG_BUILD ";;
no) IS_LIBRDKCONFIG_ENABLED=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-mountutils]) ;;
esac
],
[echo "mountutils is disabled"])
AM_CONDITIONAL([IS_LIBRDKCONFIG_ENABLED], [test x$IS_LIBRDKCONFIG_ENABLED = xtrue])
AC_SUBST(LIBRDKCONFIG_FLAG)

# Check for breakpad
BREAKPAD_CFLAGS=" "
BREAKPAD_LFLAGS=" "
AC_ARG_ENABLE([breakpad],
AS_HELP_STRING([--enable-breakpad],[enable breakpad support (default is no)]),
[
case "${enableval}" in
yes) BREAKPAD_CFLAGS="-DINCLUDE_BREAKPAD"
BREAKPAD_LFLAGS="-lbreakpadwrapper";;
no) AC_MSG_ERROR([breakpad is disabled]) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-breakpad]) ;;
esac
],
[echo "breakpad is disabled"])

Comment on lines +130 to +135
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The --enable-breakpad option claims “default is no”, but explicitly passing --enable-breakpad=no currently triggers AC_MSG_ERROR. The no branch should disable breakpad without error (and typically just leave BREAKPAD_CFLAGS/LFLAGS empty).

Suggested change
no) AC_MSG_ERROR([breakpad is disabled]) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-breakpad]) ;;
esac
],
[echo "breakpad is disabled"])
no) BREAKPAD_CFLAGS=" "
BREAKPAD_LFLAGS=" " ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-breakpad]) ;;
esac
],
[echo "breakpad is disabled"])

Copilot uses AI. Check for mistakes.
AC_CONFIG_FILES([Makefile uploadstblogs/src/Makefile])
AC_OUTPUT
20 changes: 18 additions & 2 deletions cov_build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,30 @@ autoreconf --install
cd ${ROOT}
rm -rf iarmmgrs
git clone https://github.com/rdkcentral/iarmmgrs.git
cp iarmmgrs/sysmgr/include/sysMgr.h /usr/local/include
cp iarmmgrs/maintenance/include/maintenanceMGR.h /usr/local/include

cd ${ROOT}
rm -rf rdk_logger
git clone https://github.com/rdkcentral/rdk_logger.git
cp rdk_logger/include/* /usr/local/include

cd ${ROOT}
rm -rf telemetry
git clone https://github.com/rdkcentral/telemetry.git
cd telemetry
sh build_inside_container.sh
cp include/*.h /usr/local/include
sh build_inside_container.sh

cd ${ROOT}
git clone https://github.com/rdkcentral/common_utilities.git -b feature/upload_L2
cd common_utilities
autoreconf -i
./configure --enable-rdkcertselector --prefix=${INSTALL_DIR} CFLAGS="-Wno-stringop-truncation -DL2_TEST_ENABLED -DRDK_LOGGER"
cp uploadutils/*.h /usr/local/include
make
make install

cd $WORKDIR
./configure --prefix=${INSTALL_DIR} CFLAGS="-DRDK_LOGGER -DHAS_MAINTENANCE_MANAGER -I$ROOT/iarmmgrs/maintenance/include"
./configure --prefix=${INSTALL_DIR} CFLAGS="-DRDK_LOGGER -DHAS_MAINTENANCE_MANAGER -DL2_TEST_ENABLED -I$ROOT/iarmmgrs/maintenance/include"
make && make install
27 changes: 23 additions & 4 deletions dcm.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "dcm_rbus.h"
#include "dcm_cronparse.h"
#include "dcm_schedjob.h"
#include "uploadstblogs.h"

static DCMDHandle *g_pdcmHandle = NULL;

Expand Down Expand Up @@ -77,13 +78,31 @@ static VOID dcmRunJobs(const INT8* profileName, VOID *pHandle)
pPrctl = "HTTP";
}
if(pURL == NULL) {
DCMWarn("Log Upload protocol is NULL, using %s\n", DCM_DEF_LOG_URL);
DCMWarn("Log Upload URL is NULL, using %s\n", DCM_DEF_LOG_URL);
pURL = DCM_DEF_LOG_URL;
}

DCMInfo("\nStart log upload Script\n");
snprintf(pExecBuff, EXECMD_BUFF_SIZE, "nice -n 19 /bin/busybox sh %s/uploadSTBLogs.sh %s 0 1 0 %s %s &",
pRDKPath, DCM_LOG_TFTP, pPrctl, pURL);
DCMInfo("\nStart log upload via library API\n");

// Call uploadstblogs library API instead of shell script
UploadSTBLogsParams params = {
.flag = 0,
.dcm_flag = 1,
.upload_on_reboot = false,
.upload_protocol = pPrctl,
.upload_http_link = pURL,
.trigger_type = TRIGGER_SCHEDULED,
.rrd_flag = false,
.rrd_file = NULL
};
#ifndef GTEST_ENABLE
int result = uploadstblogs_run(&params);
if (result != 0) {
DCMError("Log upload failed with error code: %d\n", result);
} else {
DCMInfo("Log upload completed successfully\n");
}
#endif
}
else if(strcmp(profileName, DCM_DIFD_SCHED) == 0) {
DCMInfo("Start FW update Script\n");
Expand Down
Loading