int main(int argc, char **argv) { struct ptunit_suite suite; suite = ptunit_mk_suite(argc, argv); ptu_run(suite, from_user_null); ptu_run(suite, from_user_default); ptu_run(suite, from_user_small); ptu_run(suite, from_user_big); ptu_run(suite, from_user); ptu_run(suite, from_user_cr3); ptu_run(suite, match_null); ptu_run(suite, match_default); ptu_run(suite, match_default_mixed); ptu_run(suite, match_cr3); ptu_run(suite, match_vmcs); ptu_run(suite, match); ptu_run(suite, match_cr3_false); ptu_run(suite, match_vmcs_false); ptunit_report(&suite); return suite.nr_fails; }
int main(int argc, char **argv) { struct image_fixture dfix, ifix, rfix; struct ptunit_suite suite; /* Dfix provides image destruction. */ dfix.init = NULL; dfix.fini = dfix_fini; /* Ifix provides an empty image. */ ifix.init = ifix_init; ifix.fini = ifix_fini; /* Rfix provides an image with two sections added. */ rfix.init = rfix_init; rfix.fini = ifix_fini; suite = ptunit_mk_suite(argc, argv); ptu_run(suite, init); ptu_run_f(suite, init_name, dfix); ptu_run(suite, init_null); ptu_run(suite, fini); ptu_run(suite, fini_empty); ptu_run(suite, fini_null); ptu_run_f(suite, name, dfix); ptu_run(suite, name_none); ptu_run(suite, name_null); ptu_run_f(suite, read_empty, ifix); ptu_run_f(suite, overlap, ifix); ptu_run_f(suite, adjacent, ifix); ptu_run_f(suite, read, rfix); ptu_run_f(suite, read_asid, ifix); ptu_run_f(suite, read_bad_asid, rfix); ptu_run_f(suite, read_null_asid, rfix); ptu_run_f(suite, read_callback, rfix); ptu_run_f(suite, read_nomem, rfix); ptu_run_f(suite, read_truncated, rfix); ptu_run_f(suite, remove_section, rfix); ptu_run_f(suite, remove_bad_vaddr, rfix); ptu_run_f(suite, remove_bad_asid, rfix); ptu_run_f(suite, remove_by_filename, rfix); ptu_run_f(suite, remove_by_filename_bad_asid, rfix); ptu_run_f(suite, remove_none_by_filename, rfix); ptu_run_f(suite, remove_all_by_filename, ifix); ptu_run_f(suite, remove_by_asid, rfix); ptu_run_f(suite, copy_empty, ifix); ptu_run_f(suite, copy, rfix); ptu_run_f(suite, copy_duplicate, rfix); ptu_run_f(suite, copy_self, rfix); ptunit_report(&suite); return suite.nr_fails; }
int main(int argc, char **argv) { struct section_fixture sfix; struct ptunit_suite suite; sfix.init = sfix_init; sfix.fini = sfix_fini; suite = ptunit_mk_suite(argc, argv); ptu_run_f(suite, init, sfix); ptu_run(suite, begin_null); ptu_run(suite, end_null); ptu_run(suite, end_bad); ptu_run_f(suite, begin, sfix); ptu_run_f(suite, end, sfix); ptu_run(suite, asid_null); ptu_run(suite, asid); ptu_run_f(suite, read, sfix); ptu_run_f(suite, read_default_asid, sfix); ptu_run_f(suite, read_offset, sfix); ptu_run_f(suite, read_truncated, sfix); ptu_run_f(suite, read_nomem_vaddr, sfix); ptu_run_f(suite, read_nomem_asid, sfix); ptunit_report(&suite); return suite.nr_fails; }
int main(int argc, char **argv) { struct test_fixture tfix; struct ptunit_suite suite; tfix.init = tfix_init; tfix.fini = NULL; suite = ptunit_mk_suite(argc, argv); ptu_run(suite, decoder_init_null); ptu_run(suite, decoder_fini_null); ptu_run(suite, alloc_decoder_null); ptu_run(suite, free_decoder_null); ptu_run(suite, sync_forward_null); ptu_run(suite, sync_backward_null); ptu_run(suite, sync_set_null); ptu_run_f(suite, sync_set_eos, tfix); ptu_run(suite, get_offset_null); ptu_run_f(suite, get_offset_init, tfix); ptu_run_f(suite, sync_set_get_offset, tfix); ptu_run(suite, get_sync_offset_null); ptu_run(suite, get_config_null); ptu_run_f(suite, get_config, tfix); ptu_run(suite, next_null); return ptunit_report(&suite); }
int main(int argc, char **argv) { struct sync_fixture sfix; struct ptunit_suite suite; sfix.init = sfix_init; sfix.fini = NULL; suite = ptunit_mk_suite(argc, argv); ptu_run_f(suite, sync_fwd_null, sfix); ptu_run_f(suite, sync_bwd_null, sfix); ptu_run_f(suite, sync_fwd_empty, sfix); ptu_run_f(suite, sync_bwd_empty, sfix); ptu_run_f(suite, sync_fwd_none, sfix); ptu_run_f(suite, sync_bwd_none, sfix); ptu_run_f(suite, sync_fwd_here, sfix); ptu_run_f(suite, sync_bwd_here, sfix); ptu_run_f(suite, sync_fwd, sfix); ptu_run_f(suite, sync_bwd, sfix); ptu_run_f(suite, sync_fwd_past, sfix); ptu_run_f(suite, sync_bwd_past, sfix); ptu_run_f(suite, sync_fwd_cutoff, sfix); ptu_run_f(suite, sync_bwd_cutoff, sfix); ptunit_report(&suite); return suite.nr_fails; }
int main(int argc, char **argv) { struct fetch_fixture ffix; struct ptunit_suite suite; ffix.init = ffix_init; ffix.fini = ffix_fini; suite = ptunit_mk_suite(argc, argv); ptu_run_f(suite, fetch_null, ffix); ptu_run_f(suite, fetch_empty, ffix); ptu_run_f(suite, fetch_unknown, ffix); ptu_run_f(suite, fetch_unknown_ext, ffix); ptu_run_f(suite, fetch_unknown_ext2, ffix); ptu_run_fp(suite, fetch_type, ffix, ppt_pad, &pt_decode_pad); ptu_run_fp(suite, fetch_type, ffix, ppt_psb, &pt_decode_psb); ptu_run_fp(suite, fetch_type, ffix, ppt_tip, &pt_decode_tip); ptu_run_fp(suite, fetch_type, ffix, ppt_tnt_64, &pt_decode_tnt_64); ptu_run_fp(suite, fetch_type, ffix, ppt_tip_pge, &pt_decode_tip_pge); ptu_run_fp(suite, fetch_type, ffix, ppt_tip_pgd, &pt_decode_tip_pgd); ptu_run_fp(suite, fetch_type, ffix, ppt_fup, &pt_decode_fup); ptu_run_fp(suite, fetch_type, ffix, ppt_pip, &pt_decode_pip); ptu_run_fp(suite, fetch_type, ffix, ppt_ovf, &pt_decode_ovf); ptu_run_fp(suite, fetch_type, ffix, ppt_psbend, &pt_decode_psbend); ptu_run_fp(suite, fetch_type, ffix, ppt_tsc, &pt_decode_tsc); ptu_run_fp(suite, fetch_type, ffix, ppt_cbr, &pt_decode_cbr); ptu_run_fp(suite, fetch_type, ffix, ppt_tma, &pt_decode_tma); ptu_run_fp(suite, fetch_type, ffix, ppt_mtc, &pt_decode_mtc); ptu_run_fp(suite, fetch_type, ffix, ppt_cyc, &pt_decode_cyc); ptu_run_fp(suite, fetch_type, ffix, ppt_stop, &pt_decode_stop); ptu_run_fp(suite, fetch_type, ffix, ppt_vmcs, &pt_decode_vmcs); ptu_run_fp(suite, fetch_type, ffix, ppt_mnt, &pt_decode_mnt); ptu_run_f(suite, fetch_tnt_8, ffix); ptu_run_f(suite, fetch_mode_exec, ffix); ptu_run_f(suite, fetch_mode_tsx, ffix); ptunit_report(&suite); return suite.nr_fails; }
int main(int argc, char **argv) { struct section_fixture sfix; struct ptunit_suite suite; sfix.init = sfix_init; sfix.fini = sfix_fini; suite = ptunit_mk_suite(argc, argv); ptu_run_f(suite, create, sfix); ptu_run_f(suite, create_bad_offset, sfix); ptu_run_f(suite, create_truncated, sfix); ptu_run_f(suite, create_empty, sfix); ptu_run(suite, filename_null); ptu_run(suite, size_null); ptu_run(suite, get_null); ptu_run(suite, put_null); ptu_run(suite, map_null); ptu_run(suite, unmap_null); ptu_run_f(suite, get_overflow, sfix); ptu_run_f(suite, map_change, sfix); ptu_run_f(suite, map_put, sfix); ptu_run_f(suite, unmap_nomap, sfix); ptu_run_f(suite, map_overflow, sfix); ptu_run_f(suite, get_put, sfix); ptu_run_f(suite, map_unmap, sfix); ptu_run_f(suite, read, sfix); ptu_run_f(suite, read_offset, sfix); ptu_run_f(suite, read_truncated, sfix); ptu_run_f(suite, read_from_truncated, sfix); ptu_run_f(suite, read_nomem, sfix); ptu_run_f(suite, read_overflow, sfix); ptu_run_f(suite, read_overflow_32bit, sfix); ptu_run_f(suite, read_nomap, sfix); ptu_run_f(suite, read_unmap_map, sfix); ptu_run_f(suite, stress, sfix); ptunit_report(&suite); return suite.nr_fails; }
int main(int argc, char **argv) { struct ptunit_suite suite; pti_ild_init(); suite = ptunit_mk_suite(argc, argv); ptu_run(suite, push); ptu_run(suite, jmp_rel); ptu_run(suite, long_nop); ptu_run(suite, mov_al_64); ptu_run(suite, mov_al_32); ptu_run(suite, mov_al_16); ptu_run(suite, rdtsc); ptu_run(suite, pcmpistri); ptu_run(suite, vmovdqa); ptu_run(suite, vpandn); ptu_run(suite, syscall); ptu_run(suite, sysret); ptu_run(suite, sysenter); ptu_run(suite, sysexit); ptu_run(suite, int3); ptu_run(suite, intn); ptu_run(suite, iret); ptu_run(suite, call_9a_cd); ptu_run(suite, call_9a_cp); ptu_run(suite, call_ff_3); ptu_run(suite, jmp_ff_5); ptu_run(suite, jmp_ea_cd); ptu_run(suite, jmp_ea_cp); ptu_run(suite, ret_ca); ptu_run(suite, vmlaunch); ptu_run(suite, vmresume); ptu_run(suite, vmcall); ptu_run(suite, vmptrld); ptunit_report(&suite); return suite.nr_fails; }
int main(int argc, char **argv) { struct ptunit_suite suite; suite = ptunit_mk_suite(argc, argv); ptu_run(suite, init); ptu_run(suite, init_null); ptu_run(suite, is_empty_initial); ptu_run(suite, is_empty_no); ptu_run(suite, is_empty_yes); ptu_run(suite, is_empty_null); ptu_run(suite, query_taken); ptu_run(suite, query_not_taken); ptu_run(suite, query_empty); ptu_run(suite, query_null); ptu_run(suite, update_tnt); ptu_run(suite, update_tnt_not_empty); ptu_run(suite, update_tnt_null_tnt); ptu_run(suite, update_tnt_null_packet); ptunit_report(&suite); return suite.nr_fails; }
int main(int argc, char **argv) { struct ptunit_suite suite; pt_ild_init(); suite = ptunit_mk_suite(argc, argv); ptu_run(suite, push); ptu_run(suite, jmp_rel); ptu_run(suite, long_nop); ptu_run(suite, mov_al_64); ptu_run(suite, mov_al_32); ptu_run(suite, mov_al_32_em64); ptu_run(suite, mov_al_32_em16); ptu_run(suite, mov_al_16_em32); ptu_run(suite, mov_al_16); ptu_run(suite, rdtsc); ptu_run(suite, pcmpistri); ptu_run(suite, vmovdqa); ptu_run(suite, vpandn); ptu_run(suite, syscall); ptu_run(suite, sysret); ptu_run(suite, sysenter); ptu_run(suite, sysexit); ptu_run(suite, int3); ptu_run(suite, intn); ptu_run(suite, iret); ptu_run(suite, call_9a_cd); ptu_run(suite, call_9a_cp); ptu_run(suite, call_ff_3); ptu_run(suite, jmp_ff_5); ptu_run(suite, jmp_ea_cd); ptu_run(suite, jmp_ea_cp); ptu_run(suite, ret_ca); ptu_run(suite, vmlaunch); ptu_run(suite, vmresume); ptu_run(suite, vmcall); ptu_run(suite, vmptrld); ptu_run(suite, jrcxz); ptu_run(suite, mov_eax_moffs64); ptu_run(suite, mov_eax_moffs64_32); ptu_run(suite, mov_rax_moffs64); ptu_run(suite, mov_rax_moffs64_32); ptu_run(suite, mov_ax_moffs64); ptu_run(suite, mov_ax_moffs64_32); ptu_run(suite, mov_eax_moffs32); ptu_run(suite, mov_ax_moffs32); ptu_run(suite, mov_ax_moffs16); ptu_run(suite, les); ptu_run(suite, les_disp16); ptu_run(suite, les_disp32); ptu_run(suite, les_ind_disp8); ptu_run(suite, les_ind_disp16); ptu_run(suite, les_ind_disp32); ptu_run(suite, lds); ptu_run(suite, lds_disp16); ptu_run(suite, lds_disp32); ptu_run(suite, lds_ind_disp8); ptu_run(suite, lds_ind_disp16); ptu_run(suite, lds_ind_disp32); ptu_run(suite, vpshufb); ptu_run(suite, bound); ptu_run(suite, evex_cutoff); ptu_run(suite, ptwrite_r32); ptu_run(suite, ptwrite_m32); ptu_run(suite, ptwrite_r64); ptu_run(suite, ptwrite_m64); return ptunit_report(&suite); }
int main(int argc, char **argv) { struct packet_fixture pfix; struct ptunit_suite suite; pfix.init = pfix_init; pfix.fini = pfix_fini; suite = ptunit_mk_suite(argc, argv); ptu_run_fp(suite, no_payload, pfix, ppt_pad); ptu_run_fp(suite, no_payload, pfix, ppt_psb); ptu_run_fp(suite, no_payload, pfix, ppt_ovf); ptu_run_fp(suite, no_payload, pfix, ppt_psbend); ptu_run_fp(suite, no_payload, pfix, ppt_stop); ptu_run_fp(suite, unknown, pfix, 4); ptu_run_fp(suite, unknown, pfix, -pte_nomem); ptu_run_fp(suite, unknown_ext, pfix, 4); ptu_run_fp(suite, unknown_ext, pfix, -pte_nomem); ptu_run_fp(suite, unknown_ext2, pfix, 4); ptu_run_fp(suite, unknown_ext2, pfix, -pte_nomem); ptu_run_f(suite, tnt_8, pfix); ptu_run_f(suite, tnt_64, pfix); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_suppressed, 0x0ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_16, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_32, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_48, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_sext_48, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_full, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_suppressed, 0x0ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_16, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_32, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_48, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_sext_48, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_full, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_suppressed, 0x0ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_update_16, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_update_32, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_update_48, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_sext_48, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_full, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_suppressed, 0x0ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_update_16, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_update_32, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_update_48, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_sext_48, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_full, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_suppressed, 0x0ull); ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_update_16, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_update_32, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_update_48, 0x4200ull); ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_sext_48, 0x42ull); ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_full, 0x42ull); ptu_run_fp(suite, mode_exec, pfix, ptem_16bit); ptu_run_fp(suite, mode_exec, pfix, ptem_32bit); ptu_run_fp(suite, mode_exec, pfix, ptem_64bit); ptu_run_f(suite, mode_tsx, pfix); ptu_run_f(suite, pip, pfix); ptu_run_f(suite, tsc, pfix); ptu_run_f(suite, cbr, pfix); ptu_run_f(suite, tma, pfix); ptu_run_f(suite, tma_bad, pfix); ptu_run_f(suite, mtc, pfix); ptu_run_f(suite, cyc, pfix); ptu_run_f(suite, vmcs, pfix); ptu_run_f(suite, mnt, pfix); ptu_run_fp(suite, cutoff, pfix, ppt_psb); ptu_run_fp(suite, cutoff_ip, pfix, ppt_tip); ptu_run_fp(suite, cutoff_ip, pfix, ppt_tip_pge); ptu_run_fp(suite, cutoff_ip, pfix, ppt_tip_pgd); ptu_run_fp(suite, cutoff_ip, pfix, ppt_fup); ptu_run_fp(suite, cutoff, pfix, ppt_ovf); ptu_run_fp(suite, cutoff, pfix, ppt_psbend); ptu_run_fp(suite, cutoff, pfix, ppt_tnt_64); ptu_run_fp(suite, cutoff, pfix, ppt_tsc); ptu_run_fp(suite, cutoff, pfix, ppt_cbr); ptu_run_fp(suite, cutoff, pfix, ppt_tma); ptu_run_fp(suite, cutoff, pfix, ppt_mtc); ptu_run_f(suite, cutoff_cyc, pfix); ptu_run_fp(suite, cutoff_mode, pfix, pt_mol_exec); ptu_run_fp(suite, cutoff_mode, pfix, pt_mol_tsx); ptu_run_fp(suite, cutoff, pfix, ppt_vmcs); ptu_run_fp(suite, cutoff, pfix, ppt_mnt); ptunit_report(&suite); return suite.nr_fails; }
int main(int argc, char **argv) { struct evq_fixture efix, pfix; struct ptunit_suite suite; efix.init = efix_init; efix.fini = NULL; pfix.init = efix_init_pending; pfix.fini = NULL; suite = ptunit_mk_suite(argc, argv); ptu_run(suite, standalone_null); ptu_run_f(suite, standalone, efix); ptu_run_p(suite, enqueue_null, evb_psbend); ptu_run_p(suite, enqueue_null, evb_tip); ptu_run_p(suite, enqueue_null, evb_fup); ptu_run_p(suite, dequeue_null, evb_psbend); ptu_run_p(suite, dequeue_null, evb_tip); ptu_run_p(suite, dequeue_null, evb_fup); ptu_run_fp(suite, dequeue_empty, efix, evb_psbend); ptu_run_fp(suite, dequeue_empty, efix, evb_tip); ptu_run_fp(suite, dequeue_empty, efix, evb_fup); ptu_run_fp(suite, enqueue_all_dequeue, efix, evb_psbend, 1); ptu_run_fp(suite, enqueue_all_dequeue, efix, evb_psbend, 2); ptu_run_fp(suite, enqueue_all_dequeue, efix, evb_tip, 1); ptu_run_fp(suite, enqueue_all_dequeue, efix, evb_tip, 3); ptu_run_fp(suite, enqueue_all_dequeue, efix, evb_fup, 1); ptu_run_fp(suite, enqueue_all_dequeue, efix, evb_fup, 4); ptu_run_fp(suite, enqueue_one_dequeue, efix, evb_psbend, evb_max * 2); ptu_run_fp(suite, enqueue_one_dequeue, efix, evb_tip, evb_max * 2); ptu_run_fp(suite, enqueue_one_dequeue, efix, evb_fup, evb_max * 2); ptu_run_fp(suite, overflow, efix, evb_psbend, 1); ptu_run_fp(suite, overflow, efix, evb_tip, 2); ptu_run_fp(suite, overflow, efix, evb_fup, 3); ptu_run_p(suite, clear_null, evb_psbend); ptu_run_p(suite, clear_null, evb_tip); ptu_run_p(suite, clear_null, evb_fup); ptu_run_fp(suite, clear, efix, evb_psbend); ptu_run_fp(suite, clear, pfix, evb_psbend); ptu_run_fp(suite, clear, efix, evb_tip); ptu_run_fp(suite, clear, pfix, evb_tip); ptu_run_fp(suite, clear, efix, evb_fup); ptu_run_fp(suite, clear, pfix, evb_fup); ptu_run_p(suite, empty_null, evb_psbend); ptu_run_p(suite, empty_null, evb_tip); ptu_run_p(suite, empty_null, evb_fup); ptu_run_p(suite, pending_null, evb_psbend); ptu_run_p(suite, pending_null, evb_tip); ptu_run_p(suite, pending_null, evb_fup); ptu_run_p(suite, find_null, evb_psbend, ptev_enabled); ptu_run_p(suite, find_null, evb_tip, ptev_disabled); ptu_run_p(suite, find_null, evb_fup, ptev_paging); ptu_run_fp(suite, find_empty, efix, evb_psbend, ptev_enabled); ptu_run_fp(suite, find_empty, efix, evb_tip, ptev_disabled); ptu_run_fp(suite, find_empty, efix, evb_fup, ptev_paging); ptu_run_fp(suite, find_none_evb, efix, evb_psbend, ptev_enabled); ptu_run_fp(suite, find_none_evb, efix, evb_tip, ptev_disabled); ptu_run_fp(suite, find_none_evb, efix, evb_fup, ptev_paging); ptu_run_fp(suite, find_none_evt, efix, evb_psbend, ptev_enabled, 3); ptu_run_fp(suite, find_none_evt, efix, evb_tip, ptev_disabled, 4); ptu_run_fp(suite, find_none_evt, efix, evb_fup, ptev_paging, 2); ptu_run_fp(suite, find, efix, evb_psbend, ptev_enabled, 0, 3); ptu_run_fp(suite, find, efix, evb_tip, ptev_disabled, 2, 0); ptu_run_fp(suite, find, efix, evb_fup, ptev_paging, 1, 4); ptunit_report(&suite); return suite.nr_fails; }