Skip to content

Commit

Permalink
vsomeip 3.4.9-r1 (#529)
Browse files Browse the repository at this point in the history
Notes:

v3.4.9-r1
- Merge COVESA PR447 with support for QNX 7.1
- Merge COVESA PR470 with changes to not instantiate
a non existent type for boost < 1.66.0
- Merge COVESA PR515 with changes that remove not used lines
- Fix missing Stop Offer
- Apply extra fixes to QNX environment

v3.4.8
- Adds debounce_filter_tests json files to gitignore
- Adds check for null serviceinfo
- Implementation of debounce frequency test
- Accept malformed StopSubscribe/Subscribe messages
- security: Fix security library name
- Also remove service instance from map of pending offers
- enforce lock acquisition order to avoid LOI
- Improved logs

v3.4.7
- Do _NOT_ try to serialize empty names
- Avoid crash on access to invalid position from tcp_endpoint buffer
- Fix security library name
- revert std::move usage in train buffer's
- Fix deadlock in mutex_

v3.4.6
- check if a policy exist in the vector of policies
- Crash in process vsomeipd crash id: D8DF38B19EEBC79D
- Enable guest port configuration per uid/gid

v3.4.5
- Implementation of new debounce filter test
- test availability when double offering service
- network test fixes
- Try to synchronize subscribe/unsubscribe/resubscribe
- Add vsomeip_portcfg.json to the list of mandatory configuration files
- Check buffer before accessing it
- Rework condition for starting the send operation for client endpoint
- Avoid spamming the log
- Extend security interface to enable syncing security clients
- Revert get_local_port() behaviour

v3.4.4.1
- manually reset tables for unavailable services on suspend state

v3.4.4
- Fix deadlock if binding of UDP client endpoint fails
- Changed local_tcp_client endpoint connect to async connect.
- Change shutdown sequence
- vSomeIP Security: Update vsomeip_sec

v3.4.3
- Fixed race between incoming subscription and StopOffer/Offer

v3.4.2
- Removed local_port_ attribute

v3.4.1
- Rename the new "register_message_handler" overload function
- Set the Client identifier when sending pong command

v3.4.0
- Allow to register multiple message handlers for the same message
- load_security_policy_extensions Unit and Benchmark Tests
- Fix is_local flag for acl acceptance msg
- Fix registration issues regarding connecting timeout
  • Loading branch information
DiogoPedrozza authored Oct 23, 2023
1 parent 538f9fc commit 91805d8
Show file tree
Hide file tree
Showing 417 changed files with 5,367 additions and 1,921 deletions.
269 changes: 167 additions & 102 deletions .gitignore

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cc_library_shared {

cflags: [
"-DWITHOUT_SYSTEMD",
"-DVSOMEIP_COMPAT_VERSION=\"3.3.8\"",
"-DVSOMEIP_COMPAT_VERSION=\"3.4.9\"",
"-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\"",
"-DUSE_DLT",
],
Expand Down
8 changes: 4 additions & 4 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ LOCAL_CFLAGS := \
-frtti \
-fexceptions \
-DWITHOUT_SYSTEMD \
-DVSOMEIP_VERSION=\"3.3.8\" \
-DVSOMEIP_VERSION=\"3.4.9\" \
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
-Wno-unused-parameter \
-Wno-non-virtual-dtor \
Expand Down Expand Up @@ -147,7 +147,7 @@ LOCAL_CFLAGS := \
-frtti \
-fexceptions \
-DWITHOUT_SYSTEMD \
-DVSOMEIP_VERSION=\"3.3.8\" \
-DVSOMEIP_VERSION=\"3.4.9\" \
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
-Wno-unused-parameter \
-Wno-non-virtual-dtor \
Expand Down Expand Up @@ -194,8 +194,8 @@ LOCAL_CFLAGS := \
-frtti \
-fexceptions \
-DWITHOUT_SYSTEMD \
-DVSOMEIP_VERSION=\"3.3.8\" \
-DVSOMEIP_COMPAT_VERSION=\"3.3.8\" \
-DVSOMEIP_VERSION=\"3.4.9\" \
-DVSOMEIP_COMPAT_VERSION=\"3.4.9\" \
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
-Wno-unused-parameter \
-Wno-non-virtual-dtor \
Expand Down
66 changes: 66 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,71 @@
Changes
=======

v3.4.9
- Merge COVESA PR447 with support for QNX 7.1
- Merge COVESA PR470 with changes to not instantiate
a non existent type for boost < 1.66.0
- Merge COVESA PR515 with changes that remove not used lines

v3.4.8
- Adds debounce_filter_tests json files to gitignore
- Adds check for null serviceinfo
- Implementation of debounce frequency test
- Accept malformed StopSubscribe/Subscribe messages
- security: Fix security library name
- Also remove service instance from map of pending offers
- enforce lock acquisition order to avoid LOI
- Improved logs

v3.4.7
- Do _NOT_ try to serialize empty names
- Avoid crash on access to invalid position from tcp_endpoint buffer
- Fix security library name
- revert std::move usage in train buffer's
- Fix deadlock in mutex_

v3.4.6
- check if a policy exist in the vector of policies
- Crash in process vsomeipd crash id: D8DF38B19EEBC79D
- Enable guest port configuration per uid/gid

v3.4.5
- Implementation of new debounce filter test
- test availability when double offering service
- network test fixes
- Try to synchronize subscribe/unsubscribe/resubscribe
- Add vsomeip_portcfg.json to the list of mandatory configuration files
- Check buffer before accessing it
- Rework condition for starting the send operation for client endpoint
- Avoid spamming the log
- Extend security interface to enable syncing security clients
- Revert get_local_port() behaviour

v3.4.4.1
- manually reset tables for unavailable services on suspend state

v3.4.4
- Fix deadlock if binding of UDP client endpoint fails
- Changed local_tcp_client endpoint connect to async connect.
- Change shutdown sequence
- vSomeIP Security: Update vsomeip_sec

v3.4.3
- Fixed race between incoming subscription and StopOffer/Offer

v3.4.2
- Removed local_port_ attribute

v3.4.1
- Rename the new "register_message_handler" overload function
- Set the Client identifier when sending pong command

v3.4.0
- Allow to register multiple message handlers for the same message
- load_security_policy_extensions Unit and Benchmark Tests
- Fix is_local flag for acl acceptance msg
- Fix registration issues regarding connecting timeout

v3.3.8
- Check buffer size when serializing/deserializing event registrations
- Remove leftovers from shm usage
Expand Down
149 changes: 26 additions & 123 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (C) 2015-2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand All @@ -10,9 +10,9 @@ set (VSOMEIP_NAME vsomeip3)
set (VSOMEIP_COMPAT_NAME vsomeip)

set (VSOMEIP_MAJOR_VERSION 3)
set (VSOMEIP_MINOR_VERSION 3)
set (VSOMEIP_PATCH_VERSION 8)
set (VSOMEIP_HOTFIX_VERSION 0)
set (VSOMEIP_MINOR_VERSION 4)
set (VSOMEIP_PATCH_VERSION 9)
set (VSOMEIP_HOTFIX_VERSION 1)

set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP_PATCH_VERSION})
set (PACKAGE_VERSION ${VSOMEIP_VERSION}) # Used in documentation/doxygen.in
Expand Down Expand Up @@ -68,7 +68,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# This is only relevant for GCC and causes warnings on Clang
set(EXPORTSYMBOLS "-Wl,-export-dynamic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exportmap.gcc")
set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -pie -Wl,-z,relro,-z,now")
set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -pie -Wno-tsan -Wl,-z,relro,-z,now")
endif()

set(NO_DEPRECATED "")
Expand Down Expand Up @@ -412,19 +412,36 @@ endif()
if (BASE_PATH)
set (VSOMEIP_BASE_PATH ${BASE_PATH})
endif ()

set (VSOMEIP_DIAGNOSIS_ADDRESS "0x01")
if (DIAGNOSIS_ADDRESS)
set (VSOMEIP_DIAGNOSIS_ADDRESS ${DIAGNOSIS_ADDRESS})
endif ()

set (VSOMEIP_UNICAST_ADDRESS "127.0.0.1")
if (UNICAST_ADDRESS)
set (VSOMEIP_UNICAST_ADDRESS ${UNICAST_ADDRESS})
endif ()

set (VSOMEIP_ROUTING_READY_MESSAGE "SOME/IP routing ready.")
if (ROUTING_READY_MESSAGE)
set (VSOMEIP_ROUTING_READY_MESSAGE ${ROUTING_READY_MESSAGE})
endif ()

set (VSOMEIP_LOCAL_TCP_PORT_WAIT_TIME 100)
if (LOCAL_TCP_PORT_WAIT_TIME)
set (VSOMEIP_LOCAL_TCP_PORT_WAIT_TIME ${LOCAL_TCP_PORT_WAIT_TIME})
endif ()

set (VSOMEIP_LOCAL_TCP_PORT_MAX_WAIT_TIME 10000)
if (LOCAL_TCP_PORT_MAX_WAIT_TIME)
if (${LOCAL_TCP_PORT_MAX_WAIT_TIME} GREATER ${LOCAL_TCP_PORT_WAIT_TIME})
set (VSOMEIP_LOCAL_TCP_PORT_MAX_WAIT_TIME ${LOCAL_TCP_PORT_MAX_WAIT_TIME})
else ()
set (VSOMEIP_LOCAL_TCP_PORT_MAX_WAIT_TIME ${LOCAL_TCP_PORT_WAIT_TIME})
endif ()
endif ()

set(DEFAULT_CONFIGURATION_FOLDER "/etc/vsomeip" CACHE PATH "Default configuration folder")
message(STATUS "Default configuration folder: ${DEFAULT_CONFIGURATION_FOLDER}")

Expand All @@ -434,6 +451,9 @@ message(STATUS "Default configuration file: ${DEFAULT_CONFIGURATION_FILE}")
message("Predefined base path: ${VSOMEIP_BASE_PATH}")
message("Predefined unicast address: ${VSOMEIP_UNICAST_ADDRESS}")
message("Predefined diagnosis address: ${VSOMEIP_DIAGNOSIS_ADDRESS}")
message("Predefined wait times for internal communication ports (TCP):\
${VSOMEIP_LOCAL_TCP_PORT_WAIT_TIME}\
(max=${VSOMEIP_LOCAL_TCP_PORT_MAX_WAIT_TIME})")

################################################################################
# Installation
Expand Down Expand Up @@ -632,126 +652,9 @@ add_subdirectory( tools )
add_custom_target( examples )
add_subdirectory( examples EXCLUDE_FROM_ALL )

##############################################################################
# Test section
##############################################################################

##############################################################################
# google benchmark
find_package(benchmark)

##############################################################################
# google test

# check for set environment variable
if(${GTEST_ROOT} STREQUAL "n/a")
message(STATUS "GTEST_ROOT is not defined. For building the tests the variable
GTEST_ROOT has to be defined. Tests can not be built.")
# early exit
return() # test can not be build -> make commands build_tests and check are not available
else()
message(STATUS "GTEST_ROOT is set. gtest root path set to ${GTEST_ROOT}")
endif()

# build google test as static library (always) -> therefore deactivate BUILD_SHARED_LIBS in case it is active
set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 0)
if ("${BUILD_SHARED_LIBS}" STREQUAL "ON")
set(BUILD_SHARED_LIBS OFF)
set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 1)
endif()
add_subdirectory(${GTEST_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/gtest EXCLUDE_FROM_ALL)
if ("${BUILD_SHARED_LIBS_AUTOMATIC_OFF}" STREQUAL "1")
set(BUILD_SHARED_LIBS ON)
set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 0)
endif()



##############################################################################
# build tests

enable_testing()
SET(TESTS_BAT "OFF" CACHE BOOL
"Controls whether only BAT tests should be build or not")
SET(TEST_SYMLINK_CONFIG_FILES "OFF" CACHE BOOL
"Controls if the json and scripts needed needed to run the tests are copied or symlinked into the build directroy (ignored on Windows)")
SET(TEST_SYMLINK_CONFIG_FILES_RELATIVE "OFF" CACHE BOOL
"Controls if the json and scripts needed needed to run the tests are symlinked relatively into the build directroy (ignored on Windows)")

SET(TEST_IP_DEFAULT_VALUE "XXX.XXX.XXX.XXX")
SET(TEST_IP_MASTER "${TEST_IP_DEFAULT_VALUE}" CACHE STRING
"The IP address of the interface which will act as test master")
SET(TEST_IP_SLAVE "${TEST_IP_DEFAULT_VALUE}" CACHE STRING
"The IP address of the interface which will act as test slave")

if((${TEST_IP_MASTER} STREQUAL ${TEST_IP_DEFAULT_VALUE}) OR
(${TEST_IP_SLAVE} STREQUAL ${TEST_IP_DEFAULT_VALUE}))
message(WARNING "TEST_IP_MASTER and/or TEST_IP_SLAVE isn't set. "
"Remote tests cannot be run. "
"To enable, please specify for example "
"-DTEST_IP_MASTER=10.0.3.1 -DTEST_IP_SLAVE=10.0.3.2")
endif()

SET(TEST_IP_SLAVE_SECOND "${TEST_IP_DEFAULT_VALUE}" CACHE STRING
"The second IP address of the interface which will act as test slave")
set(TEST_SECOND_ADDRESS "OFF" CACHE BOOL
"Controls whether second address tests should run or not")

if(${TEST_IP_SLAVE_SECOND} STREQUAL ${TEST_IP_DEFAULT_VALUE})
message(WARNING "TEST_IP_SLAVE_SECOND isn't set. "
"Test with more than one IP address on same interface is not enabled."
"Please specify them via for example "
"-TEST_IP_SLAVE_SECOND=10.0.3.126")
else()
set(TEST_SECOND_ADDRESS "ON")
endif()

set(TEST_E2E_PROFILE_04 "ON")

SET(TEST_UID_DEFAULT_VALUE "123456789")
SET(TEST_UID "${TEST_UID_DEFAULT_VALUE}" CACHE STRING
"The User ID of the user running the test: Needed for security")
SET(TEST_GID_DEFAULT_VALUE "123456789")
SET(TEST_GID "${TEST_GID_DEFAULT_VALUE}" CACHE STRING
"The Group ID of the user running the test: Needed for security")

SET(TEST_SECURITY "ON" CACHE BOOL
"Controls whether security tests should run or not")

if((${TEST_UID} STREQUAL ${TEST_UID_DEFAULT_VALUE}) OR
(${TEST_GID} STREQUAL ${TEST_GID_DEFAULT_VALUE}) OR
DISABLE_SECURITY)
message(WARNING "TEST_UID and/or TEST_GID isn't set. "
"Security Tests are not runnable "
"Please specify them for example "
"-DTEST_UID=1000 -DTEST_GID=1000")
SET(TEST_SECURITY "OFF")
endif()

add_custom_target(build_tests)

set(CMAKE_CTEST_COMMAND ctest -V)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
add_dependencies(check build_tests)

add_custom_target(build_network_tests)
add_dependencies(build_network_tests ${VSOMEIP_NAME})
add_dependencies(build_network_tests ${VSOMEIP_NAME}-e2e)
add_dependencies(build_network_tests ${VSOMEIP_NAME}-sd)
add_dependencies(build_tests build_network_tests)

add_custom_target(build_unit_tests)
add_dependencies(build_unit_tests ${VSOMEIP_NAME})
add_dependencies(build_unit_tests ${VSOMEIP_NAME}-sd)
add_dependencies(build_tests build_unit_tests)

add_custom_target(build_benchmark_tests)
add_dependencies(build_benchmark_tests ${VSOMEIP_NAME})
add_dependencies(build_benchmark_tests ${VSOMEIP_NAME}-sd)
add_dependencies(build_tests build_benchmark_tests)

##############################################################################
# add test directory
enable_testing()

add_subdirectory( test EXCLUDE_FROM_ALL )

Expand Down
3 changes: 2 additions & 1 deletion build_qnx/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ CMAKE_ARGS = -DCMAKE_TOOLCHAIN_FILE=$(PROJECT_ROOT)/qnx.nto.toolchain.cmake \
-DINSTALL_INCLUDE_DIR=$(VSOMEIP_INSTALL_ROOT)/usr/include \
-DCPUVARDIR=$(CPUVARDIR) \
-DGCC_VER=${GCC_VER} \
-DVSOMEIP_INSTALL_ROUTINGMANAGERD=ON
-DVSOMEIP_INSTALL_ROUTINGMANAGERD=ON \
-DDISABLE_DLT=y

ifeq ($(GENERATE_TESTS), TRUE)
CMAKE_ARGS += -DENABLE_SIGNAL_HANDLING=1 \
Expand Down
6 changes: 3 additions & 3 deletions config/vsomeip-local-security.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"unicast" : "10.0.3.1",
"logging" :
{
{
"level" : "info",
"console" : "true",
"file" : { "enable" : "false", "path" : "/tmp/vsomeip.log" },
"dlt" : "false"
},
"applications" :
"applications" :
[
{
"name" : "service-sample",
"id" : "0x1277"
},
{
{
"name" : "client-sample",
"id" : "0x1344"
}
Expand Down
12 changes: 6 additions & 6 deletions config/vsomeip-local-tcp-client.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"unicast" : "192.168.56.101",
"netmask" : "255.255.255.0",
"logging" :
"logging" :
{
"level" : "info",
"console" : "true",
Expand All @@ -27,14 +27,14 @@
"id" : "0x1346"
}
],
"services" :
"services" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"unicast" : "192.168.56.102",
"reliable" : { "port" : "30509", "magic-cookies" : false },
"events" :
"events" :
[
{
"event" : "0x0777",
Expand All @@ -53,15 +53,15 @@
[
{
"eventgroup" : "0x4455",
"events" : [ "0x777", "0x778" ]
"events" : [ "0x777", "0x778" ]
},
{
"eventgroup" : "0x4465",
"events" : [ "0x778", "0x779" ]
"events" : [ "0x778", "0x779" ]
},
{
"eventgroup" : "0x4555",
"events" : [ "0x777", "0x779" ]
"events" : [ "0x777", "0x779" ]
}
]
}
Expand Down
Loading

0 comments on commit 91805d8

Please sign in to comment.