diff --git a/cicd_testing/afl-zafl.sh b/cicd_testing/afl-zafl.sh index 47af0a3472a069cd501865ae00db1bccca6d802c..7786ff3328fae939d823490da6811eea3b584b46 100755 --- a/cicd_testing/afl-zafl.sh +++ b/cicd_testing/afl-zafl.sh @@ -8,24 +8,24 @@ source set_env_vars # Test with afl echo "Setup afl - ZAFL_HOME=$ZAFL_HOME " -$ZAFL_HOME/zfuzz/util/setup-afl.sh -sudo $ZAFL_HOME/zfuzz/util/afl_setup_core_pattern.sh +$ZAFL_HOME/util/setup-afl.sh +sudo $ZAFL_HOME/util/afl_setup_core_pattern.sh echo "Test various zafl configurations" -$ZAFL_HOME/zfuzz/test/strings/test_strings.sh -$ZAFL_HOME/zfuzz/test/bc/test_bc.sh -$ZAFL_HOME/zfuzz/test/od/test_od.sh +$ZAFL_HOME/test/strings/test_strings.sh +$ZAFL_HOME//test/bc/test_bc.sh +$ZAFL_HOME//test/od/test_od.sh echo "Test graph optimizations" -$ZAFL_HOME//tools/zax/test/test_graph.sh -$ZAFL_HOME//tools/zax/test/test_context.sh -$ZAFL_HOME//tools/zax/test/test_context_recursion.sh +$ZAFL_HOME/tools/zax/test/test_graph.sh +$ZAFL_HOME/tools/zax/test/test_context.sh +$ZAFL_HOME/tools/zax/test/test_context_recursion.sh echo "Test zafl with ZAFL_TRACE_MAP_FIXED_ADDRESS=0x10000" export ZAFL_TRACE_MAP_FIXED_ADDRESS=0x10000 -$ZAFL_HOME/zfuzz/test/bc.fixed_map/test_bc.sh -$ZAFL_HOME/zfuzz/test/sha256sum/test_sha256sum.sh +$ZAFL_HOME/test/bc.fixed_map/test_bc.sh +$ZAFL_HOME/test/sha256sum/test_sha256sum.sh echo "Test zuntracer configurations" -$ZAFL_HOME/zfuzz/test/ls.zuntracer/test_ls.sh +$ZAFL_HOME/test/ls.zuntracer/test_ls.sh diff --git a/cicd_testing/installer.sh b/cicd_testing/installer.sh index d39b722cda71e1b4b664b91196e22258ed02ca2e..318c88cd4fca35332d45842e3846b7a36f418f98 100755 --- a/cicd_testing/installer.sh +++ b/cicd_testing/installer.sh @@ -17,7 +17,7 @@ log_error() sanity_check_bc() { - $ZAFL_HOME/zfuzz/bin/zafl.sh $(which bc) bc.zafl + $ZAFL_HOME/bin/zafl.sh $(which bc) bc.zafl if [ ! $? -eq 0 ]; then log_error "something went wrong trying to transform a binary with zafl instrumentation" fi diff --git a/cicd_testing/run_zafl.sh b/cicd_testing/run_zafl.sh index 84eaa48bf56676e6b52cc1665ed625a3ea4457ae..ce3624bce7fcfd7b7f67c14690795be8d5cb4f28 100755 --- a/cicd_testing/run_zafl.sh +++ b/cicd_testing/run_zafl.sh @@ -7,7 +7,7 @@ main() cd /zafl source ./set_env_vars cd /tmp - /zafl/zfuzz/bin/zafl.sh "$@" + /zafl/bin/zafl.sh "$@" res=$? if [[ $res != 0 ]]; then diff --git a/release/README.txt b/release/README.txt deleted file mode 100644 index 014c3b848b7f827a22be1c1e56db625f1a823043..0000000000000000000000000000000000000000 --- a/release/README.txt +++ /dev/null @@ -1,73 +0,0 @@ -ZAFL installation - -============================ -=== ZAFL -============================ - -1. Install the tarball locally on your machine - - tar -xzvf zafl_install.tgz - -2. Set the proper environment variables. To use any Zipr-based tools, you will -need these environment variables to be set. - - cd zafl_install - . set_env_vars - -3. You will need to have sudo priviledges (please don't run as root) - -4. Make sure the postgres DB is running and that you have an account - - cd $ZAFL_HOME/zipr_umbrella - ./postgres_setup.sh - -============================ -=== Zafl binary fuzzing === -============================ - -1. Again make sure the proper environment variables are set - - cd zafl_install - . set_env_vars - -2. Test Zafl instrumentation - - pushd /tmp - - zafl.sh `which bc` bc.zafl - ldd bc.zafl - # you should see lizafl.so as a dependence - - ZAFL_DEBUG=1 ./bc.zafl - # you should see output of the form (this is normal) - Error getting shm environment variable - fake allocate AFL trace map - - # at this point, you should be able to use bc normally - at the bc promt, enter: 2+3 - the answer should be: 5 - - popd - -3. Download and install your own version of American Fuzzy Lop (afl) - - Be sure to set the environment variable AFL_PATH to point to your afl installation directory - - After installing, type: - afl-fuzz - - You should see the usage instructions for afl-fuzz - -4. Test with bc.zafl created in step 2 - - pushd /tmp - - mkdir input_seeds - echo "1" > input_seeds/seed.1 - - afl-fuzz -i input_seeds -o afl_output -- ./bc.zafl - - # afl should now be fuzzing bc.zafl - - popd - - diff --git a/release/generate_release.sh b/release/generate_release.sh deleted file mode 100755 index 5caeecef683862e5d17c4913717f1a292e2cf02f..0000000000000000000000000000000000000000 --- a/release/generate_release.sh +++ /dev/null @@ -1,58 +0,0 @@ -#/bin/bash - -# use absolute paths -releasedir=$(dirname $(readlink -f $0)) -zaflinstalldir=$releasedir/zafl_install -zestruntimeinstalldir=$releasedir/zafl_install/zest_runtime - -pre_cleanup() -{ - pushd $releasedir - rm *.tgz >/dev/null 2>&1 - rm -fr $zaflinstalldir >/dev/null 2>&1 - popd -} - -post_cleanup() -{ - pushd $releasedir - rm -fr $zaflinstalldir >/dev/null 2>&1 - popd -} - -main() -{ - # create local copy of install dir - pre_cleanup - mkdir $zaflinstalldir - - # regen install for zipr umbrella - cd $PEASOUP_UMBRELLA_DIR - echo "Reinstalling just the right parts." - ./regen_install.sh ps zipr stars >/dev/null - echo "Adding zipr sub-component" - cp -r $ZAFL_HOME/install/zipr_umbrella $zaflinstalldir - $PEDI_HOME/pedi -c -m manifest.txt > /dev/null - - echo "Adding installation README.txt" - cp $releasedir/README.txt $zaflinstalldir - - echo "Adding zest/zafl runtime libraries" - mkdir -p $zestruntimeinstalldir/lib - cd $zestruntimeinstalldir/lib - cp $PEASOUP_UMBRELLA_DIR/zest_runtime/lib64/*.so . - - cd $releasedir - echo "Adding zfuzz sub-component" - cp -r $ZAFL_HOME/install/zfuzz $zaflinstalldir - cp -r $ZAFL_HOME/install/set_env_vars $zaflinstalldir - echo "Creating installation archive" - tar czf zafl_install.tgz zafl_install - - echo "Cleaning up" - post_cleanup - - echo "Complete: release tarball ready" -} - -main "$@" diff --git a/zfuzz/test/bc.fixed_map/test_bc.sh b/test/bc.fixed_map/test_bc.sh similarity index 100% rename from zfuzz/test/bc.fixed_map/test_bc.sh rename to test/bc.fixed_map/test_bc.sh diff --git a/zfuzz/test/bc/test_bc.sh b/test/bc/test_bc.sh similarity index 100% rename from zfuzz/test/bc/test_bc.sh rename to test/bc/test_bc.sh diff --git a/zfuzz/test/bench/binutils.spec b/test/bench/binutils.spec similarity index 100% rename from zfuzz/test/bench/binutils.spec rename to test/bench/binutils.spec diff --git a/zfuzz/test/bench/build_aflgcc.sh b/test/bench/build_aflgcc.sh similarity index 100% rename from zfuzz/test/bench/build_aflgcc.sh rename to test/bench/build_aflgcc.sh diff --git a/zfuzz/test/bench/build_dyninst.sh b/test/bench/build_dyninst.sh similarity index 100% rename from zfuzz/test/bench/build_dyninst.sh rename to test/bench/build_dyninst.sh diff --git a/zfuzz/test/bench/build_qemu.sh b/test/bench/build_qemu.sh similarity index 100% rename from zfuzz/test/bench/build_qemu.sh rename to test/bench/build_qemu.sh diff --git a/zfuzz/test/bench/build_zafl.sh b/test/bench/build_zafl.sh similarity index 100% rename from zfuzz/test/bench/build_zafl.sh rename to test/bench/build_zafl.sh diff --git a/zfuzz/test/bench/download.sh b/test/bench/download.sh similarity index 100% rename from zfuzz/test/bench/download.sh rename to test/bench/download.sh diff --git a/zfuzz/test/bench/run-all.sh b/test/bench/run-all.sh similarity index 100% rename from zfuzz/test/bench/run-all.sh rename to test/bench/run-all.sh diff --git a/zfuzz/test/bench/run-zafl-all.sh b/test/bench/run-zafl-all.sh similarity index 100% rename from zfuzz/test/bench/run-zafl-all.sh rename to test/bench/run-zafl-all.sh diff --git a/zfuzz/test/bench/setup_afl.sh b/test/bench/setup_afl.sh similarity index 100% rename from zfuzz/test/bench/setup_afl.sh rename to test/bench/setup_afl.sh diff --git a/zfuzz/test/bench/setup_aflgcc.sh b/test/bench/setup_aflgcc.sh similarity index 100% rename from zfuzz/test/bench/setup_aflgcc.sh rename to test/bench/setup_aflgcc.sh diff --git a/zfuzz/test/bench/setup_binutils.sh b/test/bench/setup_binutils.sh similarity index 100% rename from zfuzz/test/bench/setup_binutils.sh rename to test/bench/setup_binutils.sh diff --git a/zfuzz/test/gzip/test_gzip.sh b/test/gzip/test_gzip.sh similarity index 100% rename from zfuzz/test/gzip/test_gzip.sh rename to test/gzip/test_gzip.sh diff --git a/zfuzz/test/ls.zuntracer/test_ls.sh b/test/ls.zuntracer/test_ls.sh similarity index 100% rename from zfuzz/test/ls.zuntracer/test_ls.sh rename to test/ls.zuntracer/test_ls.sh diff --git a/zfuzz/test/od/test_od.sh b/test/od/test_od.sh similarity index 100% rename from zfuzz/test/od/test_od.sh rename to test/od/test_od.sh diff --git a/zfuzz/test/sha256sum/test_sha256sum.sh b/test/sha256sum/test_sha256sum.sh similarity index 100% rename from zfuzz/test/sha256sum/test_sha256sum.sh rename to test/sha256sum/test_sha256sum.sh diff --git a/zfuzz/test/spec2006/test_spec.sh b/test/spec2006/test_spec.sh similarity index 100% rename from zfuzz/test/spec2006/test_spec.sh rename to test/spec2006/test_spec.sh diff --git a/zfuzz/test/spec2017/test_spec17.sh b/test/spec2017/test_spec17.sh similarity index 100% rename from zfuzz/test/spec2017/test_spec17.sh rename to test/spec2017/test_spec17.sh diff --git a/zfuzz/test/strings/test_strings.sh b/test/strings/test_strings.sh similarity index 100% rename from zfuzz/test/strings/test_strings.sh rename to test/strings/test_strings.sh diff --git a/zfuzz/util/afl_setup_core_pattern.sh b/util/afl_setup_core_pattern.sh similarity index 100% rename from zfuzz/util/afl_setup_core_pattern.sh rename to util/afl_setup_core_pattern.sh diff --git a/zfuzz/util/setup-afl.sh b/util/setup-afl.sh similarity index 100% rename from zfuzz/util/setup-afl.sh rename to util/setup-afl.sh