/tools/testing/selftests/kvm/s390x/ |
D | sync_regs_test.c | 72 int rv, cap; in main() local 90 rv = _vcpu_run(vm, VCPU_ID); in main() 91 TEST_ASSERT(rv < 0 && errno == EINVAL, in main() 93 rv); in main() 97 rv = _vcpu_run(vm, VCPU_ID); in main() 98 TEST_ASSERT(rv < 0 && errno == EINVAL, in main() 100 rv); in main() 105 rv = _vcpu_run(vm, VCPU_ID); in main() 106 TEST_ASSERT(rv < 0 && errno == EINVAL, in main() 108 rv); in main() [all …]
|
D | memop.c | 37 int rv, i, maxsize; in main() local 93 rv = _vcpu_ioctl(vm, VCPU_ID, KVM_S390_MEM_OP, &ksmo); in main() 94 TEST_ASSERT(rv == -1 && errno == E2BIG, "ioctl allows insane sizes"); in main() 103 rv = _vcpu_ioctl(vm, VCPU_ID, KVM_S390_MEM_OP, &ksmo); in main() 104 TEST_ASSERT(rv == -1 && (errno == EINVAL || errno == ENOMEM), in main() 114 rv = _vcpu_ioctl(vm, VCPU_ID, KVM_S390_MEM_OP, &ksmo); in main() 115 TEST_ASSERT(rv == -1 && errno == EINVAL, "ioctl allows all flags"); in main() 124 rv = _vcpu_ioctl(vm, VCPU_ID, KVM_S390_MEM_OP, &ksmo); in main() 125 TEST_ASSERT(rv == -1 && errno == EINVAL, "ioctl allows bad operations"); in main() 134 rv = _vcpu_ioctl(vm, VCPU_ID, KVM_S390_MEM_OP, &ksmo); in main() [all …]
|
/tools/testing/selftests/proc/ |
D | read.c | 42 ssize_t rv; in f_reg() local 48 rv = read(fd, buf, sizeof(buf)); in f_reg() 49 assert((0 <= rv && rv <= sizeof(buf)) || rv == -1); in f_reg() 56 ssize_t rv; in f_reg_write() local 61 rv = write(fd, buf, len); in f_reg_write() 62 assert((0 <= rv && rv <= len) || rv == -1); in f_reg_write() 69 ssize_t rv; in f_lnk() local 71 rv = readlinkat(dirfd(d), filename, buf, sizeof(buf)); in f_lnk() 72 assert((0 <= rv && rv <= sizeof(buf)) || rv == -1); in f_lnk()
|
D | proc-loadavg-001.c | 43 ssize_t rv; in main() local 48 rv = read(fd, buf, sizeof(buf)); in main() 49 if (rv < 3) in main() 51 p = buf + rv; in main() 66 rv = read(fd, buf, sizeof(buf)); in main() 67 if (rv < 3) in main() 69 p = buf + rv; in main()
|
D | fd-002-posix-eq.c | 30 int rv; in main() local 43 rv = fstat(fd0, &st0); in main() 44 assert(rv == 0); in main() 45 rv = fstat(fd1, &st1); in main() 46 assert(rv == 0); in main() 47 rv = fstat(fd2, &st2); in main() 48 assert(rv == 0); in main()
|
D | proc-pid-vm.c | 317 ssize_t rv; in main() local 325 rv = read(fd, buf, sizeof(buf)); in main() 326 assert(rv == len); in main() 336 ssize_t rv; in main() local 344 rv = read(fd, buf, sizeof(buf)); in main() 345 assert(0 <= rv && rv <= sizeof(buf)); in main() 347 assert(rv >= strlen(buf0)); in main() 354 assert(memmem(buf, rv, RSS1, strlen(RSS1)) || in main() 355 memmem(buf, rv, RSS2, strlen(RSS2))); in main() 356 assert(memmem(buf, rv, PSS1, strlen(PSS1)) || in main() [all …]
|
D | self.c | 28 ssize_t rv; in main() local 33 rv = readlink("/proc/self", buf2, sizeof(buf2)); in main() 34 assert(rv == strlen(buf1)); in main() 35 buf2[rv] = '\0'; in main()
|
D | fd-003-kthread.c | 45 ssize_t rv; in kernel_thread_fd() local 61 rv = read(fd, buf, sizeof(buf)); in kernel_thread_fd() 63 if (0 < rv && rv <= sizeof(buf)) { in kernel_thread_fd() 68 assert(buf[rv - 1] == '\n'); in kernel_thread_fd() 69 buf[rv - 1] = '\0'; in kernel_thread_fd() 125 int rv; in test_lookup_fail() local 127 rv = sys_statx(fd, pathname, AT_SYMLINK_NOFOLLOW, 0, (void *)stx); in test_lookup_fail() 128 assert(rv == -1 && errno == ENOENT); in test_lookup_fail()
|
D | proc-uptime.h | 29 ssize_t rv; in proc_uptime() local 33 rv = pread(fd, buf, sizeof(buf), 0); in proc_uptime() 34 assert(0 <= rv && rv <= sizeof(buf)); in proc_uptime() 59 assert(p + 4 == buf + rv); in proc_uptime()
|
D | proc-self-syscall.c | 36 ssize_t rv; in main() local 50 rv = sys_read(fd, buf2, sizeof(buf2)); in main() 51 if (rv < 0) in main() 53 if (rv < strlen(buf1)) in main()
|
D | thread-self.c | 31 ssize_t rv; in f() local 37 rv = readlink("/proc/thread-self", buf2, sizeof(buf2)); in f() 38 assert(rv == strlen(buf1)); in f() 39 buf2[rv] = '\0'; in f()
|
D | setns-sysvipc.c | 112 ssize_t rv; in main() local 122 rv = read(fd, buf, sizeof(buf)); in main() 123 if (rv == strlen(S32)) { in main() 125 } else if (rv == strlen(S64)) { in main()
|
D | fd-001-lookup.c | 36 ssize_t rv; in test_lookup_pass() local 39 rv = lstat(pathname, &st); in test_lookup_pass() 40 assert(rv == 0); in test_lookup_pass() 47 ssize_t rv; in test_lookup_fail() local 49 rv = lstat(pathname, &st); in test_lookup_fail() 50 assert(rv == -1 && errno == ENOENT); in test_lookup_fail()
|
D | setns-dcache.c | 113 ssize_t rv; in main() local 122 rv = read(fd, buf, sizeof(buf)); in main() 124 assert(rv == strlen(S)); in main()
|
/tools/testing/selftests/bpf/ |
D | test_tcpbpf_user.c | 61 int rv; in verify_sockopt_result() local 64 rv = bpf_map_lookup_elem(sock_map_fd, &key, &res); in verify_sockopt_result() 65 EXPECT_EQ(0, rv, "d"); in verify_sockopt_result() 69 rv = bpf_map_lookup_elem(sock_map_fd, &key, &res); in verify_sockopt_result() 70 EXPECT_EQ(0, rv, "d"); in verify_sockopt_result() 100 int rv; in main() local 117 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main() 118 if (rv) { in main() 137 rv = bpf_map_lookup_elem(map_fd, &key, &g); in main() 138 if (rv != 0) { in main() [all …]
|
D | test_tcpnotify_user.c | 78 int prog_fd, rv, cg_fd = -1; in main() local 104 rv = bpf_prog_attach(prog_fd, cg_fd, BPF_CGROUP_SOCK_OPS, 0); in main() 105 if (rv) { in main() 145 rv = bpf_map_lookup_elem(bpf_map__fd(global_map), &key, &g); in main() 146 if (rv != 0) { in main() 147 printf("FAILED: bpf_map_lookup_elem returns %d\n", rv); in main()
|
/tools/testing/selftests/kvm/x86_64/ |
D | sync_regs_test.c | 87 int rv, cap; in main() local 109 rv = _vcpu_run(vm, VCPU_ID); in main() 110 TEST_ASSERT(rv < 0 && errno == EINVAL, in main() 112 rv); in main() 116 rv = _vcpu_run(vm, VCPU_ID); in main() 117 TEST_ASSERT(rv < 0 && errno == EINVAL, in main() 119 rv); in main() 124 rv = _vcpu_run(vm, VCPU_ID); in main() 125 TEST_ASSERT(rv < 0 && errno == EINVAL, in main() 127 rv); in main() [all …]
|
D | platform_info_test.c | 84 int rv; in main() local 90 rv = kvm_check_cap(KVM_CAP_MSR_PLATFORM_INFO); in main() 91 if (!rv) { in main()
|
D | hyperv_cpuid.c | 136 int rv; in main() local 142 rv = kvm_check_cap(KVM_CAP_HYPERV_CPUID); in main() 143 if (!rv) { in main()
|
D | vmx_set_nested_state_test.c | 39 int rv; in test_nested_state_expect_errno() local 41 rv = vcpu_nested_state_set(vm, VCPU_ID, state, true); in test_nested_state_expect_errno() 42 TEST_ASSERT(rv == -1 && errno == expected_errno, in test_nested_state_expect_errno() 44 strerror(expected_errno), expected_errno, rv, strerror(errno), in test_nested_state_expect_errno()
|
/tools/testing/selftests/bpf/progs/ |
D | test_tcpnotify_kern.c | 36 int rv = -1; in bpf_testcb() local 52 rv = 1; in bpf_testcb() 61 rv = 1; in bpf_testcb() 73 rv = 1; in bpf_testcb() 90 rv = -1; in bpf_testcb() 92 skops->reply = rv; in bpf_testcb()
|
D | test_tcpbpf_kern.c | 61 int rv = -1; in bpf_testcb() local 94 rv = bpf_setsockopt(skops, SOL_IPV6, IPV6_TCLASS, &v, in bpf_testcb() 148 rv = -1; in bpf_testcb() 150 skops->reply = rv; in bpf_testcb()
|
/tools/testing/selftests/powerpc/tm/ |
D | tm-resched-dscr.c | 40 uint64_t rv, dscr1 = 1, dscr2, texasr; in test_body() local 73 : [rv]"=r"(rv), [dscr2]"=m"(dscr2), [texasr]"=m"(texasr) in test_body() 78 assert(rv); /* make sure the transaction aborted */ in test_body()
|
/tools/testing/selftests/exec/ |
D | recursion-depth.c | 61 int rv = execve(FILENAME, NULL, NULL); in main() local 62 if (rv == -1 && errno == ELOOP) { in main() 65 fprintf(stderr, "error: execve, rv %d, errno %d\n", rv, errno); in main()
|
/tools/perf/util/ |
D | namespaces.c | 73 int rv = -1; in nsinfo__init() local 76 return rv; in nsinfo__init() 79 return rv; in nsinfo__init() 120 rv = 0; in nsinfo__init() 127 return rv; in nsinfo__init()
|