Lines Matching refs:TEST_ASSERT
63 TEST_ASSERT(r < path_size, in get_module_param_bool()
69 TEST_ASSERT(r == 1, "read(%s) failed", path); in get_module_param_bool()
72 TEST_ASSERT(!r, "close(%s) failed", path); in get_module_param_bool()
115 TEST_ASSERT(ret >= 0, KVM_IOCTL_ERROR(KVM_CHECK_EXTENSION, ret)); in kvm_check_cap()
138 TEST_ASSERT(vm->fd >= 0, KVM_IOCTL_ERROR(KVM_CREATE_VM, vm->fd)); in vm_open()
163 TEST_ASSERT(i < NUM_VM_MODES, "Guest mode ID %d too big", i); in vm_guest_mode_string()
196 TEST_ASSERT(vm != NULL, "Insufficient Memory"); in ____vm_create()
249 TEST_ASSERT(vm->va_bits == 48 || vm->va_bits == 57, in ____vm_create()
303 TEST_ASSERT(nr_runnable_vcpus, in vm_nr_pages_required()
306 TEST_ASSERT(nr_runnable_vcpus <= kvm_check_cap(KVM_CAP_MAX_VCPUS), in vm_nr_pages_required()
375 TEST_ASSERT(!nr_vcpus || vcpus, "Must provide vCPU array"); in __vm_create_with_vcpus()
422 TEST_ASSERT(ret == 0, "KVM_SET_USER_MEMORY_REGION IOCTL failed,\n" in kvm_vm_restart()
540 TEST_ASSERT(!ret, __KVM_SYSCALL_ERROR("munmap()", ret)); in vm_vcpu_rm()
545 TEST_ASSERT(!ret, __KVM_SYSCALL_ERROR("munmap()", ret)); in vm_vcpu_rm()
548 TEST_ASSERT(!ret, __KVM_SYSCALL_ERROR("close()", ret)); in vm_vcpu_rm()
565 TEST_ASSERT(!ret, __KVM_SYSCALL_ERROR("close()", ret)); in kvm_vm_release()
568 TEST_ASSERT(!ret, __KVM_SYSCALL_ERROR("close()", ret)); in kvm_vm_release()
588 TEST_ASSERT(!ret, __KVM_SYSCALL_ERROR("munmap()", ret)); in __vm_mem_region_delete()
634 TEST_ASSERT(fd != -1, __KVM_SYSCALL_ERROR("memfd_create()", fd)); in kvm_memfd_alloc()
637 TEST_ASSERT(!r, __KVM_SYSCALL_ERROR("ftruncate()", r)); in kvm_memfd_alloc()
640 TEST_ASSERT(!r, __KVM_SYSCALL_ERROR("fallocate()", r)); in kvm_memfd_alloc()
729 TEST_ASSERT(region->region.guest_phys_addr != in vm_userspace_mem_region_gpa_insert()
754 TEST_ASSERT(region->host_mem != in vm_userspace_mem_region_hva_insert()
786 TEST_ASSERT(!ret, "KVM_SET_USER_MEMORY_REGION failed, errno = %d (%s)", in vm_set_user_memory_region()
822 TEST_ASSERT(vm_adjust_num_guest_pages(vm->mode, npages) == npages, in vm_userspace_mem_region_add()
826 TEST_ASSERT((guest_paddr % vm->page_size) == 0, "Guest physical " in vm_userspace_mem_region_add()
830 TEST_ASSERT((((guest_paddr >> vm->page_shift) + npages) - 1) in vm_userspace_mem_region_add()
871 TEST_ASSERT(region != NULL, "Insufficient Memory"); in vm_userspace_mem_region_add()
905 TEST_ASSERT(region->mmap_start != MAP_FAILED, in vm_userspace_mem_region_add()
908 TEST_ASSERT(!is_backing_src_hugetlb(src_type) || in vm_userspace_mem_region_add()
921 TEST_ASSERT(ret == 0, "madvise failed, addr: %p length: 0x%lx src_type: %s", in vm_userspace_mem_region_add()
935 TEST_ASSERT(ret == 0, "KVM_SET_USER_MEMORY_REGION IOCTL failed,\n" in vm_userspace_mem_region_add()
953 TEST_ASSERT(region->mmap_alias != MAP_FAILED, in vm_userspace_mem_region_add()
1019 TEST_ASSERT(ret == 0, "KVM_SET_USER_MEMORY_REGION IOCTL failed,\n" in vm_mem_region_set_flags()
1049 TEST_ASSERT(!ret, "KVM_SET_USER_MEMORY_REGION failed\n" in vm_mem_region_move()
1080 TEST_ASSERT(ret >= sizeof(struct kvm_run), in vcpu_mmap_sz()
1109 TEST_ASSERT(!vcpu_exists(vm, vcpu_id), "vCPU%d already exists\n", vcpu_id); in __vm_vcpu_add()
1113 TEST_ASSERT(vcpu != NULL, "Insufficient Memory"); in __vm_vcpu_add()
1118 TEST_ASSERT(vcpu->fd >= 0, KVM_IOCTL_ERROR(KVM_CREATE_VCPU, vcpu->fd)); in __vm_vcpu_add()
1120 TEST_ASSERT(vcpu_mmap_sz() >= sizeof(*vcpu->run), "vcpu mmap size " in __vm_vcpu_add()
1125 TEST_ASSERT(vcpu->run != MAP_FAILED, in __vm_vcpu_add()
1204 TEST_ASSERT(sparsebit_is_set_num(vm->vpages_valid, in vm_vaddr_unused_gap()
1210 TEST_ASSERT(sparsebit_is_clear_num(vm->vpages_mapped, in vm_vaddr_unused_gap()
1326 TEST_ASSERT(vaddr + size > vaddr, "Vaddr overflow"); in virt_map()
1327 TEST_ASSERT(paddr + size > paddr, "Paddr overflow"); in virt_map()
1472 TEST_ASSERT(!ret, KVM_IOCTL_ERROR(KVM_RUN, ret)); in vcpu_run()
1483 TEST_ASSERT(ret == -1 && errno == EINTR, in vcpu_run_complete_io()
1499 TEST_ASSERT(ret == -1 && errno == E2BIG, "KVM_GET_REG_LIST n=0"); in vcpu_get_reg_list()
1512 TEST_ASSERT(size > 0, "Should enable dirty ring first"); in vcpu_map_dirty_ring()
1519 TEST_ASSERT(addr == MAP_FAILED, "Dirty ring mapped private"); in vcpu_map_dirty_ring()
1523 TEST_ASSERT(addr == MAP_FAILED, "Dirty ring mapped exec"); in vcpu_map_dirty_ring()
1527 TEST_ASSERT(addr != MAP_FAILED, "Dirty ring map failed"); in vcpu_map_dirty_ring()
1571 TEST_ASSERT(err <= 0, "KVM_CREATE_DEVICE shouldn't return a positive value"); in __kvm_create_device()
1617 TEST_ASSERT(ret >= 0, KVM_IOCTL_ERROR(KVM_IRQ_LINE, ret)); in kvm_irq_line()
1667 TEST_ASSERT(!ret, KVM_IOCTL_ERROR(KVM_SET_GSI_ROUTING, ret)); in kvm_gsi_routing_write()
1805 TEST_ASSERT(num > 0, "Must allocate at least one page"); in vm_phy_pages_alloc()
1807 TEST_ASSERT((paddr_min % vm->page_size) == 0, "Min physical address " in vm_phy_pages_alloc()
1940 TEST_ASSERT(stats_desc, "Allocate memory for stats descriptors"); in read_stats_descriptors()
1943 TEST_ASSERT(ret == total_size, "Read KVM stats descriptors"); in read_stats_descriptors()
1970 TEST_ASSERT(desc->size, "No elements in stat '%s'", desc->name); in read_stat_data()
1971 TEST_ASSERT(max_elements, "Zero elements requested for stat '%s'", desc->name); in read_stat_data()
1976 TEST_ASSERT(ret >= 0, "pread() failed on stat '%s', errno: %i (%s)", in read_stat_data()
1978 TEST_ASSERT(ret == size, in read_stat_data()