Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion cov_build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh

Copilot AI Feb 10, 2026

Copy link

Choose a reason for hiding this comment

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

The shebang must start at the very first character of the file. This line currently has a leading space ( #!/bin/sh), which can prevent the script from running when executed directly (e.g., ./cov_build.sh) and may confuse tooling. Remove the leading whitespace so the file begins with #!/bin/sh at column 1.

Suggested change
#!/bin/sh
#!/bin/sh

Copilot uses AI. Check for mistakes.
####################################################################################
# If not stated otherwise in this file or this component's LICENSE file the
# following copyright and licenses apply:
Expand Down Expand Up @@ -31,6 +31,12 @@ export CXXFLAGS="-Wno-format -Wno-unused-variable"
./configure --prefix=${RFC_INSTALL_DIR} --enable-rfctool=yes --enable-tr181set=yes

cd $RFC_ROOT
git clone https://github.com/rdkcentral/rdk_logger.git -b develop
Comment on lines 33 to +34

Copilot AI Feb 10, 2026

Copy link

Choose a reason for hiding this comment

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

This step only copies headers from rdk_logger into /usr/local/include, but the build links rfcMgr against -lrdkloggers (see rfcMgr/Makefile.am). Without building/installing the rdk_logger library into the link path, the build can still fail at link time; consider adding a build/install step for rdk_logger (or installing the appropriate package) rather than only copying headers.

Suggested change
cd $RFC_ROOT
git clone https://github.com/rdkcentral/rdk_logger.git -b develop
cd $RFC_ROOT
rm -rf rdk_logger
git clone https://github.com/rdkcentral/rdk_logger.git -b develop
cd rdk_logger
autoreconf -i
./configure --prefix=${RFC_INSTALL_DIR}
make && make install
cd $RFC_ROOT

Copilot uses AI. Check for mistakes.

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

The git clone command will fail if the rdk_logger directory already exists from a previous run. Consider adding a cleanup step (e.g., rm -rf rdk_logger) before cloning, or using a conditional check to skip cloning if the directory already exists. This is especially important for CI/CD environments where the script may be run multiple times.

Copilot uses AI. Check for mistakes.
cp rdk_logger/include/rdk_logger.h /usr/local/include


Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

There are extra blank lines (lines 37-38) that add unnecessary whitespace. Consider removing these to maintain consistency with the rest of the codebase.

Suggested change

Copilot uses AI. Check for mistakes.
cd $RFC_ROOT

Comment on lines +37 to +39

Copilot AI Feb 10, 2026

Copy link

Choose a reason for hiding this comment

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

There are two consecutive blank lines added here (lines 37 and 39) followed by a redundant directory change command. The extra blank lines serve no purpose and reduce code readability. Additionally, the 'cd $RFC_ROOT' command on line 38 is redundant since the script is already in that directory from line 33, and there was no directory change in between.

Suggested change
cd $RFC_ROOT

Copilot uses AI. Check for mistakes.
rm -rf common_utilities
git clone https://github.com/rdkcentral/common_utilities.git -b develop
Comment on lines +34 to 41

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

The git clone command lacks error handling. If the clone fails (e.g., due to network issues or if the directory already exists from a previous run), the script will continue execution and likely fail later with unclear errors. Consider adding error checking after the git clone command, such as checking the exit code or using set -e at the script level.

Suggested change
git clone https://github.com/rdkcentral/rdk_logger.git -b develop
cp rdk_logger/include/rdk_logger.h /usr/local/include
cd $RFC_ROOT
rm -rf common_utilities
git clone https://github.com/rdkcentral/common_utilities.git -b develop
if ! git clone https://github.com/rdkcentral/rdk_logger.git -b develop; then
echo "Error: Failed to clone rdk_logger repository" >&2
exit 1
fi
cp rdk_logger/include/rdk_logger.h /usr/local/include
cd $RFC_ROOT
rm -rf common_utilities
if ! git clone https://github.com/rdkcentral/common_utilities.git -b develop; then
echo "Error: Failed to clone common_utilities repository" >&2
exit 1
fi

Copilot uses AI. Check for mistakes.
cd common_utilities
Expand Down
6 changes: 5 additions & 1 deletion rfcMgr/gtest/mocks/rdk_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@
#include <stdio.h>

#define LOG_RFCMGR "LOG.RDK.RFCMGR"
#if defined(RDK_LOGGER)
#include "rdk_logger.h"
#define RDK_LOG rdk_logger_msg_printf
#else
#define RDK_LOG_TRACE1 1
#define RDK_LOG_DEBUG 2
#define RDK_LOG_INFO 3
#define RDK_LOG_WARN 4
#define RDK_LOG_ERROR 5

#define rdk_logger_init(DEBUG_INI_NAME) ;

// The macro to convert RDK_LOG to printf
Expand All @@ -50,4 +53,5 @@


#endif
#endif

1 change: 1 addition & 0 deletions rfcMgr/mtlsUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//

Copilot AI Feb 10, 2026

Copy link

Choose a reason for hiding this comment

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

The stray // line before the license header makes this file inconsistent with the rest of the component (other files start the /*############################################################################## header at line 1) and may break automated license/header scanners that expect the header at the top of file. Please remove this extra line so the license block is the first content in the file.

Copilot uses AI. Check for mistakes.

Copilot AI Feb 10, 2026

Copy link

Choose a reason for hiding this comment

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

This adds an empty // comment line before the license header. It doesn't convey information and adds noise to the file header; please remove it unless there's a specific tooling requirement it addresses (in which case add a brief explanatory comment instead).

Copilot uses AI. Check for mistakes.

Copilot AI Feb 10, 2026

Copy link

Choose a reason for hiding this comment

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

A standalone // line was added before the file’s existing license/header block. This is inconsistent with other source files in this component (which start directly with the license block) and can interfere with automated license/header detection tools; remove the extra line or incorporate it into the existing header comment if needed.

Copilot uses AI. Check for mistakes.

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

An empty comment line has been added. This appears to serve no purpose and should be removed for code cleanliness.

Copilot uses AI. Check for mistakes.
/*##############################################################################
# If not stated otherwise in this file or this component's LICENSE file the
# following copyright and licenses apply:
Expand Down
4 changes: 4 additions & 0 deletions run_ut.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Copilot AI Feb 10, 2026

Copy link

Choose a reason for hiding this comment

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

An empty line has been added at the start of the file, before the shebang. This is incorrect - the shebang (#!/bin/sh) must be the first line of the file with no preceding whitespace or blank lines. Otherwise, the shell script may not be interpreted correctly by the system.

Copilot uses AI. Check for mistakes.

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

Empty line added before the shebang. The shebang should be on the first line of the file for proper script execution. Remove this empty line.

Suggested change

Copilot uses AI. Check for mistakes.
#!/bin/sh

####################################################################################
Expand Down Expand Up @@ -29,6 +30,9 @@ if [ "x$1" = "x--enable-cov" ]; then
ENABLE_COV=true
fi

git clone https://github.com/rdkcentral/rdk_logger.git -b develop

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

The git clone command will fail if the rdk_logger directory already exists from a previous run. Consider adding a cleanup step (e.g., rm -rf rdk_logger) before cloning, or using a conditional check to skip cloning if the directory already exists. This is especially important for CI/CD environments where the script may be run multiple times.

Copilot uses AI. Check for mistakes.

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

The git clone command lacks error handling. If the clone fails (e.g., due to network issues or if the directory already exists), the script will continue execution and likely fail later with unclear errors. Consider adding error checking after the git clone command, such as checking the exit code or using set -e at the script level.

Suggested change
git clone https://github.com/rdkcentral/rdk_logger.git -b develop
git clone https://github.com/rdkcentral/rdk_logger.git -b develop
if [ $? -ne 0 ]; then
echo "Error: Failed to clone rdk_logger repository"
exit 1
fi

Copilot uses AI. Check for mistakes.
cp rdk_logger/include/* /usr/local/include

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

This script uses a wildcard to copy all files from rdk_logger/include/* while cov_build.sh (line 35) only copies rdk_logger/include/rdk_logger.h. This inconsistency could lead to different behavior between unit test and coverage build environments. Consider standardizing the approach - either both should copy all headers or both should copy only rdk_logger.h.

Suggested change
cp rdk_logger/include/* /usr/local/include
cp rdk_logger/include/rdk_logger.h /usr/local/include

Copilot uses AI. Check for mistakes.

cp ./rfcMgr/gtest/mocks/rfc.properties /etc/rfc.properties
cp ./rfcMgr/gtest/mocks/rfcdefaults.ini /tmp/rfcdefaults.ini

Expand Down
2 changes: 1 addition & 1 deletion test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ AM_CFLAGS = -D_ANSC_LINUX
AM_CFLAGS += -D_ANSC_USER

AM_CPPFLAGS = -Wall -g -Werror
AM_CXXFLAGS = -std=c++11
AM_CXXFLAGS = -std=c++11 -DRDK_LOGGER

ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = rfc_gtest.bin
Expand Down
Loading