/tools/testing/selftests/rtc/ |
D | rtctest.c | 40 int rc; in TEST_F() local 44 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm); in TEST_F() 45 ASSERT_NE(-1, rc); in TEST_F() 53 int i, rc, irq = 0; variable 57 rc = ioctl(self->fd, RTC_UIE_ON, 0); 58 if (rc == -1) { 66 rc = read(self->fd, &data, sizeof(data)); 67 ASSERT_NE(-1, rc); 73 rc = ioctl(self->fd, RTC_UIE_OFF, 0); 74 ASSERT_NE(-1, rc); [all …]
|
/tools/testing/selftests/kvm/lib/ |
D | io.c | 43 ssize_t rc; in test_write() local 54 rc = write(fd, ptr, num_left); in test_write() 56 switch (rc) { in test_write() 60 " rc: %zi errno: %i", rc, errno); in test_write() 66 rc, num_written, num_left); in test_write() 70 TEST_ASSERT(rc >= 0, "Unexpected ret from write,\n" in test_write() 71 " rc: %zi errno: %i", rc, errno); in test_write() 72 num_written += rc; in test_write() 73 num_left -= rc; in test_write() 74 ptr += rc; in test_write() [all …]
|
/tools/testing/selftests/ia64/ |
D | aliasing-test.c | 26 int fd, rc; in map_mem() local 37 rc = ioctl(fd, PCIIOC_MMAP_IS_MEM); in map_mem() 38 if (rc == -1) in map_mem() 52 rc = munmap(addr, length); in map_mem() 53 if (rc == -1) { in map_mem() 66 int i, n, r, rc = 0, result = 0; in scan_tree() local 89 rc = map_mem(path2, offset, length, touch); in scan_tree() 90 if (rc == 0) in scan_tree() 92 else if (rc > 0) in scan_tree() 96 return rc; in scan_tree() [all …]
|
/tools/testing/selftests/efivarfs/ |
D | open-unlink.c | 17 int rc; in set_immutable() local 24 rc = ioctl(fd, FS_IOC_GETFLAGS, &flags); in set_immutable() 25 if (rc < 0) { in set_immutable() 29 return rc; in set_immutable() 37 rc = ioctl(fd, FS_IOC_SETFLAGS, &flags); in set_immutable() 41 return rc; in set_immutable() 48 int rc; in get_immutable() local 55 rc = ioctl(fd, FS_IOC_GETFLAGS, &flags); in get_immutable() 56 if (rc < 0) { in get_immutable() 60 return rc; in get_immutable() [all …]
|
/tools/testing/selftests/powerpc/tm/ |
D | tm-trap.c | 251 int rc; in tm_trap_test() local 275 rc = pthread_attr_init(&attr); in tm_trap_test() 276 if (rc) in tm_trap_test() 277 pr_error(rc, "pthread_attr_init()"); in tm_trap_test() 284 rc = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in tm_trap_test() 285 if (rc) in tm_trap_test() 286 pr_error(rc, "pthread_attr_setaffinity()"); in tm_trap_test() 295 rc = fflush(0); in tm_trap_test() 296 if (rc) in tm_trap_test() 297 pr_error(rc, "fflush()"); in tm_trap_test() [all …]
|
D | tm-unavailable.c | 315 int rc; in test_fp_vec() local 318 rc = pthread_create(&t0, attr, tm_una_ping, (void *) &flags); in test_fp_vec() 319 if (rc) in test_fp_vec() 320 pr_err(rc, "pthread_create()"); in test_fp_vec() 321 rc = pthread_setname_np(t0, "tm_una_ping"); in test_fp_vec() 322 if (rc) in test_fp_vec() 323 pr_warn(rc, "pthread_setname_np"); in test_fp_vec() 324 rc = pthread_join(t0, &ret_value); in test_fp_vec() 325 if (rc) in test_fp_vec() 326 pr_err(rc, "pthread_join"); in test_fp_vec() [all …]
|
/tools/testing/selftests/powerpc/pmu/ |
D | lib.c | 75 int rc; in wait_for_child() local 77 if (waitpid(child_pid, &rc, 0) == -1) { in wait_for_child() 82 if (WIFEXITED(rc)) in wait_for_child() 83 rc = WEXITSTATUS(rc); in wait_for_child() 85 rc = 1; /* Signal or other */ in wait_for_child() 87 return rc; in wait_for_child() 119 int cpu, rc; in eat_cpu() local 137 rc = -1; in eat_cpu() 143 rc = test_function(); in eat_cpu() 147 return rc; in eat_cpu() [all …]
|
/tools/testing/selftests/net/ |
D | nettest.c | 207 int rc; in tcp_md5sig() local 216 rc = setsockopt(sd, IPPROTO_TCP, TCP_MD5SIG, &md5sig, sizeof(md5sig)); in tcp_md5sig() 217 if (rc < 0) { in tcp_md5sig() 220 rc = 0; in tcp_md5sig() 225 return rc; in tcp_md5sig() 266 int sd, rc; in get_ifidx() local 281 rc = ioctl(sd, SIOCGIFINDEX, (char *)&ifdata); in get_ifidx() 283 if (rc != 0) { in get_ifidx() 293 int rc; in bind_to_device() local 295 rc = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name)+1); in bind_to_device() [all …]
|
D | fib_tests.sh | 24 local rc=$1 28 if [ ${rc} -eq ${expected} ]; then 521 local cmd out rc 533 rc=$? 537 log_test $rc $erc "$desc" 693 rc=$? 700 return $rc 707 local rc=0 724 rc=1 733 return $rc [all …]
|
/tools/usb/usbip/src/ |
D | usbip_attach.c | 83 int rc; in import_device() local 87 rc = usbip_vhci_driver_open(); in import_device() 88 if (rc < 0) { in import_device() 102 rc = usbip_vhci_attach_device(port, sockfd, udev->busnum, in import_device() 104 if (rc < 0 && errno != EBUSY) { in import_device() 108 } while (rc < 0); in import_device() 122 int rc; in query_import_device() local 132 rc = usbip_net_send_op_common(sockfd, OP_REQ_IMPORT, 0); in query_import_device() 133 if (rc < 0) { in query_import_device() 142 rc = usbip_net_send(sockfd, (void *) &request, sizeof(request)); in query_import_device() [all …]
|
D | usbip_bind.c | 42 int rc = -1; in bind_usbip() local 48 rc = write_sysfs_attribute(bind_attr_path, busid, strlen(busid)); in bind_usbip() 49 if (rc < 0) { in bind_usbip() 65 int rc = -1; in unbind_other() local 113 rc = write_sysfs_attribute(unbind_attr_path, busid, strlen(busid)); in unbind_other() 114 if (rc < 0) { in unbind_other() 132 int rc; in bind_device() local 154 rc = unbind_other(busid); in bind_device() 155 if (rc == UNBIND_ST_FAILED) { in bind_device() 158 } else if (rc == UNBIND_ST_USBIP_HOST) { in bind_device() [all …]
|
D | usbipd.c | 99 int rc; in recv_request_import() local 103 rc = usbip_net_recv(sockfd, &req, sizeof(req)); in recv_request_import() 104 if (rc < 0) { in recv_request_import() 132 rc = usbip_net_send_op_common(sockfd, OP_REP_IMPORT, status); in recv_request_import() 133 if (rc < 0) { in recv_request_import() 146 rc = usbip_net_send(sockfd, &pdu_udev, sizeof(pdu_udev)); in recv_request_import() 147 if (rc < 0) { in recv_request_import() 164 int rc, i; in send_reply_devlist() local 184 rc = usbip_net_send_op_common(connfd, OP_REP_DEVLIST, ST_OK); in send_reply_devlist() 185 if (rc < 0) { in send_reply_devlist() [all …]
|
D | usbip_unbind.c | 33 int rc, ret = -1; in unbind_device() local 66 rc = write_sysfs_attribute(unbind_attr_path, busid, strlen(busid)); in unbind_device() 67 if (rc < 0) { in unbind_device() 73 rc = modify_match_busid(busid, 0); in unbind_device() 74 if (rc < 0) { in unbind_device() 84 rc = write_sysfs_attribute(rebind_attr_path, busid, strlen(busid)); in unbind_device() 85 if (rc < 0) { in unbind_device()
|
/tools/testing/selftests/powerpc/alignment/ |
D | alignment_handler.c | 85 rc |= do_test(#name, test_##name) 193 int offset, width, fd, rc, r; in do_test() local 215 rc = posix_memalign(&mem0, bufsize, bufsize); in do_test() 216 if (rc) { in do_test() 218 return rc; in do_test() 221 rc = posix_memalign(&mem1, bufsize, bufsize); in do_test() 222 if (rc) { in do_test() 225 return rc; in do_test() 228 rc = 0; in do_test() 247 rc = 1; in do_test() [all …]
|
/tools/testing/selftests/bpf/ |
D | test_section_names.c | 12 int rc; member 17 int rc; member 153 int rc; in test_prog_type_by_name() local 155 rc = libbpf_prog_type_by_name(test->sec_name, &prog_type, in test_prog_type_by_name() 158 if (rc != test->expected_load.rc) { in test_prog_type_by_name() 159 warnx("prog: unexpected rc=%d for %s", rc, test->sec_name); in test_prog_type_by_name() 163 if (rc) in test_prog_type_by_name() 184 int rc; in test_attach_type_by_name() local 186 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); in test_attach_type_by_name() 188 if (rc != test->expected_attach.rc) { in test_attach_type_by_name() [all …]
|
/tools/testing/selftests/powerpc/ |
D | harness.c | 30 int rc, status; in run_test() local 53 rc = waitpid(pid, &status, 0); in run_test() 54 if (rc == -1) { in run_test() 106 int rc; in test_harness() local 123 rc = run_test(test_function, name); in test_harness() 125 if (rc == MAGIC_SKIP_RETURN_VALUE) { in test_harness() 128 rc = 0; in test_harness() 130 test_finish(name, rc); in test_harness() 132 return rc; in test_harness()
|
D | utils.c | 33 int rc, fd; in read_auxv() local 44 rc = -EIO; in read_auxv() 50 rc = -EOVERFLOW; in read_auxv() 54 rc = 0; in read_auxv() 57 return rc; in read_auxv() 131 int rc; in is_ppc64le() local 134 rc = uname(&uts); in is_ppc64le() 135 if (rc) { in is_ppc64le() 145 int rc = -1, fd; in read_debugfs_file() local 153 return rc; in read_debugfs_file() [all …]
|
/tools/testing/selftests/rseq/ |
D | rseq.c | 74 int rc; in rseq_available() local 76 rc = sys_rseq(NULL, 0, 0, 0); in rseq_available() 77 if (rc != -1) in rseq_available() 91 int rc; in rseq_register_current_thread() local 97 rc = sys_rseq(&__rseq_abi, sizeof(struct rseq_abi), 0, RSEQ_SIG); in rseq_register_current_thread() 98 if (rc) in rseq_register_current_thread() 106 int rc; in rseq_unregister_current_thread() local 112 rc = sys_rseq(&__rseq_abi, sizeof(struct rseq_abi), RSEQ_ABI_FLAG_UNREGISTER, RSEQ_SIG); in rseq_unregister_current_thread() 113 if (rc) in rseq_unregister_current_thread()
|
/tools/testing/selftests/sysctl/ |
D | sysctl.sh | 211 if [[ $rc != 0 ]]; then 212 echo "Failed test, return value: $rc" >&2 213 exit $rc 225 exit $rc 232 rc=0 278 rc=1 288 rc=1 298 rc=1 309 rc=1 327 rc=1 [all …]
|
/tools/testing/selftests/ir/ |
D | ir_loopback.sh | 12 if ! /sbin/modprobe -q -n rc-loopback; then 17 /sbin/modprobe rc-loopback 22 RCDEV=$(grep -l DRV_NAME=rc-loopback /sys/class/rc/rc*/uevent | grep -o 'rc[0-9]\+')
|
/tools/testing/selftests/kvm/x86_64/ |
D | set_sregs_test.c | 31 int rc; in main() local 41 rc = _vcpu_sregs_set(vm, VCPU_ID, &sregs); in main() 42 TEST_ASSERT(rc, "Set IA32_APIC_BASE to %llx (invalid)", in main() 45 rc = _vcpu_sregs_set(vm, VCPU_ID, &sregs); in main() 46 TEST_ASSERT(!rc, "Couldn't set IA32_APIC_BASE to %llx (valid)", in main()
|
/tools/testing/selftests/powerpc/benchmarks/ |
D | fork.c | 139 int rc; in bench_thread() local 141 rc = pthread_attr_init(&attr); in bench_thread() 142 if (rc) { in bench_thread() 143 errno = rc; in bench_thread() 152 rc = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in bench_thread() 153 if (rc) { in bench_thread() 154 errno = rc; in bench_thread() 161 rc = pthread_create(&tid, &attr, null_fn, NULL); in bench_thread() 162 if (rc) { in bench_thread() 163 errno = rc; in bench_thread() [all …]
|
/tools/testing/selftests/powerpc/math/ |
D | fpu_signal.c | 58 long rc; in signal_fpu_c() local 62 rc = sigaction(SIGUSR1, &act, NULL); in signal_fpu_c() 63 if (rc) in signal_fpu_c() 70 rc = preempt_fpu(darray, &threads_starting, &running); in signal_fpu_c() 72 return (void *) rc; in signal_fpu_c() 77 int i, j, rc, threads; in test_signal_fpu() local 88 rc = pthread_create(&tids[i], NULL, signal_fpu_c, NULL); in test_signal_fpu() 89 FAIL_IF(rc); in test_signal_fpu()
|
D | fpu_preempt.c | 44 long rc; in preempt_fpu_c() local 51 rc = preempt_fpu(darray, &threads_starting, &running); in preempt_fpu_c() 53 return (void *)rc; in preempt_fpu_c() 58 int i, rc, threads; in test_preempt_fpu() local 68 rc = pthread_create(&tids[i], NULL, preempt_fpu_c, NULL); in test_preempt_fpu() 69 FAIL_IF(rc); in test_preempt_fpu()
|
/tools/testing/selftests/sparc64/drivers/ |
D | drivers_test.sh | 11 rc=1 21 rc=1 28 rc=0 30 exit $rc
|