Giter Club home page Giter Club logo

test-suite's Introduction

How to use Test-Suite

Test-Suite is a micro-benchmark suite designed for validating various static analysis algorithms (particularly pointer analyses and static bug checkers) developed in SVF. It includes around 400 hand-written programs and code snippets. Test-Suite provides flexible and extendable interfaces for users to add their own tests for validating the correctness of different static analyses.

Download SVF and execute the following commandline under SVF's root directory. build.sh will build SVF and run SVF's analyses against the test cases if Test-suite folder is present.

git clone https://github.com/SVF-tools/SVF.git
cd SVF
git clone https://github.com/SVF-tools/Test-Suite
source ./build.sh
ctest

The following gives the Test-Suite's folders and the corresponding SVF's options for validation.

Folder SVF option Description
basic_c_tests wpa -ander -stat=false basic test cases for C programs (flow-insensitive and field-sensitive analysis)
basic_cpp_tests wpa -ander -stat=false basic test cases for C++ programs (flow-insensitive and field-sensitive analysis)
fs_tests wpa -fspta -stat=false flow-sensitive tests
cs_tests dvf -cxt -print-pts=false -stat=false context-sensitive tests
path_tests path-sensitive tests
complex_tests wpa -ander -stat=false complex test cases simplified from real programs
mta multithreaded test cases
mem_leak saber -leak -valid-tests -mempar=inter-disjoint -stat=false memory leak test cases
double_free saber -dfree -valid-tests -stat=false double free test cases

Scripts

Travis CI is used to build all the test cases, It uses ./generate_bc.sh to do so and then pushes the compiled test cases into master branch.

All tests are specified in CMakeLists.txt file. The CMakeLists.txt file uses foreach loops to specify tests in bulk. To add new tests append a command and specified folder into the respective commands list and folders list in CMakeLists.txt An example of a test:

add_test(
  NAME basic_c_tests/CI-funptr.c
  COMMAND wpa -ander -stat=false ${CMAKE_CURRENT_SOURCE_DIR}/test_cases_bc/basic_c_tests/CI-funptr.c.bc
  WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/${CMAKE_BUILD_TYPE}-build/bin
)

For differential testing of two options a C++ script diff_tests.cpp is used. This script will run each option, compare the results and output. If the output is 0 then the test passed.

test-suite's People

Contributors

bitcalc avatar colindelotavo avatar guanqin-123 avatar j03d03 avatar jasonzhongzexin avatar jeffjma avatar jiawei-95 avatar jumormt avatar kisslune avatar lukekoko avatar martinnowack avatar mbarbar avatar shrep16 avatar shuangxiangkan avatar svf-tools avatar talbenxu avatar unsw-corg avatar wren71 avatar xudon9 avatar yuleisui avatar zh-lee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.