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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00078 $0.01554
Opus 5 $0.00039 $0.00777
Sonnet 5 $0.00016 $0.00311
Haiku 4.5 $0.00008 $0.00155

Measured yesterday against content hash 37babc4a8c3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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. yesterday 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 (194 stars, last pushed 2mo ago), licensed MIT. It adds 78 tokens to every session and 1,554 once invoked, about $0.0004 per session on Opus 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

run-helix-tests

Submit and monitor .NET MAUI unit tests on Helix infrastructure. Supports running XAML, Resizetizer, Core, Essentials, and other unit test projects on distributed Helix queues.

dotnet/maui · 45 tokens

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

product-description-generator

E-commerce product description generator for any platform. Generates optimized titles, bullet points, descriptions, and backend keywords using competitor research + keyword scoring + FABE copywriting. Two modes: (A) Create — generate listing from product specs with optional competitor analysis, (B) Optimize — improve…

nexscope-ai/eCommerce-Skills · 126 tokens