Skip to main content
Version: 3.1.1

Running Tests

ChronoLog's test suite covers four broad categories: unit, integration, communication/overhead, and system/workload tests. The full suite is registered with CMake's CTest framework except for a handful of Python system scripts and shell workload drivers that live outside the CTest tree.

A debug build exposes the largest set of tests (~133 CTest entries). Some entries are DISABLED in the default run; others are marked MANUAL because they require a live multi-process ChronoLog deployment before they can succeed.


How to Run Tests​

CTest (automated)​

From your CMake build directory:

# List all registered tests without running them
ctest -N

# Run all enabled tests (parallel, verbose)
ctest --output-on-failure -j$(nproc)

# Run a specific subset by name regex
ctest -R "Unit_ChronoCommon_StoryChunk" --output-on-failure

# Run including DISABLED tests
ctest -R "." --output-on-failure
info

ctest -N is the authoritative source of truth for test counts and names in a given build. Debug builds include extra GTest cases (e.g. TRACE/DEBUG macro tests) that are absent from release builds.

Manual Tests​

Tests labelled MANUAL require ChronoVisor, ChronoKeeper, and the client library to be running before execution. Start the deployment first (see the Docker tutorials), then invoke the binary directly:

# Example — client connectivity test
./tests/integration/client/client_connect_rpc_test

# Shell-based communication protocol test
bash tests/communication/thallium_protocol_test.sh

Disabled Tests​

The following tests are registered with CTest but excluded from the default run. They can be forced with ctest -R <name>:

CTest NameSource FileReason
Unit_ChronoCommon_ExtractionChaintests/unit/chrono-common/chrono_common_extraction_chain_test.cppUnder active development
Unit_ChronoCommon_ChunkConsumerServicetests/unit/chrono-common/chrono_common_chunk_consumer_service_test.cppUnder active development
Unit_ChronoPlayer_StoryChunkTransferAgenttests/unit/chrono-player/chrono_player_transfer_agent_test.cppUnder active development
Unit_ChronoPlayer_PlaybackServiceLifecycletests/unit/chrono-player/chrono_player_playback_service_test.cppUnder active development

Server Tests​

info

The three GTest suites below (story_chunk_test, story_pipeline_test, chronokvs_logger_test) are discovered at runtime by GTest. CTest registers each individual test case as a separate entry, so a single ctest -R Unit_ChronoCommon_StoryChunk run executes all 47 cases.

Unit Tests – StoryChunk​

47 GTest cases. CTest name prefix: Unit_ChronoCommon_StoryChunk_

TestConstructors

Test NameTypeFrameworkSource FileDescription
testEmptyConstructorUnitGTesttests/unit/chrono-common/story_chunk_test.cppEmpty StoryChunk has no events
testNormalCtorInitUnitGTesttests/unit/chrono-common/story_chunk_test.cppStart/end times set correctly
testBoundaryCtorInitUnitGTesttests/unit/chrono-common/story_chunk_test.cppendTime < startTime is auto-corrected to startTime + 5000

TestInsertEvent

Test NameTypeFrameworkSource FileDescription
testNormalInsertEventUnitGTesttests/unit/chrono-common/story_chunk_test.cppSingle event inserted and retrieved
testInsertAtEndTimeUnitGTesttests/unit/chrono-common/story_chunk_test.cppEvent at endTime boundary rejected
testInsertBeforeStartUnitGTesttests/unit/chrono-common/story_chunk_test.cppEvent before startTime rejected
testInsertAtStartTimeUnitGTesttests/unit/chrono-common/story_chunk_test.cppEvent at startTime accepted
testOutOfOrderInsertUnitGTesttests/unit/chrono-common/story_chunk_test.cpp6 out-of-order events stored chronologically
testDuplicateKeyCombinationsUnitGTesttests/unit/chrono-common/story_chunk_test.cppSame timestamp with different client/index accepted; true duplicate rejected
testStressInsertUnitGTesttests/unit/chrono-common/story_chunk_test.cpp100 000 events inserted and verified
testIncorrectEventIdUnitGTesttests/unit/chrono-common/story_chunk_test.cppEvent with wrong storyId rejected
testInsertLargeEventRecordUnitGTesttests/unit/chrono-common/story_chunk_test.cpp20 KB payload event accepted

TestMergeEvents

Test NameTypeFrameworkSource FileDescription
testEmptyInputMapUnitGTesttests/unit/chrono-common/story_chunk_test.cppMerge of empty map does nothing
testStartBeforeWindowUnitGTesttests/unit/chrono-common/story_chunk_test.cppOnly in-window events merged from map
testValidMergeUnitGTesttests/unit/chrono-common/story_chunk_test.cpp2 valid events merged and map emptied
testAllInvalidMergesUnitGTesttests/unit/chrono-common/story_chunk_test.cppAll out-of-window events rejected
testDuplicateTimestampsUnitGTesttests/unit/chrono-common/story_chunk_test.cpp3 events at same timestamp all merged
testHugeMergeUnitGTesttests/unit/chrono-common/story_chunk_test.cpp1 000 events merged at once
BoundaryEndTimeExclusionUnitGTesttests/unit/chrono-common/story_chunk_test.cppEvent at endTime excluded; endTime-1 included
testMergeFromMiddleUnitGTesttests/unit/chrono-common/story_chunk_test.cppMerge starts from arbitrary iterator position
testMergeEmptyChunkUnitGTesttests/unit/chrono-common/story_chunk_test.cppMerging empty StoryChunk changes nothing
testMergeWithinWindowUnitGTesttests/unit/chrono-common/story_chunk_test.cpp2 in-window events merged from other chunk
testMergeOutsideWindowUnitGTesttests/unit/chrono-common/story_chunk_test.cppOnly in-window subset merged
testMixedChunkMergeUnitGTesttests/unit/chrono-common/story_chunk_test.cppOverlap events from differently-windowed chunk
testMergeStartTimeIncorrectUnitGTesttests/unit/chrono-common/story_chunk_test.cppmergeStart before/after window still bounded by chunk window
testMergeMapThenChunkUnitGTesttests/unit/chrono-common/story_chunk_test.cppSequential map-merge then chunk-merge both succeed
testIncorrectStoryIdUnitGTesttests/unit/chrono-common/story_chunk_test.cppWrong storyId event rejected
testEmptyAndHugePayloadsUnitGTesttests/unit/chrono-common/story_chunk_test.cppEmpty-record and 5 KB payload handled
testMergeStartBeforeEndInsideUnitGTesttests/unit/chrono-common/story_chunk_test.cppOther chunk starts before, ends inside
testMergeStartInsideEndAfterUnitGTesttests/unit/chrono-common/story_chunk_test.cppOther chunk starts inside, ends after
testMergeExactBoundaryNoOverlapUnitGTesttests/unit/chrono-common/story_chunk_test.cppNo overlap at exact boundary

TestEraseEvents

Test NameTypeFrameworkSource FileDescription
testValidEraseUnitGTesttests/unit/chrono-common/story_chunk_test.cppErase single event by timestamp range
testNonExistingTimestampUnitGTesttests/unit/chrono-common/story_chunk_test.cppErase non-existent timestamp is no-op
testEraseDuplicateTimestampsUnitGTesttests/unit/chrono-common/story_chunk_test.cppBoth events at same timestamp erased
testEraseInRangeUnitGTesttests/unit/chrono-common/story_chunk_test.cppRange erase removes all events in [120, 160)
testEraseOutOfTimeUnitGTesttests/unit/chrono-common/story_chunk_test.cppRange outside chunk window is no-op
testEraseInvalidTimeUnitGTesttests/unit/chrono-common/story_chunk_test.cppstart > end is no-op
testEraseAllEventsUnitGTesttests/unit/chrono-common/story_chunk_test.cppErase [10, 2000) removes all events
testStressEraseUnitGTesttests/unit/chrono-common/story_chunk_test.cppErase 20 000 events from a 100 000-event chunk
testEraseEndTimeMinusOneUnitGTesttests/unit/chrono-common/story_chunk_test.cppendTime-1 erased; others kept
testZeroRangeUnitGTesttests/unit/chrono-common/story_chunk_test.cppErase [x, x) is no-op

TestExtractEventSeries

Test NameTypeFrameworkSource FileDescription
testExtractEmptyChunkUnitGTesttests/unit/chrono-common/story_chunk_test.cppExtract from empty chunk returns empty vector
testExtractSingleEventUnitGTesttests/unit/chrono-common/story_chunk_test.cppSingle event extracted with correct fields
testExtractEventsSortedUnitGTesttests/unit/chrono-common/story_chunk_test.cpp7 events extracted in ascending order
testExtractTwiceUnitGTesttests/unit/chrono-common/story_chunk_test.cppSecond extract returns empty after chunk cleared
testExtractAfterReinsertUnitGTesttests/unit/chrono-common/story_chunk_test.cppInsert → extract → insert → extract cycle
testExtractLargePayloadUnitGTesttests/unit/chrono-common/story_chunk_test.cpp5 KB payload preserved after extract

Unit Tests – StoryPipeline​

28 GTest cases. CTest name prefix: Unit_ChronoCommon_StoryPipeline_

TestConstructors

Test NameTypeFrameworkSource FileDescription
testValidEmptyInitUnitGTesttests/unit/chrono-common/story_pipeline_test.cppPipeline created with zero startTime
testOnBoundaryStartTimeUnitGTesttests/unit/chrono-common/story_pipeline_test.cppGranularity-aligned start kept; 3 chunks allocated
testNonBoundaryRoundingUnitGTesttests/unit/chrono-common/story_pipeline_test.cppNon-aligned start rounded to previous boundary
testHugeStoryStartTimeNoOverflowUnitGTesttests/unit/chrono-common/story_pipeline_test.cppNear-max startTime with no uint64 overflow

TestGetActiveIngestionHandle

Test NameTypeFrameworkSource FileDescription
testNonNullHandleEmptyDequesUnitGTesttests/unit/chrono-common/story_pipeline_test.cppHandle non-null; active and passive deques empty

TestCollectIngestedEvents

Test NameTypeFrameworkSource FileDescription
testNoChunkValidUnitGTesttests/unit/chrono-common/story_pipeline_test.cppNo chunk → collect is no-op
testSingleEmptyChunkUnitGTesttests/unit/chrono-common/story_pipeline_test.cppEmpty chunk removed; deques stay empty
testSingleNonEmptyChunkUnitGTesttests/unit/chrono-common/story_pipeline_test.cppNon-empty chunk merged and deleted
testNullptrInActiveDequeUnitGTesttests/unit/chrono-common/story_pipeline_test.cppnullptr entry skipped without crash

TestExtractDecayedChunks

Test NameTypeFrameworkSource FileDescription
testEmptyExtractUnitGTesttests/unit/chrono-common/story_pipeline_test.cppExtract before decay threshold extracts nothing
testExtractSmallAfterDecayUnitGTesttests/unit/chrono-common/story_pipeline_test.cppNon-empty chunk stashed after decay
testExtractMultipleUnitGTesttests/unit/chrono-common/story_pipeline_test.cppTwo chunks stashed past both decay points
testNoAppendAfterSingleDecayUnitGTesttests/unit/chrono-common/story_pipeline_test.cppTimeline shrinks; no append when ≥2 chunks remain
testAppendBehaviorAfterMultiDecayUnitGTesttests/unit/chrono-common/story_pipeline_test.cppNew chunk appended when only 1 chunk left
testExtractLeavesTwoUnitGTesttests/unit/chrono-common/story_pipeline_test.cppEmpty head chunks removed; future non-empty chunk preserved

MergeEvents

Test NameTypeFrameworkSource FileDescription
testEmptyMergeUnitGTesttests/unit/chrono-common/story_pipeline_test.cppMerging empty chunk is no-op
testPrependSuccessUnitGTesttests/unit/chrono-common/story_pipeline_test.cppEvent before TimelineStart causes prepend
testSingleAppendUnitGTesttests/unit/chrono-common/story_pipeline_test.cppEvent after TimelineEnd extends timeline by 1 chunk
testMultipleAppendUnitGTesttests/unit/chrono-common/story_pipeline_test.cppFar-future event extends timeline multiple chunks

TestPrependStoryChunk

Test NameTypeFrameworkSource FileDescription
testSuccessUnitGTesttests/unit/chrono-common/story_pipeline_test.cppPrepend moves TimelineStart back by 1 granularity

TestAppendStoryChunk

Test NameTypeFrameworkSource FileDescription
testSuccessUnitGTesttests/unit/chrono-common/story_pipeline_test.cppAppend moves TimelineEnd forward by 1 granularity

TestFinalize

Test NameTypeFrameworkSource FileDescription
testNoPendingChunksUnitGTesttests/unit/chrono-common/story_pipeline_test.cppFinalize on empty pipeline does nothing
testOnlyPassiveDequeUnitGTesttests/unit/chrono-common/story_pipeline_test.cppPassive-deque chunk stashed
testOnlyActiveDequeUnitGTesttests/unit/chrono-common/story_pipeline_test.cppActive-deque chunk stashed
testMixedDequesUnitGTesttests/unit/chrono-common/story_pipeline_test.cppPassive then active chunks stashed in FIFO order
testEmptyVsNonTimelineUnitGTesttests/unit/chrono-common/story_pipeline_test.cppEmpty head chunks skipped; non-empty stashed
testFinalizeDoubleCallUnitGTesttests/unit/chrono-common/story_pipeline_test.cppSecond finalize is a safe no-op
testFinalizeWithMixedTimelineUnitGTesttests/unit/chrono-common/story_pipeline_test.cpp3 non-empty chunks in pipeline all stashed

Unit Tests – ChronoKVS Logger​

25 GTest cases in a debug build (22 in release). CTest name prefix: Unit_ChronoKVS_ChronoKVSLogger_

Test NameTypeFrameworkSource FileDescription
LogLevel_EnumOrderingUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppLog-level enum ordering is correct
LogLevel_ExactValuesUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppLog-level enum exact integer values
DefaultLevel_ReturnsExpectedUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppgetDefaultLogLevel() returns DEBUG (debug build) or ERROR (release)
LogLevelToString_AllLevelsUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppAll 7 levels convert to correct string
LogLevelToString_UnknownUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppUnknown level returns fallback string
FormatMessage_SingleStringUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppFormat with a single string argument
FormatMessage_OneIntArgUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppFormat with one integer argument
FormatMessage_StringArgUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppFormat with one string argument
FormatMessage_MultipleArgsUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppFormat with multiple mixed arguments
Macros_InfoEnabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppINFO macro fires when level ≤ INFO
Macros_InfoDisabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppINFO macro suppressed when level > INFO
Macros_WarningEnabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppWARNING macro fires when level ≤ WARNING
Macros_WarningDisabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppWARNING macro suppressed when level > WARNING
Macros_ErrorEnabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppERROR macro fires when level ≤ ERROR
Macros_ErrorDisabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppERROR macro suppressed when level > ERROR
Macros_CriticalEnabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppCRITICAL macro fires when level ≤ CRITICAL
Macros_CriticalDisabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppCRITICAL macro suppressed when level > CRITICAL
Macros_OffDisablesAllUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppOFF level suppresses all macros
DebugMacros_TraceEnabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppTRACE macro fires at TRACE level (debug build only)
DebugMacros_TraceDisabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppTRACE macro suppressed above TRACE level (debug build only)
DebugMacros_DebugEnabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppDEBUG macro fires at DEBUG level (debug build only)
DebugMacros_DebugDisabledUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppDEBUG macro suppressed above DEBUG level (debug build only)
DebugMacros_AllLevelsWithTraceUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppAll levels produce output with TRACE active (debug build only)
ReleaseMacros_TraceDebugAreNoopsUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppTRACE/DEBUG are no-ops in release builds (release build only)
ReleaseMacros_InfoStillWorksUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppINFO still works after TRACE/DEBUG no-op (release build only)
LogMessage_DirectCallUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppDirect log_message() call at each level
LogMessage_AllLevelsDirectUnitGTesttests/unit/chronokvs/chronokvs_logger_test.cppAll levels exercised via log_message()

Unit Tests – ChronoPlayer​

4 standalone CTest entries; 2 are disabled in the default run.

Test NameTypeFrameworkSource FileDescription
Unit_ChronoPlayer_HDF5ArchiveReadingAgentUnitCustomtests/unit/chrono-player/chrono_player_hdf5_archive_reader_test.cppHDF5 reading agent retrieves story chunks from archive
Unit_ChronoPlayer_FileSystemMonitoringUnitCustomtests/unit/chrono-player/chrono_player_fs_monitoring_test.cppFile-system watcher detects new archive files
Unit_ChronoPlayer_StoryChunkTransferAgent (DISABLED)UnitCustomtests/unit/chrono-player/chrono_player_transfer_agent_test.cppTransfer agent lifecycle (under development)
Unit_ChronoPlayer_PlaybackServiceLifecycle (DISABLED)UnitCustomtests/unit/chrono-player/chrono_player_playback_service_test.cppPlayback service start/stop lifecycle (under development)

Integration Tests – Keeper-Grapher​

Test NameTypeFrameworkSource FileDescription
Integration_KeeperGrapher_StoryChunkIngestIntegrationCustomtests/integration/keeper-grapher/keeper_grapher_ingest_test.cppChronoKeeper ingest pipeline stores chunks in ChronoGrapher
Integration_KeeperGrapher_StoryChunkExtractIntegrationCustomtests/integration/keeper-grapher/keeper_grapher_extract_test.cppDecay-triggered extraction delivers chunks from Keeper to Grapher

Integration Tests – Package Discovery​

Test NameTypeFrameworkSource FileDescription
PackageDiscovery_CMakeFindPackageIntegrationCMaketests/integration/package-discovery/package_discovery_cmake_test.cppfind_package(ChronoLog) locates headers and libraries in-tree
PackageDiscovery_PkgConfigIntegrationCMaketests/integration/package-discovery/package_discovery_pkgconfig_test.cpppkg-config --cflags chronolog returns correct flags in-tree
PackageDiscovery_Installed_CMakeFindPackageIntegrationCMake script(CMake script)find_package(ChronoLog) succeeds after cmake --install
PackageDiscovery_Installed_PkgConfigIntegrationCMake script(CMake script)pkg-config succeeds after cmake --install

Communication Tests​

Test NameTypeFrameworkSource FileDescription
Communication_Thallium_ServerRepeaterRpcCommunicationCustomtests/communication/thallium_server_test.cppThallium RPC server accepts and echoes RPCs
Communication_Thallium_ClientMpiCommunicationMPItests/communication/thallium_client_mpi_test.cppMPI-launched client exchanges RPCs with server
Communication_Thallium_ClientSendRecvOrRdma (MANUAL)CommunicationCustomtests/communication/thallium_client_test.cppSend/recv and RDMA paths tested with live server
Communication_Thallium_ProtocolScript (MANUAL)CommunicationShelltests/communication/thallium_protocol_test.shShell script probes all supported Thallium transports

Overhead / Benchmark Tests​

Test NameTypeFrameworkSource FileDescription
Overhead_Clock_HighResolutionClockOverheadCustomtests/overhead/clock/clock_high_resolution_test.cppclock_gettime resolution and monotonicity
Overhead_Clock_TimestampCollectionOverheadCustomtests/overhead/clock/clock_timestamp_collection_test.cppThroughput of timestamp-collection in a tight loop
Overhead_Clock_TimestampCollisionDetectionOverheadCustomtests/overhead/clock/clock_timestamp_collision_test.cppCollision-detection logic under concurrent timestamp pressure
Overhead_Clock_Script (MANUAL)OverheadShelltests/overhead/clock/clock_cset_shield_test.shCPU-set shielding effect on clock overhead
Overhead_Lock_ContentionBenchmarkOverheadCustomtests/overhead/lock/lock_overhead_test.cppMutex vs. spinlock contention benchmark

System & Workload Scripts​

These scripts are not registered with CTest. Run them directly after a full deployment.

ScriptTypeDescription
test/system/fidelity_test_01.pySystemPython fidelity test — scenario 01
test/system/fidelity_test_02.pySystemPython fidelity test — scenario 02
test/system/fidelity_test_03.pySystemPython fidelity test — scenario 03
test/system/fidelity_test_all.pySystemDrives all three fidelity scenarios in sequence
tests/synthetic_workload/perf_test.shWorkloadMPI-launched performance benchmark
tests/synthetic_workload/distributed_syslog.shWorkloadDistributed syslog simulation across multiple nodes

Client Tests​

warning

All client integration tests require a live ChronoLog deployment (ChronoVisor + ChronoKeeper + ChronoGrapher) before they will succeed. Start the system first — see the Docker tutorials — then run these tests manually.

Integration Tests​

Test NameTypeFrameworkSource FileDescription
Integration_Client_ConnectRpcIntegrationCustomtests/integration/client/client_connect_rpc_test.cppClient connects to ChronoVisor via RPC
Integration_Client_MetadataRpcIntegrationCustomtests/integration/client/client_metadata_rpc_test.cppCreate/destroy chronicle and story metadata RPCs
Integration_Client_MultiPthreadIntegrationCustomtests/integration/client/client_multi_pthread_test.cppMultiple POSIX threads sharing a single client handle
Integration_Client_ThreadInterdependencyIntegrationCustomtests/integration/client/client_thread_interdependency_test.cppThreads depend on each other's story events
Integration_Client_MultiStorytellersIntegrationCustomtests/integration/client/client_multi_storytellers_test.cppMultiple storyteller handles writing concurrently
Integration_Client_StoryReaderIntegrationCustomtests/integration/client/client_story_reader_test.cppReader API retrieves events written by a storyteller
Integration_Client_MultiArgobotsIntegrationCustomtests/integration/client/client_multi_argobots_test.cppMultiple Argobots ULTs sharing a client
Integration_Client_MultiOpenmpIntegrationCustomtests/integration/client/client_multi_openmp_test.cppOpenMP threads writing events in parallel
Integration_Client_HybridArgobotsIntegrationCustomtests/integration/client/client_hybrid_argobots_test.cppHybrid Argobots + POSIX thread concurrency

Communication Tests – Client​

Test NameTypeFrameworkSource FileDescription
Communication_Thallium_ClientSendRecvOrRdma (MANUAL)CommunicationCustomtests/communication/thallium_client_test.cppClient-side send/recv and RDMA paths with live server

ChronoKVS Integration​

Test NameTypeFrameworkSource FileDescription
Integration_ChronoKVS_PluginIntegration (MANUAL)IntegrationCustomtests/integration/chronokvs/chronokvs_integration_test.cppChronoKVS plugin end-to-end write/read with live deployment
info

Integration_ChronoKVS_PluginIntegration has a 300-second CTest timeout. It exercises the full ChronoKVS write and read path, so a running ChronoLog system and a populated KVS store are required.