kernel-testing

kernel-testing is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 78 tokens per session (1,554 once invoked), scanned B, original, MIT.

A guide to testing Linux kernel code with tools such as KUnit, kselftest, syzkaller, and the Linux Test Project. These cover focused in-kernel tests, broader self-tests, automated fuzzing, and system-call compatibility checks.

In plain words
What is it for?
Writing kernel unit tests, adding self-tests, fuzzing system calls and ioctl interfaces, measuring kernel coverage, and connecting tests to continuous integration.
Why use it?
It helps catch kernel regressions, unsafe inputs, and compatibility problems before changes reach real systems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./tools/testing/kunit/kunit.py run.

Good fit Writing kernel unit tests, adding self-tests, fuzzing system calls and ioctl interfaces, measuring kernel coverage, and connecting tests to continuous integration.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills
agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/kernel-testing

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kernel-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/kernel-testing/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/kernel-testing)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/kernel-testing"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/kernel-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kernel-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/kernel-testing"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/kernel-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,554 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.01554
Opus 5.5 $0.00031 $0.00622
Sonnet 5.5 $0.00016 $0.00311
Haiku 4.5 $0.00008 $0.00155

Measured 1mo ago against content hash 37babc4a8c3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

kernel-testing scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| LTP massive failures | Wrong environment | Run as root; check prerequisites in README |
skills/kernel/kernel-testing/SKILL.md · 239 lines

How it starts

The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kernel Testing

Purpose

Guide agents through testing the Linux kernel: KUnit in-kernel unit tests, the kselftest harness, syzkaller fuzzing with kcov coverage, Linux Test Project (LTP) syscall regression, and KernelCI integration for continuous testing.

When to Use

  • Writing unit tests for kernel library code or driver helpers
  • Adding regression tests to tools/testing/selftests/
  • Fuzzing syscalls and ioctl interfaces with syzkaller
  • Measuring kernel code coverage with kcov
  • Running LTP for syscall compatibility validation
  • Setting up CI for kernel patches

Workflow

1. KUnit — in-kernel unit tests

// test_example.c
#include <kunit/test.h>

static void example_test(struct kunit *test)
{
    KUNIT_EXPECT_EQ(test, 1 + 1, 2);
    KUNIT_ASSERT_NOT_ERR_OR_NULL(test, kmalloc(16, GFP_KERNEL));
}

static struct kunit_case example_test_cases[] = {
    KUNIT_CASE(example_test),
    {}
};

static struct kunit_suite example_suite = {
    .name = "example",
    .test_cases = example_test_cases,
};
kunit_test_suite(example_suite);

MODULE_LICENSE("GPL");
# Makefile
obj-$(CONFIG_KUNIT) += test_example.o
# Run KUnit (in-tree)
./tools/testing/kunit/kunit.py run

# Run specific test
./tools/testing/kunit/kunit.py run --filter example

# With cross-compilation
./tools/testing/kunit/kunit.py run --cross_compile aarch64-linux-gnu- \
    --arch arm64

KUnit runs in kernel context (UMH or dedicated kunit kernel). Use kunit_kmalloc for test allocations.

2. kselftest harness

# Build all selftests
cd tools/testing/selftests
make -j$(nproc)

# Run all
make run_tests

# Run specific test
./memfd/memfd_test
./mount/run_unprivileged_remount.sh

Adding a new selftest:

tools/testing/selftests/mytest/
├── Makefile
├── mytest.c
└── config        # optional kconfig requirements
# tools/testing/selftests/mytest/Makefile
CFLAGS += -Wall
TEST_GEN_FILES := mytest
TEST_PROGS := mytest

include ../lib.mk

Read the full file on GitHub · 239 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 239 lines · 78 tokens per session scan B 37babc4a8c3a

Subscribe to this mod's changes

kernel-testing is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (263 stars, last pushed 3mo ago), licensed MIT. It adds 78 tokens to every session and 1,554 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

test-commander

Generate unit, integration, E2E, and visual regression tests following the Testing Trophy methodology (80% integration). Covers Vitest/Jest, Testing Library, Playwright, MSW for API mocking, snapshot strategy, visual regression (Chromatic/Percy/Playwright), test factories with Faker, and CI sharding. Use when user…

EliasOulkadi/shokunin · 117 tokens

testing

Two pieces: okapi's test server / test context, and the okapitest package's fluent request builder and assertions.

jkaninda/okapi-skills · 0 tokens

test-writer

Generate or extend comprehensive test suites — unit, integration, E2E, and contract tests — for any language or framework. Use when the user asks to write tests, add coverage, test a specific function or module, set up a test framework, generate test cases from code, or validate behaviour with automated tests.

CODE-SAURABH/OpenSkills · 67 tokens

migrate-xunit-to-xunit-v3

Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…

dotnet/skills · 149 tokens

dart-test

DART Test: unit tests, integration tests, CI validation, and debugging.

dartsim/dart · 18 tokens

principle-test-behavior-not-implementation

Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.

michael-denyer/pstack-claude · 50 tokens