mirror of
https://github.com/rsyslog/rsyslog.git
synced 2026-06-16 04:12:41 +02:00
Update AGENTS.md and subordinate guides to recommend incremental builds via 'make check TESTS=""'. This avoids redundant autogen and configure steps during iterative development. With the help of AI-Agents: Google Jules
3.3 KiB
3.3 KiB
AGENTS.md – Runtime subtree
These instructions apply to all files under runtime/, which implement the
rsyslog core (message queues, networking backends, parsers, scheduler, stats
collection, and process orchestration).
Purpose & scope
- Treat this tree as the authoritative implementation of the rsyslog engine. Changes here affect every module and deployment profile.
- Consult the top-level
AGENTS.mdand component-specific guides (e.g.plugins/AGENTS.md) when a change crosses directory boundaries.
Key components
rsyslog.c/rsyslog.h: main entry point and daemon lifecycle helpers.modules.c,module-template.h: module loader contracts shared withplugins/andcontrib/.queue.c,wti.c,wtp.c: work queue implementation and worker threads.tcpsrv.c,tcpclt.c,net*.c: TCP/TLS listeners and clients.parser.c,prop.c,template.c: core message parsing and property engine.statsobj.c,dynstats*.c: statistics registry and dynamic counters.timezones.c,datetime.c: time conversion helpers.
Build & validation
- Efficient Build: Use
make -j$(nproc) check TESTS=""to incrementally build the core, shared libraries, and test dependencies. This ensures that tests can dynamically load the runtime via-M../runtime/.libs. - Bootstrap/Configure: Run
./autogen.shand./configure --enable-testbenchonly when build scripts change (configure.ac,Makefile.am, etc.) or if theMakefileis missing. Run these from the repository root. - Run Tests: Prefer targeted test runs:
- Directly invoke the most relevant shell test under
tests/(e.g../tests/queue-persist.sh). - Use
make check TESTS='<script>.sh'when you need automake’s harness or Valgrind variants (*-vg.sh). - For configuration validation edits, run
./tests/validation-run.sh.
- Directly invoke the most relevant shell test under
- When changing exported symbols, update
runtime/Makefile.amand ensure the library version script (if touched) remains consistent with existing SONAME policies.
Coding expectations
- Follow
COMMENTING_STYLE.mdand add/update "Concurrency & Locking" blocks in files that manage shared state (queues, network sessions, statistics). - Keep worker/thread behavior aligned with
MODULE_AUTHOR_CHECKLIST.mdrules: per-worker state stays inwrkrInstanceData_t, shared state is guarded in per-action data structures. - Update
doc/ai/module_map.yamlwhen locking guarantees, queue semantics, or exported helper APIs change so module authors know what to depend on. - Update or create unit helpers (e.g. under
tests/orruntime/hashtable/) when you modify reusable primitives.
Coordination & documentation
- Notify module owners (via metadata or review notes) when adjusting
module-template.h, initialization flows, or statistics surfaces consumed by plugins. - Cross-reference user docs in
doc/if behavior visible to operators changes (configuration syntax, stats counters, TLS requirements, etc.). - Leave
ChangeLogandNEWSedits to the maintainers; do not modify those files in routine patches.
Debugging tips
- Enable extra runtime logging with
export RSYSLOG_DEBUG="..."in tests (seetests/diag.sh) when chasing race conditions. - Use the testbench Valgrind helpers by running the corresponding
*-vg.shscripts to flush out memory and threading regressions.