80 test_skip( __FILE__, __LINE__,
"PAPI_get_shared_lib_info", 1 );
83 if ( ( shinfo->
count == 0 ) && ( shinfo->
map ) ) {
84 test_fail( __FILE__, __LINE__,
"PAPI_get_shared_lib_info", 1 );
96 const char *_libname =
"libcrypt.so";
98 void ( *setkey) (
const char *
key);
99 void ( *encrypt) (
char block[64],
int edflag);
101 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
102 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
103 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
104 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
111 handle = dlopen( _libname, RTLD_NOW );
113 printf(
"dlopen: %s\n", dlerror( ) );
114 if (!
quiet) printf(
"Did you forget to set the environmental " 115 "variable LIBPATH (in AIX) or " 116 "LD_LIBRARY_PATH (in linux) ?\n" );
117 test_fail( __FILE__, __LINE__,
"dlopen", 1 );
120 setkey = dlsym( handle,
"setkey" );
121 encrypt = dlsym( handle,
"encrypt" );
122 if ( setkey == NULL || encrypt == NULL) {
123 if (!
quiet) printf(
"dlsym: %s\n", dlerror( ) );
124 test_fail( __FILE__, __LINE__,
"dlsym", 1 );
139 printf(
"encrypted ");
143 if (!memcmp(txt,orig,64)) {
144 test_fail( __FILE__, __LINE__,
"encode", 1 );
150 printf(
"decrypted ");
154 if (memcmp(txt,orig,64)) {
155 test_fail( __FILE__, __LINE__,
"decode", 1 );
158 oldcount = shinfo->
count;
161 test_fail( __FILE__, __LINE__,
"PAPI_get_shared_lib_info", 1 );
168 if ( ( shinfo->
count == 0 ) && ( shinfo->
map ) ) {
169 test_fail( __FILE__, __LINE__,
"PAPI_get_shared_lib_info", 1 );
172 if ( shinfo->
count <= oldcount ) {
173 test_fail( __FILE__, __LINE__,
"PAPI_get_shared_lib_info", 1 );
void test_pass(const char *filename)
const PAPI_shlib_info_t * PAPI_get_shared_lib_info(void)
void print_shlib_info_map(const PAPI_shlib_info_t *shinfo, int quiet)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_library_init(int version)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)