tidb-failpoint-test-runner

Determines failpoint enablement requirements before running TiDB package tests.

40.5k|6.2k|Updated Sep 6, 2015
One-click install
npx skills add https://github.com/pingcap/tidb --skill tidb-failpoint-test-runner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidb-failpoint-test-runner
Source: https://github.com/pingcap/tidb/tree/main/.agents/skills/tidb-failpoint-test-runner
Command: npx skills add https://github.com/pingcap/tidb --skill tidb-failpoint-test-runner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Running TiDB package tests under pkg/... without the correct failpoint setup leads to misleading results, since the -tags=intest,deadlock build flags do not enable failpoints. This Skill guides the decision of whether failpoint enable/disable commands are required before and after a test run.

Core Features & Use Cases

  • Failpoint Decision Workflow: Consults docs/agents/testing-flow.md to decide whether a package requires failpoint enablement before testing.
  • Correct Command Selection: Chooses between the failpoint-enabled run command set and the standard unit test command set based on the package's characteristics.
  • Targeted Test Execution: Keeps runs focused with -run <TestName> and supports Bazel-specific variants.
  • Use Case: A developer modifying a package under pkg/ uses this Skill to determine the package needs failpoints, enables them, runs the targeted test, disables failpoints afterward, and records the decision evidence in the final report.

Quick Start

Check whether my TiDB package test needs failpoint enablement and run the correct test command for it.

Frequently Asked Questions about tidb-failpoint-test-runner

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

FAQPage Schema
How do I run TiDB package tests with failpoints enabled?

First consult docs/agents/testing-flow.md under 'Failpoint decision for unit tests' to confirm the package needs failpoints, then run the failpoint-enabled command set which enables failpoints before the test and disables them afterward.

Do the intest and deadlock build tags enable failpoints in TiDB tests?

No, the -tags=intest,deadlock build flags do not enable failpoints. Failpoints must be explicitly enabled and disabled around the test command when the package requires them.

How do I run a single TiDB unit test?

Keep the run targeted by passing -run <TestName> with the appropriate test command. For Bazel-specific variants, follow the Bazel notes in the failpoint-enabled run section of docs/agents/testing-flow.md.

When should I skip failpoint enablement for TiDB tests?

Skip failpoint enablement when the package does not match the failpoint checks defined in docs/agents/testing-flow.md. In that case, use the standard unit tests command set for pkg/ packages directly.

What should I record after running TiDB failpoint tests?

Record the decision evidence showing why failpoints were or were not needed, along with the exact test command executed, in the final report.