Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Test Suite

Functional and integration tests that verify correctness of every layer — from raw io_uring events up to full GObj protocol stacks. All tests are registered as ctest targets and run automatically with yunetas test.

Source: tests/c/

# Run the full suite
yunetas test

# Run a single test by name
ctest -R test_c_timer --output-on-failure --test-dir build

# Run ctest in a loop until first failure (flaky-test detection)
./ctest-loop.sh

Event loop (yev_loop)

Low-level tests for the io_uring event loop, without the GObj layer.

BinaryDescription
test_yevent_listen1–4Server creates a listen socket and accepts one client connection.
test_yevent_connect1–2Client connects to a listening server; verifies the connection succeeds.
test_yevent_traffic1–6Client ↔ server message echo over plain TCP (multiple variants).
test_yevent_udp_traffic1UDP message echo.
test_yevent_traffic_secure1TLS-encrypted TCP message echo.
test_yevent_timer_once1–2One-shot timer expiration.
test_yevent_timer_periodic1Periodic (recurring) timer.

Source: tests/c/yev_loop/yev_events/, tests/c/yev_loop/yev_events_tls/

Timers

BinaryDescription
test_c_timerC_TIMER GClass — periodic timeout operations.
test_c_timer0C_TIMER0 GClass — basic (low-level) timer.

Source: tests/c/c_timer/, tests/c/c_timer0/

TCP networking

Plain and TLS TCP through the full GObj protocol stack.

BinaryDescription
test_c_tcp test1–4Plain TCP: connect, disconnect, echo, and rapid multi-message burst.
test_c_tcp2 test1–4Same scenarios using the newer C_TCP_S method (no child_tree_filter).
test_c_tcps test1–4TLS TCP: connect, disconnect, echo, and multi-message burst.
test_c_tcps2 test1–4TLS TCP with the newer method.

Source: tests/c/c_tcp/, tests/c/c_tcp2/, tests/c/c_tcps/, tests/c/c_tcps2/

MQTT

BinaryDescription
test_c_mqtt test1Self-contained broker + client: subscribe, publish QoS 0, verify reception, disconnect.

Source: tests/c/c_mqtt/

BinaryDescription
test_subscriptions test1–2GObj event subscribe / unsubscribe lifecycle.
test_c_node_link_eventsEV_TREEDB_NODE_LINKED / UNLINKED events at the C_NODE GClass level.
test_tr_treedb_link_eventsLow-level link/unlink callback mechanism in tr_treedb.

Source: tests/c/c_subscriptions/, tests/c/c_node_link_events/, tests/c/tr_treedb_link_events/

Timeranger2 persistence

BinaryDescription
test_tranger_startupDatabase initialization and startup.
test_topic_pkey_integerOpen topic as master, manage runtime lists, append records with integer keys.
test_topic_pkey_integer_iteratorIterator without callbacks over integer-key data.
test_topic_pkey_integer_iterator2Iterator with per-key callbacks and time-based matching.
test_topic_pkey_integer_iterator3Absolute-position searches.
test_topic_pkey_integer_iterator4Relative-position searches.
test_topic_pkey_integer_iterator5Paginated searches.
test_topic_pkey_integer_iterator6Master/client iterator mode with realtime record additions.
test_testingTesting utilities (event counters, assertions).

Source: tests/c/timeranger2/

TR_MSG & TR_QUEUE

BinaryDescription
test_tr_msg1Message topics: iteration, key matching, instance retrieval.
test_tr_msg2Stress variant: 1 000 devices × 100 traces.
test_tr_queue1Queue topic: enqueue / dequeue with time-based keys over a multi-day period.

Source: tests/c/tr_msg/, tests/c/tr_queue/

TreeDB

BinaryDescription
test_tr_treedbSchema creation, user/department/compound structures, node CRUD, and state snapshots (foto files).

Source: tests/c/tr_treedb/

Keyword matching

BinaryDescription
test_kw1kw_match_simple() with strings, booleans, integers, and floats.

Source: tests/c/kw/

Generic message interchange

A JSON-driven test runner that executes scripted test sequences and validates event traces and error logs.

Test scenarioDescription
test_mqtt_qos0MQTT QoS 0 publish/subscribe interchange.
test_tcp_connectTCP connection establishment.
test_tcp_reconnectTCP reconnection and recovery.

Source: tests/c/msg_interchange/

Build flag

Tests are enabled by default via .config (CONFIG_MODULE_TEST=y). Toggle with menuconfig or pass -DENABLE_TESTS=OFF to CMake.