dlopen-tests.c revision bacc66dc6f446d47be18b61d569721481d70386b
/*
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/>.
*/
#include "config.h"
#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_LIBWBCLIENT
#endif /* BUILD_LIBWBCLIENT */
#ifdef BUILD_IFP
#endif /* BUILD_IFP */
#ifdef BUILD_SUDO
#endif
#ifdef BUILD_AUTOFS
#endif
#ifdef HAVE_KRB5_LOCATOR_PLUGIN
NULL } },
#endif
#ifdef HAVE_KRB5_LOCALAUTH_PLUGIN
NULL } },
#endif
#ifdef HAVE_PAC_RESPONDER
#endif
#ifdef HAVE_CIFS_IDMAP_PLUGIN
#endif
NULL } },
#ifdef BUILD_SAMBA
#endif /* BUILD_SAMBA */
NULL } },
#ifdef HAVE_PYTHON2_BINDINGS
#endif
#ifdef HAVE_PYTHON3_BINDINGS
#endif
#ifdef HAVE_CONFIG_LIB
#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;
}