mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-10-07 02:43:23 +00:00
404912f068
* resolve conflict for loongarch and RISCV in Mapping.c and Mapping.h * Use RISCV_get_detail for simplicity Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com> * Use detail_is_set for simplicity Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com> * Change comment style Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com> * remove redundant add_str * fix bug for RISCV_add_detail * fix operands for csr instructions * add python binding and tester for RISC-V * add more test cases for RISC-V (M,A,F,D,C instructions) * fix incorrect operand and access for sc.w and sc.d * fix incorrect operand for fence and sfence.vma * assert -> CS_ASSERT * some instructions in test_riscv.c should be RISCV64 * add cs details test * update python testers --------- Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com> |
||
---|---|---|
.. | ||
include | ||
src | ||
build_cstest.sh | ||
cstest_report.py | ||
issues.cs | ||
Makefile | ||
README.md |
Regression testing
This directory contains a tool for regression testing core of Capstone
Dependency
- MacOS users can install cmocka with:
brew install cmocka
-
Or download & build from source code Cmocka
-
Build Cmocka
Build
You can build cstest
with cmake
when building Capstone. Just pass the CAPSTONE_BUILD_CSTEST
flag
during configuration.
Alternatively you can use the build_cstest.sh
file in this directory.
Usage
-
Usage:
cstest [-e] [-f <file_name.cs>] [-d <directory>]
-e
: test all commented test
-
Test for all closed issues
cd suite/cstest
./build/cstest -f ./issues.cs
- Test for some input from LLVM
cd suite/cstest
./build/cstest -f ../MC/AArch64/basic-a64-instructions.s.cs
- Test for all cs file in a folder
cd suite/cstest
./build/cstest -d ../MC
- Test all
cd suite/cstest
make cstest
Report tool
-
Usage
cstest_report.py [-Dc] -t <cstest_path> [-f <file_name.cs>] [-d <directory>]
-D
: print details-c
: auto comment out failed test
-
Example:
./cstest_report.py -t build/cstest -d ../MC/PowerPC/
./cstest_report.py -t build/cstest -f issues.cs