From: Michal Nowak Date: Tue, 16 Jun 2020 12:19:41 +0000 (+0200) Subject: Add "stress" tests to GitLab CI X-Git-Tag: v9.17.7~40^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39305411e85fb4423b6b8248d4c69a9003cd16e8;p=thirdparty%2Fbind9.git Add "stress" tests to GitLab CI Run "stress" tests for scheduled pipelines and pipelines created for tags. These tests were previously only performed manually (as part of pre-release testing of each new BIND version). Their purpose is to detect memory leaks and potential performance issues. As the run time of each "stress" test itself is set to 1 hour, set the GitLab CI job timeout to 2 hours in order to account for the extra time needed to set the test up and gather its results. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ebdaea1c66f..b6fc343daa5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,12 +37,15 @@ variables: WITH_READLINE_LIBEDIT: "--with-readline=libedit" WITH_READLINE_READLINE: "--with-readline=readline" + BIND_INSTALL_PATH: "${CI_PROJECT_DIR}/.local" + stages: - autoconf - precheck - build - unit - system + - performance - docs - push - postcheck @@ -65,6 +68,27 @@ stages: - linux - i386 +.linux-stress-amd64: &linux_stress_amd64 + tags: + - amd64 + - aws + - linux-stress + - stress + +.linux-stress-arm64: &linux_stress_arm64 + tags: + - aarch64 + - aws + - linux-stress + - stress + +.freebsd-stress-amd64: &freebsd_stress_amd64 + tags: + - amd64 + - aws + - bsd-stress + - stress + ### Docker Image Templates # Alpine Linux @@ -113,6 +137,10 @@ stages: image: "$CI_REGISTRY_IMAGE:fedora-32-amd64" <<: *linux_amd64 +.fedora-32-arm64: &fedora_32_arm64_image + image: "$CI_REGISTRY_IMAGE:fedora-32-arm64" + <<: *linux_stress_arm64 + # Ubuntu .ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image @@ -183,7 +211,7 @@ stages: --with-cmocka \ --with-libxml2 \ --with-json-c \ - --prefix=$HOME/.local \ + --prefix="${BIND_INSTALL_PATH}" \ $EXTRA_CONFIGURE \ || cat config.log @@ -1353,6 +1381,101 @@ respdiff: expire_in: "1 day" when: on_failure +# "Stress" tests + +.stress: &stress_job + stage: performance + script: + - *configure + - *setup_interfaces + - *setup_softhsm + - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1 + - make install + - git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.isc.org/isc-private/bind-qa.git + - cd bind-qa/bind9/stress + - DIG="${BIND_INSTALL_PATH}/bin/dig" WORKSPACE="${CI_PROJECT_DIR}" bash stress.sh + needs: + - job: autoreconf + artifacts: true + only: + - schedules + - tags + artifacts: + untracked: true + expire_in: "1 day" + when: always + timeout: 2h + +stress:authoritative:fedora:32:amd64: + <<: *fedora_32_amd64_image + <<: *linux_stress_amd64 + <<: *stress_job + variables: + CC: gcc + FLAME: /usr/bin/flame + MODE: authoritative + RATE: 10000 + RUN_TIME: 1 + +stress:recursive:fedora:32:amd64: + <<: *fedora_32_amd64_image + <<: *linux_stress_amd64 + <<: *stress_job + variables: + CC: gcc + FLAME: /usr/bin/flame + MODE: recursive + RATE: 10000 + RUN_TIME: 1 + +stress:authoritative:fedora:32:arm64: + <<: *fedora_32_arm64_image + <<: *linux_stress_arm64 + <<: *stress_job + variables: + CC: gcc + FLAME: /usr/bin/flame + MODE: authoritative + RATE: 10000 + RUN_TIME: 1 + +stress:recursive:fedora:32:arm64: + <<: *fedora_32_arm64_image + <<: *linux_stress_arm64 + <<: *stress_job + variables: + CC: gcc + FLAME: /usr/bin/flame + MODE: recursive + RATE: 10000 + RUN_TIME: 1 + +stress:authoritative:freebsd12: + <<: *freebsd_12_amd64_image + <<: *freebsd_stress_amd64 + <<: *stress_job + variables: + CC: clang + FLAME: /usr/local/bin/flame + MODE: authoritative + RATE: 10000 + RUN_TIME: 1 + # See: https://gitlab.isc.org/isc-projects/bind9/-/issues/1941 + allow_failure: true + +stress:recursive:freebsd12: + <<: *freebsd_12_amd64_image + <<: *freebsd_stress_amd64 + <<: *stress_job + variables: + CC: clang + FLAME: /usr/local/bin/flame + MODE: recursive + RATE: 10000 + RUN_TIME: 1 + # See: https://gitlab.isc.org/isc-projects/bind9/-/issues/1941 + allow_failure: true + # ABI check abi-check: