testing-debugging
Skill68 starsChanged 7 months agoApache-2.0View on GitHub
Testing and debugging for Zephyr RTOS. Covers the Ztest framework for unit and integration tests, the Twister test runner for automated HIL/SIM validation, and advanced tracing/debugging techniques (SystemView, Thread Analyzer, Stack analysis). Trigger when writing unit tests, setting up CI/CD pipelines, or analyzing system performance and latency.
In this repository21 other files it gives its agents.
- zephyr-agent-skillsSkill
- board-bringupSkill
- build-systemSkill
- connectivity-bleSkill
- connectivity-ipSkill
- connectivity-usb-canSkill
- devicetreeSkill
- hardware-ioSkill
- industrialSkill
- iot-protocolsSkill
- kernel-basicsSkill
- kernel-servicesSkill
- multicoreSkill
- native-simSkill
- power-performanceSkill
- security-updatesSkill
- specializedSkill
- storageSkill
- zephyr-foundationsSkill
- zephyr-indexSkill
- zephyr-moduleSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Ensure code quality and system reliability using Zephyr's comprehensive testing framework and observability tools.
- Distinctive: line 13
Write robust unit and integration tests for native simulation and real hardware.
- Distinctive: line 40
HIL Validation: Use hardware maps to consistently run critical hardware tests on real devices during every release cycle.
- Very specific: line 41
Stack Safety: Always enable CONFIG_STACK_SENTINEL and the Thread Analyzer during development to catch memory issues early.
- Very specific: line 44
[twister_smoke.py](scripts/twister_smoke.py): Run a small Twister suite and print result summary.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Zephyr Testing & Debugging
Ensure code quality and system reliability using Zephyr's comprehensive testing framework and observability tools.
Core Workflows
1. Ztest Framework
Write robust unit and integration tests for native simulation and real hardware.
- Reference: ztest_framework.md
- Key Tools:
ZTEST_SUITE,ZTEST,zassert_equal.
2. Twister Test Runner
Automate test execution across multiple platforms and generate professional reports.
- Reference: twister_testing.md
- Key Tools:
twisterscript,testcase.yaml, hardware mapping.
3. Tracing & Debugging
Analyze system behavior, timing, and memory usage with advanced tracing tools.
- Reference: tracing_debugging.md
- Key Tools:
CONFIG_TRACING, Segger SystemView, Thread Analyzer.
Quick Start (Ztest)
#include <zephyr/ztest.h>
ZTEST_SUITE(basic_test, NULL, NULL, NULL, NULL, NULL);
ZTEST(basic_test, test_pass) {
zassert_true(true, "Boolean evaluation failed");
}Professional Patterns (Reliability)
- Continuous Integration: Integrate Twister reports (
twister.json) into CI/CD pipelines for automated regression testing. - HIL Validation: Use hardware maps to consistently run critical hardware tests on real devices during every release cycle.
- Stack Safety: Always enable
CONFIG_STACK_SENTINELand the Thread Analyzer during development to catch memory issues early.
Automation Tools
- twister_smoke.py: Run a small Twister suite and print result summary.
Examples & Templates
- testcase.yaml.template: Starter testcase metadata for Twister.
Validation Checklist
twisterexecutes selected test suites with no unexpected failures.- At least one
ZTESTsuite runs in simulation and reports pass/fail correctly. - Tracing or thread-analyzer output is captured and reviewed for hotspots.
- CI artifacts include machine-readable reports (for example
twister.json).
Resources
- References:
ztest_framework.md: Writing tests with expectations and suites.twister_testing.md: Using the test runner and metadata.tracing_debugging.md: Tracing, stack analysis, and debugging backends.
- Scripts:
twister_smoke.py: Lightweight Twister runner with summary output.
- Assets:
testcase.yaml.template: Reusable testcase metadata template.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

