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 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 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; }