test case for the linux-infiniband component Adapted from its counterpart in the net component.
23{
25 int total_events=0;
26 int code;
28 int r;
30
31
33
34
38 }
39
41 printf("Listing all infiniband events\n");
42 }
43
45
46 for(cid=0; cid<numcmp; cid++) {
47
49 test_fail(__FILE__, __LINE__,
"PAPI_get_component_info failed\n",-1);
50 }
51
52 if ( strstr(cmpinfo->
name,
"infiniband") == NULL) {
53 continue;
54 }
55
57 printf("Component %d (%d) - %d events - %s\n",
60 }
62 test_skip(__FILE__,__LINE__,
"Component infiniband is disabled", 0);
63 continue;
64 }
65
67
70
74 }
75
78 }
79
80 total_events++;
81
83 }
84
85 }
86
87 if (total_events==0) {
88 test_skip(__FILE__,__LINE__,
"No infiniband events found", 0);
89 }
90
92
93 return 0;
94}
Enumerate PAPI preset or native events for a given component.
Convert a numeric hardware event code to a name.
get information about a specific software component
initialize the PAPI library.
Get the number of components available on the system.
char event_name[2][PAPI_MAX_STR_LEN]
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
char name[PAPI_MAX_STR_LEN]