Home
last modified time | relevance | path

Searched refs:ioctl (Results 1 – 25 of 108) sorted by relevance

12345

/tools/testing/selftests/powerpc/ptrace/
Dperf-hwbreak.c122 ioctl(fd[i], PERF_EVENT_IOC_RESET); in reset_fds()
130 ioctl(fd[i], PERF_EVENT_IOC_ENABLE); in enable_fds()
138 ioctl(fd[i], PERF_EVENT_IOC_DISABLE); in disable_fds()
209 ioctl(break_fd, PERF_EVENT_IOC_ENABLE); in runtestsingle()
222 ioctl(break_fd, PERF_EVENT_IOC_DISABLE); in runtestsingle()
271 ioctl(break_fd, PERF_EVENT_IOC_RESET); in runtest_dar_outside()
272 ioctl(break_fd, PERF_EVENT_IOC_ENABLE); in runtest_dar_outside()
275 ioctl(break_fd, PERF_EVENT_IOC_DISABLE); in runtest_dar_outside()
286 ioctl(break_fd, PERF_EVENT_IOC_RESET); in runtest_dar_outside()
287 ioctl(break_fd, PERF_EVENT_IOC_ENABLE); in runtest_dar_outside()
[all …]
/tools/testing/selftests/rtc/
Drtctest.c44 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm); in TEST_F()
57 rc = ioctl(self->fd, RTC_UIE_ON, 0);
73 rc = ioctl(self->fd, RTC_UIE_OFF, 0);
82 rc = ioctl(self->fd, RTC_UIE_ON, 0); in TEST_F()
108 rc = ioctl(self->fd, RTC_UIE_OFF, 0); in TEST_F()
120 rc = ioctl(self->fd, RTC_RD_TIME, &tm); in TEST_F()
126 rc = ioctl(self->fd, RTC_ALM_SET, &tm); in TEST_F()
133 rc = ioctl(self->fd, RTC_ALM_READ, &tm); in TEST_F()
140 rc = ioctl(self->fd, RTC_AIE_ON, 0); in TEST_F()
151 rc = ioctl(self->fd, RTC_AIE_OFF, 0); in TEST_F()
[all …]
/tools/perf/tests/
Dbp_signal.c75 ioctl(fd1, PERF_EVENT_IOC_DISABLE, 0); in sig_handler_2()
76 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in sig_handler_2()
77 ioctl(fd3, PERF_EVENT_IOC_DISABLE, 0); in sig_handler_2()
96 ioctl(fd1, PERF_EVENT_IOC_DISABLE, 0); in sig_handler()
97 ioctl(fd2, PERF_EVENT_IOC_DISABLE, 0); in sig_handler()
98 ioctl(fd3, PERF_EVENT_IOC_DISABLE, 0); in sig_handler()
135 ioctl(fd, PERF_EVENT_IOC_RESET, 0); in __event()
240 ioctl(fd1, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal()
241 ioctl(fd2, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal()
242 ioctl(fd3, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal()
[all …]
Dbp_signal_overflow.c107 ioctl(fd, PERF_EVENT_IOC_RESET, 0); in test__bp_signal_overflow()
108 ioctl(fd, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal_overflow()
113 ioctl(fd, PERF_EVENT_IOC_DISABLE, 0); in test__bp_signal_overflow()
/tools/testing/selftests/watchdog/
Dwatchdog-test.c49 ret = ioctl(fd, WDIOC_KEEPALIVE, &dummy); in keep_alive()
127 ret = ioctl(fd, WDIOC_GETSUPPORT, &info); in main()
141 ret = ioctl(fd, WDIOC_GETBOOTSTATUS, &flags); in main()
150 ret = ioctl(fd, WDIOC_SETOPTIONS, &flags); in main()
160 ret = ioctl(fd, WDIOC_SETOPTIONS, &flags); in main()
176 ret = ioctl(fd, WDIOC_SETTIMEOUT, &flags); in main()
186 ret = ioctl(fd, WDIOC_GETTIMEOUT, &flags); in main()
194 ret = ioctl(fd, WDIOC_SETPRETIMEOUT, &flags); in main()
204 ret = ioctl(fd, WDIOC_GETPRETIMEOUT, &flags); in main()
212 ret = ioctl(fd, WDIOC_GETTIMELEFT, &flags); in main()
/tools/pci/
Dpcitest.c54 ret = ioctl(fd, PCITEST_BAR, test->barnum); in run_test()
63 ret = ioctl(fd, PCITEST_SET_IRQTYPE, test->irqtype); in run_test()
72 ret = ioctl(fd, PCITEST_GET_IRQTYPE); in run_test()
81 ret = ioctl(fd, PCITEST_CLEAR_IRQ); in run_test()
90 ret = ioctl(fd, PCITEST_LEGACY_IRQ, 0); in run_test()
99 ret = ioctl(fd, PCITEST_MSI, test->msinum); in run_test()
108 ret = ioctl(fd, PCITEST_MSIX, test->msixnum); in run_test()
120 ret = ioctl(fd, PCITEST_WRITE, &param); in run_test()
132 ret = ioctl(fd, PCITEST_READ, &param); in run_test()
144 ret = ioctl(fd, PCITEST_COPY, &param); in run_test()
/tools/testing/selftests/nsfs/
Downer.c60 uns = ioctl(ns, NS_GET_USERNS); in main()
74 init_uns = ioctl(uns, NS_GET_USERNS); in main()
78 if (ioctl(init_uns, NS_GET_USERNS) >= 0 || errno != EPERM) in main()
84 if (ioctl(ns, NS_GET_USERNS) >= 0 || errno != EPERM) in main()
86 if (ioctl(init_uns, NS_GET_USERNS) >= 0 || errno != EPERM) in main()
/tools/testing/selftests/bpf/prog_tests/
Dtp_attach_query.c60 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_ENABLE, 0); in test_tp_attach_query()
68 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_QUERY_BPF, query); in test_tp_attach_query()
76 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_SET_BPF, prog_fd[i]); in test_tp_attach_query()
84 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_QUERY_BPF, query); in test_tp_attach_query()
93 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_QUERY_BPF, in test_tp_attach_query()
102 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_QUERY_BPF, query); in test_tp_attach_query()
111 err = ioctl(pmu_fd[i], PERF_EVENT_IOC_QUERY_BPF, query); in test_tp_attach_query()
128 ioctl(pmu_fd[i], PERF_EVENT_IOC_DISABLE); in test_tp_attach_query()
/tools/testing/selftests/timers/
Drtcpie.c62 retval = ioctl(fd, RTC_IRQP_READ, &old_pie_rate); in main()
80 retval = ioctl(fd, RTC_IRQP_SET, tmp); in main()
96 retval = ioctl(fd, RTC_PIE_ON, 0); in main()
127 retval = ioctl(fd, RTC_PIE_OFF, 0); in main()
135 ioctl(fd, RTC_IRQP_SET, old_pie_rate); in main()
/tools/spi/
Dspidev_fdx.c68 status = ioctl(fd, SPI_IOC_MESSAGE(2), xfer); in do_msg()
85 if (ioctl(fd, SPI_IOC_RD_MODE32, &mode) < 0) { in dumpstat()
89 if (ioctl(fd, SPI_IOC_RD_LSB_FIRST, &lsb) < 0) { in dumpstat()
93 if (ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits) < 0) { in dumpstat()
97 if (ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &speed) < 0) { in dumpstat()
Dspidev_test.c150 ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); in transfer()
433 ret = ioctl(fd, SPI_IOC_WR_MODE32, &mode); in main()
437 ret = ioctl(fd, SPI_IOC_RD_MODE32, &mode); in main()
444 ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits); in main()
448 ret = ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits); in main()
455 ret = ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &speed); in main()
459 ret = ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &speed); in main()
/tools/virtio/
Dvirtio_test.c80 r = ioctl(dev->control, VHOST_SET_FEATURES, &features); in vhost_vq_setup()
83 r = ioctl(dev->control, VHOST_SET_VRING_NUM, &state); in vhost_vq_setup()
86 r = ioctl(dev->control, VHOST_SET_VRING_BASE, &state); in vhost_vq_setup()
88 r = ioctl(dev->control, VHOST_SET_VRING_ADDR, &addr); in vhost_vq_setup()
91 r = ioctl(dev->control, VHOST_SET_VRING_KICK, &file); in vhost_vq_setup()
94 r = ioctl(dev->control, VHOST_SET_VRING_CALL, &file); in vhost_vq_setup()
139 r = ioctl(dev->control, VHOST_SET_OWNER, NULL); in vdev_info_init()
150 r = ioctl(dev->control, VHOST_SET_MEM_TABLE, dev->mem); in vdev_info_init()
180 r = ioctl(dev->control, VHOST_TEST_RUN, &test); in run_test()
222 r = ioctl(dev->control, VHOST_TEST_SET_BACKEND, in run_test()
[all …]
/tools/testing/selftests/drivers/dma-buf/
Dudmabuf.c65 buf = ioctl(devfd, UDMABUF_CREATE, &create); in main()
75 buf = ioctl(devfd, UDMABUF_CREATE, &create); in main()
85 buf = ioctl(devfd, UDMABUF_CREATE, &create); in main()
95 buf = ioctl(devfd, UDMABUF_CREATE, &create); in main()
/tools/testing/selftests/ptp/
Dtestptp.c80 err = ioctl(fd, request[i], &extts_request); in do_flag_test()
84 err = ioctl(fd, request[i], &extts_request); in do_flag_test()
274 if (ioctl(fd, PTP_CLOCK_GETCAPS, &caps)) { in main()
361 if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) { in main()
379 if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) { in main()
390 if (ioctl(fd, PTP_CLOCK_GETCAPS, &caps)) { in main()
397 if (ioctl(fd, PTP_PIN_GETFUNC, &desc)) { in main()
440 if (ioctl(fd, PTP_PEROUT_REQUEST2, &perout_request)) { in main()
452 if (ioctl(fd, PTP_PIN_SETFUNC, &desc)) { in main()
461 if (ioctl(fd, PTP_ENABLE_PPS, enable)) { in main()
[all …]
/tools/testing/selftests/sync/
Dsync.c77 err = ioctl(fd1, SYNC_IOC_MERGE, &data); in sync_merge()
94 err = ioctl(fd, SYNC_IOC_FILE_INFO, info); in sync_file_info()
114 err = ioctl(fd, SYNC_IOC_FILE_INFO, info); in sync_file_info()
175 return ioctl(fd, SW_SYNC_IOC_INC, &arg); in sw_sync_timeline_inc()
204 err = ioctl(fd, SW_SYNC_IOC_CREATE_FENCE, &data); in sw_sync_fence_create()
/tools/testing/selftests/kvm/x86_64/
Dget_msr_index_features.c25 r = ioctl(kvm_fd, KVM_GET_MSR_INDEX_LIST, list); in kvm_num_index_msrs()
53 r = ioctl(kvm_fd, KVM_GET_MSR_INDEX_LIST, list); in test_get_msr_index()
71 r = ioctl(kvm_fd, KVM_GET_MSR_FEATURE_INDEX_LIST, list); in kvm_num_feature_msrs()
88 r = ioctl(kvm_fd, KVM_GET_MSR_FEATURE_INDEX_LIST, list); in kvm_get_msr_feature_list()
Dmmio_warning_test.c46 res = ioctl(kvmcpu, KVM_RUN, 0); in thr()
62 kvmvm = ioctl(kvm, KVM_CREATE_VM, 0); in test()
64 kvmcpu = ioctl(kvmvm, KVM_CREATE_VCPU, 0); in test()
/tools/testing/selftests/efivarfs/
Dopen-unlink.c24 rc = ioctl(fd, FS_IOC_GETFLAGS, &flags); in set_immutable()
37 rc = ioctl(fd, FS_IOC_SETFLAGS, &flags); in set_immutable()
55 rc = ioctl(fd, FS_IOC_GETFLAGS, &flags); in get_immutable()
/tools/testing/selftests/kvm/lib/
Dkvm_util.c84 ret = ioctl(kvm_fd, KVM_CHECK_EXTENSION, cap); in kvm_check_cap()
109 ret = ioctl(vm->fd, KVM_ENABLE_CAP, cap); in vm_enable_cap()
137 r = ioctl(vcpu->fd, KVM_ENABLE_CAP, cap); in vcpu_enable_cap()
163 vm->fd = ioctl(vm->kvm_fd, KVM_CREATE_VM, vm->type); in vm_open()
426 int ret = ioctl(vmp->fd, KVM_SET_USER_MEMORY_REGION, &region->region); in kvm_vm_restart()
443 ret = ioctl(vm->fd, KVM_GET_DIRTY_LOG, &args); in kvm_vm_get_dirty_log()
456 ret = ioctl(vm->fd, KVM_CLEAR_DIRTY_LOG, &args); in kvm_vm_clear_dirty_log()
463 return ioctl(vm->fd, KVM_RESET_DIRTY_RINGS); in kvm_vm_reset_dirty_ring()
629 ret = ioctl(vm->fd, KVM_SET_USER_MEMORY_REGION, &region->region); in __vm_mem_region_delete()
934 ret = ioctl(vm->fd, KVM_SET_USER_MEMORY_REGION, &region->region); in vm_userspace_mem_region_add()
[all …]
/tools/testing/selftests/kvm/lib/x86_64/
Dprocessor.c699 ret = ioctl(kvm_fd, KVM_GET_SUPPORTED_CPUID, cpuid); in kvm_get_supported_cpuid()
731 r = ioctl(kvm_fd, KVM_GET_MSRS, &buffer.header); in kvm_get_feature_msr()
765 rc = ioctl(vcpu->fd, KVM_GET_CPUID2, cpuid); in vcpu_get_cpuid()
836 rc = ioctl(vcpu->fd, KVM_SET_CPUID2, cpuid); in vcpu_set_cpuid()
868 r = ioctl(vcpu->fd, KVM_GET_MSRS, &buffer.header); in vcpu_get_msr()
905 r = ioctl(vcpu->fd, KVM_SET_MSRS, &buffer.header); in _vcpu_set_msr()
1005 r = ioctl(kvm_fd, KVM_GET_MSR_INDEX_LIST, &nmsrs); in kvm_get_num_msrs_fd()
1027 r = ioctl(kvm_fd, KVM_GET_MSR_INDEX_LIST, list); in kvm_get_msr_index_list()
1062 r = ioctl(vm->kvm_fd, KVM_GET_MSR_INDEX_LIST, list); in vcpu_save_state()
1067 r = ioctl(vcpu->fd, KVM_GET_VCPU_EVENTS, &state->events); in vcpu_save_state()
[all …]
/tools/testing/selftests/media_tests/
Dregression_test.txt1 Testing for regressions in Media Controller API register, ioctl, syscall,
4 unbound while ioctl is in progress.
23 a loop running media ioctl MEDIA_IOC_DEVICE_INFO command once every 10
28 sleep 10 in between the ioctl calls.
Dvideo_device_test.c86 ret = ioctl(fd, VIDIOC_QUERYCAP, &vcap); in main()
92 ret = ioctl(fd, VIDIOC_G_TUNER, &vtuner); in main()
/tools/testing/selftests/gpio/
Dgpio-mockup-cdev.c39 ret = ioctl(cfd, GPIO_V2_GET_LINE_IOCTL, &req); in request_line_v2()
53 ret = ioctl(lfd, GPIO_V2_LINE_GET_VALUES_IOCTL, &vals); in get_value_v2()
73 ret = ioctl(cfd, GPIO_GET_LINEHANDLE_IOCTL, &req); in request_line_v1()
85 ret = ioctl(lfd, GPIOHANDLE_GET_LINE_VALUES_IOCTL, &vals); in get_value_v1()
/tools/testing/selftests/perf_events/
Dremove_on_exec.c107 ASSERT_EQ(ioctl(self->fd, PERF_EVENT_IOC_ENABLE, 0), 0); in TEST_F()
154 EXPECT_EQ(ioctl(self->fd, PERF_EVENT_IOC_ENABLE, 0), 0); in TEST_F()
177 EXPECT_EQ(ioctl(self->fd, PERF_EVENT_IOC_ENABLE, 0), 0); in TEST_F()
212 EXPECT_EQ(ioctl(self->fd, PERF_EVENT_IOC_ENABLE, 0), 0); in TEST_F()
/tools/testing/selftests/dmabuf-heaps/
Ddmabuf-heap.c31 ret = ioctl(fd, DRM_IOCTL_VERSION, &version); in check_vgem()
73 ret = ioctl(vgem_fd, DRM_IOCTL_PRIME_FD_TO_HANDLE, &import_handle); in import_vgem_fd()
85 ioctl(vgem_fd, DRM_IOCTL_GEM_CLOSE, &close); in close_handle()
119 ret = ioctl(fd, DMA_HEAP_IOCTL_ALLOC, &data); in dmabuf_heap_alloc_fdflags()
139 return ioctl(fd, DMA_BUF_IOCTL_SYNC, &sync); in dmabuf_sync()
320 ret = ioctl(fd, older_alloc_ioctl, &data); in dmabuf_heap_alloc_older()
356 ret = ioctl(fd, newer_alloc_ioctl, &data); in dmabuf_heap_alloc_newer()

12345