/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/powerpc/syscalls/ |
D | rtas_filter.c | 57 int rc; in read_entire_file() local 70 rc = read(fd, *buf + off, BLOCK_SIZE); in read_entire_file() 71 if (rc < 0) in read_entire_file() 74 off += rc; in read_entire_file() 75 } while (rc == BLOCK_SIZE); in read_entire_file() 107 int rc, fd; in get_property() local 109 rc = open_prop_file(prop_path, prop_name, &fd); in get_property() 110 if (rc) in get_property() 111 return rc; in get_property() 113 rc = read_entire_file(fd, prop_val, prop_len); in get_property() [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 | 250 int cpu, rc; in tm_trap_test() local 278 rc = pthread_attr_init(&attr); in tm_trap_test() 279 if (rc) in tm_trap_test() 280 pr_error(rc, "pthread_attr_init()"); in tm_trap_test() 287 rc = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in tm_trap_test() 288 if (rc) in tm_trap_test() 289 pr_error(rc, "pthread_attr_setaffinity()"); in tm_trap_test() 298 rc = fflush(0); in tm_trap_test() 299 if (rc) in tm_trap_test() 300 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/ |
D | utils.c | 32 int rc, fd; in read_auxv() local 43 rc = -EIO; in read_auxv() 49 rc = -EOVERFLOW; in read_auxv() 53 rc = 0; in read_auxv() 56 return rc; in read_auxv() 130 int rc; in is_ppc64le() local 133 rc = uname(&uts); in is_ppc64le() 134 if (rc) { in is_ppc64le() 145 int rc = -1, fd; in read_sysfs_file() local 150 return rc; in read_sysfs_file() [all …]
|
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()
|
/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/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 | 93 rc |= do_test(#name, test_##name) 104 rc |= do_test(#name, test_##name) 223 int offset, width, fd, rc, r; in do_test() local 246 rc = posix_memalign(&mem0, bufsize, bufsize); in do_test() 247 if (rc) { in do_test() 249 return rc; in do_test() 252 rc = posix_memalign(&mem1, bufsize, bufsize); in do_test() 253 if (rc) { in do_test() 256 return rc; in do_test() 259 rc = 0; in do_test() [all …]
|
/tools/testing/selftests/bpf/prog_tests/ |
D | section_names.c | 10 int rc; member 15 int rc; member 167 int rc; in test_prog_type_by_name() local 169 rc = libbpf_prog_type_by_name(test->sec_name, &prog_type, in test_prog_type_by_name() 172 CHECK(rc != test->expected_load.rc, "check_code", in test_prog_type_by_name() 173 "prog: unexpected rc=%d for %s\n", rc, test->sec_name); in test_prog_type_by_name() 175 if (rc) in test_prog_type_by_name() 190 int rc; in test_attach_type_by_name() local 192 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); in test_attach_type_by_name() 194 CHECK(rc != test->expected_attach.rc, "check_ret", in test_attach_type_by_name() [all …]
|
/tools/testing/selftests/net/ |
D | nettest.c | 263 int rc; in tcp_md5sig() local 287 rc = setsockopt(sd, IPPROTO_TCP, opt, &md5sig, sizeof(md5sig)); in tcp_md5sig() 288 if (rc < 0) { in tcp_md5sig() 291 rc = 0; in tcp_md5sig() 296 return rc; in tcp_md5sig() 337 int sd, rc; in get_ifidx() local 352 rc = ioctl(sd, SIOCGIFINDEX, (char *)&ifdata); in get_ifidx() 354 if (rc != 0) { in get_ifidx() 364 int rc; in bind_to_device() local 366 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/testing/selftests/powerpc/mm/ |
D | stack_expansion_ldst.c | 81 int rc; in search_proc_maps() local 90 rc = sscanf(buf, "%lx-%lx %*c%*c%*c%*c %*x %*d:%*d %*d %127s\n", in search_proc_maps() 92 if (rc == 2) in search_proc_maps() 95 if (rc != 3) { in search_proc_maps() 97 rc = -1; in search_proc_maps() 104 rc = 0; in search_proc_maps() 111 return rc; in search_proc_maps() 132 int rc; in test_one() local 138 assert(waitpid(pid, &rc, 0) != -1); in test_one() 140 if (WIFEXITED(rc) && WEXITSTATUS(rc) == 0) in test_one() [all …]
|
/tools/testing/selftests/sysctl/ |
D | sysctl.sh | 204 if [[ $rc != 0 ]]; then 205 echo "Failed test, return value: $rc" >&2 206 exit $rc 218 exit $rc 225 rc=0 271 rc=1 281 rc=1 291 rc=1 302 rc=1 320 rc=1 [all …]
|
/tools/testing/selftests/powerpc/nx-gzip/ |
D | gzip_vas.c | 53 int rc, fd; in open_device_nodes() local 66 rc = ioctl(fd, VAS_TX_WIN_OPEN, (unsigned long)&txattr); in open_device_nodes() 67 if (rc < 0) { in open_device_nodes() 68 fprintf(stderr, "ioctl() n %d, error %d\n", rc, errno); in open_device_nodes() 69 rc = -errno; in open_device_nodes() 76 rc = -errno; in open_device_nodes() 82 rc = 0; in open_device_nodes() 85 return rc; in open_device_nodes() 90 int rc; in nx_function_begin() local 109 rc = open_device_nodes(devname, pri, nxhandle); in nx_function_begin() [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/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/nci/ |
D | nci_dev.c | 187 int rc; in get_family_id() local 189 rc = send_get_nfc_family(sd, pid); in get_family_id() 191 if (rc < 0) in get_family_id() 253 int rc, resp_len; in get_nci_devid() local 255 rc = send_cmd_with_idx(sd, fid, pid, NFC_CMD_GET_DEVICE, dev_id); in get_nci_devid() 256 if (rc < 0) { in get_nci_devid() 257 rc = -1; in get_nci_devid() 263 rc = -2; in get_nci_devid() 269 rc = -3; in get_nci_devid() 275 return rc; in get_nci_devid() [all …]
|
/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 …]
|