]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove support for compiling without assertions (Both ISC_CHECK_ALL, ISC_CHECK_NONE...
authorOndřej Surý <ondrej@sury.org>
Fri, 23 Nov 2018 09:25:38 +0000 (10:25 +0100)
committerOndřej Surý <ondrej@sury.org>
Thu, 31 Jan 2019 10:16:08 +0000 (11:16 +0100)
.gitlab-ci.yml
lib/dns/tests/dbversion_test.c
lib/isc/include/isc/assertions.h
util/altbuild.sh [deleted file]
util/copyrights

index f7c2453831fd32bf988df72cb01c932bf1aee9fe..45f2d695abbf4e81637121622714ea3c462246f4 100644 (file)
@@ -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
index 57f48e28fe6b231cef6ec7f56c6dcd62ccc78d98..570a025806c556d50fd5302ff2b472cf8c994ea6 100644 (file)
@@ -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);
index 62e883d17bc757b223a6bc4362ce3fd9781eca65..e89b43ec8a6212c089278896d68d286c96f2e098 100644 (file)
@@ -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 (file)
index a6f472c..0000000
+++ /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
index 19abd79c54a7a63ea1bb583c9d5a4011edd4a86b..88638c2c7ce791ec6067282cfec5f3c473c384b4 100644 (file)
 ./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