From: Ondřej Surý Date: Fri, 23 Nov 2018 09:25:38 +0000 (+0100) Subject: Remove support for compiling without assertions (Both ISC_CHECK_ALL, ISC_CHECK_NONE... X-Git-Tag: v9.13.6~20^2~1 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3a3e75042d48d6981ae6331e232549e3a21bdf79;p=thirdparty%2Fbind9.git Remove support for compiling without assertions (Both ISC_CHECK_ALL, ISC_CHECK_NONE are now gone) --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f7c2453831f..45f2d695abb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -481,25 +481,3 @@ unit:pkcs11:sid:amd64: <<: *unit_test_job dependencies: - pkcs11:sid:amd64 - -# Jobs for GCC builds with assertions compiled away on Debian Sid (amd64) - -noassert:sid:amd64: - variables: - CC: gcc - CFLAGS: "-Wall -Wextra -O2 -g -DISC_CHECK_NONE=1" - EXTRA_CONFIGURE: "--with-libidn2" - <<: *debian_sid_amd64_image - <<: *build_job - -system:noassert:sid:amd64: - <<: *debian_sid_amd64_image - <<: *system_test_job - dependencies: - - noassert:sid:amd64 - -unit:noassert:sid:amd64: - <<: *debian_sid_amd64_image - <<: *unit_test_job - dependencies: - - noassert:sid:amd64 diff --git a/lib/dns/tests/dbversion_test.c b/lib/dns/tests/dbversion_test.c index 57f48e28fe6..570a025806c 100644 --- a/lib/dns/tests/dbversion_test.c +++ b/lib/dns/tests/dbversion_test.c @@ -43,7 +43,6 @@ static char tempname[11] = "dtXXXXXXXX"; static dns_db_t *db1 = NULL, *db2 = NULL; static dns_dbversion_t *v1 = NULL, *v2 = NULL; -#ifndef ISC_CHECK_NONE /* * The code below enables us to trap assertion failures for testing * purposes. local_callback() is set as the callback function for @@ -72,9 +71,6 @@ local_callback(const char *file, int line, isc_assertiontype_t type, mock_assert(1, cond, file, line); longjmp(assertion, 1); } -#else -#define check_assertion(function_call) -#endif /* ISC_CHECK_NONE */ static int _setup(void **state) { @@ -82,9 +78,7 @@ _setup(void **state) { UNUSED(state); -#ifndef ISC_CHECK_NONE isc_assertion_setcallback(local_callback); -#endif res = dns_test_begin(NULL, false); assert_int_equal(res, ISC_R_SUCCESS); diff --git a/lib/isc/include/isc/assertions.h b/lib/isc/include/isc/assertions.h index 62e883d17bc..e89b43ec8a6 100644 --- a/lib/isc/include/isc/assertions.h +++ b/lib/isc/include/isc/assertions.h @@ -43,75 +43,29 @@ isc_assertion_setcallback(isc_assertioncallback_t); const char * isc_assertion_typetotext(isc_assertiontype_t type); -#if defined(ISC_CHECK_ALL) || defined(__COVERITY__) -#define ISC_CHECK_REQUIRE 1 -#define ISC_CHECK_ENSURE 1 -#define ISC_CHECK_INSIST 1 -#define ISC_CHECK_INVARIANT 1 -#endif - -#if defined(ISC_CHECK_NONE) && !defined(__COVERITY__) -#define ISC_CHECK_REQUIRE 0 -#define ISC_CHECK_ENSURE 0 -#define ISC_CHECK_INSIST 0 -#define ISC_CHECK_INVARIANT 0 -#endif - -#ifndef ISC_CHECK_REQUIRE -#define ISC_CHECK_REQUIRE 1 -#endif - -#ifndef ISC_CHECK_ENSURE -#define ISC_CHECK_ENSURE 1 -#endif - -#ifndef ISC_CHECK_INSIST -#define ISC_CHECK_INSIST 1 -#endif - -#ifndef ISC_CHECK_INVARIANT -#define ISC_CHECK_INVARIANT 1 -#endif - -#if ISC_CHECK_REQUIRE != 0 #define ISC_REQUIRE(cond) \ ((void) (ISC_LIKELY(cond) || \ ((isc_assertion_failed)(__FILE__, __LINE__, \ isc_assertiontype_require, \ #cond), 0))) -#else -#define ISC_REQUIRE(cond) ((void) ISC_LIKELY(cond)) -#endif /* ISC_CHECK_REQUIRE */ -#if ISC_CHECK_ENSURE != 0 #define ISC_ENSURE(cond) \ ((void) (ISC_LIKELY(cond) || \ ((isc_assertion_failed)(__FILE__, __LINE__, \ isc_assertiontype_ensure, \ #cond), 0))) -#else -#define ISC_ENSURE(cond) ((void) ISC_LIKELY(cond)) -#endif /* ISC_CHECK_ENSURE */ -#if ISC_CHECK_INSIST != 0 #define ISC_INSIST(cond) \ ((void) (ISC_LIKELY(cond) || \ ((isc_assertion_failed)(__FILE__, __LINE__, \ isc_assertiontype_insist, \ #cond), 0))) -#else -#define ISC_INSIST(cond) ((void) ISC_LIKELY(cond)) -#endif /* ISC_CHECK_INSIST */ -#if ISC_CHECK_INVARIANT != 0 #define ISC_INVARIANT(cond) \ ((void) (ISC_LIKELY(cond) || \ ((isc_assertion_failed)(__FILE__, __LINE__, \ isc_assertiontype_invariant, \ #cond), 0))) -#else -#define ISC_INVARIANT(cond) ((void) ISC_LIKELY(cond)) -#endif /* ISC_CHECK_INVARIANT */ ISC_LANG_ENDDECLS diff --git a/util/altbuild.sh b/util/altbuild.sh deleted file mode 100644 index a6f472cdb7a..00000000000 --- a/util/altbuild.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# -# "Alternative build" test. -# -# Build BIND9 with build options that are seldom tested otherwise. -# Specify the CVS tag or the name of a kit .tar.gz file as a -# command line argument. -# - -tmpdir=/tmp -case $# in - 2) arg=$1 tmpdir="$2" ;; - 1) arg=$1 ;; - *) echo "usage: $0 cvs-tag | absolute-path-to-gzipped-tar-file [tmpdir]" >&2; exit 1 ;; -esac - -here=`pwd` - -test -f util/check-instincludes.sh || { - echo "$0: must be run from top of CVS tree"; - exit 1; -} - -kitdir=${tmpdir}/kit -srcdir=${tmpdir}/src -builddir=${tmpdir}/build -instdir=${tmpdir}/inst - -test -d $tmpdir || mkdir $tmpdir -test ! -d $kitdir || rm -rf $kitdir -mkdir $kitdir - -test ! -d $srcdir || rm -rf $srcdir -mkdir $srcdir - -test ! -d $builddir || rm -rf $builddir -mkdir $builddir - -test ! -d $instdir || rm -rf $instdir -mkdir $instdir - -case $arg in - *.tar.gz) - kit="$arg" - ;; - *) - tag="$arg" - sh util/kit.sh $tag $kitdir || exit 1 - kit=$kitdir/*.tar.gz - ;; -esac - -cd $srcdir || exit 1 -gzcat $kit | tar xf - - -cd $builddir || exit 1 - -# Test a libtool / separate object dir / threadless build. - -CFLAGS="-g -DISC_CHECK_NONE -DISC_LIST_CHECKINIT" \ - sh $srcdir/bind-*/configure --with-libtool \ - --disable-threads --with-openssl --prefix=$instdir -gmake clean -gmake -gmake install - -# Rebuild in the source tree so that the test suite -# works, then run it. - -cd $srcdir/bind-* || exit 1 -CFLAGS="-g -DISC_CHECK_NONE -DISC_LIST_CHECKINIT" \ - sh configure --with-libtool --disable-threads --prefix=$instdir -make -make install - -( cd bin/tests && make test ) - -# Check the installed header files - -cd $here -sh util/check-instincludes.sh $instdir diff --git a/util/copyrights b/util/copyrights index 19abd79c54a..88638c2c7ce 100644 --- a/util/copyrights +++ b/util/copyrights @@ -2575,7 +2575,6 @@ ./util/COPYRIGHT.NOM X 2001,2004,2007,2016,2018,2019 ./util/COPYRIGHT.PORTION X 1996,1997,1998,1999,2000,2001,2004,2007,2016,2018,2019 ./util/COPYRIGHT.TOP X 2018,2019 -./util/altbuild.sh SH 2000,2001,2002,2004,2007,2008,2012,2016,2017,2018,2019 ./util/bindkeys.pl PERL 2009,2010,2011,2012,2014,2016,2017,2018,2019 ./util/branchsync.sh SH 2013,2016,2018,2019 ./util/check-categories.sh SH 2015,2016,2017,2018,2019