From 721c02cd2c4a439db0acd5f19d853dd7ec118bbb Mon Sep 17 00:00:00 2001 From: "Dongjia \"toka\" Zhang" Date: Thu, 4 May 2023 20:03:06 +0200 Subject: [PATCH] Revert "Add a CI task that checks performance regression (#1248)" (#1254) This reverts commit 6929c89b861faa4f382a51ab07e3ee1eb727df8c. --- .github/workflows/build_and_test.yml | 23 ------------ scripts/executions-check.sh | 53 ---------------------------- 2 files changed, 76 deletions(-) delete mode 100755 scripts/executions-check.sh diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f8a2fc882d..e3b8011974 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -225,29 +225,6 @@ jobs: if: runner.os == 'macOS' # use bash v4 run: /usr/local/bin/bash -c 'RUN_ON_CI=1 ./scripts/test_all_fuzzers.sh' - executions-check: - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - - uses: lyricwulf/abc@v1 - with: - linux: llvm llvm-dev clang - macos: llvm bash wget coreutils - - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - - name: Build and run libfuzzer_libpng (Linux) - if: runner.os == 'Linux' - run: ./scripts/executions-check.sh - - name: Build and run libfuzzer_libpng (macOS) - if: runner.os == 'macOS' - run: /usr/local/bin/bash -c './scripts/executions-check.sh' - nostd-build: runs-on: ubuntu-latest steps: diff --git a/scripts/executions-check.sh b/scripts/executions-check.sh deleted file mode 100755 index 20791c3221..0000000000 --- a/scripts/executions-check.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -install_libpng() { - cd ./fuzzers/libfuzzer_libpng && wget https://deac-fra.dl.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.xz - tar -xvf libpng-1.6.37.tar.xz || echo "Failed to download libpng" - cd libpng-1.6.37 && ./configure --enable-shared=no --with-pic=yes --enable-hardware-optimizations=yes && cd .. -} - -build_libpng(){ - cargo build --release || echo "ERROR: Failed to build libfuzzer_libpng" - - cd libpng-1.6.37 && make CC="$(pwd)/../target/release/libafl_cc" CXX="$(pwd)/../target/release/ libafl_cxx" -j "$(nproc)" && cd .. -} - -git_checkout(){ - git reset --hard HEAD~1 -} - -build_run_fuzzer(){ - ./target/release/libafl_cxx ./harness.cc libpng-1.6.37/.libs/libpng16.a -I libpng-1.6.37/ -o fuzzer_libpng -lz -lm || echo "ERROR: Failed to build the fuzzer" - - ./fuzzer_libpng > log.txt & - timeout 5m ./fuzzer_libpng >/dev/null 2>&1 & - - while true; do - if grep -q "Broker" log.txt ; then - pkill --signal SIGKILL "fuzzer_libpng" - executions=$(grep -m 1 "Broker" log.txt | awk '{print $14}') - rm -rf ./libafl_unix_shmem_server - echo "${executions%,}" - break - fi - done -} - -main(){ - install_libpng - - build_libpng - new_executions=$(build_run_fuzzer) - - git_checkout - - build_libpng - last_executions=$(build_run_fuzzer) - - echo "the execution count of the new fuzzer is $new_executions" - echo "the execution count of the last fuzzer is $last_executions" -} - -main - - -