Compare commits

..
6 changed files with 49 additions and 55 deletions
+42 -28
View File
@@ -15,7 +15,6 @@ variables:
BUILD_PARALLEL_JOBS: 6
TEST_PARALLEL_JOBS: 6
MAKE_COMMAND: make
CONFIGURE: ./configure
CLANG: clang-9
SCAN_BUILD: scan-build-9
@@ -94,6 +93,10 @@ stages:
# Debian
.debian-jessie-amd64: &debian_jessie_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
<<: *linux_amd64
.debian-stretch-amd64: &debian_stretch_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
<<: *linux_amd64
@@ -203,7 +206,7 @@ stages:
- test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
script:
- *configure
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- test -z "${RUN_MAKE_INSTALL}" || make install
- test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install
needs:
@@ -314,34 +317,22 @@ stages:
when: on_failure
.cppcheck_args: &run_cppcheck |
cppcheck --enable=warning,performance,portability,information,missingInclude \
--include=config.h \
--quiet \
--std=c11 \
--language=c \
--project=compile_commands.json \
--error-exitcode=2 \
-j ${TEST_PARALLEL_JOBS:-1} \
--xml \
--output-file=cppcheck.results \
--relative-paths="$CI_PROJECT_DIR" \
--inline-suppr \
--suppressions-list=util/suppressions.txt
cppcheck --enable=warning,performance,portability,information,missingInclude --include=config.h --std=c11 --language=c --project=compile_commands.json --error-exitcode=2 -j ${TEST_PARALLEL_JOBS:-1} --xml --output-file=cppcheck.results --relative-paths="$CI_PROJECT_DIR" --inline-suppr --suppressions-list=util/suppressions.txt
.cppcheck_report: &cppcheck_report_html |
cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" \
--file=cppcheck.results \
--report-dir=cppcheck_html/
cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" --file=cppcheck.results --report-dir=cppcheck_html/
.cppcheck: &cppcheck_job
<<: *default_triggering_rules
stage: postcheck
before_script:
- pip3 install compiledb
script:
- *configure
- (make -nwk all || true) | compiledb
- export GCC_VERSION=$(gcc --version | sed -n 's/.*\([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p')
- sed -i "/gcc\",/a\"-DCPPCHECK\", \"-D__STDC__\", \"-D__GNUC__=${GCC_VERSION}\"," compile_commands.json
script:
- *run_cppcheck
after_script:
- *cppcheck_report_html
artifacts:
paths:
@@ -350,6 +341,9 @@ stages:
- cppcheck_html/
expire_in: "1 day"
when: on_failure
needs:
- job: autoreconf:sid:amd64
artifacts: true
### Job Definitions
@@ -544,6 +538,30 @@ unit:gcc:centos8:amd64:
- job: gcc:centos8:amd64
artifacts: true
# Jobs for regular GCC builds on Debian 8 Jessie (amd64)
gcc:jessie:amd64:
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON} -O2"
EXTRA_CONFIGURE: "--without-cmocka --with-python --disable-geoip"
<<: *debian_jessie_amd64_image
<<: *build_job
system:gcc:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *system_test_job
needs:
- job: gcc:jessie:amd64
artifacts: true
unit:gcc:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *unit_test_job
needs:
- job: gcc:jessie:amd64
artifacts: true
# Jobs for regular GCC builds on Debian 9 Stretch (amd64)
gcc:stretch:amd64:
@@ -629,7 +647,6 @@ gcc:sid:amd64:
CFLAGS: "${CFLAGS_COMMON} -O3"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1
MAKE_COMMAND: bear --use-cc=${CC} --verbose make
<<: *debian_sid_amd64_image
<<: *build_job
@@ -650,9 +667,6 @@ unit:gcc:sid:amd64:
cppcheck:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *cppcheck_job
needs:
- job: gcc:sid:amd64
artifacts: true
# Job for out-of-tree GCC build on Debian Sid (amd64)
@@ -1256,13 +1270,13 @@ respdiff:sid:amd64:
BIND_BASELINE_VERSION: v9_11_3
script:
- ./configure --without-make-clean
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} V=1
- make -j${BUILD_PARALLEL_JOBS:-1} V=1
- *setup_interfaces
- git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.isc.org/isc-private/bind-qa.git
- git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind
- cd refbind/
- ./configure --without-make-clean
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} V=1
- make -j${BUILD_PARALLEL_JOBS:-1} V=1
- cd ../bind-qa/bind9/respdiff
- bash respdiff.sh -q "${PWD}/100k_mixed.txt" -c 3 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}/refbind" "${CI_PROJECT_DIR}"
needs:
@@ -1291,11 +1305,11 @@ abi-check:sid:amd64:
BIND_BASELINE_VERSION: v9_17_0
script:
- *configure
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} V=1
- make -j${BUILD_PARALLEL_JOBS:-1} V=1
- git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind
- cd refbind/
- *configure
- ${MAKE_COMMAND} -j${BUILD_PARALLEL_JOBS:-1} V=1
- make -j${BUILD_PARALLEL_JOBS:-1} V=1
- cd ..
- util/api-checker.sh . refbind
artifacts:
-1
View File
@@ -59,7 +59,6 @@
- [ ] ***(QA)*** Ensure all new tags are annotated and signed.
- [ ] ***(SwEng)*** Push tags for the published releases to the public repository.
- [ ] ***(SwEng)*** Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`).
- [ ] ***(QA)*** For each maintained branch, update the `BIND_BASELINE_VERSION` variable for the `abi-check:sid:amd64` job in `.gitlab-ci.yml` to the latest published BIND version tag for a given branch.
[^1]: If not, use the time remaining until the tagging deadline to ensure all outstanding issues are either resolved or moved to a different milestone.
+2 -5
View File
@@ -79,11 +79,8 @@ struct isc_rwlock {
#endif /* USE_PTHREAD_RWLOCK */
isc_result_t
isc__rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
unsigned int write_quota, const char *file,
unsigned int line);
#define isc_rwlock_init(l, rq, wq) isc__rwlock_init((l), (rq), (wq),\
__FILE__, __LINE__)
isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
unsigned int write_quota);
isc_result_t
isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type);
+1 -1
View File
@@ -829,7 +829,7 @@ isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level) {
}
UNLOCK(&lctx->lock);
}
RDUNLOCK(&lctx->lcfg_rwl);
WRUNLOCK(&lctx->lcfg_rwl);
}
}
-6
View File
@@ -17,7 +17,6 @@
#include <sys/time.h>
#include <time.h>
#include <isc/log.h>
#include <isc/mutex.h>
#include <isc/once.h>
#include <isc/print.h>
@@ -295,11 +294,6 @@ isc__mutex_init(isc_mutex_t *mp, const char *file, unsigned int line) {
strerror_r(err, strbuf, sizeof(strbuf));
isc_error_fatal(file, line, "pthread_mutex_init failed: %s",
strbuf);
} else {
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_OTHER, ISC_LOG_INFO,
"Initialized mutex %p at %s:%d",
mp, file, line);
}
}
#endif /* if !(ISC_MUTEX_DEBUG && defined(PTHREAD_MUTEX_ERRORCHECK)) && \
+4 -14
View File
@@ -20,7 +20,6 @@
#endif /* if defined(sun) && (defined(__sparc) || defined(__sparc__)) */
#include <isc/atomic.h>
#include <isc/log.h>
#include <isc/magic.h>
#include <isc/platform.h>
#include <isc/print.h>
@@ -33,16 +32,11 @@
#include <pthread.h>
isc_result_t
isc__rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
unsigned int write_quota, const char *file,
unsigned int line) {
isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
unsigned int write_quota) {
UNUSED(read_quota);
UNUSED(write_quota);
REQUIRE(pthread_rwlock_init(&rwl->rwlock, NULL) == 0);
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_OTHER, ISC_LOG_INFO,
"Initialized rwlock %p at %s:%d",
&rwl->rwlock, file, line);
atomic_init(&rwl->downgrade, false);
return (ISC_R_SUCCESS);
}
@@ -196,14 +190,10 @@ print_lock(const char *operation, isc_rwlock_t *rwl, isc_rwlocktype_t type) {
#endif /* ISC_RWLOCK_TRACE */
isc_result_t
isc__rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
unsigned int write_quota, const char *file,
unsigned int line) {
isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
unsigned int write_quota) {
REQUIRE(rwl != NULL);
UNUSED(file);
UNUSED(line);
/*
* In case there's trouble initializing, we zero magic now. If all
* goes well, we'll set it to RWLOCK_MAGIC.