Skip to content

Commit

Permalink
Run Github Ubuntu CI on PRs (#4598)
Browse files Browse the repository at this point in the history
* Refs #20679: Run Github Ubuntu CI on PRs

Signed-off-by: EduPonz <[email protected]>

* Refs #20679: Fix remaining hidden overloads

Signed-off-by: EduPonz <[email protected]>

* Refs #20679: Run CI on PRs to intermediate branches

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
(cherry picked from commit 7154a57)

# Conflicts:
#	.github/workflows/address-sanitizers.yaml
#	.github/workflows/documentation-tests.yaml
#	.github/workflows/mac-ci.yml
#	.github/workflows/thread-sanitizer.yaml
#	.github/workflows/windows-ci.yml
#	test/blackbox/common/BlackboxTestsDiscovery.cpp
  • Loading branch information
EduPonz authored and mergify[bot] committed Mar 22, 2024
1 parent d3a969c commit 38df012
Show file tree
Hide file tree
Showing 28 changed files with 156 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/address-sanitizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ on:
default: '2.13.x'

pull_request:
<<<<<<< HEAD
branches:
- '2.13.x'
=======
>>>>>>> 7154a57a0 (Run Github Ubuntu CI on PRs (#4598))
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/documentation-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ on:
default: '2.13.x'

pull_request:
<<<<<<< HEAD
branches:
- '2.13.x'
=======
>>>>>>> 7154a57a0 (Run Github Ubuntu CI on PRs (#4598))
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/mac-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ on:
required: true

pull_request:
<<<<<<< HEAD
branches:
- '2.13.x'
=======
>>>>>>> 7154a57a0 (Run Github Ubuntu CI on PRs (#4598))
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/thread-sanitizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ on:
type: string

pull_request:
<<<<<<< HEAD
branches:
- '2.13.x'
=======
>>>>>>> 7154a57a0 (Run Github Ubuntu CI on PRs (#4598))
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ on:
type: string
required: true

pull_request:
paths-ignore:
- '**.md'
- '**.txt'
- '!**/CMakeLists.txt'

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ on:
required: true

pull_request:
<<<<<<< HEAD
branches:
- '2.13.x'
=======
>>>>>>> 7154a57a0 (Run Github Ubuntu CI on PRs (#4598))
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
4 changes: 4 additions & 0 deletions include/fastrtps/subscriber/SubscriberHistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ class SubscriberHistory : public rtps::ReaderHistory

private:

using rtps::ReaderHistory::completed_change;
using rtps::ReaderHistory::received_change;
using rtps::ReaderHistory::remove_change_nts;

using t_m_Inst_Caches = std::map<rtps::InstanceHandle_t, KeyedChanges>;

//!Map where keys are instance handles and values vectors of cache changes
Expand Down
4 changes: 4 additions & 0 deletions src/cpp/fastdds/domain/DomainParticipantImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,10 @@ class DomainParticipantImpl
bool on_guard_;
};

using fastrtps::rtps::RTPSParticipantListener::onParticipantDiscovery;
using fastrtps::rtps::RTPSParticipantListener::onReaderDiscovery;
using fastrtps::rtps::RTPSParticipantListener::onWriterDiscovery;

public:

MyRTPSParticipantListener(
Expand Down
4 changes: 4 additions & 0 deletions src/cpp/fastdds/publisher/DataWriterImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ class DataWriterImpl : protected rtps::IReaderDataFilter
#endif //FASTDDS_STATISTICS

DataWriterImpl* data_writer_;

private:

using fastrtps::rtps::WriterListener::onWriterMatched;
}
writer_listener_;

Expand Down
4 changes: 4 additions & 0 deletions src/cpp/fastdds/subscriber/DataReaderImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,10 @@ class DataReaderImpl
#endif //FASTDDS_STATISTICS

DataReaderImpl* data_reader_;

private:

using fastrtps::rtps::ReaderListener::onReaderMatched;
}
reader_listener_;

Expand Down
6 changes: 6 additions & 0 deletions src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ class ParticipantImpl

ParticipantImpl* mp_participantimpl;

private:

using rtps::RTPSParticipantListener::onParticipantDiscovery;
using rtps::RTPSParticipantListener::onReaderDiscovery;
using rtps::RTPSParticipantListener::onWriterDiscovery;

}
m_rtps_listener;

Expand Down
4 changes: 4 additions & 0 deletions src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ class PublisherImpl
const LivelinessLostStatus& status) override;

PublisherImpl* mp_publisherImpl;

private:

using rtps::WriterListener::onWriterMatched;
}
m_writerListener;

Expand Down
4 changes: 4 additions & 0 deletions src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ class SubscriberImpl
rtps::RTPSReader* reader,
const LivelinessChangedStatus& status) override;
SubscriberImpl* mp_subscriberImpl;

private:

using rtps::ReaderListener::onReaderMatched;
}
m_readerListener;

Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/DataSharing/ReaderPool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ class ReaderPool : public DataSharingPayloadPool

private:

using DataSharingPayloadPool::init_shared_memory;

bool is_volatile_; //< Whether the reader is volatile or not
uint64_t next_payload_; //< Index of the next history position to read
SequenceNumber_t last_sn_; //< Sequence number of the last read payload
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/DataSharing/WriterPool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ class WriterPool : public DataSharingPayloadPool

private:

using DataSharingPayloadPool::init_shared_memory;

octet* payloads_pool_; //< Shared pool of payloads

uint32_t max_data_size_; //< Maximum size of the serialized payload data
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/builtin/discovery/participant/PDPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ class PDPClient : public PDP

private:

using PDP::announceParticipantState;

/**
* Manually match the local PDP reader with the PDP writer of a given server. The function is
* not thread safe (nts) in the sense that it does not take the PDP mutex. It does however take
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ class PDPServer : public fastrtps::rtps::PDP

private:

using fastrtps::rtps::PDP::announceParticipantState;

#if HAVE_SECURITY
/**
* Returns whether discovery should be secured
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

class BaseImpl : public IPayloadPool
{
public:

bool get_payload(
uint32_t size,
CacheChange_t& cache_change) override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ class Impl<PREALLOCATED_WITH_REALLOC_MEMORY_MODE> : public BaseImpl

private:

using BaseImpl::get_payload;

uint32_t min_payload_size_;
};
4 changes: 4 additions & 0 deletions src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ class DynamicTopicPayloadPool : public TopicPayloadPool
return DYNAMIC_RESERVE_MEMORY_MODE;
}

private:

using TopicPayloadPool::get_payload;

};

} // namespace rtps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class DynamicReusableTopicPayloadPool : public TopicPayloadPool
return DYNAMIC_REUSABLE_MEMORY_MODE;
}

private:

using TopicPayloadPool::get_payload;

};

} // namespace rtps
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class PreallocatedTopicPayloadPool : public TopicPayloadPool

private:

using TopicPayloadPool::get_payload;

uint32_t payload_size_;
uint32_t minimum_pool_size_; //< Minimum initial pool size (sum of all histories)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class PreallocatedReallocTopicPayloadPool : public TopicPayloadPool

private:

using TopicPayloadPool::get_payload;

uint32_t min_payload_size_;
uint32_t minimum_pool_size_; //< Minimum initial pool size (sum of all histories)
};
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/transport/TCPTransportInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class TCPTransportInterface : public TransportInterface

std::atomic<bool> alive_;

using TransportInterface::transform_remote_locator;

protected:

std::vector<fastrtps::rtps::IPFinder::info_IP> current_interfaces_;
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/transport/UDPTransportInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class UDPTransportInterface : public TransportInterface
{
friend class UDPSenderResource;

using TransportInterface::transform_remote_locator;

public:

~UDPTransportInterface() override;
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/transport/shared_mem/SharedMemTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ class SharedMemTransport : public TransportInterface

private:

using TransportInterface::transform_remote_locator;

//! Constructor with no descriptor is necessary for implementations derived from this class.
SharedMemTransport();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ class MonitorServiceListener :
public:

MonitorServiceListener(
MonitorService* ms
);

public:
MonitorService* ms);

bool on_local_entity_status_change(
const fastrtps::rtps::GUID_t& guid,
Expand All @@ -70,6 +67,9 @@ class MonitorServiceListener :

MonitorService* monitor_srv_;

private:

using fastrtps::rtps::WriterListener::onWriterMatched;

};

Expand Down
71 changes: 71 additions & 0 deletions test/blackbox/common/BlackboxTestsDiscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2131,3 +2131,74 @@ TEST(Discovery, MultipleXMLProfileLoad)
thr_reader.join();
thr_writer.join();
}
<<<<<<< HEAD
=======

//! Regression test for redmine issue 20641
TEST(Discovery, discovery_cyclone_participant_with_custom_pid)
{
using namespace eprosima::fastdds::dds;
using namespace eprosima::fastrtps::rtps;

/* Custom participant listener to count number of discovered participants */
class DiscoveryListener : public DomainParticipantListener
{
public:

void on_participant_discovery(
DomainParticipant*,
ParticipantDiscoveryInfo&& info) override
{
if (ParticipantDiscoveryInfo::DISCOVERED_PARTICIPANT == info.status)
{
discovered_participants_++;
}
else if (ParticipantDiscoveryInfo::REMOVED_PARTICIPANT == info.status)
{
discovered_participants_--;
}
}

uint8_t discovered_participants() const
{
return discovered_participants_;
}

private:

using DomainParticipantListener::on_participant_discovery;

std::atomic<uint8_t> discovered_participants_{0};
};

/* Create a datagram injection transport */
using eprosima::fastdds::rtps::DatagramInjectionTransportDescriptor;
using eprosima::fastdds::rtps::DatagramInjectionTransport;
auto low_level_transport = std::make_shared<UDPv4TransportDescriptor>();
auto transport = std::make_shared<DatagramInjectionTransportDescriptor>(low_level_transport);

/* Disable builtin transport and add custom one */
DomainParticipantQos participant_qos = PARTICIPANT_QOS_DEFAULT;
participant_qos.transport().use_builtin_transports = false;
participant_qos.transport().user_transports.clear();
participant_qos.transport().user_transports.push_back(transport);

/* Create participant with custom transport and listener */
DiscoveryListener listener;
uint32_t domain_id = static_cast<uint32_t>(GET_PID()) % 230;
DomainParticipantFactory* factory = DomainParticipantFactory::get_instance();
DomainParticipant* participant = factory->create_participant(domain_id, participant_qos, &listener);
ASSERT_NE(nullptr, participant);

/* Inject a Cyclone DDS Data(p) with a custom PID that we also use */
auto receivers = transport->get_receivers();
ASSERT_FALSE(receivers.empty());
DatagramInjectionTransport::deliver_datagram_from_file(receivers, "datagrams/20641.bin");

/* Assert that the participant is discovered */
ASSERT_EQ(listener.discovered_participants(), 1u);

/* Clean up */
factory->delete_participant(participant);
}
>>>>>>> 7154a57a0 (Run Github Ubuntu CI on PRs (#4598))

0 comments on commit 38df012

Please sign in to comment.