25{
26
27 int i, k, err_count = 0;
31 int numcmp, cid;
33
35
36
38
39
43 }
44
46 printf("Test adding invalid events.\n");
47 }
48
49
53 }
54
55
56
58 printf("+ Simple invalid event\t");
59 }
60
64 printf("Unexpectedly opened!\n");
65 err_count++;
66 }
67 }
68 else {
69 if (!
quiet) printf(
"OK\n");
70 }
71
72
74 printf("+ Extra colons\t");
75 }
76
80 printf("Unexpectedly opened!\n");
81 err_count++;
82 }
83 }
84 else {
85 if (!
quiet) printf(
"OK\n");
86 }
87
88
89
91 printf("+ Large invalid event\t");
92 }
93
96
100 printf("Unexpectedly opened!\n");
101 err_count++;
102 }
103 }
104 else {
105 if (!
quiet) printf(
"OK\n");
106 }
107
108
110 printf("+ Large unterminated invalid event\t");
111 }
112
114
118 printf("Unexpectedly opened!\n");
119 err_count++;
120 }
121 }
122 else {
123 if (!
quiet) printf(
"OK\n");
124 }
125
126
127
129 printf("+ Randomly modifying valid events\t");
130 }
131
133
134
135 for( cid = 0; cid < numcmp; cid++ ) {
136
137
139 if (cmpinfo == NULL) {
140 test_fail( __FILE__, __LINE__,
"PAPI_get_component_info", 2 );
141 }
142
143
145
146 }
147
148
149
150
153
154 do {
156
159 do {
161
162
163
164
165 if (strstr(info1.
symbol,
"perf_raw")) {
166 break;
167 }
168
169
170
171 if (strlen(info1.
symbol)>5) {
173
177 printf("Unexpectedly opened %s!\n",
179 err_count++;
180 }
181 }
182 }
184 } else {
185
186
187
188
189
190 if (strlen(info.
symbol)>5) {
192
196 printf("Unexpectedly opened %s!\n",
198 err_count++;
199 }
200 }
201 }
202 }
203
205
206 }
207
208
209
210 if ( err_count ) {
212 printf( "%d Invalid events added.\n", err_count );
213 }
214 test_fail( __FILE__, __LINE__,
"Invalid events added", 1 );
215 }
216
218
219 return 0;
220}
add PAPI preset or native hardware event by name to an EventSet
Create a new empty PAPI EventSet.
Enumerate PAPI preset or native events for a given component.
get information about a specific software component
Get the event's name and description info.
initialize the PAPI library.
Get the number of components available on the system.
char large_name[LARGE_NAME_SIZE]
#define PAPI_NTV_ENUM_UMASKS
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)
char symbol[PAPI_HUGE_STR_LEN]