14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi Jakub Hrozek <jhrozek@redhat.com>
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi Copyright (C) 2014 Red Hat
fdf3e1e28e824a562b895c8c6b5d77d70146d357Josef 'Jeff' Sipek SSSD tests: Resolver tests using a fake resolver library
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi This program is free software; you can redistribute it and/or modify
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi it under the terms of the GNU General Public License as published by
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi the Free Software Foundation; either version 3 of the License, or
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi (at your option) any later version.
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi This program is distributed in the hope that it will be useful,
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi but WITHOUT ANY WARRANTY; without even the implied warranty of
7e86d6308f3f4226c3ed42052cbeb11749821bc2Aki Tuomi MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi GNU General Public License for more details.
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi You should have received a copy of the GNU General Public License
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <talloc.h>
#include <tevent.h>
#include <errno.h>
#include <popt.h>
#include <stdarg.h>
#include <stdlib.h>
#include <resolv.h>
#include "resolv/async_resolv.h"
#include "tests/cmocka/common_mock.h"
#include "tests/cmocka/common_mock_resp.h"
HEADER h;
memset(&h, 0, sizeof(h));
return NS_HFIXEDSZ;
assert_true(n > 0);
qb += n;
remaining -= n;
const char *key,
const char *question,
return resp_size;
const char *question,
ssize_t i;
for (i = 0; i < n_rrs; i++) {
return buf_head;
struct resolv_fake_ctx);
switch(opt) {
return rv;