ohos-test-fuzz-generation

Generate LLVM libFuzzer FUZZ tests for C/C++ APIs with corpus seeds.

31|6|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill ohos-test-fuzz-generation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ohos-test-fuzz-generation
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/ohos-test-fuzz-generation
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill ohos-test-fuzz-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tools/fuzz_generator.py, tools/fuzz_check.py, tools/seed_generator.py, tools/generate_report.py.

What problem does it solve?

This Skill helps you automatically generate LLVM libFuzzer-based FUZZ test cases for C/C++ APIs, then enforces a strict security and safety-focused review so your fuzzing effort is valid, effective, and compliant.

Core Features & Use Cases

  • FUZZ Test Generation Pipeline: analyzes target class APIs, generates a standardized fuzz project (fuzzer skeleton + driver + corpus scaffolding), and fills in parameter construction logic.
  • Semantic Corpus (seed) Generation: produces meaningful initial corpus data based on parameter types and naming patterns to improve fuzz efficiency.
  • 26-Rule Security & Compliance Review with Reports: runs a set of automated checks (including complex parameter construction, IPC stub handling, size/data misuse, and fuzz-driver safety) and can guide automatic fixes for supported rules.
  • OpenHarmony / Linux / Android Compatibility: designed to work with OpenHarmony build ecosystems and common LLVM libFuzzer setups.

Quick Start

Use the skill to generate FUZZ tests for your target class by providing its header path and class name, then generate seeds and a compliance report in one workflow.

Frequently Asked Questions about ohos-test-fuzz-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate libFuzzer fuzz tests for C++ APIs automatically?

You can generate libFuzzer fuzz tests for C++ APIs by providing the target header path and class name. The tool analyzes class methods, creates a fuzz driver skeleton, and constructs parameter logic to produce a standardized fuzz project.

How does semantic corpus seed generation improve fuzz testing efficiency?

Semantic corpus seed generation improves fuzz testing by producing meaningful initial corpus data based on parameter types and naming patterns. This targeted approach helps the fuzzer discover valid code paths faster than using empty or random inputs.

Can I use this fuzz testing tool for OpenHarmony and Android build environments?

Yes, this fuzz testing tool supports OpenHarmony, Linux, and Android build environments. It is designed to integrate with OpenHarmony build ecosystems and common LLVM libFuzzer setups for automated test case generation.

What security checks are performed during fuzz driver compliance review?

The fuzz driver compliance review runs a 26-rule security check covering complex parameter construction, IPC stub handling, size/data misuse, and safe data handling. It generates a compliance report and can guide automatic fixes for supported rules.

How do I fix IPC stub testing errors in my generated fuzz driver?

To fix IPC stub testing errors in your generated fuzz driver, run the automated security check tool. It identifies IPC stub handling issues and size/data misuse, then guides automatic fixes to satisfy the fuzz-driver safety rules.

What is the best way to prepare corpus seeds for C++ fuzz testing?

The best way to prepare corpus seeds for C++ fuzz testing is using automated semantic generation. The tool analyzes parameter types and naming patterns to construct meaningful initial corpus data, which improves fuzz efficiency over manual seed creation.