summaryrefslogtreecommitdiff
path: root/test/client_id_tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/client_id_tests')
-rw-r--r--test/client_id_tests/client_id_test_globals.hpp32
-rwxr-xr-xtest/client_id_tests/client_id_test_master_starter.sh64
-rw-r--r--test/client_id_tests/client_id_test_service.cpp248
-rwxr-xr-xtest/client_id_tests/client_id_test_slave_starter.sh50
-rw-r--r--test/client_id_tests/conf/client_id_test_diff_client_ids_diff_ports_master.json.in56
-rw-r--r--test/client_id_tests/conf/client_id_test_diff_client_ids_diff_ports_slave.json.in70
-rw-r--r--test/client_id_tests/conf/client_id_test_diff_client_ids_same_ports_master.json.in56
-rw-r--r--test/client_id_tests/conf/client_id_test_diff_client_ids_same_ports_slave.json.in70
-rw-r--r--test/client_id_tests/conf/client_id_test_same_client_ids_diff_ports_master.json.in56
-rw-r--r--test/client_id_tests/conf/client_id_test_same_client_ids_diff_ports_slave.json.in70
-rw-r--r--test/client_id_tests/conf/client_id_test_same_client_ids_same_ports_master.json.in56
-rw-r--r--test/client_id_tests/conf/client_id_test_same_client_ids_same_ports_slave.json.in70
12 files changed, 898 insertions, 0 deletions
diff --git a/test/client_id_tests/client_id_test_globals.hpp b/test/client_id_tests/client_id_test_globals.hpp
new file mode 100644
index 0000000..30ee575
--- /dev/null
+++ b/test/client_id_tests/client_id_test_globals.hpp
@@ -0,0 +1,32 @@
+// Copyright (C) 2014-2015 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/.
+
+#ifndef CLIENT_ID_TEST_CLIENT_ID_TEST_GLOBALS_HPP_
+#define CLIENT_ID_TEST_CLIENT_ID_TEST_GLOBALS_HPP_
+
+namespace client_id_test {
+
+struct service_info {
+ vsomeip::service_t service_id;
+ vsomeip::instance_t instance_id;
+ vsomeip::method_t method_id;
+};
+
+static constexpr std::array<service_info, 6> service_infos = {{
+ // placeholder to be consistent w/ client ids, service ids, app names
+ { 0xFFFF, 0xFFFF, 0xFFFF },
+ // node 1
+ { 0x1000, 0x1, 0x1111 },
+ { 0x2000, 0x1, 0x2222 },
+ // node 2
+ { 0x3000, 0x1, 0x3333 },
+ { 0x4000, 0x1, 0x4444 },
+ { 0x5000, 0x1, 0x5555 }
+}};
+
+static constexpr int messages_to_send = 10;
+}
+
+#endif /* CLIENT_ID_TEST_CLIENT_ID_TEST_GLOBALS_HPP_ */
diff --git a/test/client_id_tests/client_id_test_master_starter.sh b/test/client_id_tests/client_id_test_master_starter.sh
new file mode 100755
index 0000000..f8550c5
--- /dev/null
+++ b/test/client_id_tests/client_id_test_master_starter.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+# Copyright (C) 2015 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/.
+
+# Purpose: This script is needed to start the services with
+# one command. This is necessary as ctest - which is used to run the
+# tests - isn't able to start two binaries for one testcase. Therefore
+# the testcase simply executes this script. This script then runs the services
+# and checks that both exit successfully.
+
+if [ $# -lt 1 ]
+then
+ echo "Please pass a json file to this script."
+ echo "For example: $0 client_id_test_diff_client_ids_diff_ports_master.json"
+ exit 1
+fi
+
+MASTER_JSON_FILE=$1
+CLIENT_JSON_FILE=${MASTER_JSON_FILE/master/slave}
+
+FAIL=0
+
+# Start the services
+export VSOMEIP_APPLICATION_NAME=client_id_test_service_one
+export VSOMEIP_CONFIGURATION=$1
+./client_id_test_service 1 &
+
+export VSOMEIP_APPLICATION_NAME=client_id_test_service_two
+export VSOMEIP_CONFIGURATION=$1
+./client_id_test_service 2 &
+
+
+
+cat <<End-of-message
+*******************************************************************************
+*******************************************************************************
+** Please now run:
+** client_id_test_slave_starter.sh $CLIENT_JSON_FILE
+** from an external host to successfully complete this test.
+**
+** You probably will need to adapt the 'unicast' settings in
+** client_id_test_diff_client_ids_diff_ports_master.json and
+** client_id_test_diff_client_ids_diff_ports_slave.json to your personal setup.
+*******************************************************************************
+*******************************************************************************
+End-of-message
+
+# Wait until client and service are finished
+for job in $(jobs -p)
+do
+ # Fail gets incremented if either client or service exit
+ # with a non-zero exit code
+ wait $job || ((FAIL+=1))
+done
+
+# Check if both exited successfully
+if [ $FAIL -eq 0 ]
+then
+ exit 0
+else
+ exit 1
+fi
diff --git a/test/client_id_tests/client_id_test_service.cpp b/test/client_id_tests/client_id_test_service.cpp
new file mode 100644
index 0000000..57c6353
--- /dev/null
+++ b/test/client_id_tests/client_id_test_service.cpp
@@ -0,0 +1,248 @@
+// Copyright (C) 2014-2015 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/.
+
+#include <chrono>
+#include <condition_variable>
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+#include <thread>
+#include <map>
+#include <algorithm>
+
+#include <gtest/gtest.h>
+
+#include <vsomeip/vsomeip.hpp>
+#include "../../implementation/logging/include/logger.hpp"
+
+#include "client_id_test_globals.hpp"
+
+
+class client_id_test_service {
+public:
+ client_id_test_service(struct client_id_test::service_info _service_info) :
+ service_info_(_service_info),
+ app_(vsomeip::runtime::get()->create_application()),
+ blocked_(false),
+ offer_thread_(std::bind(&client_id_test_service::run, this)),
+ stopped_(false),
+ stop_thread_(std::bind(&client_id_test_service::wait_for_stop, this)) {
+ app_->init();
+ app_->register_state_handler(
+ std::bind(&client_id_test_service::on_state, this,
+ std::placeholders::_1));
+ app_->register_message_handler(service_info_.service_id,
+ service_info_.instance_id, service_info_.method_id,
+ std::bind(&client_id_test_service::on_request, this,
+ std::placeholders::_1));
+ app_->register_message_handler(vsomeip::ANY_SERVICE,
+ service_info_.instance_id, vsomeip::ANY_METHOD,
+ std::bind(&client_id_test_service::on_response, this,
+ std::placeholders::_1));
+
+ for(const auto& i : client_id_test::service_infos) {
+ if ((i.service_id == service_info_.service_id
+ && i.instance_id == service_info_.instance_id)
+ || (i.service_id == 0xFFFF && i.instance_id == 0xFFFF)) {
+ continue;
+ }
+ app_->register_availability_handler(i.service_id, i.instance_id,
+ std::bind(&client_id_test_service::on_availability, this,
+ std::placeholders::_1, std::placeholders::_2,
+ std::placeholders::_3));
+
+ other_services_available_[std::make_pair(i.service_id, i.instance_id)] = false;
+ other_services_received_response_[std::make_pair(i.service_id, i.method_id)] = 0;
+ }
+
+ app_->start();
+ }
+
+ ~client_id_test_service() {
+ offer_thread_.join();
+ stop_thread_.join();
+ }
+
+ void offer() {
+ app_->offer_service(service_info_.service_id, service_info_.instance_id);
+ }
+
+ void stop_offer() {
+ app_->stop_offer_service(service_info_.service_id, service_info_.instance_id);
+ }
+
+ void on_state(vsomeip::state_type_e _state) {
+ VSOMEIP_INFO << "Application " << app_->get_name() << " is "
+ << (_state == vsomeip::state_type_e::ST_REGISTERED ?
+ "registered." : "deregistered.");
+
+ if (_state == vsomeip::state_type_e::ST_REGISTERED) {
+ std::lock_guard<std::mutex> its_lock(mutex_);
+ blocked_ = true;
+ condition_.notify_one();
+ }
+ }
+
+ void on_availability(vsomeip::service_t _service,
+ vsomeip::instance_t _instance, bool _is_available) {
+ if(_is_available) {
+ VSOMEIP_INFO << "Service ["
+ << std::setw(4) << std::setfill('0') << std::hex << _service << "." << _instance
+ << "] is "
+ << (_is_available ? "available." : "NOT available.");
+
+ auto its_service = other_services_available_.find(std::make_pair(_service, _instance));
+ if(its_service != other_services_available_.end()) {
+ its_service->second = true;
+ }
+
+ if(std::all_of(other_services_available_.cbegin(),
+ other_services_available_.cend(),
+ [](const std::map<std::pair<vsomeip::service_t,
+ vsomeip::instance_t>, bool>::value_type& v) {
+ return v.second;})) {
+ std::lock_guard<std::mutex> its_lock(mutex_);
+ blocked_ = true;
+ condition_.notify_one();
+ }
+ }
+ }
+
+ void on_request(const std::shared_ptr<vsomeip::message> &_message) {
+ if(_message->get_message_type() == vsomeip::message_type_e::MT_REQUEST) {
+ VSOMEIP_DEBUG << "Received a request with Client/Session [" << std::setw(4)
+ << std::setfill('0') << std::hex << _message->get_client() << "/"
+ << std::setw(4) << std::setfill('0') << std::hex
+ << _message->get_session() << "]";
+ std::shared_ptr<vsomeip::message> its_response = vsomeip::runtime::get()
+ ->create_response(_message);
+ app_->send(its_response);
+ }
+ }
+
+ void on_response(const std::shared_ptr<vsomeip::message> &_message) {
+ if(_message->get_message_type() == vsomeip::message_type_e::MT_RESPONSE) {
+ VSOMEIP_DEBUG << "Received a response with Client/Session [" << std::setw(4)
+ << std::setfill('0') << std::hex << _message->get_client() << "/"
+ << std::setw(4) << std::setfill('0') << std::hex
+ << _message->get_session() << "] from Service/Method ["
+ << std::setw(4) << std::setfill('0') << std::hex
+ << _message->get_service() << "/" << std::setw(4) << std::setfill('0')
+ << std::hex << _message->get_method() <<"]";
+ other_services_received_response_[std::make_pair(_message->get_service(),
+ _message->get_method())]++;
+
+ if(std::all_of(other_services_received_response_.cbegin(),
+ other_services_received_response_.cend(),
+ [](const std::map<std::pair<vsomeip::service_t,
+ vsomeip::method_t>, std::uint32_t>::value_type& v)
+ { return v.second == client_id_test::messages_to_send;})) {
+ std::lock_guard<std::mutex> its_lock(stop_mutex_);
+ stopped_ = true;
+ stop_condition_.notify_one();
+ }
+ }
+ }
+
+ void run() {
+ VSOMEIP_DEBUG << "Running";
+ std::unique_lock<std::mutex> its_lock(mutex_);
+ while (!blocked_) {
+ condition_.wait(its_lock);
+ }
+ blocked_ = false;
+
+ VSOMEIP_DEBUG << "Offering";
+ offer();
+
+
+ while (!blocked_) {
+ condition_.wait(its_lock);
+ }
+ blocked_ = false;
+
+ VSOMEIP_DEBUG << "Sending";
+ // send a message to all other services
+ for (int var = 0; var < client_id_test::messages_to_send; ++var) {
+ for(const client_id_test::service_info& i: client_id_test::service_infos) {
+ if ((i.service_id == service_info_.service_id
+ && i.instance_id == service_info_.instance_id)
+ || (i.service_id == 0xFFFF && i.instance_id == 0xFFFF)) {
+ continue;
+ }
+ std::shared_ptr<vsomeip::message> msg = vsomeip::runtime::get()->create_request();
+ msg->set_service(i.service_id);
+ msg->set_instance(i.instance_id);
+ msg->set_method(i.method_id);
+ app_->send(msg);
+ VSOMEIP_DEBUG << "Sending a request to Service/Method ["
+ << std::setw(4) << std::setfill('0') << std::hex
+ << i.service_id << "/" << std::setw(4) << std::setfill('0')
+ << std::hex << i.instance_id <<"]";
+ }
+ }
+
+ while (!blocked_) {
+ condition_.wait(its_lock);
+ }
+ blocked_ = false;
+ }
+
+ void wait_for_stop() {
+ std::unique_lock<std::mutex> its_lock(stop_mutex_);
+ while (!stopped_) {
+ stop_condition_.wait(its_lock);
+ }
+ VSOMEIP_INFO << "Received responses from all other services, going down";
+
+ // let offer thread exit
+ {
+ std::lock_guard<std::mutex> its_lock(mutex_);
+ blocked_ = true;
+ condition_.notify_one();
+ }
+
+ std::this_thread::sleep_for(std::chrono::seconds(3));
+ app_->stop();
+ }
+
+private:
+ client_id_test::service_info service_info_;
+ std::shared_ptr<vsomeip::application> app_;
+ std::map<std::pair<vsomeip::service_t, vsomeip::instance_t>, bool> other_services_available_;
+ std::map<std::pair<vsomeip::service_t, vsomeip::method_t>, std::uint32_t> other_services_received_response_;
+
+ bool blocked_;
+ std::mutex mutex_;
+ std::condition_variable condition_;
+ std::thread offer_thread_;
+
+ bool stopped_;
+ std::mutex stop_mutex_;
+ std::condition_variable stop_condition_;
+ std::thread stop_thread_;
+};
+
+static int service_number;
+
+TEST(someip_client_id_test, send_ten_messages_to_service)
+{
+ client_id_test_service its_sample(
+ client_id_test::service_infos[service_number]);
+}
+
+#ifndef WIN32
+int main(int argc, char** argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+ if(argc < 2) {
+ std::cerr << "Please specify a service number, like: " << argv[0] << " 2" << std::endl;
+ std::cerr << "Valid service numbers are in the range of [0,4]" << std::endl;
+ return 1;
+ }
+ service_number = std::stoi(std::string(argv[1]), nullptr);
+ return RUN_ALL_TESTS();
+}
+#endif
diff --git a/test/client_id_tests/client_id_test_slave_starter.sh b/test/client_id_tests/client_id_test_slave_starter.sh
new file mode 100755
index 0000000..94ff78b
--- /dev/null
+++ b/test/client_id_tests/client_id_test_slave_starter.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+# Copyright (C) 2015 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/.
+
+# Purpose: This script is needed to start the services with
+# one command. This is necessary as ctest - which is used to run the
+# tests - isn't able to start multiple binaries for one testcase. Therefore
+# the testcase simply executes this script. This script then runs the services
+# and checks that all exit successfully.
+
+FAIL=0
+
+if [ $# -lt 1 ]
+then
+ echo "Please pass a json file to this script."
+ echo "For example: $0 client_id_test_diff_client_ids_diff_ports_slave.json"
+ exit 1
+fi
+
+# Start the services
+export VSOMEIP_APPLICATION_NAME=client_id_test_service_three
+export VSOMEIP_CONFIGURATION=$1
+./client_id_test_service 3 &
+
+export VSOMEIP_APPLICATION_NAME=client_id_test_service_four
+export VSOMEIP_CONFIGURATION=$1
+./client_id_test_service 4 &
+
+export VSOMEIP_APPLICATION_NAME=client_id_test_service_five
+export VSOMEIP_CONFIGURATION=$1
+./client_id_test_service 5 &
+
+
+# Wait until all applications are finished
+for job in $(jobs -p)
+do
+ # Fail gets incremented if one of the binaries exits
+ # with a non-zero exit code
+ wait $job || ((FAIL+=1))
+done
+
+# Check if both exited successfully
+if [ $FAIL -eq 0 ]
+then
+ exit 0
+else
+ exit 1
+fi
diff --git a/test/client_id_tests/conf/client_id_test_diff_client_ids_diff_ports_master.json.in b/test/client_id_tests/conf/client_id_test_diff_client_ids_diff_ports_master.json.in
new file mode 100644
index 0000000..fe2248d
--- /dev/null
+++ b/test/client_id_tests/conf/client_id_test_diff_client_ids_diff_ports_master.json.in
@@ -0,0 +1,56 @@
+{
+ "unicast":"@TEST_IP_MASTER@",
+ "logging":
+ {
+ "level":"info",
+ "console":"true",
+ "file":
+ {
+ "enable":"false",
+ "path":"/tmp/vsomeip.log"
+ },
+ "dlt":"false"
+ },
+ "applications":
+ [
+ {
+ "name":"client_id_test_service_one",
+ "id":"0x1111"
+ },
+ {
+ "name":"client_id_test_service_two",
+ "id":"0x2222"
+ }
+ ],
+ "services":
+ [
+ {
+ "service":"0x1000",
+ "instance":"0x0001",
+ "unreliable":"30001",
+ "reliable":
+ {
+ "port":"40001",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x2000",
+ "instance":"0x0001",
+ "unreliable":"30002",
+ "reliable":
+ {
+ "port":"40002",
+ "enable-magic-cookies":"false"
+ }
+ }
+ ],
+ "routing":"client_id_test_service_one",
+ "service-discovery":
+ {
+ "enable":"true",
+ "multicast":"224.0.0.1",
+ "port":"30490",
+ "protocol":"udp"
+ }
+} \ No newline at end of file
diff --git a/test/client_id_tests/conf/client_id_test_diff_client_ids_diff_ports_slave.json.in b/test/client_id_tests/conf/client_id_test_diff_client_ids_diff_ports_slave.json.in
new file mode 100644
index 0000000..62aee87
--- /dev/null
+++ b/test/client_id_tests/conf/client_id_test_diff_client_ids_diff_ports_slave.json.in
@@ -0,0 +1,70 @@
+{
+ "unicast":"@TEST_IP_SLAVE@",
+ "logging":
+ {
+ "level":"info",
+ "console":"true",
+ "file":
+ {
+ "enable":"false",
+ "path":"/tmp/vsomeip.log"
+ },
+ "dlt":"false"
+ },
+ "applications":
+ [
+ {
+ "name":"client_id_test_service_three",
+ "id":"0x3333"
+ },
+ {
+ "name":"client_id_test_service_four",
+ "id":"0x4444"
+ },
+ {
+ "name":"client_id_test_service_five",
+ "id":"0x5555"
+ }
+ ],
+ "services":
+ [
+ {
+ "service":"0x3000",
+ "instance":"0x0001",
+ "unreliable":"30003",
+ "reliable":
+ {
+ "port":"40003",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x4000",
+ "instance":"0x0001",
+ "unreliable":"30004",
+ "reliable":
+ {
+ "port":"40004",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x5000",
+ "instance":"0x0001",
+ "unreliable":"30005",
+ "reliable":
+ {
+ "port":"40005",
+ "enable-magic-cookies":"false"
+ }
+ }
+ ],
+ "routing":"client_id_test_service_three",
+ "service-discovery":
+ {
+ "enable":"true",
+ "multicast":"224.0.0.1",
+ "port":"30490",
+ "protocol":"udp"
+ }
+} \ No newline at end of file
diff --git a/test/client_id_tests/conf/client_id_test_diff_client_ids_same_ports_master.json.in b/test/client_id_tests/conf/client_id_test_diff_client_ids_same_ports_master.json.in
new file mode 100644
index 0000000..b0c833b
--- /dev/null
+++ b/test/client_id_tests/conf/client_id_test_diff_client_ids_same_ports_master.json.in
@@ -0,0 +1,56 @@
+{
+ "unicast":"@TEST_IP_MASTER@",
+ "logging":
+ {
+ "level":"info",
+ "console":"true",
+ "file":
+ {
+ "enable":"false",
+ "path":"/tmp/vsomeip.log"
+ },
+ "dlt":"false"
+ },
+ "applications":
+ [
+ {
+ "name":"client_id_test_service_one",
+ "id":"0x1111"
+ },
+ {
+ "name":"client_id_test_service_two",
+ "id":"0x2222"
+ }
+ ],
+ "services":
+ [
+ {
+ "service":"0x1000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x2000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ }
+ ],
+ "routing":"client_id_test_service_one",
+ "service-discovery":
+ {
+ "enable":"true",
+ "multicast":"224.0.0.1",
+ "port":"30490",
+ "protocol":"udp"
+ }
+} \ No newline at end of file
diff --git a/test/client_id_tests/conf/client_id_test_diff_client_ids_same_ports_slave.json.in b/test/client_id_tests/conf/client_id_test_diff_client_ids_same_ports_slave.json.in
new file mode 100644
index 0000000..a9084fc
--- /dev/null
+++ b/test/client_id_tests/conf/client_id_test_diff_client_ids_same_ports_slave.json.in
@@ -0,0 +1,70 @@
+{
+ "unicast":"@TEST_IP_SLAVE@",
+ "logging":
+ {
+ "level":"info",
+ "console":"true",
+ "file":
+ {
+ "enable":"false",
+ "path":"/tmp/vsomeip.log"
+ },
+ "dlt":"false"
+ },
+ "applications":
+ [
+ {
+ "name":"client_id_test_service_three",
+ "id":"0x3333"
+ },
+ {
+ "name":"client_id_test_service_four",
+ "id":"0x4444"
+ },
+ {
+ "name":"client_id_test_service_five",
+ "id":"0x5555"
+ }
+ ],
+ "services":
+ [
+ {
+ "service":"0x3000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x4000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x5000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ }
+ ],
+ "routing":"client_id_test_service_three",
+ "service-discovery":
+ {
+ "enable":"true",
+ "multicast":"224.0.0.1",
+ "port":"30490",
+ "protocol":"udp"
+ }
+} \ No newline at end of file
diff --git a/test/client_id_tests/conf/client_id_test_same_client_ids_diff_ports_master.json.in b/test/client_id_tests/conf/client_id_test_same_client_ids_diff_ports_master.json.in
new file mode 100644
index 0000000..fe2248d
--- /dev/null
+++ b/test/client_id_tests/conf/client_id_test_same_client_ids_diff_ports_master.json.in
@@ -0,0 +1,56 @@
+{
+ "unicast":"@TEST_IP_MASTER@",
+ "logging":
+ {
+ "level":"info",
+ "console":"true",
+ "file":
+ {
+ "enable":"false",
+ "path":"/tmp/vsomeip.log"
+ },
+ "dlt":"false"
+ },
+ "applications":
+ [
+ {
+ "name":"client_id_test_service_one",
+ "id":"0x1111"
+ },
+ {
+ "name":"client_id_test_service_two",
+ "id":"0x2222"
+ }
+ ],
+ "services":
+ [
+ {
+ "service":"0x1000",
+ "instance":"0x0001",
+ "unreliable":"30001",
+ "reliable":
+ {
+ "port":"40001",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x2000",
+ "instance":"0x0001",
+ "unreliable":"30002",
+ "reliable":
+ {
+ "port":"40002",
+ "enable-magic-cookies":"false"
+ }
+ }
+ ],
+ "routing":"client_id_test_service_one",
+ "service-discovery":
+ {
+ "enable":"true",
+ "multicast":"224.0.0.1",
+ "port":"30490",
+ "protocol":"udp"
+ }
+} \ No newline at end of file
diff --git a/test/client_id_tests/conf/client_id_test_same_client_ids_diff_ports_slave.json.in b/test/client_id_tests/conf/client_id_test_same_client_ids_diff_ports_slave.json.in
new file mode 100644
index 0000000..dc8f5ae
--- /dev/null
+++ b/test/client_id_tests/conf/client_id_test_same_client_ids_diff_ports_slave.json.in
@@ -0,0 +1,70 @@
+{
+ "unicast":"@TEST_IP_SLAVE@",
+ "logging":
+ {
+ "level":"info",
+ "console":"true",
+ "file":
+ {
+ "enable":"false",
+ "path":"/tmp/vsomeip.log"
+ },
+ "dlt":"false"
+ },
+ "applications":
+ [
+ {
+ "name":"client_id_test_service_three",
+ "id":"0x1111"
+ },
+ {
+ "name":"client_id_test_service_four",
+ "id":"0x2222"
+ },
+ {
+ "name":"client_id_test_service_five",
+ "id":"0x3333"
+ }
+ ],
+ "services":
+ [
+ {
+ "service":"0x3000",
+ "instance":"0x0001",
+ "unreliable":"30003",
+ "reliable":
+ {
+ "port":"40003",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x4000",
+ "instance":"0x0001",
+ "unreliable":"30004",
+ "reliable":
+ {
+ "port":"40004",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x5000",
+ "instance":"0x0001",
+ "unreliable":"30005",
+ "reliable":
+ {
+ "port":"40005",
+ "enable-magic-cookies":"false"
+ }
+ }
+ ],
+ "routing":"client_id_test_service_three",
+ "service-discovery":
+ {
+ "enable":"true",
+ "multicast":"224.0.0.1",
+ "port":"30490",
+ "protocol":"udp"
+ }
+} \ No newline at end of file
diff --git a/test/client_id_tests/conf/client_id_test_same_client_ids_same_ports_master.json.in b/test/client_id_tests/conf/client_id_test_same_client_ids_same_ports_master.json.in
new file mode 100644
index 0000000..b0c833b
--- /dev/null
+++ b/test/client_id_tests/conf/client_id_test_same_client_ids_same_ports_master.json.in
@@ -0,0 +1,56 @@
+{
+ "unicast":"@TEST_IP_MASTER@",
+ "logging":
+ {
+ "level":"info",
+ "console":"true",
+ "file":
+ {
+ "enable":"false",
+ "path":"/tmp/vsomeip.log"
+ },
+ "dlt":"false"
+ },
+ "applications":
+ [
+ {
+ "name":"client_id_test_service_one",
+ "id":"0x1111"
+ },
+ {
+ "name":"client_id_test_service_two",
+ "id":"0x2222"
+ }
+ ],
+ "services":
+ [
+ {
+ "service":"0x1000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x2000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ }
+ ],
+ "routing":"client_id_test_service_one",
+ "service-discovery":
+ {
+ "enable":"true",
+ "multicast":"224.0.0.1",
+ "port":"30490",
+ "protocol":"udp"
+ }
+} \ No newline at end of file
diff --git a/test/client_id_tests/conf/client_id_test_same_client_ids_same_ports_slave.json.in b/test/client_id_tests/conf/client_id_test_same_client_ids_same_ports_slave.json.in
new file mode 100644
index 0000000..0b6e1e2
--- /dev/null
+++ b/test/client_id_tests/conf/client_id_test_same_client_ids_same_ports_slave.json.in
@@ -0,0 +1,70 @@
+{
+ "unicast":"@TEST_IP_SLAVE@",
+ "logging":
+ {
+ "level":"info",
+ "console":"true",
+ "file":
+ {
+ "enable":"false",
+ "path":"/tmp/vsomeip.log"
+ },
+ "dlt":"false"
+ },
+ "applications":
+ [
+ {
+ "name":"client_id_test_service_three",
+ "id":"0x1111"
+ },
+ {
+ "name":"client_id_test_service_four",
+ "id":"0x2222"
+ },
+ {
+ "name":"client_id_test_service_five",
+ "id":"0x3333"
+ }
+ ],
+ "services":
+ [
+ {
+ "service":"0x3000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x4000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ },
+ {
+ "service":"0x5000",
+ "instance":"0x0001",
+ "unreliable":"30000",
+ "reliable":
+ {
+ "port":"40000",
+ "enable-magic-cookies":"false"
+ }
+ }
+ ],
+ "routing":"client_id_test_service_three",
+ "service-discovery":
+ {
+ "enable":"true",
+ "multicast":"224.0.0.1",
+ "port":"30490",
+ "protocol":"udp"
+ }
+} \ No newline at end of file