1// SPDX-License-Identifier: GPL-2.0 2#include <string.h> 3#include "tests/tests.h" 4#include "arch-tests.h" 5 6#ifdef HAVE_AUXTRACE_SUPPORT 7#ifdef HAVE_EXTRA_TESTS 8DEFINE_SUITE("x86 instruction decoder - new instructions", insn_x86); 9#endif 10 11static struct test_case intel_pt_tests[] = { 12 TEST_CASE("Intel PT packet decoder", intel_pt_pkt_decoder), 13 TEST_CASE("Intel PT hybrid CPU compatibility", intel_pt_hybrid_compat), 14 { .name = NULL, } 15}; 16 17struct test_suite suite__intel_pt = { 18 .desc = "Intel PT", 19 .test_cases = intel_pt_tests, 20}; 21 22#endif 23#if defined(__x86_64__) 24DEFINE_SUITE("x86 bp modify", bp_modify); 25#endif 26DEFINE_SUITE("x86 Sample parsing", x86_sample_parsing); 27DEFINE_SUITE("AMD IBS via core pmu", amd_ibs_via_core_pmu); 28static struct test_case hybrid_tests[] = { 29 TEST_CASE_REASON("x86 hybrid event parsing", hybrid, "not hybrid"), 30 { .name = NULL, } 31}; 32 33struct test_suite suite__hybrid = { 34 .desc = "x86 hybrid", 35 .test_cases = hybrid_tests, 36}; 37 38struct test_suite *arch_tests[] = { 39#ifdef HAVE_DWARF_UNWIND_SUPPORT 40 &suite__dwarf_unwind, 41#endif 42#ifdef HAVE_AUXTRACE_SUPPORT 43#ifdef HAVE_EXTRA_TESTS 44 &suite__insn_x86, 45#endif 46 &suite__intel_pt, 47#endif 48#if defined(__x86_64__) 49 &suite__bp_modify, 50#endif 51 &suite__x86_sample_parsing, 52 &suite__amd_ibs_via_core_pmu, 53 &suite__hybrid, 54 NULL, 55}; 56