Home
last modified time | relevance | path

Searched refs:TEST_ASSERT_EQ (Results 1 – 25 of 33) sorted by relevance

12

/linux-6.12.1/tools/testing/selftests/kvm/x86_64/
Dtsc_msrs_test.c106 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), val); in main()
107 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main()
112 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), val); in main()
113 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main()
118 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), val); in main()
119 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main()
126 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), HOST_ADJUST + val); in main()
127 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main()
132 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), HOST_ADJUST + val); in main()
133 TEST_ASSERT_EQ(vcpu_get_msr(vcpu, MSR_IA32_TSC_ADJUST), UNITY * 123456); in main()
[all …]
Dprivate_mem_kvm_exits_test.c37 TEST_ASSERT_EQ(vcpu->run->exit_reason, KVM_EXIT_MEMORY_FAULT); in run_vcpu_get_exit_reason()
77 TEST_ASSERT_EQ(exit_reason, KVM_EXIT_MEMORY_FAULT); in test_private_access_memslot_deleted()
78 TEST_ASSERT_EQ(vcpu->run->memory_fault.flags, KVM_MEMORY_EXIT_FLAG_PRIVATE); in test_private_access_memslot_deleted()
79 TEST_ASSERT_EQ(vcpu->run->memory_fault.gpa, EXITS_TEST_GPA); in test_private_access_memslot_deleted()
80 TEST_ASSERT_EQ(vcpu->run->memory_fault.size, EXITS_TEST_SIZE); in test_private_access_memslot_deleted()
106 TEST_ASSERT_EQ(exit_reason, KVM_EXIT_MEMORY_FAULT); in test_private_access_memslot_not_private()
107 TEST_ASSERT_EQ(vcpu->run->memory_fault.flags, KVM_MEMORY_EXIT_FLAG_PRIVATE); in test_private_access_memslot_not_private()
108 TEST_ASSERT_EQ(vcpu->run->memory_fault.gpa, EXITS_TEST_GPA); in test_private_access_memslot_not_private()
109 TEST_ASSERT_EQ(vcpu->run->memory_fault.size, EXITS_TEST_SIZE); in test_private_access_memslot_not_private()
Dxen_vmcall_test.c112 TEST_ASSERT_EQ(run->xen.type, KVM_EXIT_XEN_HCALL); in main()
113 TEST_ASSERT_EQ(run->xen.u.hcall.cpl, 0); in main()
114 TEST_ASSERT_EQ(run->xen.u.hcall.longmode, 1); in main()
115 TEST_ASSERT_EQ(run->xen.u.hcall.input, INPUTVALUE); in main()
116 TEST_ASSERT_EQ(run->xen.u.hcall.params[0], ARGVALUE(1)); in main()
117 TEST_ASSERT_EQ(run->xen.u.hcall.params[1], ARGVALUE(2)); in main()
118 TEST_ASSERT_EQ(run->xen.u.hcall.params[2], ARGVALUE(3)); in main()
119 TEST_ASSERT_EQ(run->xen.u.hcall.params[3], ARGVALUE(4)); in main()
120 TEST_ASSERT_EQ(run->xen.u.hcall.params[4], ARGVALUE(5)); in main()
121 TEST_ASSERT_EQ(run->xen.u.hcall.params[5], ARGVALUE(6)); in main()
Ddirty_log_page_splitting_test.c76 TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_SYNC); in vcpu_worker()
110 TEST_ASSERT_EQ(host_num_pages, pages_per_slot * SLOTS); in run_test()
171 TEST_ASSERT_EQ((stats_populated.pages_2m * 512 + in run_test()
183 TEST_ASSERT_EQ(stats_clear_pass[0].hugepages, 0); in run_test()
187 TEST_ASSERT_EQ(stats_dirty_logging_enabled.hugepages, stats_populated.hugepages); in run_test()
189 TEST_ASSERT_EQ(stats_dirty_logging_enabled.hugepages, 0); in run_test()
200 TEST_ASSERT_EQ(stats_populated.pages_2m, stats_repopulated.pages_2m); in run_test()
201 TEST_ASSERT_EQ(stats_populated.pages_1g, stats_repopulated.pages_1g); in run_test()
Dsev_smoke_test.c112 TEST_ASSERT_EQ(vcpu->run->system_event.type, KVM_SYSTEM_EVENT_SEV_TERM); in test_sync_vmsa()
113 TEST_ASSERT_EQ(vcpu->run->system_event.ndata, 1); in test_sync_vmsa()
114 TEST_ASSERT_EQ(vcpu->run->system_event.data[0], GHCB_MSR_TERM_REQ); in test_sync_vmsa()
141 TEST_ASSERT_EQ(vcpu->run->system_event.type, KVM_SYSTEM_EVENT_SEV_TERM); in test_sev()
142 TEST_ASSERT_EQ(vcpu->run->system_event.ndata, 1); in test_sev()
143 TEST_ASSERT_EQ(vcpu->run->system_event.data[0], GHCB_MSR_TERM_REQ); in test_sev()
Drecalc_apic_map_test.c60 TEST_ASSERT_EQ(pthread_create(&thread, NULL, race, vcpus[0]), 0); in main()
68 TEST_ASSERT_EQ(pthread_cancel(thread), 0); in main()
69 TEST_ASSERT_EQ(pthread_join(thread, NULL), 0); in main()
Dnested_exceptions_test.c246 TEST_ASSERT_EQ(events.flags & KVM_VCPUEVENT_VALID_PAYLOAD, in main()
248 TEST_ASSERT_EQ(events.exception.pending, true); in main()
249 TEST_ASSERT_EQ(events.exception.nr, SS_VECTOR); in main()
250 TEST_ASSERT_EQ(events.exception.has_error_code, true); in main()
251 TEST_ASSERT_EQ(events.exception.error_code, SS_ERROR_CODE); in main()
Dxapic_state_test.c77 TEST_ASSERT_EQ(get_ucall(vcpu, &uc), UCALL_SYNC); in ____test_icr()
78 TEST_ASSERT_EQ(uc.args[1], val); in ____test_icr()
91 TEST_ASSERT_EQ(icr & ~APIC_ICR_BUSY, val & ~APIC_ICR_BUSY); in ____test_icr()
93 TEST_ASSERT_EQ(icr, val & ~APIC_ICR_BUSY); in ____test_icr()
Dexit_on_emulation_failure_test.c35 TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_DONE); in main()
Dsync_regs_test.c184 TEST_ASSERT_EQ(pthread_create(&thread, NULL, racer, (void *)run), 0); in race_sync_regs()
202 TEST_ASSERT_EQ(pthread_cancel(thread), 0); in race_sync_regs()
203 TEST_ASSERT_EQ(pthread_join(thread, NULL), 0); in race_sync_regs()
Dpmu_event_filter_test.c791 TEST_ASSERT_EQ(!!count, !!(bitmap & BIT(idx))); in __test_fixed_counter_bitmap()
795 TEST_ASSERT_EQ(!!count, !(bitmap & BIT(idx))); in __test_fixed_counter_bitmap()
804 TEST_ASSERT_EQ(!!count, !!(bitmap & BIT(idx))); in __test_fixed_counter_bitmap()
809 TEST_ASSERT_EQ(!!count, !(bitmap & BIT(idx))); in __test_fixed_counter_bitmap()
Dvmx_exception_with_invalid_guest_state.c53 TEST_ASSERT_EQ(setitimer(ITIMER_REAL, &timer, NULL), 0); in set_timer()
Dvmx_pmu_caps_test.c103 TEST_ASSERT_EQ(vcpu_get_msr(vcpu, MSR_IA32_PERF_CAPABILITIES), in KVM_ONE_VCPU_TEST()
/linux-6.12.1/tools/testing/selftests/kvm/s390x/
Dcmma_test.c235 TEST_ASSERT_EQ(rc, -1); in test_get_cmma_basic()
236 TEST_ASSERT_EQ(errno_out, ENXIO); in test_get_cmma_basic()
245 TEST_ASSERT_EQ(rc, -1); in test_get_cmma_basic()
246 TEST_ASSERT_EQ(errno_out, EINVAL); in test_get_cmma_basic()
250 TEST_ASSERT_EQ(rc, 0); in test_get_cmma_basic()
251 TEST_ASSERT_EQ(errno_out, 0); in test_get_cmma_basic()
258 TEST_ASSERT_EQ(rc, -1); in test_get_cmma_basic()
259 TEST_ASSERT_EQ(errno_out, EINVAL); in test_get_cmma_basic()
266 TEST_ASSERT_EQ(vcpu->run->exit_reason, 13); in assert_exit_was_hypercall()
267 TEST_ASSERT_EQ(vcpu->run->s390_sieic.icptcode, 4); in assert_exit_was_hypercall()
[all …]
Ddebug_test.c50 TEST_ASSERT_EQ(vcpu->run->psw_mask, new_psw[0]); in test_step_int()
51 TEST_ASSERT_EQ(vcpu->run->psw_addr, new_psw[1]); in test_step_int()
88 TEST_ASSERT_EQ(vcpu->run->s390_sieic.icptcode, ICPT_INST); in test_step_pgm_diag()
89 TEST_ASSERT_EQ(vcpu->run->s390_sieic.ipa & 0xff00, IPA0_DIAG); in test_step_pgm_diag()
93 TEST_ASSERT_EQ(vcpu->run->psw_mask, new_psw[0]); in test_step_pgm_diag()
94 TEST_ASSERT_EQ(vcpu->run->psw_addr, new_psw[1]); in test_step_pgm_diag()
Ducontrol_test.c38 TEST_ASSERT_EQ(0, rc); in require_ucontrol_admin()
283 TEST_ASSERT_EQ(KVM_EXIT_S390_SIEIC, self->run->exit_reason); in uc_assert_diag44()
284 TEST_ASSERT_EQ(ICPT_INST, sie_block->icptcode); in uc_assert_diag44()
285 TEST_ASSERT_EQ(0x8300, sie_block->ipa); in uc_assert_diag44()
286 TEST_ASSERT_EQ(0x440000, sie_block->ipb); in uc_assert_diag44()
Dtprot.c195 TEST_ASSERT_EQ(uc.cmd, UCALL_SYNC); \
196 TEST_ASSERT_EQ(uc.args[1], __stage); \
Dshared_zeropage_test.c96 TEST_ASSERT_EQ(uc.cmd, UCALL_DONE); in main()
/linux-6.12.1/tools/testing/selftests/kvm/aarch64/
Daarch32_id_regs.c101 TEST_ASSERT_EQ(val, 0); in test_user_raz_wi()
110 TEST_ASSERT_EQ(val, 0); in test_user_raz_wi()
130 TEST_ASSERT_EQ(val, 0); in test_user_raz_invariant()
137 TEST_ASSERT_EQ(val, 0); in test_user_raz_invariant()
Dset_id_regs.c360 TEST_ASSERT_EQ(new_val, val); in test_reg_set_success()
388 TEST_ASSERT_EQ(val, old_val); in test_reg_set_fail()
434 TEST_ASSERT_EQ(masks[idx] & ftr_bits[j].mask, ftr_bits[j].mask); in test_vm_ftr_id_regs()
460 TEST_ASSERT_EQ(test_reg_vals[encoding_to_range_idx(uc.args[2])], in test_guest_reg_read()
539 TEST_ASSERT_EQ(test_reg_vals[idx], observed); in test_assert_id_reg_unchanged()
Dpage_fault_test.c319 TEST_ASSERT_EQ(addr, (uint64_t)args->hva); in uffd_generic_handler()
433 TEST_ASSERT_EQ(run->mmio.phys_addr, region->region.guest_phys_addr); in mmio_on_test_gpa_handler()
632 TEST_ASSERT_EQ(test->expected_events.uffd_faults, events.uffd_faults); in check_event_counts()
633 TEST_ASSERT_EQ(test->expected_events.mmio_exits, events.mmio_exits); in check_event_counts()
634 TEST_ASSERT_EQ(test->expected_events.fail_vcpu_runs, events.fail_vcpu_runs); in check_event_counts()
/linux-6.12.1/tools/testing/selftests/kvm/lib/x86_64/
Dsev.c75 TEST_ASSERT_EQ(status.policy, policy); in sev_vm_launch()
76 TEST_ASSERT_EQ(status.state, SEV_GUEST_STATE_LAUNCH_UPDATE); in sev_vm_launch()
97 TEST_ASSERT_EQ(guest_status.state, SEV_GUEST_STATE_LAUNCH_SECRET); in sev_vm_launch_measure()
112 TEST_ASSERT_EQ(status.state, SEV_GUEST_STATE_RUNNING); in sev_vm_launch_finish()
/linux-6.12.1/tools/testing/selftests/kvm/riscv/
Debreak_test.c64 TEST_ASSERT_EQ(pc, LABEL_ADDRESS(sw_bp_1)); in main()
78 TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_DONE); in main()
/linux-6.12.1/tools/testing/selftests/kvm/
Dguest_memfd_test.c42 TEST_ASSERT_EQ(mem, MAP_FAILED); in test_mmap()
52 TEST_ASSERT_EQ(sb.st_size, total_size); in test_file_size()
53 TEST_ASSERT_EQ(sb.st_blksize, page_size); in test_file_size()
Dcoalesced_io_test.c172 TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_SYNC); in test_coalesced_io()
173 TEST_ASSERT_EQ(ring->first, ring_start); in test_coalesced_io()
174 TEST_ASSERT_EQ(ring->last, ring_start); in test_coalesced_io()

12