/linux-6.1.9/tools/testing/selftests/powerpc/pmu/event_code_tests/ |
D | generic_events_valid_test.c | 36 FAIL_IF(event_open(&event)); in generic_events_valid_test() 41 FAIL_IF(event_open(&event)); in generic_events_valid_test() 46 FAIL_IF(event_open(&event)); in generic_events_valid_test() 50 FAIL_IF(event_open(&event)); in generic_events_valid_test() 55 FAIL_IF(event_open(&event)); in generic_events_valid_test() 59 FAIL_IF(event_open(&event)); in generic_events_valid_test() 63 FAIL_IF(!event_open(&event)); in generic_events_valid_test() 67 FAIL_IF(!event_open(&event)); in generic_events_valid_test() 71 FAIL_IF(!event_open(&event)); in generic_events_valid_test() 74 FAIL_IF(!event_open(&event)); in generic_events_valid_test() [all …]
|
D | reserved_bits_mmcra_sample_elig_mode_test.c | 37 FAIL_IF(!event_open(&event)); in reserved_bits_mmcra_sample_elig_mode() 40 FAIL_IF(!event_open(&event)); in reserved_bits_mmcra_sample_elig_mode() 43 FAIL_IF(!event_open(&event)); in reserved_bits_mmcra_sample_elig_mode() 46 FAIL_IF(!event_open(&event)); in reserved_bits_mmcra_sample_elig_mode() 49 FAIL_IF(!event_open(&event)); in reserved_bits_mmcra_sample_elig_mode() 52 FAIL_IF(!event_open(&event)); in reserved_bits_mmcra_sample_elig_mode() 55 FAIL_IF(!event_open(&event)); in reserved_bits_mmcra_sample_elig_mode() 64 FAIL_IF(!event_open(&event)); in reserved_bits_mmcra_sample_elig_mode() 67 FAIL_IF(!event_open(&event)); in reserved_bits_mmcra_sample_elig_mode()
|
D | event_alternatives_tests_p9.c | 45 FAIL_IF(event_open(&leader)); in event_alternatives_tests_p9() 53 FAIL_IF(event_open_with_group(&event, leader.fd)); in event_alternatives_tests_p9() 59 FAIL_IF(event_open(&leader)); in event_alternatives_tests_p9() 66 FAIL_IF(event_open_with_group(&event, leader.fd)); in event_alternatives_tests_p9() 72 FAIL_IF(event_open(&leader)); in event_alternatives_tests_p9() 79 FAIL_IF(event_open_with_group(&event, leader.fd)); in event_alternatives_tests_p9() 85 FAIL_IF(event_open(&leader)); in event_alternatives_tests_p9() 92 FAIL_IF(event_open_with_group(&event, leader.fd)); in event_alternatives_tests_p9() 98 FAIL_IF(event_open(&leader)); in event_alternatives_tests_p9() 105 FAIL_IF(event_open_with_group(&event, leader.fd)); in event_alternatives_tests_p9()
|
/linux-6.1.9/tools/testing/selftests/powerpc/mm/ |
D | exec_prot.c | 98 FAIL_IF(mprotect(insns, pgsize, rights) != 0); in check_exec_fault() 101 FAIL_IF(remaining_faults != 0); in check_exec_fault() 103 FAIL_IF(!is_fault_expected(fault_code)); in check_exec_fault() 122 FAIL_IF(sigprocmask(SIG_SETMASK, 0, &segv_act.sa_mask) != 0); in test() 125 FAIL_IF(sigaction(SIGSEGV, &segv_act, NULL) != 0); in test() 130 FAIL_IF(sigprocmask(SIG_SETMASK, 0, &trap_act.sa_mask) != 0); in test() 133 FAIL_IF(sigaction(SIGTRAP, &trap_act, NULL) != 0); in test() 140 FAIL_IF(insns == MAP_FAILED); in test() 173 FAIL_IF(mprotect(insns, pgsize, PROT_EXEC) != 0); in test() 175 FAIL_IF(remaining_faults != 0 || !is_fault_expected(fault_code)); in test() [all …]
|
D | pkey_exec_prot.c | 115 FAIL_IF(sigprocmask(SIG_SETMASK, 0, &segv_act.sa_mask) != 0); in test() 118 FAIL_IF(sigaction(SIGSEGV, &segv_act, NULL) != 0); in test() 123 FAIL_IF(sigprocmask(SIG_SETMASK, 0, &trap_act.sa_mask) != 0); in test() 126 FAIL_IF(sigaction(SIGTRAP, &trap_act, NULL) != 0); in test() 133 FAIL_IF(insns == MAP_FAILED); in test() 156 FAIL_IF(pkey < 0); in test() 179 FAIL_IF(sys_pkey_mprotect(insns, pgsize, PROT_EXEC, pkey) != 0); in test() 183 FAIL_IF(remaining_faults != 0); in test() 196 FAIL_IF(sys_pkey_mprotect(insns, pgsize, PROT_EXEC, pkey) != 0); in test() 200 FAIL_IF(remaining_faults != 0 || fault_code != SEGV_ACCERR); in test() [all …]
|
D | pkey_siginfo.c | 258 FAIL_IF(r.base == MAP_FAILED); in test() 272 FAIL_IF(sigprocmask(SIG_SETMASK, 0, &act.sa_mask) != 0); in test() 275 FAIL_IF(sigaction(SIGSEGV, &act, NULL) != 0); in test() 295 FAIL_IF(pthread_attr_init(&attr) != 0); in test() 296 FAIL_IF(pthread_barrier_init(&iteration_barrier, NULL, 2) != 0); in test() 301 FAIL_IF(pthread_create(&prot_thread, &attr, &protect, &r) != 0); in test() 302 FAIL_IF(pthread_create(&pacc_thread, &attr, &protect_access, &r) != 0); in test() 303 FAIL_IF(pthread_join(prot_thread, NULL) != 0); in test() 304 FAIL_IF(pthread_join(pacc_thread, NULL) != 0); in test() 309 FAIL_IF(pthread_create(&prot_thread, &attr, &protect, &r) != 0); in test() [all …]
|
D | large_vm_fork_separation.c | 45 FAIL_IF(pipe(p2c) == -1 || pipe(c2p) == -1); in test() 49 FAIL_IF(read(p2c[0], &c, 1) != 1); in test() 55 FAIL_IF(write(c2p[1], &c, 1) != 1); in test() 56 FAIL_IF(read(p2c[0], &c, 1) != 1); in test() 61 FAIL_IF(write(p2c[1], &c, 1) != 1); in test() 62 FAIL_IF(read(c2p[0], &c, 1) != 1); in test() 74 FAIL_IF(write(p2c[1], &c, 1) != 1); in test() 75 FAIL_IF(waitpid(pid, &status, 0) == -1); in test() 76 FAIL_IF(!WIFEXITED(status) || WEXITSTATUS(status)); in test()
|
/linux-6.1.9/tools/testing/selftests/powerpc/pmu/ebb/ |
D | event_attributes_test.c | 24 FAIL_IF(event_open(&event)); in event_attributes() 31 FAIL_IF(event_open(&event) == 0); in event_attributes() 38 FAIL_IF(event_open(&event) == 0); in event_attributes() 45 FAIL_IF(event_open(&event) == 0); in event_attributes() 52 FAIL_IF(event_open(&event) == 0); in event_attributes() 59 FAIL_IF(event_open(&event) == 0); in event_attributes() 66 FAIL_IF(event_open(&event) == 0); in event_attributes() 71 FAIL_IF(event_open(&leader)); in event_attributes() 77 FAIL_IF(event_open_with_group(&event, leader.fd)); in event_attributes() 84 FAIL_IF(event_open(&leader)); in event_attributes() [all …]
|
D | ebb_vs_cpu_event_test.c | 31 FAIL_IF(event_open_with_cpu(event, cpu)); in setup_cpu_event() 32 FAIL_IF(event_enable(event)); in setup_cpu_event() 47 FAIL_IF(cpu < 0); in ebb_vs_cpu_event() 48 FAIL_IF(bind_to_cpu(cpu)); in ebb_vs_cpu_event() 50 FAIL_IF(pipe(read_pipe.fds) == -1); in ebb_vs_cpu_event() 51 FAIL_IF(pipe(write_pipe.fds) == -1); in ebb_vs_cpu_event() 60 FAIL_IF(sync_with_child(read_pipe, write_pipe)); in ebb_vs_cpu_event() 70 FAIL_IF(sync_with_child(read_pipe, write_pipe)); in ebb_vs_cpu_event() 73 FAIL_IF(wait_for_child(pid)); in ebb_vs_cpu_event() 74 FAIL_IF(event_disable(&event)); in ebb_vs_cpu_event() [all …]
|
D | cpu_event_pinned_vs_ebb_test.c | 33 FAIL_IF(event_open_with_cpu(event, cpu)); in setup_cpu_event() 34 FAIL_IF(event_enable(event)); in setup_cpu_event() 49 FAIL_IF(cpu < 0); in cpu_event_pinned_vs_ebb() 50 FAIL_IF(bind_to_cpu(cpu)); in cpu_event_pinned_vs_ebb() 52 FAIL_IF(pipe(read_pipe.fds) == -1); in cpu_event_pinned_vs_ebb() 53 FAIL_IF(pipe(write_pipe.fds) == -1); in cpu_event_pinned_vs_ebb() 74 FAIL_IF(sync_with_child(read_pipe, write_pipe)); in cpu_event_pinned_vs_ebb() 78 FAIL_IF(wait_for_child(pid) != 2); in cpu_event_pinned_vs_ebb() 80 FAIL_IF(event_disable(&event)); in cpu_event_pinned_vs_ebb() 81 FAIL_IF(event_read(&event)); in cpu_event_pinned_vs_ebb() [all …]
|
D | ebb_on_child_test.c | 27 FAIL_IF(wait_for_parent(read_pipe)); in victim_child() 28 FAIL_IF(notify_parent(write_pipe)); in victim_child() 32 FAIL_IF(wait_for_parent(read_pipe)); in victim_child() 33 FAIL_IF(notify_parent(write_pipe)); in victim_child() 52 FAIL_IF(pipe(read_pipe.fds) == -1); in ebb_on_child() 53 FAIL_IF(pipe(write_pipe.fds) == -1); in ebb_on_child() 61 FAIL_IF(sync_with_child(read_pipe, write_pipe)); in ebb_on_child() 72 FAIL_IF(event_open_with_pid(&event, pid)); in ebb_on_child() 73 FAIL_IF(ebb_event_enable(&event)); in ebb_on_child() 75 FAIL_IF(sync_with_child(read_pipe, write_pipe)); in ebb_on_child() [all …]
|
D | task_event_pinned_vs_ebb_test.c | 32 FAIL_IF(event_open_with_pid(event, child_pid)); in setup_child_event() 33 FAIL_IF(event_enable(event)); in setup_child_event() 47 FAIL_IF(pipe(read_pipe.fds) == -1); in task_event_pinned_vs_ebb() 48 FAIL_IF(pipe(write_pipe.fds) == -1); in task_event_pinned_vs_ebb() 69 FAIL_IF(sync_with_child(read_pipe, write_pipe)); in task_event_pinned_vs_ebb() 73 FAIL_IF(wait_for_child(pid) != 2); in task_event_pinned_vs_ebb() 74 FAIL_IF(event_disable(&event)); in task_event_pinned_vs_ebb() 75 FAIL_IF(event_read(&event)); in task_event_pinned_vs_ebb() 79 FAIL_IF(event.result.value == 0); in task_event_pinned_vs_ebb() 84 FAIL_IF(event.result.enabled == 0); in task_event_pinned_vs_ebb() [all …]
|
D | ebb_on_willing_child_test.c | 25 FAIL_IF(wait_for_parent(read_pipe)); in victim_child() 32 FAIL_IF(notify_parent(write_pipe)); in victim_child() 35 FAIL_IF(core_busy_loop()); in victim_child() 43 FAIL_IF(ebb_state.stats.ebb_count == 0); in victim_child() 57 FAIL_IF(pipe(read_pipe.fds) == -1); in ebb_on_willing_child() 58 FAIL_IF(pipe(write_pipe.fds) == -1); in ebb_on_willing_child() 67 FAIL_IF(sync_with_child(read_pipe, write_pipe)); in ebb_on_willing_child() 78 FAIL_IF(event_open_with_pid(&event, pid)); in ebb_on_willing_child() 79 FAIL_IF(ebb_event_enable(&event)); in ebb_on_willing_child() 82 FAIL_IF(wait_for_child(pid)); in ebb_on_willing_child()
|
D | cpu_event_vs_ebb_test.c | 31 FAIL_IF(event_open_with_cpu(event, cpu)); in setup_cpu_event() 32 FAIL_IF(event_enable(event)); in setup_cpu_event() 47 FAIL_IF(cpu < 0); in cpu_event_vs_ebb() 48 FAIL_IF(bind_to_cpu(cpu)); in cpu_event_vs_ebb() 50 FAIL_IF(pipe(read_pipe.fds) == -1); in cpu_event_vs_ebb() 51 FAIL_IF(pipe(write_pipe.fds) == -1); in cpu_event_vs_ebb() 72 FAIL_IF(sync_with_child(read_pipe, write_pipe)); in cpu_event_vs_ebb() 76 FAIL_IF(wait_for_child(pid)); in cpu_event_vs_ebb() 78 FAIL_IF(event_disable(&event)); in cpu_event_vs_ebb() 79 FAIL_IF(event_read(&event)); in cpu_event_vs_ebb()
|
D | fork_cleanup_test.c | 29 FAIL_IF(mfspr(SPRN_BESCR) != 0); in child() 30 FAIL_IF(mfspr(SPRN_EBBHR) != 0); in child() 31 FAIL_IF(mfspr(SPRN_EBBRR) != 0); in child() 33 FAIL_IF(catch_sigill(write_pmc1)); in child() 36 FAIL_IF(event_read(&event)); in child() 51 FAIL_IF(event_open(&event)); in fork_cleanup() 57 FAIL_IF(ebb_event_enable(&event)); in fork_cleanup() 69 FAIL_IF(wait_for_child(pid)); in fork_cleanup()
|
D | task_event_vs_ebb_test.c | 30 FAIL_IF(event_open_with_pid(event, child_pid)); in setup_child_event() 31 FAIL_IF(event_enable(event)); in setup_child_event() 45 FAIL_IF(pipe(read_pipe.fds) == -1); in task_event_vs_ebb() 46 FAIL_IF(pipe(write_pipe.fds) == -1); in task_event_vs_ebb() 67 FAIL_IF(sync_with_child(read_pipe, write_pipe)); in task_event_vs_ebb() 71 FAIL_IF(wait_for_child(pid)); in task_event_vs_ebb() 72 FAIL_IF(event_disable(&event)); in task_event_vs_ebb() 73 FAIL_IF(event_read(&event)); in task_event_vs_ebb()
|
/linux-6.1.9/tools/testing/selftests/powerpc/pmu/sampling_tests/ |
D | mmcra_thresh_marked_sample_test.c | 35 FAIL_IF(event_open(&event)); in mmcra_thresh_marked_sample() 38 FAIL_IF(event_enable(&event)); in mmcra_thresh_marked_sample() 43 FAIL_IF(event_disable(&event)); in mmcra_thresh_marked_sample() 46 FAIL_IF(!collect_samples(event.mmap_buffer)); in mmcra_thresh_marked_sample() 51 FAIL_IF(!intr_regs); in mmcra_thresh_marked_sample() 58 FAIL_IF(EV_CODE_EXTRACT(event.attr.config, thd_sel) != in mmcra_thresh_marked_sample() 60 FAIL_IF(EV_CODE_EXTRACT(event.attr.config, thd_start) != in mmcra_thresh_marked_sample() 62 FAIL_IF(EV_CODE_EXTRACT(event.attr.config, thd_stop) != in mmcra_thresh_marked_sample() 64 FAIL_IF(EV_CODE_EXTRACT(event.attr.config, marked) != in mmcra_thresh_marked_sample() 66 FAIL_IF(EV_CODE_EXTRACT(event.attr.config, sample >> 2) != in mmcra_thresh_marked_sample() [all …]
|
D | mmcr2_fcs_fch_test.c | 39 FAIL_IF(sigaction(SIGUSR2, &sigact, NULL)); in mmcr2_fcs_fch() 40 FAIL_IF(kill(getpid(), SIGUSR2)); in mmcr2_fcs_fch() 49 FAIL_IF(event_open(&event)); in mmcr2_fcs_fch() 52 FAIL_IF(event_enable(&event)); in mmcr2_fcs_fch() 57 FAIL_IF(event_disable(&event)); in mmcr2_fcs_fch() 60 FAIL_IF(!collect_samples(event.mmap_buffer)); in mmcr2_fcs_fch() 65 FAIL_IF(!intr_regs); in mmcr2_fcs_fch() 72 FAIL_IF(event.attr.exclude_kernel != in mmcr2_fcs_fch() 75 FAIL_IF(event.attr.exclude_kernel != in mmcr2_fcs_fch()
|
D | mmcr1_sel_unit_cache_test.c | 33 FAIL_IF(!p); in mmcr1_sel_unit_cache() 39 FAIL_IF(event_open(&event)); in mmcr1_sel_unit_cache() 51 FAIL_IF(!collect_samples(event.mmap_buffer)); in mmcr1_sel_unit_cache() 56 FAIL_IF(!intr_regs); in mmcr1_sel_unit_cache() 62 FAIL_IF(EV_CODE_EXTRACT(event.attr.config, pmcxsel) != in mmcr1_sel_unit_cache() 64 FAIL_IF(EV_CODE_EXTRACT(event.attr.config, unit) != in mmcr1_sel_unit_cache() 66 FAIL_IF(EV_CODE_EXTRACT(event.attr.config, cache) != in mmcr1_sel_unit_cache() 76 FAIL_IF(test_harness(mmcr1_sel_unit_cache, "mmcr1_sel_unit_cache")); in main()
|
/linux-6.1.9/tools/testing/selftests/powerpc/ptrace/ |
D | ptrace-gpr.c | 41 FAIL_IF(validate_gpr(gpr_buf, parent_gpr_val)); in child() 42 FAIL_IF(validate_fpr_double(fpr_buf, parent_fpr_val)); in child() 52 FAIL_IF(start_trace(child)); in trace_gpr() 55 FAIL_IF(show_gpr(child, gpr)); in trace_gpr() 56 FAIL_IF(validate_gpr(gpr, child_gpr_val)); in trace_gpr() 59 FAIL_IF(show_fpr(child, fpr)); in trace_gpr() 61 FAIL_IF(validate_fpr(fpr, tmp)); in trace_gpr() 65 FAIL_IF(!peeked_fprs); in trace_gpr() 66 FAIL_IF(validate_fpr(peeked_fprs, tmp)); in trace_gpr() 70 FAIL_IF(write_gpr(child, parent_gpr_val)); in trace_gpr() [all …]
|
D | ptrace-tm-gpr.c | 92 FAIL_IF(start_trace(child)); in trace_tm_gpr() 93 FAIL_IF(show_gpr(child, gpr)); in trace_tm_gpr() 94 FAIL_IF(validate_gpr(gpr, GPR_2)); in trace_tm_gpr() 95 FAIL_IF(show_fpr(child, fpr)); in trace_tm_gpr() 96 FAIL_IF(validate_fpr(fpr, FPR_2_REP)); in trace_tm_gpr() 97 FAIL_IF(show_ckpt_fpr(child, fpr)); in trace_tm_gpr() 98 FAIL_IF(validate_fpr(fpr, FPR_1_REP)); in trace_tm_gpr() 99 FAIL_IF(show_ckpt_gpr(child, gpr)); in trace_tm_gpr() 100 FAIL_IF(validate_gpr(gpr, GPR_1)); in trace_tm_gpr() 101 FAIL_IF(write_ckpt_gpr(child, GPR_3)); in trace_tm_gpr() [all …]
|
D | ptrace-tm-spd-gpr.c | 98 FAIL_IF(start_trace(child)); in trace_tm_spd_gpr() 99 FAIL_IF(show_gpr(child, gpr)); in trace_tm_spd_gpr() 100 FAIL_IF(validate_gpr(gpr, GPR_4)); in trace_tm_spd_gpr() 101 FAIL_IF(show_fpr(child, fpr)); in trace_tm_spd_gpr() 102 FAIL_IF(validate_fpr(fpr, FPR_4_REP)); in trace_tm_spd_gpr() 103 FAIL_IF(show_ckpt_fpr(child, fpr)); in trace_tm_spd_gpr() 104 FAIL_IF(validate_fpr(fpr, FPR_1_REP)); in trace_tm_spd_gpr() 105 FAIL_IF(show_ckpt_gpr(child, gpr)); in trace_tm_spd_gpr() 106 FAIL_IF(validate_gpr(gpr, GPR_1)); in trace_tm_spd_gpr() 107 FAIL_IF(write_ckpt_gpr(child, GPR_3)); in trace_tm_spd_gpr() [all …]
|
D | ptrace-tm-spd-vsx.c | 101 FAIL_IF(start_trace(child)); in trace_tm_spd_vsx() 102 FAIL_IF(show_vsx(child, vsx)); in trace_tm_spd_vsx() 103 FAIL_IF(validate_vsx(vsx, fp_load)); in trace_tm_spd_vsx() 104 FAIL_IF(show_vmx(child, vmx)); in trace_tm_spd_vsx() 105 FAIL_IF(validate_vmx(vmx, fp_load)); in trace_tm_spd_vsx() 106 FAIL_IF(show_vsx_ckpt(child, vsx)); in trace_tm_spd_vsx() 107 FAIL_IF(validate_vsx(vsx, fp_load_ckpt)); in trace_tm_spd_vsx() 108 FAIL_IF(show_vmx_ckpt(child, vmx)); in trace_tm_spd_vsx() 109 FAIL_IF(validate_vmx(vmx, fp_load_ckpt)); in trace_tm_spd_vsx() 116 FAIL_IF(write_vsx_ckpt(child, vsx)); in trace_tm_spd_vsx() [all …]
|
D | ptrace-tm-vsx.c | 89 FAIL_IF(start_trace(child)); in trace_tm_vsx() 90 FAIL_IF(show_vsx(child, vsx)); in trace_tm_vsx() 91 FAIL_IF(validate_vsx(vsx, fp_load)); in trace_tm_vsx() 92 FAIL_IF(show_vmx(child, vmx)); in trace_tm_vsx() 93 FAIL_IF(validate_vmx(vmx, fp_load)); in trace_tm_vsx() 94 FAIL_IF(show_vsx_ckpt(child, vsx)); in trace_tm_vsx() 95 FAIL_IF(validate_vsx(vsx, fp_load_ckpt)); in trace_tm_vsx() 96 FAIL_IF(show_vmx_ckpt(child, vmx)); in trace_tm_vsx() 97 FAIL_IF(validate_vmx(vmx, fp_load_ckpt)); in trace_tm_vsx() 103 FAIL_IF(write_vsx_ckpt(child, vsx)); in trace_tm_vsx() [all …]
|
/linux-6.1.9/tools/testing/selftests/powerpc/papr_attributes/ |
D | attr_test.c | 68 FAIL_IF(errno); in verify_energy_info() 71 FAIL_IF(!S_ISDIR(s.st_mode)); in verify_energy_info() 86 FAIL_IF(attr_type == INVALID); in verify_energy_info() 91 FAIL_IF(!f); in verify_energy_info() 92 FAIL_IF(fgetc(f) == EOF); in verify_energy_info() 96 FAIL_IF(!f); in verify_energy_info() 97 FAIL_IF(fgetc(f) == EOF); in verify_energy_info() 102 FAIL_IF(!f); in verify_energy_info() 103 FAIL_IF(fgetc(f) == EOF); in verify_energy_info()
|