diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 975d289d6d..5bc031ce36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: # name: [linux-acr-gcc-tests, linux-acr-clang-build, linux-acr-clang-tests, linux-meson-gcc-build, linux-meson-gcc-tests, linux-meson-gcc-newshell-tests, macos-meson-clang-tests, linux-gcc-tests-asan, capstone-v3, capstone-v5] - name: [linux-acr-gcc-tests, linux-meson-gcc-newshell-tests, macos-meson-clang-tests] + name: [linux-acr-gcc-tests, linux-meson-gcc-newshell-tests] # ignore_error: [false] include: - name: linux-acr-gcc-tests @@ -74,14 +74,14 @@ jobs: coverage: true enabled: true timeout: 50 - - name: macos-meson-clang-tests - os: macos-latest - build_system: meson - compiler: clang - run_tests: true - meson_options: -Duse_webui=true - enabled: true - timeout: 60 + # - name: macos-meson-clang-tests + # os: macos-latest + # build_system: meson + # compiler: clang + # run_tests: true + # meson_options: -Duse_webui=true + # enabled: true + # timeout: 60 # - name: linux-gcc-tests-asan # os: ubuntu-20.04 # build_system: meson diff --git a/.travis.disabled.yml b/.travis.disabled.yml deleted file mode 100644 index 147d6cc923..0000000000 --- a/.travis.disabled.yml +++ /dev/null @@ -1,125 +0,0 @@ -# travis.yml for testing rizin. -# Initially written in 2014-2016 -# by jn__. Updated 2018 by damo22 -# xvilka, pancake, ret2libc in 2020 - -language: generic -dist: trusty -conditions: v1 - -branches: - only: - - dev - - /^release-.*$/ - - /^prerelease-.*$/ - -services: - - docker - -os: osx -jobs: - fast_finish: true - include: - # emscripten - - if: (branch = dev AND type = push) OR head_branch =~ ^wasm-* - os: linux - name: WASM - env: EMSCRIPTEN=1 - # Linux with GCC on PowerPC - - if: (branch = dev AND type = push) OR head_branch =~ ^ppc64-* - os: linux - name: PPC64 - arch: ppc64le - dist: bionic - env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" - # Linux with GCC on System Z - - if: (branch = dev AND type = push) OR head_branch =~ ^s390x-* - os: linux - name: S390X - arch: s390x - dist: bionic - env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" - # Linux with GCC on ARMv8 (64bit) - - if: (branch = dev AND type = push) OR head_branch =~ ^arm64-* - os: linux - name: ARM64 - arch: arm64 - dist: bionic - env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" - # Run Fuzzing Sanity Test on every push - # XXX its broken it complains about invalid key - #- os: linux - # env: COMPILER_NAME=clang CXX=clang++ CC=clang RZ_TESTS_DISABLE=1 FUZZIT=0 INSTALL_SYSTEM=static CXXFLAGS="-fsanitize=fuzzer" - # TODO: move this as new GitHub workflows - # release-only: meson build with system libraries - - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* - os: linux - env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson RZ_SYS_MAGIC=true RZ_SYS_ZIP=true RZ_SYS_LZ4=true RZ_SYS_ZLIB=true RZ_SYS_OPENSSL=true - # release-only: nogpl plugins file, just test if it builds - - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* - os: linux - env: COMPILER_NAME=gcc CXX=g++ CC=gcc RZ_PLUGINS_FILE=nogpl RZ_TESTS_DISABLE=1 - # release-only: static plugins file, just test if it builds - - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* - os: linux - env: COMPILER_NAME=gcc CXX=g++ CC=gcc RZ_PLUGINS_FILE=static RZ_TESTS_DISABLE=1 - # release-only: tiny plugins file, just test if it builds - - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* - os: linux - env: COMPILER_NAME=gcc CXX=g++ CC=gcc RZ_PLUGINS_FILE=tiny RZ_TESTS_DISABLE=1 - # release-only: system capstone (capstone3), just test if it builds - - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* - os: linux - env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson RZ_SYS_CAPSTONE=true RZ_TESTS_DISABLE=1 - - allow_failures: - # Emscripten - - os: linux - name: WASM - env: EMSCRIPTEN=1 - # Linux with GCC on PowerPC - - os: linux - arch: ppc64le - env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" - # Linux with GCC on System Z - - os: linux - arch: s390x - env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" - # Linux with GCC on ARMv8 (64bit) - - os: linux - arch: arm64 - env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" - - os: linux - env: COMPILER_NAME=clang CXX=clang++ CC=clang ASAN=1 ASAN_OPTIONS=detect_odr_violation=0 LSAN_OPTIONS=detect_leaks=0 CFLAGS="-DRZ_ASSERT_STDOUT=1" - -cache: - - ccache - -addons: - homebrew: - packages: - - libuv - - cabextract - -before_install: - - | - if [ "${FUZZIT}" == "1" ]; then - docker pull gcr.io/fuzzit-public/builders:llvm9.v1 - elif [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ]; then - docker pull rizinorg/r2-travis:latest || docker build -t rizinorg/r2-travis:latest -f Dockerfile.travis . - fi - -script: - - export PR_NAME=$(echo $TRAVIS_PULL_REQUEST_SLUG | cut -d'/' -f1) - - | - if [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ]; then - $SHELL ./travis-extract-var.sh | tee ${TRAVIS_BUILD_DIR}/docker-env.sh - fi - - | - if [ "${FUZZIT}" == "1" ] ; then - docker run -v /home/travis/.ccache:/root/.ccache -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" --entrypoint "/bin/bash" gcr.io/fuzzit-public/builders:llvm9.v1 -c "cd ${TRAVIS_BUILD_DIR}; . docker-env.sh; bash travis-script" - elif [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ] ; then - docker run -v /home/travis/.ccache:/root/.ccache -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" --entrypoint "/bin/bash" rizinorg/r2-travis:latest -c "cd ${TRAVIS_BUILD_DIR}; . docker-env.sh; bash travis-script" - else - $SHELL travis-script - fi diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..abb9b16fed --- /dev/null +++ b/.travis.yml @@ -0,0 +1,123 @@ +# travis.yml for testing rizin. +# Initially written in 2014-2016 +# by jn__. Updated 2018 by damo22 +# xvilka, pancake, ret2libc in 2020 + +language: generic +dist: trusty +conditions: v1 + +branches: + only: + - dev + - /^release-.*$/ + - /^prerelease-.*$/ + +services: + - docker + +os: osx +jobs: + fast_finish: true + include: + - os: osx + name: macOS + env: INSTALL_SYSTEM=meson COMPILER_NAME=clang CXX=clang++ CC=clang +# # emscripten +# - if: (branch = dev AND type = push) OR head_branch =~ ^wasm-* +# os: linux +# name: WASM +# env: EMSCRIPTEN=1 +# # Linux with GCC on PowerPC +# - if: (branch = dev AND type = push) OR head_branch =~ ^ppc64-* +# os: linux +# name: PPC64 +# arch: ppc64le +# dist: bionic +# env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" +# # Linux with GCC on System Z +# - if: (branch = dev AND type = push) OR head_branch =~ ^s390x-* +# os: linux +# name: S390X +# arch: s390x +# dist: bionic +# env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" +# # Linux with GCC on ARMv8 (64bit) +# - if: (branch = dev AND type = push) OR head_branch =~ ^arm64-* +# os: linux +# name: ARM64 +# arch: arm64 +# dist: bionic +# env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" +# # Run Fuzzing Sanity Test on every push +# # XXX its broken it complains about invalid key +# #- os: linux +# # env: COMPILER_NAME=clang CXX=clang++ CC=clang R2_TESTS_DISABLE=1 FUZZIT=0 INSTALL_SYSTEM=static CXXFLAGS="-fsanitize=fuzzer" +# # TODO: move this as new GitHub workflows +# # release-only: meson build with system libraries +# - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* +# os: linux +# env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson R2_SYS_MAGIC=true R2_SYS_ZIP=true R2_SYS_LZ4=true R2_SYS_ZLIB=true R2_SYS_OPENSSL=true +# # release-only: nogpl plugins file, just test if it builds +# - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* +# os: linux +# env: COMPILER_NAME=gcc CXX=g++ CC=gcc R2_PLUGINS_FILE=nogpl R2_TESTS_DISABLE=1 +# # release-only: static plugins file, just test if it builds +# - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* +# os: linux +# env: COMPILER_NAME=gcc CXX=g++ CC=gcc R2_PLUGINS_FILE=static R2_TESTS_DISABLE=1 +# # release-only: tiny plugins file, just test if it builds +# - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* +# os: linux +# env: COMPILER_NAME=gcc CXX=g++ CC=gcc R2_PLUGINS_FILE=tiny R2_TESTS_DISABLE=1 +# # release-only: system capstone (capstone3), just test if it builds +# - if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR branch =~ ^prerelease-* +# os: linux +# env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson R2_SYS_CAPSTONE=true R2_TESTS_DISABLE=1 + +# allow_failures: +# # Emscripten +# - os: linux +# name: WASM +# env: EMSCRIPTEN=1 +# # Linux with GCC on PowerPC +# - os: linux +# arch: ppc64le +# env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" +# # Linux with GCC on System Z +# - os: linux +# arch: s390x +# env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" +# # Linux with GCC on ARMv8 (64bit) +# - os: linux +# arch: arm64 +# env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" +# - os: linux +# env: COMPILER_NAME=clang CXX=clang++ CC=clang ASAN=1 ASAN_OPTIONS=detect_odr_violation=0 LSAN_OPTIONS=detect_leaks=0 CFLAGS="-DR2_ASSERT_STDOUT=1" + +cache: + - ccache + +before_install: + - echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc + - | + if [ "${FUZZIT}" == "1" ]; then + docker pull gcr.io/fuzzit-public/builders:llvm9.v1 + elif [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ]; then + docker pull rizinorg/r2-travis:latest || docker build -t rizinorg/r2-travis:latest -f Dockerfile.travis . + fi + +script: + - export PR_NAME=$(echo $TRAVIS_PULL_REQUEST_SLUG | cut -d'/' -f1) + - | + if [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ]; then + $SHELL ./travis-extract-var.sh | tee ${TRAVIS_BUILD_DIR}/docker-env.sh + fi + - | + if [ "${FUZZIT}" == "1" ] ; then + docker run -v /home/travis/.ccache:/root/.ccache -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" --entrypoint "/bin/bash" gcr.io/fuzzit-public/builders:llvm9.v1 -c "cd ${TRAVIS_BUILD_DIR}; . docker-env.sh; bash travis-script" + elif [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ] ; then + docker run -v /home/travis/.ccache:/root/.ccache -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" --entrypoint "/bin/bash" rizinorg/r2-travis:latest -c "cd ${TRAVIS_BUILD_DIR}; . docker-env.sh; bash travis-script" + else + $SHELL travis-script + fi diff --git a/binrz/rz-test/rz-test.c b/binrz/rz-test/rz-test.c index 980b5bd4bc..483aab4b14 100644 --- a/binrz/rz-test/rz-test.c +++ b/binrz/rz-test/rz-test.c @@ -720,6 +720,7 @@ static void print_log(RzTestState *state, ut64 prev_completed, ut64 prev_paths_c printf ("[**] %50s ", (const char *)rz_pvector_at (&state->completed_paths, prev_paths_completed)); print_state_counts (state); printf ("\n"); + fflush (stdout); } } diff --git a/librz/io/meson.build b/librz/io/meson.build index b0b5789e80..f05f687613 100644 --- a/librz/io/meson.build +++ b/librz/io/meson.build @@ -53,6 +53,9 @@ endif rz_io_deps = [ rz_util_dep, rz_socket_dep, + rz_hash_dep, + rz_crypto_dep, + rz_cons_dep, # transitive from gdb_dep, but must be explicitly listed here or meson will break the rpath bochs_dep, gdb_dep, winkd_dep, diff --git a/test/Makefile b/test/Makefile index 2dae560957..fa7f2874aa 100644 --- a/test/Makefile +++ b/test/Makefile @@ -6,7 +6,7 @@ bins: fuzz/targets: git clone --depth 1 https://github.com/rizinorg/rizin-fuzztargets fuzz/targets -RUNTEST=rz-test -L +RUNTEST=rz-test ${RZ_TEST_ARGS} -L rz-test-tests: bins ${RUNTEST} diff --git a/test/db/archos/darwin-x64/http b/test/db/archos/darwin-x64/http index 0ac78b0309..af9ac592ba 100644 --- a/test/db/archos/darwin-x64/http +++ b/test/db/archos/darwin-x64/http @@ -30,9 +30,6 @@ EXPECT=<rizin webui -EOF -EXPECT_ERR=<