/linux-master/tools/testing/selftests/kvm/s390x/ |
H A D | resets.c | 65 TEST_ASSERT(eval_reg == value, "value == 0x%lx", value); 81 TEST_ASSERT(irqs >= 0, "Could not fetch IRQs: errno %d", errno); 82 TEST_ASSERT(!irqs, "IRQ pending"); 93 TEST_ASSERT(!memcmp(®s.gprs, regs_null, sizeof(regs.gprs)), "grs == 0"); 96 TEST_ASSERT(!memcmp(&sregs.acrs, regs_null, sizeof(sregs.acrs)), "acrs == 0"); 99 TEST_ASSERT(!memcmp(&fpu.fprs, regs_null, sizeof(fpu.fprs)), "fprs == 0"); 102 TEST_ASSERT(!memcmp(sync_regs->gprs, regs_null, sizeof(sync_regs->gprs)), 105 TEST_ASSERT(!memcmp(sync_regs->acrs, regs_null, sizeof(sync_regs->acrs)), 108 TEST_ASSERT(!memcmp(sync_regs->vrs, regs_null, sizeof(sync_regs->vrs)), 116 TEST_ASSERT(sync_reg [all...] |
H A D | sync_regs_test.c | 40 TEST_ASSERT(left->reg == right->reg, \ 46 TEST_ASSERT(left->reg == right->reg, \ 84 TEST_ASSERT(rv < 0 && errno == EINVAL, 91 TEST_ASSERT(rv < 0 && errno == EINVAL, 105 TEST_ASSERT(rv < 0 && errno == EINVAL, 112 TEST_ASSERT(rv < 0 && errno == EINVAL, 128 TEST_ASSERT(rv == 0, "vcpu_run failed: %d", rv); 130 TEST_ASSERT(run->s390_sieic.icptcode == 4 && 164 TEST_ASSERT(rv == 0, "vcpu_run failed: %d", rv); 166 TEST_ASSERT(ru [all...] |
/linux-master/tools/testing/selftests/kvm/x86_64/ |
H A D | max_vcpuid_cap_test.c | 26 TEST_ASSERT(ret < 0, 35 TEST_ASSERT(ret < 0, 40 TEST_ASSERT(ret < 0, "Creating vCPU with ID > MAX_VCPU_ID should fail");
|
H A D | flds_emulation.h | 29 TEST_ASSERT(run->emulation_failure.suberror == KVM_INTERNAL_ERROR_EMULATION, 34 TEST_ASSERT(run->emulation_failure.ndata >= 3 && 38 TEST_ASSERT(run->emulation_failure.insn_size >= 2, 43 TEST_ASSERT(insn_bytes[0] == 0xd9 && insn_bytes[1] == 0,
|
H A D | hyperv_cpuid.c | 53 TEST_ASSERT(hv_cpuid_entries->nent == nent_expected, 61 TEST_ASSERT((entry->function >= 0x40000000) && 66 TEST_ASSERT(entry->index == 0, 69 TEST_ASSERT(entry->flags == 0, 72 TEST_ASSERT(!entry->padding[0] && !entry->padding[1] && 79 TEST_ASSERT(entry->eax == test_val, 88 TEST_ASSERT(!!test_val == !smt_possible(), 93 TEST_ASSERT(entry->eax & (1UL << 19), 97 TEST_ASSERT((entry->eax & 0xffff) == 0x101, 126 TEST_ASSERT(re [all...] |
H A D | xss_msr_test.c | 31 TEST_ASSERT(xss_val == 0, 50 TEST_ASSERT(!r || r == 1, KVM_IOCTL_ERROR(KVM_SET_MSRS, r)); 51 TEST_ASSERT(r != 1 || xss_in_msr_list,
|
H A D | vmx_dirty_log_test.c | 151 TEST_ASSERT(test_bit(0, bmap), "Page 0 incorrectly reported clean"); 152 TEST_ASSERT(host_test_mem[0] == 1, "Page 0 not written by guest"); 154 TEST_ASSERT(!test_bit(0, bmap), "Page 0 incorrectly reported dirty"); 155 TEST_ASSERT(host_test_mem[0] == 0xaaaaaaaaaaaaaaaaULL, "Page 0 written by guest"); 158 TEST_ASSERT(!test_bit(1, bmap), "Page 1 incorrectly reported dirty"); 159 TEST_ASSERT(host_test_mem[4096 / 8] == 0xaaaaaaaaaaaaaaaaULL, "Page 1 written by guest"); 160 TEST_ASSERT(!test_bit(2, bmap), "Page 2 incorrectly reported dirty"); 161 TEST_ASSERT(host_test_mem[8192 / 8] == 0xaaaaaaaaaaaaaaaaULL, "Page 2 written by guest");
|
H A D | hwcr_msr_test.c | 23 TEST_ASSERT(val & ~legal ? !r : r == 1, 28 TEST_ASSERT(actual == (val & valid),
|
H A D | set_boot_cpu_id.c | 42 TEST_ASSERT(r == -1 && errno == EBUSY, "KVM_SET_BOOT_CPU_ID set %s", msg); 56 TEST_ASSERT(!strcmp((const char *)uc.args[0], "hello") && 63 TEST_ASSERT(stage == 1, 70 TEST_ASSERT(false, "Unexpected exit: %s",
|
H A D | ucna_injection_test.c | 145 TEST_ASSERT(get_ucall(vcpu, &uc) == UCALL_SYNC, 147 TEST_ASSERT(uc.args[1] == SYNC_GP, "#GP is expected."); 183 TEST_ASSERT(r == 0, 190 TEST_ASSERT(get_ucall(params->vcpu, &uc) == UCALL_SYNC, 192 TEST_ASSERT(uc.args[1] == SYNC_FIRST_UCNA, "Injecting first UCNA."); 200 TEST_ASSERT(get_ucall(params->vcpu, &uc) == UCALL_SYNC, 202 TEST_ASSERT(uc.args[1] == SYNC_SECOND_UCNA, "Injecting second UCNA."); 211 TEST_ASSERT(false, "vCPU assertion failure: %s.", 229 TEST_ASSERT(*params->p_i_ucna_rcvd == 1, "Only first UCNA get signaled."); 230 TEST_ASSERT(*param [all...] |
H A D | xen_shinfo_test.c | 483 TEST_ASSERT(zero_fd != -1, "Failed to open /dev/zero"); 512 TEST_ASSERT(ruf.u.runstate_update_flag == 1, 535 TEST_ASSERT(m == shinfo, "Failed to map /dev/zero over shared info"); 666 TEST_ASSERT(rs->state_entry_time == rs->time[0] + 679 TEST_ASSERT(!evtchn_irq_expected, "Event channel IRQ not seen"); 749 TEST_ASSERT(!evtchn_irq_expected, 762 TEST_ASSERT(!evtchn_irq_expected, 782 TEST_ASSERT(!evtchn_irq_expected, 793 TEST_ASSERT(!evtchn_irq_expected, 806 TEST_ASSERT(!evtchn_irq_expecte [all...] |
/linux-master/tools/testing/selftests/kvm/lib/ |
H A D | elf.c | 22 TEST_ASSERT(fd >= 0, "Failed to open ELF file,\n" 35 TEST_ASSERT((ident[EI_MAG0] == ELFMAG0) && (ident[EI_MAG1] == ELFMAG1) 44 TEST_ASSERT(ident[EI_CLASS] == ELFCLASS64, 51 TEST_ASSERT(((BYTE_ORDER == LITTLE_ENDIAN) 66 TEST_ASSERT(ident[EI_VERSION] == EV_CURRENT, 80 TEST_ASSERT(offset_rv == 0, "Seek to ELF header failed,\n" 83 TEST_ASSERT(hdrp->e_phentsize == sizeof(Elf64_Phdr), 88 TEST_ASSERT(hdrp->e_shentsize == sizeof(Elf64_Shdr), 106 * Return: None, TEST_ASSERT failures for all error conditions 122 TEST_ASSERT(f [all...] |
H A D | io.c | 22 * error (e.g. EIO). Such errors cause a TEST_ASSERT failure. 28 * write(2) or cause a TEST_ASSERT failure. 39 * On failure, a TEST_ASSERT failure is caused. 51 TEST_ASSERT(count >= 0, "Unexpected count, count: %li", count); 58 TEST_ASSERT(errno == EAGAIN || errno == EINTR, 70 TEST_ASSERT(rc >= 0, "Unexpected ret from write,\n" 94 * error (e.g. EIO). Such errors cause a TEST_ASSERT failure. Note, 96 * contains at least the number of requested bytes to be read. A TEST_ASSERT 105 * read(2) or cause a TEST_ASSERT failure. 116 * On failure, a TEST_ASSERT failur [all...] |
H A D | test_util.c | 49 TEST_ASSERT(size && isdigit(size[0]), "Need at least one digit in '%s'", size); 53 TEST_ASSERT(base != ULLONG_MAX, "Overflow parsing size!"); 73 TEST_ASSERT(false, "Unknown size letter %c", *scale); 76 TEST_ASSERT((base << shift) >> shift == base, "Overflow scaling size!"); 143 TEST_ASSERT(ret == 0 || (ret == -1 && errno == ENOENT), 155 TEST_ASSERT(thp_configured(), "THP is not configured in host kernel"); 158 TEST_ASSERT(f != NULL, "Error in opening transparent_hugepage/hpage_pmd_size"); 162 TEST_ASSERT(ret < 1, "Error reading transparent_hugepage/hpage_pmd_size"); 176 TEST_ASSERT(f != NULL, "Error in opening /proc/meminfo"); 288 TEST_ASSERT( [all...] |
H A D | userfaultfd_util.c | 71 TEST_ASSERT(r == 1, 128 TEST_ASSERT(uffd_desc, "malloc failed"); 135 TEST_ASSERT(uffd >= 0, "uffd creation failed, errno: %d", errno); 139 TEST_ASSERT(ioctl(uffd, UFFDIO_API, &uffdio_api) != -1, 146 TEST_ASSERT(ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) != -1, 148 TEST_ASSERT((uffdio_register.ioctls & expected_ioctls) == 152 TEST_ASSERT(!ret, "Failed to set up pipefd"); 173 TEST_ASSERT(ret == 1, "Unable to write to pipefd"); 176 TEST_ASSERT(ret == 0, "Pthread_join failed.");
|
H A D | kvm_util.c | 31 TEST_ASSERT(fd >= 0, "Failed to open '%s'", path); 65 TEST_ASSERT(r < path_size, 71 TEST_ASSERT(bytes_read > 0, "read(%s) returned %ld, wanted %ld bytes", 75 TEST_ASSERT(!r, "close(%s) failed", path); 92 TEST_ASSERT(value[r - 1] == '\n', 159 * specified by the value of cap. On failure a TEST_ASSERT failure 172 TEST_ASSERT(ret >= 0, KVM_IOCTL_ERROR(KVM_CHECK_EXTENSION, ret)); 195 TEST_ASSERT(vm->fd >= 0, KVM_IOCTL_ERROR(KVM_CREATE_VM, vm->fd)); 221 TEST_ASSERT(i < NUM_VM_MODES, "Guest mode ID %d too big", i); 270 TEST_ASSERT(v [all...] |
/linux-master/tools/testing/selftests/kvm/ |
H A D | guest_memfd_test.c | 29 TEST_ASSERT(read(fd, buf, sizeof(buf)) < 0, 31 TEST_ASSERT(write(fd, buf, sizeof(buf)) < 0, 33 TEST_ASSERT(pread(fd, buf, sizeof(buf), 0) < 0, 35 TEST_ASSERT(pwrite(fd, buf, sizeof(buf), 0) < 0, 53 TEST_ASSERT(!ret, "fstat should succeed"); 63 TEST_ASSERT(!ret, "fallocate with aligned offset and size should succeed"); 67 TEST_ASSERT(ret, "fallocate with unaligned offset should fail"); 70 TEST_ASSERT(ret, "fallocate beginning at total_size should fail"); 73 TEST_ASSERT(ret, "fallocate beginning after total_size should fail"); 77 TEST_ASSERT(!re [all...] |
H A D | kvm_binary_stats_test.c | 44 TEST_ASSERT(id, "Allocate memory for id string"); 47 TEST_ASSERT(ret == header.name_size, 52 TEST_ASSERT(!strncmp(id, "kvm", 3) && strlen(id) < header.name_size, 65 TEST_ASSERT(header.desc_offset && header.desc_offset >= sizeof(header) && 69 TEST_ASSERT(header.desc_offset > header.data_offset || 84 TEST_ASSERT(strlen(pdesc->name) < header.name_size, 88 TEST_ASSERT(type <= KVM_STATS_TYPE_MAX, 90 TEST_ASSERT(unit <= KVM_STATS_UNIT_MAX, 92 TEST_ASSERT(base <= KVM_STATS_BASE_MAX, 108 TEST_ASSERT(pdes [all...] |
H A D | rseq_test.c | 58 TEST_ASSERT(CPU_ISSET(cpu, &possible_mask), 93 TEST_ASSERT(!r, "sched_setaffinity failed, errno = %d (%s)", 197 TEST_ASSERT(!r, "sched_getaffinity failed, errno = %d (%s)", errno, 203 TEST_ASSERT(!r, "rseq_register_current_thread failed, errno = %d (%s)", 218 TEST_ASSERT(get_ucall(vcpu, NULL) == UCALL_SYNC, 241 TEST_ASSERT(!r, "getcpu failed, errno = %d (%s)", 247 TEST_ASSERT(rseq_cpu == cpu, 258 TEST_ASSERT(i > (NR_TASK_MIGRATIONS / 2),
|
H A D | hardware_disable_test.c | 44 TEST_ASSERT(false, "%s: exited with reason %d: %s", 58 TEST_ASSERT(false, "%s: exited", __func__); 68 TEST_ASSERT(r == 0, "%s: failed to create thread", __func__); 76 TEST_ASSERT(r == 0, "%s: failed set affinity", __func__); 84 TEST_ASSERT(r == 0, "%s: failed to join thread", __func__); 121 TEST_ASSERT(false, "%s: [%d] child escaped the ninja", __func__, run); 150 TEST_ASSERT(false, "Child exited unexpectedly"); 165 TEST_ASSERT(pid >= 0, "%s: unable to fork", __func__); 175 TEST_ASSERT(r != pid,
|
H A D | kvm_create_max_vcpus.c | 58 TEST_ASSERT(!getrlimit(RLIMIT_NOFILE, &rl), "getrlimit() failed!"); 71 TEST_ASSERT(!setrlimit(RLIMIT_NOFILE, &rl), "setrlimit() failed!"); 83 TEST_ASSERT(kvm_max_vcpu_id >= kvm_max_vcpus,
|
/linux-master/tools/testing/selftests/kvm/aarch64/ |
H A D | vcpu_width_config.c | 95 TEST_ASSERT(ret == 0, 98 TEST_ASSERT(ret == 0, 104 TEST_ASSERT(ret == 0, 107 TEST_ASSERT(ret == 0, 114 TEST_ASSERT(ret != 0, 117 TEST_ASSERT(ret != 0,
|
H A D | smccc_filter.c | 58 TEST_ASSERT(!ret, "failed to configure SMCCC filter: %d", ret); 93 TEST_ASSERT(r < 0 && errno == EINVAL, 107 TEST_ASSERT(r < 0 && errno == EEXIST, 114 TEST_ASSERT(r < 0 && errno == EEXIST, 127 TEST_ASSERT(r < 0 && errno == EINVAL, 140 TEST_ASSERT(r < 0 && errno == EINVAL, 153 TEST_ASSERT(r < 0 && errno == EINVAL, 170 TEST_ASSERT(r < 0 && errno == EEXIST, 183 TEST_ASSERT(uc.args[1] == SMCCC_RET_NOT_SUPPORTED, 212 TEST_ASSERT(ru [all...] |
/linux-master/tools/testing/selftests/kvm/lib/riscv/ |
H A D | ucall.c | 24 TEST_ASSERT(0, "Unexpected trap taken by guest");
|
/linux-master/tools/testing/selftests/kvm/lib/s390x/ |
H A D | diag318_test_handler.c | 39 TEST_ASSERT(run->s390_sieic.icptcode == ICPT_INSTRUCTION, 41 TEST_ASSERT((run->s390_sieic.ipa & 0xff00) == IPA0_DIAG, 47 TEST_ASSERT(diag318_info != 0, "DIAGNOSE 0x0318 info not set");
|