16 #include <my_global.h>
17 #include <my_pthread.h>
24 #include "stub_pfs_global.h"
25 #include "stub_server_misc.h"
34 stub_alloc_always_fails=
true;
36 memset(& param, 0xFF,
sizeof(param));
68 init_event_name_sizing(& param);
70 ok(rc == 1,
"oom (mutex)");
104 init_event_name_sizing(& param);
106 ok(rc == 1,
"oom (rwlock)");
140 init_event_name_sizing(& param);
142 ok(rc == 1,
"oom (cond)");
176 init_event_name_sizing(& param);
178 ok(rc == 1,
"oom (file)");
210 init_event_name_sizing(& param);
212 ok(rc == 1,
"oom (file handle)");
246 init_event_name_sizing(& param);
248 ok(rc == 1,
"oom (table)");
282 init_event_name_sizing(& param);
284 ok(rc == 1,
"oom (thread)");
287 stub_alloc_always_fails=
false;
320 stub_alloc_fails_after_count= 2;
321 init_event_name_sizing(& param);
323 ok(rc == 1,
"oom (thread waits history sizing)");
354 stub_alloc_fails_after_count= 2;
355 init_event_name_sizing(& param);
357 ok(rc == 1,
"oom (per thread wait)");
380 init_event_name_sizing(& param);
382 ok(rc == 1,
"oom (socket)");
397 stub_alloc_fails_after_count= 1;
398 init_event_name_sizing(& param);
400 ok(rc == 1,
"oom (per thread waits)");
432 stub_alloc_fails_after_count= 3;
433 init_event_name_sizing(& param);
435 ok(rc == 1,
"oom (thread stages history sizing)");
467 stub_alloc_fails_after_count= 2;
468 init_event_name_sizing(& param);
470 ok(rc == 1,
"oom (per thread stages)");
502 stub_alloc_fails_after_count= 2;
503 init_event_name_sizing(& param);
505 ok(rc == 1,
"oom (thread statements history sizing)");
537 stub_alloc_fails_after_count= 2;
538 init_event_name_sizing(& param);
540 ok(rc == 1,
"oom (per thread statements)");
572 stub_alloc_fails_after_count= 1;
573 init_event_name_sizing(& param);
575 ok(rc == 1,
"oom (global waits)");
607 stub_alloc_fails_after_count= 3;
608 init_event_name_sizing(& param);
610 ok(rc == 0,
"init stage class");
612 ok(rc == 1,
"oom (global stages)");
645 stub_alloc_fails_after_count= 3;
646 init_event_name_sizing(& param);
648 ok(rc == 0,
"init statement class");
650 ok(rc == 1,
"oom (global statements)");
664 int main(
int,
char **)
667 MY_INIT(
"pfs_instr-oom-t");