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.
This commit is contained in:
Michal Nowak 2020-06-16 14:19:41 +02:00
parent 58aca6d9d5
commit 39305411e8
No known key found for this signature in database
GPG key ID: 24A3E8463AEE5E56

View file

@ -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: