Skip to content
/ mkcheck Public
forked from nandor/mkcheck

Incremental Build Verification

License

Notifications You must be signed in to change notification settings

echoix/mkcheck

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mkcheck

Incremental Build Verification

Supported Platforms

Due to use of the ptrace system call, mkcheck only supports Linux-based operating systems at this time. Python 2 is required for fuzz testing. mkcheck only compiles with clang at this time.

Building

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++
make

Running tests

make -C tests/make test
make -C tests/parallel test

Dependency Graph Inference

The dependency graph inference tool runs a child process under ptrace and dumps information about all files and processes involved in a build to a database file, specified using the --output flag. The file is in JSON format and is read by the fuzz testing tool. More information about the format is available in tools/fuzz_test/graph.py.

mkcheck --output=<path-to-graph> -- <build command>

Build Fuzzing

Fuzz testing is performed using a Python script, executed out of the directory of the project under test. The dependency graph must be inferred beforehand and stored at a path accesible to the fuzzing tool. <path-to-fuzz_test> must point to the tools/fuzz_test directory of the project.

cd <project-dir>
python <path-to-fuzz_test> --graph-path=<path-to-graph> fuzz|list|query|build|race

Other options to the fuzzing script are:

  • --rule-path specifies the path to a YAML file containing regexes to filter out files. The document should be a map from the keys "filter_in", "filter_out", "filter_tmp" to lists of regexes which blacklist irrelevant inputs, outputs and files considered for race testing.
  • --use-hash forces the use of content hashing.
  • --argv specifies additional arguments to GNU Make projects.

The fuzzing script supports the following commands:

  • fuzz perform fuzz testing on the project. If only a few files are to be tested, their paths can be passed as optional arguments. If no files are specified, all unfiltered files are considered.
  • list list the files which are considered by default
  • query query the dependencies of a file from the graph
  • build run a build and generate the graph, overwriting it
  • race perform race testing

License

The source code of this project is available under the MIT License.

About

Incremental Build Verification

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 70.5%
  • Python 24.4%
  • C 2.3%
  • Makefile 2.2%
  • CMake 0.6%