tests: Extended Integration Tests - #428
Open
KonradBreitsprecherBkd wants to merge 8 commits into
Open
KonradBreitsprecherBkd wants to merge 8 commits into
KonradBreitsprecherBkd wants to merge 8 commits into
Conversation
added: ITest_HealthCheck for soft/hard response timeouts and disconnects (QA 2.11-2.13) added: ITest_Logging cases for sink levels and file sink naming (QA 2.6, 2.7) added: ITest_RemoteLogging cases for LogFromRemotes false/default and remote sink levels (QA 2.8) added: ITest_PcapTracing for PCAP file and pipe sinks, parsed like an external tool would (QA 2.23.1, 2.23.2) added: ITest_DomainSockets, same-host connections use local:// unless disabled (QA 2.18, SILKIT-1435) added: ITest_ConfigPrecedence, configured name, registry URI and network override the API (QA 2.19) added: ITest_LinSleepWakeup for repeated LIN sleep/wakeup cycles (QA 2.3, SILKIT-1504) fixed: log file scanning in tests could terminate the test process when parallel tests removed files Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
KonradBreitsprecherBkd
force-pushed
the
dev_extend_integrationtests
branch
from
October 2, 2026 07:11
88841cb to
cb65886
Compare
The QA test specification is not part of the public SIL Kit. Describe what the integration tests check instead of referring to QA test case numbers and internal issue keys. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
- Move the tests of ITest_RemoteLogging into ITest_Logging, so all logging integration tests are in one file and use the ITest_Logging fixture. - Move the log file helpers of ITestLogFiles.hpp into IntegrationTestUtils.hpp instead of adding a new header. - IntegrationTestUtils.hpp was not included anywhere so far. To include it from several tests: make its free functions inline, include <Windows.h> with NOMINMAX, and use defined() for platform checks (-Wundef). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
MinGW's libstdc++ already defines NOMINMAX, so defining it again is an error with -Werror. Define NOMINMAX and WIN32_LEAN_AND_MEAN only if not yet defined. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
Move the repeated sleep/wakeup test into ITest_Lin, next to the single-cycle sync_lin_simulation test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
KonradBreitsprecherBkd
force-pushed
the
dev_extend_integrationtests
branch
from
October 2, 2026 07:35
39b89c3 to
1f7ddf2
Compare
unlink() is declared in <unistd.h>, which was not included, so the Linux build failed now that tests include the header. Include the POSIX headers on all non-Windows platforms, since __unix__ is not defined on macOS. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
On 32-bit builds, std::streamoff returned by tellg() is wider than size_t, which MSVC reports as C4244 (an error with warnings as errors). Cast it explicitly. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
Add LogFilePrefix() to IntegrationTestUtils.hpp, so the "<LogName>_<ParticipantName>_" file name scheme is spelled out in one place instead of appending "_" by hand. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
KonradBreitsprecherBkd
force-pushed
the
dev_extend_integrationtests
branch
from
October 2, 2026 12:40
6daf1e4 to
ac1838c
Compare
KonradBreitsprecherBkd
marked this pull request as ready for review
October 2, 2026 13:23
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Subject
Tests: extend the integration tests for logging, health monitoring, PCAP tracing, domain sockets, configuration precedence and LIN sleep/wakeup
Description
Adds integration tests for behavior that was so far only checked by hand: end-to-end scenarios with real participants and a registry, which inspect log files, PCAP output and lifecycle states.
New test files:
ITest_HealthCheck:SoftResponseTimeoutlogs a warning, and the simulation continues.HardResponseTimeoutputs the participant into theErrorstate.ITest_PcapTracing: Ethernet frames of a controller with a PCAP trace sink end up in a valid PCAP stream, both for aPcapFileand aPcapPipesink. The stream is parsed without SIL Kit internals, the same way an external tool like Wireshark reads it.ITest_DomainSockets: Participants on the same host connect via local domain sockets by default, and via TCP if domain sockets are disabled.ITest_ConfigPrecedence:Extended:
ITest_Lin: new testrepeated_sleep_and_wakeup_cycles. LIN master and slave go through several go-to-sleep / wakeup cycles and exchange frames after every wakeup, so a slave that does not return from sleep is detected. The existingsync_lin_simulationonly covers a single cycle.ITest_Loggingnow contains all logging integration tests:Level: Offwrites nothing.<LogName>_<ParticipantName>_<Timestamp>.jsonl, with one file per participant.ITest_RemoteLogging, which is removed:LogFromRemotes: falseignores remote messagesLogFromRemotesdefaults tofalseRemotesink filters on the sender sideTest infrastructure:
MakeUniqueLogName,FindLogFiles,ReadTextFile,ScopedLogFiles) are inIntegrationTestUtils.hpp; no new header is added.IntegrationTestUtils.hppwas not included by any test so far. To include it from several tests:inline, which avoids multiple definitions at link time<Windows.h>is included withNOMINMAXdefined(), because-Wundeffailed for__unix__andWIN32ITest_PcapTracingdefinesNOMINMAX/WIN32_LEAN_AND_MEANonly if they are not defined yet. MinGW's libstdc++ already definesNOMINMAX, and redefining it broke the MinGW build with-Werror.Instructions for review / testing
SilKit/IntegrationTests/and their entries inSilKit/IntegrationTests/CMakeLists.txt. No production code changes.ITest_RemoteLogging.*tests are nowITest_Logging.*. Update test filters that select them by suite name.SILKIT_WARNINGS_AS_ERRORS=ONwith MSVC (VS 2026, Debug) and MinGW GCC 13.2 (Ninja). The logging, health check, domain socket and PCAP tests pass with both.Developer checklist (address before review)