dlopen-tests.c revision af4ffe1001adcc0a96897e426d26444f07af9aa1
/*
SSSD
Authors:
Simo Sorce <simo@redhat.com>
Copyright (C) 2013 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _GNU_SOURCE
#include <stdbool.h>
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <check.h>
struct so {
const char *name;
const char *libs[6];
} so[] = {
#ifdef BUILD_SUDO
#endif
#ifdef BUILD_AUTOFS
#endif
#ifdef HAVE_KRB5_LOCATOR_PLUGIN
NULL } },
#endif
#ifdef HAVE_PAC_RESPONDER
#endif
#ifdef HAVE_CIFS_IDMAP_PLUGIN
#endif
{ "libsss_child.so", { "libtevent.so",
{ "libsss_crypt.so", { "libtalloc.so",
{ "libsss_util.so", { "libtalloc.so",
#ifdef HAVE_PYTHON_BINDINGS
#endif
{ NULL }
};
{
void *handle;
bool ok;
if (!handle) {
return false;
}
round++;
} else {
ok = true;
}
return ok;
}
{
char *errmsg;
bool ok;
int i;
}
}
Suite *dlopen_suite(void)
{
suite_add_tcase(s, tc_dlopen);
return s;
}
{
int number_failed;
Suite *s = dlopen_suite();
if (number_failed == 0)
return EXIT_SUCCESS;
return EXIT_FAILURE;
}