rsyslog-test
Standardizes testing and validation for rsyslog using the diag.sh framework.
Install
mkdir -p .claude/skills/rsyslog-test && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2339" && unzip -o skill.zip -d .claude/skills/rsyslog-test && rm skill.zipInstalls to .claude/skills/rsyslog-test
About this skill
rsyslog_test
This skill provides guidelines and tools for running tests efficiently. It emphasizes direct test script execution to avoid the overhead and opacity of the full make check harness.
Quick Start
- Build First: Ensure the project is built (use
rsyslog_build). - Run Specific Test:
./tests/<test-name>.sh - Run with Valgrind:
./tests/<test-name>-vg.sh
Detailed Instructions
1. Direct Execution Rule
NEVER use make check during routine development. It is slow (runs 1000+ tests) and hides failure details.
- Rule: Run individual shell scripts directly from the
tests/directory. - Benefit: Immediate feedback and visible stdout/stderr.
2. Test Registration (tests/Makefile.am)
New tests MUST be registered using the "Define at Top, Distribute Unconditionally, Register Conditionally" pattern. This ensures make distcheck validity.
- Define Variable: Group your tests into a descriptive variable at the top of
tests/Makefile.am(before theif ENABLE_TESTBENCHblock).TESTS_MYMODULE = \ test1.sh \ test2.sh - Unconditional Distribution: Add it to
EXTRA_DISTimmediately after definition. NEVER add test scripts toEXTRA_DISTinside a conditional block.EXTRA_DIST += $(TESTS_MYMODULE) - Conditional Registration: Append the variable to the global
TESTSlist inside the appropriateif ENABLE_...block.if ENABLE_MYMODULE_TESTS TESTS += $(TESTS_MYMODULE) endif - Serialization: If tests must run in order, add
.logdependencies:test2.log: test1.log
3. Using diag.sh Helpers
All tests source tests/diag.sh. You should use its standardized helpers:
cmp_exact: Verify file content matches.require_plugin: Skip test if a module is not built.command_deny: Ensure a specific command fails.
4. Valgrind Testing
For memory leak and race condition detection:
- Use scripts ending in
-vg.sh. - These are wrappers that set
USE_VALGRIND=1and source the base test.
5. Debugging Failed Tests
If a test fails, you can inspect logs by:
- Enabling debug: Uncomment
RSYSLOG_DEBUGexports intests/diag.sh. - Disabling cleanup: Comment out
exit_testat the end of the script. - Output files: Look for
rstb_*.out.logandlog.
6. Integration Test Policy
Certain modules (Kafka, Elasticsearch, Journald) have heavy integration tests requiring external services.
- Policy: Skip these in restricted environments (like AI sandboxes) unless build-only validation is insufficient.
- Check module-specific
AGENTS.mdorMODULE_METADATA.yaml.
7. Memory Lifecycle Validation (Mental Audit)
Before committing C changes, agents SHOULD perform a self-audit of memory ownership and lifecycle.
- Rule: Run the
/auditworkflow. It orchestrates multiple specialized passes (Memory Guardian, Concurrency Architect) using the Canned Prompts. - Critical Patterns:
- NULL Checks:
es_str2cstr()can returnNULL. Every call MUST be followed by aNULLcheck. - Macro Usage: Prefer
CHKmalloc()for allocations as it automatically handles theNULLcheck and jumps tofinalize_it.
- NULL Checks:
- Focus: Pay special attention to
RS_RETerror paths,es_str2cstr()checks, andstrdupcalls.
8. Mock Smoke Check (Fast Distcheck)
Whenever you add or rename test scripts, you MUST run a fast distribution check to ensure all files are correctly registered and invocable in a VPATH build. This avoids breaking CI for distribution-related issues.
Command:
make distcheck TEST_RUN_TYPE=MOCK-OK -j$(nproc)
- Pattern: This uses the
MOCK-OKmode intests/diag.shto exit tests with success immediately, skipping the overhead of actual execution while still verifying shell script invocability and distribution completeness.
Related Skills
rsyslog_build: Required before running tests.rsyslog_module: Documentation on module-specific test dependencies.
More by rsyslog
View all skills by rsyslog →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversEnhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s
Supercharge browser tasks with Browser MCP—AI-driven, local browser automation for powerful, private testing. Inspired b
Mobile Next offers fast, seamless mobile automation for iOS and Android. Automate apps, extract data, and simplify mobil
Automate Excel file tasks without Microsoft Excel using openpyxl and xlsxwriter for formatting, formulas, charts, and ad
Connect Supabase projects to AI with Supabase MCP Server. Standardize LLM communication for secure, efficient developmen
Integrate with Gemini CLI for large-scale file analysis, secure code execution, and advanced context control using Googl
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.