diff options
| author | 2022-04-29 10:48:09 +0200 | |
|---|---|---|
| committer | 2022-04-29 10:48:09 +0200 | |
| commit | 07c5f6ec23fcf9237a24e71adcfacabce677f818 (patch) | |
| tree | 588e8c5f82b9163181fad3581f610e6f1d88cba4 /tests/fuzzer | |
| parent | a9153f1615a842cfb9e9bcda4d9071e202618569 (diff) | |
| download | OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.tar.gz OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.zip | |
Change file organization.
Diffstat (limited to 'tests/fuzzer')
| -rw-r--r-- | tests/fuzzer/CMakeLists.txt | 26 | ||||
| -rwxr-xr-x | tests/fuzzer/run_test.sh | 27 | ||||
| -rw-r--r-- | tests/fuzzer/testcase.cpp | 37 | ||||
| -rw-r--r-- | tests/fuzzer/testcase_dir/gooddata.txt | 45 |
4 files changed, 0 insertions, 135 deletions
diff --git a/tests/fuzzer/CMakeLists.txt b/tests/fuzzer/CMakeLists.txt deleted file mode 100644 index b93a1d3..0000000 --- a/tests/fuzzer/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -cmake_minimum_required(VERSION 3.16) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra") -set(CMAKE_AUTOMOC ON) - -find_package(Qt6Core REQUIRED) -find_package(Qt6Gui REQUIRED) -find_package(Qt6Svg REQUIRED) -find_package(Qt6Concurrent REQUIRED) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) - -#SET (CMAKE_EXE_LINKER_FLAGS "-static") - -add_definitions(-DPAINTER_OP) -set(MODE "cli") - - - -set(fdsource testcase.cpp) - -add_executable(fuzzTestCase ${fdsource} ) - - -target_link_libraries(fuzzTestCase libdiceparser.a Qt6::Core Qt6::Gui Qt6::Svg Qt6::Concurrent) -#target_link_libraries(fuzzTestCase ) diff --git a/tests/fuzzer/run_test.sh b/tests/fuzzer/run_test.sh deleted file mode 100755 index 9ecdeef..0000000 --- a/tests/fuzzer/run_test.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -rm -rf build -mkdir build -cd build -CC=afl-gcc CXX=afl-g++ cmake ../ -DSTATIC_BUILD=ON && make -#export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" - - -#./fuzzTestCase ../testcase_dir/gooddata.txt -# afl-fuzz -m 2G -i ../testcase_dir -o ../findings_dir ./fuzzTestCase @@ -afl-fuzz -m 2G -i ../testcase_dir -o ../sync_dir -M fuzzer01 ./fuzzTestCase @@ & -screen -S fuzz1 -d -m touch afl-fuzz -m 2G -i ../testcase_dir -o ../sync_dir -S fuzzer02 ./fuzzTestCase @@ & -screen -S fuzz2 -d -m touch afl-fuzz -m 2G -i ../testcase_dir -o ../sync_dir -S fuzzer03 ./fuzzTestCase @@ & -screen -S fuzz3 -d -m touch afl-fuzz -m 2G -i ../testcase_dir -o ../sync_dir -S fuzzer04 ./fuzzTestCase @@ & -screen -S fuzz4 -d -m touch afl-fuzz -m 2G -i ../testcase_dir -o ../sync_dir -S fuzzer05 ./fuzzTestCase @@ & -screen -S fuzz5 -d -m touch afl-fuzz -m 2G -i ../testcase_dir -o ../sync_dir -S fuzzer06 ./fuzzTestCase @@ - - - -# as root - -# echo core >/proc/sys/kernel/core_pattern - -# echo performance | tee cpu*/cpufreq/scaling_governor - -# echo ondemand | tee cpu*/cpufreq/scaling_governor diff --git a/tests/fuzzer/testcase.cpp b/tests/fuzzer/testcase.cpp deleted file mode 100644 index 87d1867..0000000 --- a/tests/fuzzer/testcase.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include <QCoreApplication> -#include <QDebug> -#include <QFile> -#include <diceparser.h> - -static DiceParser* parser= new DiceParser(); - -void runCommand(const QString& cmd) -{ - qDebug() << "cmd" << cmd; - if(parser->parseLine(cmd)) - { - parser->start(); - } -} - -int main(int argc, char** argv) -{ - // qDebug() << "first"; - QCoreApplication app(argc, argv); - - // qDebug() << "start"; - QFile file(app.arguments().at(1)); - // qDebug() << "file" << app.arguments().at(1); - if(!file.open(QIODevice::ReadOnly)) - return 1; - - auto line= file.readLine(); - while(!line.isEmpty()) - { - // qDebug() << line; - runCommand(QString::fromUtf8(line)); - line= file.readLine(); - } - - return 0; -} diff --git a/tests/fuzzer/testcase_dir/gooddata.txt b/tests/fuzzer/testcase_dir/gooddata.txt deleted file mode 100644 index d62c87e..0000000 --- a/tests/fuzzer/testcase_dir/gooddata.txt +++ /dev/null @@ -1,45 +0,0 @@ -1L[cheminée,chocolat,épée,arc,chute de pierre[40]] -10d10c[>=6]-@c[=1] -1+1D10 -1+(4*3)D10s -2+4/4 -2D10*2D20*8 -1D100a[>=95]a[>=96]a[>=97]a[>=98]a[>=99]e[>=100] -15D10e10c[8-10] -(4+4)^4 -(1d20+20)*7/10 -20*7/10 -2d6c[%2=0] -D25;D10 -8+8+8 -1D20-88 -100*1D20*2D6 -2D6 # comment -100/28*3 -help -la -10D10c[<2|>7] -10D6c[=2|=4|=6] -10D10e[=1|=10]k4 -1L[t,b,s,r,j,v,i,p[8-10]] -1d6e6;1d4e4mk1 -400D20/400000 -1d100e[>=95]i[<5]{-1d100e95} -1d100i[<70]{1d10i[=10]{1d100i[<70]{1d10e10}}} -5-5*5+5 -((3+4)*2)d6 -4d6i[=6]{+1d6} -10d[-8--1] -4d6e6i[=4]{-4} -4d6e6f[!=4] -5d10g10 -4d6p[4:blue] -10d[0-9] -1d8e8;1d6e6mk1+2 -3d100g5 -2d10k1+2d10k1+2d10k1 -(1)-1d6e6 -8d10o -[100,200,300]k2 -100;200;300;[$1,$2,$3]k2 -0-2;$1+$1;$2i:[<1]{1}{0} |