Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 809) sorted by relevance

12345678910>>...33

/tools/testing/selftests/bpf/prog_tests/
Dtc_bpf.c30 int ret; in test_tc_bpf_basic() local
32 ret = bpf_obj_get_info_by_fd(fd, &info, &info_len); in test_tc_bpf_basic()
33 if (!ASSERT_OK(ret, "bpf_obj_get_info_by_fd")) in test_tc_bpf_basic()
34 return ret; in test_tc_bpf_basic()
36 ret = bpf_tc_attach(hook, &opts); in test_tc_bpf_basic()
37 if (!ASSERT_OK(ret, "bpf_tc_attach")) in test_tc_bpf_basic()
38 return ret; in test_tc_bpf_basic()
47 ret = bpf_tc_attach(hook, &opts); in test_tc_bpf_basic()
48 if (!ASSERT_OK(ret, "bpf_tc_attach replace mode")) in test_tc_bpf_basic()
52 ret = bpf_tc_query(hook, &opts); in test_tc_bpf_basic()
[all …]
/tools/testing/selftests/filesystems/
Ddevpts_pts.c18 int ret; in terminal_dup2() local
20 ret = dup2(duplicate, original); in terminal_dup2()
21 if (ret < 0) in terminal_dup2()
44 int ret; in login_pty() local
48 ret = ioctl(fd, TIOCSCTTY, NULL); in login_pty()
49 if (ret < 0) in login_pty()
52 ret = terminal_set_stdfds(fd); in login_pty()
53 if (ret < 0) in login_pty()
64 int status, ret; in wait_for_pid() local
67 ret = waitpid(pid, &status, 0); in wait_for_pid()
[all …]
/tools/power/x86/intel-speed-select/
Disst-core.c12 int ret; in isst_write_pm_config() local
19 ret = isst_send_mbox_command(cpu, WRITE_PM_CONFIG, PM_FEATURE, 0, req, in isst_write_pm_config()
21 if (ret) in isst_write_pm_config()
22 return ret; in isst_write_pm_config()
32 int ret; in isst_read_pm_config() local
34 ret = isst_send_mbox_command(cpu, READ_PM_CONFIG, PM_FEATURE, 0, 0, in isst_read_pm_config()
36 if (ret) in isst_read_pm_config()
37 return ret; in isst_read_pm_config()
50 int ret; in isst_get_ctdp_levels() local
52 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_ctdp_levels()
[all …]
/tools/include/nolibc/
Dnolibc.h419 long ret; in sys_stat() local
423 ret = my_syscall4(__NR_newfstatat, AT_FDCWD, path, &stat, 0); in sys_stat()
425 ret = my_syscall2(__NR_stat, path, &stat); in sys_stat()
442 return ret; in sys_stat()
515 void *ret = sys_brk(addr); in brk() local
517 if (!ret) { in brk()
533 int ret = sys_chdir(path); in chdir() local
535 if (ret < 0) { in chdir()
536 SET_ERRNO(-ret); in chdir()
537 ret = -1; in chdir()
[all …]
/tools/testing/selftests/uevent/
Duevent_filtering.c32 ssize_t ret; in read_nointr() local
35 ret = read(fd, buf, count); in read_nointr()
36 if (ret < 0 && errno == EINTR) in read_nointr()
39 return ret; in read_nointr()
44 ssize_t ret; in write_nointr() local
47 ret = write(fd, buf, count); in write_nointr()
48 if (ret < 0 && errno == EINTR) in write_nointr()
51 return ret; in write_nointr()
56 int status, ret; in wait_for_pid() local
59 ret = waitpid(pid, &status, 0); in wait_for_pid()
[all …]
/tools/gpio/
Dgpio-utils.c66 int ret; in gpiotools_request_line() local
68 ret = asprintf(&chrdev_name, "/dev/%s", device_name); in gpiotools_request_line()
69 if (ret < 0) in gpiotools_request_line()
74 ret = -errno; in gpiotools_request_line()
88 ret = ioctl(fd, GPIO_V2_GET_LINE_IOCTL, &req); in gpiotools_request_line()
89 if (ret == -1) { in gpiotools_request_line()
90 ret = -errno; in gpiotools_request_line()
92 "GPIO_GET_LINE_IOCTL", ret, strerror(errno)); in gpiotools_request_line()
99 return ret < 0 ? ret : req.fd; in gpiotools_request_line()
113 int ret; in gpiotools_set_values() local
[all …]
/tools/testing/selftests/powerpc/ptrace/
Dptrace-pkey.c74 int ret; in child() local
77 ret = wait_parent(&info->child_sync); in child()
78 if (ret) in child()
79 return ret; in child()
131 ret = prod_parent(&info->child_sync); in child()
132 CHILD_FAIL_IF(ret, &info->child_sync); in child()
134 ret = wait_parent(&info->child_sync); in child()
135 if (ret) in child()
136 return ret; in child()
147 ret = prod_parent(&info->child_sync); in child()
[all …]
Dptrace.h62 int ret; in start_trace() local
64 ret = ptrace(PTRACE_ATTACH, child, NULL, NULL); in start_trace()
65 if (ret) { in start_trace()
69 ret = waitpid(child, NULL, 0); in start_trace()
70 if (ret != child) { in start_trace()
79 int ret; in stop_trace() local
81 ret = ptrace(PTRACE_DETACH, child, NULL, NULL); in stop_trace()
82 if (ret) { in stop_trace()
91 int ret; in cont_trace() local
93 ret = ptrace(PTRACE_CONT, child, NULL, NULL); in cont_trace()
[all …]
Dcore-pkey.c77 int ret; in increase_core_file_limit() local
79 ret = getrlimit(RLIMIT_CORE, &rlim); in increase_core_file_limit()
80 FAIL_IF(ret); in increase_core_file_limit()
89 ret = setrlimit(RLIMIT_CORE, &rlim); in increase_core_file_limit()
90 FAIL_IF(ret); in increase_core_file_limit()
93 ret = getrlimit(RLIMIT_FSIZE, &rlim); in increase_core_file_limit()
94 FAIL_IF(ret); in increase_core_file_limit()
103 ret = setrlimit(RLIMIT_FSIZE, &rlim); in increase_core_file_limit()
104 FAIL_IF(ret); in increase_core_file_limit()
114 int *ptr, ret; in child() local
[all …]
/tools/iio/
Diio_utils.c34 int i, ret; in iioutils_break_up_name() local
65 ret = asprintf(generic_name, "%s_%s", prefix, working); in iioutils_break_up_name()
68 return (ret == -1) ? -ENOMEM : 0; in iioutils_break_up_name()
93 int ret; in iioutils_get_type() local
100 ret = asprintf(&scan_el_dir, FORMAT_SCAN_ELEMENTS_DIR, device_dir, buffer_idx); in iioutils_get_type()
101 if (ret < 0) in iioutils_get_type()
104 ret = asprintf(&builtname, FORMAT_TYPE_FILE, name); in iioutils_get_type()
105 if (ret < 0) { in iioutils_get_type()
106 ret = -ENOMEM; in iioutils_get_type()
109 ret = asprintf(&builtname_generic, FORMAT_TYPE_FILE, generic_name); in iioutils_get_type()
[all …]
/tools/testing/selftests/dmabuf-heaps/
Ddmabuf-heap.c26 int ret; in check_vgem() local
31 ret = ioctl(fd, DRM_IOCTL_VERSION, &version); in check_vgem()
32 if (ret) in check_vgem()
71 int ret; in import_vgem_fd() local
73 ret = ioctl(vgem_fd, DRM_IOCTL_PRIME_FD_TO_HANDLE, &import_handle); in import_vgem_fd()
74 if (ret == 0) in import_vgem_fd()
76 return ret; in import_vgem_fd()
90 int ret, fd; in dmabuf_heap_open() local
93 ret = snprintf(buf, 256, "%s/%s", DEVPATH, name); in dmabuf_heap_open()
94 if (ret < 0) { in dmabuf_heap_open()
[all …]
/tools/bootconfig/
Dmain.c114 int ret; in xbc_show_list() local
117 ret = xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX); in xbc_show_list()
118 if (ret < 0) { in xbc_show_list()
119 fprintf(stderr, "Failed to compose key %d\n", ret); in xbc_show_list()
135 int ret; in load_xbc_fd() local
141 ret = read(fd, *buf, size); in load_xbc_fd()
142 if (ret < 0) in load_xbc_fd()
146 return ret; in load_xbc_fd()
153 int fd, ret; in load_xbc_file() local
158 ret = fstat(fd, &stat); in load_xbc_file()
[all …]
/tools/testing/selftests/kvm/aarch64/
Dvgic_init.c55 int ret = _vcpu_ioctl(vm, vcpuid, KVM_RUN, NULL); in run_vcpu() local
56 if (ret) in run_vcpu()
85 int ret; in subtest_dist_rdist() local
96 ret = _kvm_device_check_attr(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, 0); in subtest_dist_rdist()
97 TEST_ASSERT(ret && errno == ENXIO, "attribute not supported"); in subtest_dist_rdist()
101 ret = _kvm_device_access(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
103 TEST_ASSERT(ret && errno == EINVAL, "GICv3 dist base not 64kB aligned"); in subtest_dist_rdist()
105 ret = _kvm_device_access(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
107 TEST_ASSERT(ret && errno == EINVAL, "GICv3 redist base not 64kB aligned"); in subtest_dist_rdist()
112 ret = _kvm_device_access(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
[all …]
/tools/testing/selftests/bpf/progs/
Dtest_tunnel_kern.c24 #define ERROR(ret) do {\ argument
26 bpf_trace_printk(fmt, sizeof(fmt), __LINE__, ret); \
48 int ret; in _gre_set_tunnel() local
57 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in _gre_set_tunnel()
59 if (ret < 0) { in _gre_set_tunnel()
60 ERROR(ret); in _gre_set_tunnel()
70 int ret; in _gre_get_tunnel() local
74 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in _gre_get_tunnel()
75 if (ret < 0) { in _gre_get_tunnel()
76 ERROR(ret); in _gre_get_tunnel()
[all …]
/tools/testing/selftests/timers/
Dset-2038.c51 int ret; in settime() local
56 ret = settimeofday(&now, NULL); in settime()
58 printf("Setting time to 0x%lx: %d\n", (long)time, ret); in settime()
59 return ret; in settime()
64 int ret; in do_tests() local
66 ret = system("date"); in do_tests()
67 ret = system("./inconsistency-check -c 0 -t 20"); in do_tests()
68 ret |= system("./nanosleep"); in do_tests()
69 ret |= system("./nsleep-lat"); in do_tests()
70 return ret; in do_tests()
[all …]
/tools/testing/selftests/vm/
Dmadv_populate.c34 int ret; in pagemap_get_entry() local
36 ret = pread(fd, &entry, sizeof(entry), pfn * sizeof(entry)); in pagemap_get_entry()
37 if (ret != sizeof(entry)) in pagemap_get_entry()
60 int ret; in sense_support() local
67 ret = madvise(addr, pagesize, MADV_POPULATE_READ); in sense_support()
68 if (ret) in sense_support()
71 ret = madvise(addr, pagesize, MADV_POPULATE_WRITE); in sense_support()
72 if (ret) in sense_support()
81 int ret; in test_prot_read() local
89 ret = madvise(addr, SIZE, MADV_POPULATE_READ); in test_prot_read()
[all …]
/tools/perf/tests/
Dexpr.c24 int ret; in test__expr() local
31 ret = test(&ctx, "1+1", 2); in test__expr()
32 ret |= test(&ctx, "FOO+BAR", 3); in test__expr()
33 ret |= test(&ctx, "(BAR/2)%2", 1); in test__expr()
34 ret |= test(&ctx, "1 - -4", 5); in test__expr()
35 ret |= test(&ctx, "(FOO-1)*2 + (BAR/2)%2 - -4", 5); in test__expr()
36 ret |= test(&ctx, "1-1 | 1", 1); in test__expr()
37 ret |= test(&ctx, "1-1 & 1", 0); in test__expr()
38 ret |= test(&ctx, "min(1,2) + 1", 2); in test__expr()
39 ret |= test(&ctx, "max(1,2) + 1", 3); in test__expr()
[all …]
/tools/testing/selftests/futex/functional/
Dfutex_requeue_pi.c53 int ret; member
73 int ret; in create_rt_thread() local
80 ret = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); in create_rt_thread()
81 if (ret) { in create_rt_thread()
82 error("pthread_attr_setinheritsched\n", ret); in create_rt_thread()
86 ret = pthread_attr_setschedpolicy(&attr, policy); in create_rt_thread()
87 if (ret) { in create_rt_thread()
88 error("pthread_attr_setschedpolicy\n", ret); in create_rt_thread()
93 ret = pthread_attr_setschedparam(&attr, &schedp); in create_rt_thread()
94 if (ret) { in create_rt_thread()
[all …]
/tools/perf/jvmti/
Dlibjvmti.c20 static void print_error(jvmtiEnv *jvmti, const char *msg, jvmtiError ret) in print_error() argument
24 err = (*jvmti)->GetErrorName(jvmti, ret, &err_msg); in print_error()
29 warnx("%s failed with an unknown error %d", msg, ret); in print_error()
40 jvmtiError ret; in do_get_line_number() local
43 ret = (*jvmti)->GetLineNumberTable(jvmti, m, &nr_lines, &loc_tab); in do_get_line_number()
44 if (ret == JVMTI_ERROR_ABSENT_INFORMATION || ret == JVMTI_ERROR_NATIVE_METHOD) { in do_get_line_number()
46 return ret; in do_get_line_number()
47 } else if (ret != JVMTI_ERROR_NONE) { in do_get_line_number()
48 print_error(jvmti, "GetLineNumberTable", ret); in do_get_line_number()
49 return ret; in do_get_line_number()
[all …]
/tools/testing/selftests/sparc64/drivers/
Dadi-test.c186 int ret, bytes_read = 0; in read_adi() local
191 ret = read(fd, buf + bytes_read, buf_sz - bytes_read); in read_adi()
193 if (ret < 0) in read_adi()
198 bytes_read += ret; in read_adi()
211 int ret, i, bytes_read = 0; in pread_adi() local
218 ret = pread(fd, buf + bytes_read, buf_sz - bytes_read, in pread_adi()
221 if (ret < 0) in pread_adi()
226 bytes_read += ret; in pread_adi()
227 cur_offset += ret; in pread_adi()
242 int ret, bytes_written = 0; in write_adi() local
[all …]
/tools/testing/selftests/resctrl/
Dcache.c68 int ret = 0; in reset_enable_llc_perf() local
70 ret = perf_event_open_llc_miss(pid, cpu_no); in reset_enable_llc_perf()
71 if (ret < 0) in reset_enable_llc_perf()
72 return ret; in reset_enable_llc_perf()
92 int ret; in get_llc_perf() local
98 ret = read(fd_lm, &rf_cqm, sizeof(struct read_format)); in get_llc_perf()
99 if (ret == -1) { in get_llc_perf()
178 int ret; in measure_cache_vals() local
184 ret = get_llc_perf(&llc_perf_miss); in measure_cache_vals()
185 if (ret < 0) in measure_cache_vals()
[all …]
/tools/testing/selftests/arm64/fp/
Dvec-syscfg.c61 int ret; in stdio_read_integer() local
63 ret = fscanf(f, "%d%*1[\n]%n", val, &n); in stdio_read_integer()
64 if (ret < 1 || n < 1) { in stdio_read_integer()
78 int read_vl, ret; in get_child_rdvl() local
80 ret = pipe(pipefd); in get_child_rdvl()
81 if (ret == -1) { in get_child_rdvl()
104 ret = dup2(pipefd[1], 1); in get_child_rdvl()
105 if (ret == -1) { in get_child_rdvl()
111 ret = execl(data->rdvl_binary, data->rdvl_binary, NULL); in get_child_rdvl()
122 pid = wait(&ret); in get_child_rdvl()
[all …]
/tools/wmi/
Ddell-smbios-example.c45 int ret; in run_wmi_smbios_cmd() local
48 ret = ioctl(fd, DELL_WMI_SMBIOS_CMD, buffer); in run_wmi_smbios_cmd()
50 return ret; in run_wmi_smbios_cmd()
59 int ret; in find_token() local
61 ret = sprintf(value_sysfs, "%s/%04x_value", token_sysfs, token); in find_token()
62 if (ret < 0) { in find_token()
75 ret = sprintf(location_sysfs, "%s/%04x_location", token_sysfs, token); in find_token()
76 if (ret < 0) { in find_token()
97 int ret; in token_is_active() local
102 ret = run_wmi_smbios_cmd(buffer); in token_is_active()
[all …]
/tools/testing/selftests/filesystems/binderfs/
Dbinderfs_test.c41 int ret; in change_mountns() local
43 ret = unshare(CLONE_NEWNS); in change_mountns()
44 ASSERT_EQ(ret, 0) { in change_mountns()
49 ret = mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, 0); in change_mountns()
50 ASSERT_EQ(ret, 0) { in change_mountns()
58 int fd, ret, saved_errno, result = 1; in __do_binderfs_test() local
77 ret = mount(NULL, binderfs_mntpt, "binder", 0, 0); in __do_binderfs_test()
78 EXPECT_EQ(ret, 0) { in __do_binderfs_test()
97 ret = ioctl(fd, BINDER_CTL_ADD, &device); in __do_binderfs_test()
101 EXPECT_GE(ret, 0) { in __do_binderfs_test()
[all …]
/tools/perf/util/
Dtop.c30 size_t ret = 0; in perf_top__header_snprintf() local
46 ret = SNPRINTF(bf, size, in perf_top__header_snprintf()
56 ret = SNPRINTF(bf, size, in perf_top__header_snprintf()
75 ret += SNPRINTF(bf + ret, size - ret, "%" PRIu64 "%s ", in perf_top__header_snprintf()
80 ret += SNPRINTF(bf + ret, size - ret, "%s", evsel__name(top->sym_evsel)); in perf_top__header_snprintf()
82 ret += SNPRINTF(bf + ret, size - ret, "], "); in perf_top__header_snprintf()
85 ret += SNPRINTF(bf + ret, size - ret, " (target_pid: %s", in perf_top__header_snprintf()
88 ret += SNPRINTF(bf + ret, size - ret, " (target_tid: %s", in perf_top__header_snprintf()
91 ret += SNPRINTF(bf + ret, size - ret, " (uid: %s", in perf_top__header_snprintf()
94 ret += SNPRINTF(bf + ret, size - ret, " (all"); in perf_top__header_snprintf()
[all …]

12345678910>>...33