linux/tools/testing/selftests/powerpc/pmu/sampling_tests
Madhavan Srinivasan 5553a79387 selftests/powerpc: Add flags.mk to support pmu buildable
When running `make -C powerpc/pmu run_tests` from top level selftests
directory, currently this error is being reported:

  make: Entering directory '/home/maddy/linux/tools/testing/selftests/powerpc/pmu'
  Makefile:40: warning: overriding recipe for target 'emit_tests'
  ../../lib.mk:111: warning: ignoring old recipe for target 'emit_tests'
  gcc -m64    count_instructions.c ../harness.c event.c lib.c ../utils.c loop.S  -o /home/maddy/selftest_output//count_instructions
  In file included from count_instructions.c:13:
  event.h:12:10: fatal error: utils.h: No such file or directory
  12 | #include "utils.h"
    |          ^~~~~~~~~
  compilation terminated.

This is due to missing of include path in CFLAGS. That is, CFLAGS and
GIT_VERSION macros are defined in the powerpc/ folder Makefile which
in this case is not involved.

To address the failure in case of executing specific sub-folder test
directly, a new rule file has been addded by the patch called "flags.mk"
under selftest/powerpc/ folder and is linked to all the Makefile of
powerpc/pmu sub-folders.

Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
[mpe: Fixup ifeq, make GIT_VERSION simply expanded to avoid re-executing git describe]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240229093711.581230-2-maddy@linux.ibm.com
2024-04-29 23:53:01 +10:00
..
.gitignore selftests/powerpc: Add missing PMU selftests to .gitignores 2022-08-15 20:59:17 +10:00
Makefile selftests/powerpc: Add flags.mk to support pmu buildable 2024-04-29 23:53:01 +10:00
bhrb_filter_map_test.c selftests/powerpc: Update bhrb filter sampling test for multiple branch filters 2022-09-28 19:22:13 +10:00
bhrb_no_crash_wo_pmu_test.c selftests/powerpc/pmu: Add selftest to check branch stack enablement will not crash on any platforms 2022-06-29 08:57:42 +10:00
intr_regs_no_crash_wo_pmu_test.c selftests/powerpc/pmu: Add selftest to check PERF_SAMPLE_REGS_INTR option will not crash on any platforms 2022-06-29 08:57:42 +10:00
misc.c selftests/powerpc/pmu: Refactor the platform check and add macros to find array size/PVR 2022-06-29 08:57:39 +10:00
misc.h selftests/powerpc: Add more utility macros 2023-06-19 17:36:27 +10:00
mmcr0_cc56run_test.c selftests/powerpc/pmu/: Add interface test for mmcr0_cc56run field 2022-03-01 23:39:09 +11:00
mmcr0_exceptionbits_test.c selftests/powerpc/pmu/: Add interface test for mmcr0 exception bits 2022-03-01 23:38:46 +11:00
mmcr0_fc56_pmc1ce_test.c selftests/powerpc/pmu/: Add interface test for mmcr0_fc56 field using pmc1 2022-03-01 23:39:54 +11:00
mmcr0_fc56_pmc56_test.c selftests/powerpc/pmu/: Add interface test for mmcr0_pmc56 using pmc5 2022-03-01 23:40:06 +11:00
mmcr0_pmccext_test.c selftests/powerpc/pmu/: Add interface test for mmcr0_pmccext bit 2022-03-01 23:39:27 +11:00
mmcr0_pmcjce_test.c selftests/powerpc/pmu/: Add interface test for mmcr0_pmcjce field 2022-03-01 23:39:41 +11:00
mmcr1_comb_test.c selftests/powerpc/pmu/: Add interface test for mmcr1_comb field 2022-03-01 23:40:16 +11:00
mmcr1_sel_unit_cache_test.c selftests/powerpc/pmu: Add selftest for mmcr1 pmcxsel/unit/cache fields 2022-06-29 08:57:42 +10:00
mmcr2_fcs_fch_test.c selftests/powerpc/pmu/: Add interface test for mmcr2_fcs_fch fields 2022-03-01 23:40:36 +11:00
mmcr2_l2l3_test.c selftests/powerpc/pmu/: Add interface test for mmcr2_l2l3 field 2022-03-01 23:40:26 +11:00
mmcr3_src_test.c selftests/powerpc/pmu/: Add interface test for mmcr3_src fields 2022-03-01 23:40:47 +11:00
mmcra_bhrb_any_test.c selftests/powerpc/pmu: Add interface test for mmcra_ifm field for any branch type 2022-06-28 23:57:55 +10:00
mmcra_bhrb_cond_test.c selftests/powerpc/pmu: Add interface test for mmcra_ifm field for conditional branch type 2022-06-28 23:57:56 +10:00
mmcra_bhrb_disable_no_branch_test.c selftests/powerpc/pmu: Add interface test for bhrb disable field for non-branch samples 2022-06-29 08:57:42 +10:00
mmcra_bhrb_disable_test.c selftests/powerpc/pmu: Add interface test for bhrb disable field 2022-06-28 23:57:56 +10:00
mmcra_bhrb_ind_call_test.c selftests/powerpc/pmu: Add interface test for mmcra_ifm field of indirect call type 2022-06-28 23:57:55 +10:00
mmcra_thresh_cmp_test.c selftests/powerpc/pmu: Add interface test for mmcra_thresh_cmp fields 2022-06-28 23:57:42 +10:00
mmcra_thresh_marked_sample_test.c selftests/powerpc/pmu: Fix sample field check in the mmcra_thresh_marked_sample_test 2023-03-15 00:52:09 +11:00