Categorygithub.com/chaos-mesh/matrix
module
0.0.0-20200722134539-1f7f58a03409
Repository: https://github.com/chaos-mesh/matrix.git
Documentation: pkg.go.dev

# README

Matrix

Matrix is a config fuzzer, i.e. generate a set of configurations for a program that need to be fuzzed.

Quickstart

$ make
$ bin/matrix -c examples/matrix-tidb-tikv-pd.yaml
# this will generate three TiDB-related configs in current folder
# including `tidb.yaml`, `tikv.yaml`, `pd.yaml`, `mysql-system-vars.sql` and `tidb-system-vars.sql`

Output folder can be configured with -d <output folder>

Usage

$ ./bin/matrix -h          
Usage of ./bin/matrix:
  -c string
        config file
  -d string
        output folder (default ".")
  -s int
        seed of rand (default UTC nanoseconds of now)

Matrix reads one config file contains generation rules, generate values based on those rules, then dump values with serializer.

Matrix Configuration

Matrix use DSL in yaml format to describe the configurations need to be fuzzed. See DSL for detailed information.

Type of configs Matrix support to generate

With different serializer, Matrix supports to generate various kinds of configurations, refer to serializer for detailed usage.

Currently supported format:

  • toml
  • yaml
  • line-based generation

TODO

Parser

  • Better unit conversion

Serializer

  • toml serializer
  • yaml serializer
  • SQL serializer
  • Command line argument serializer

Generator

  • List generation
  • Instructive information (e.g. default value)
  • Simple recursive random generator
  • Non-recursive generator that supports dependency

Random

  • Random generate value
  • Specific random seed to have same output with same seed, to support continuous testing

# Packages

No description provided by the author
No description provided by the author
No description provided by the author