From: Evan Hunt Date: Wed, 26 Feb 2025 00:23:14 +0000 (-0800) Subject: wrap ns_client_error() for unit testing X-Git-Tag: v9.18.35~11^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=6b22c9a989893874daa9ced49e6483883a15ade5;p=thirdparty%2Fbind9.git wrap ns_client_error() for unit testing When testing, the client object doesn't have a proper netmgr handle, so ns_client_error() needs to be a no-op. (cherry picked from commit ae37ef45ff45db4919842ad29d3f8dfe0c77c76c) --- diff --git a/tests/ns/Makefile.am b/tests/ns/Makefile.am index 33f91d8c7bc..81e36629e40 100644 --- a/tests/ns/Makefile.am +++ b/tests/ns/Makefile.am @@ -20,6 +20,10 @@ check_PROGRAMS = \ plugin_test \ query_test +query_test_SOURCES = \ + query_test.c \ + netmgr_wrap.c + EXTRA_DIST = testdata include $(top_srcdir)/Makefile.tests diff --git a/tests/ns/netmgr_wrap.c b/tests/ns/netmgr_wrap.c new file mode 100644 index 00000000000..6737e53013e --- /dev/null +++ b/tests/ns/netmgr_wrap.c @@ -0,0 +1,28 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * SPDX-License-Identifier: MPL-2.0 + * + * 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 https://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +/*! \file */ + +#include +#include +#include + +#include + +#include + +void +ns_client_error(ns_client_t *client ISC_ATTR_UNUSED, + isc_result_t result ISC_ATTR_UNUSED) { + return; +}