Home
last modified time | relevance | path

Searched refs:cfd (Results 1 – 7 of 7) sorted by relevance

/tools/testing/selftests/net/
Dtls.c71 int fd, cfd; in FIXTURE() local
102 self->cfd = accept(sfd, &addr, &len); in FIXTURE_SETUP()
103 ASSERT_GE(self->cfd, 0); in FIXTURE_SETUP()
115 ret = setsockopt(self->cfd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP()
122 close(self->cfd); in FIXTURE_TEARDOWN()
135 EXPECT_NE(recv(self->cfd, buf, send_len, 0), -1); in TEST_F()
141 int fd, cfd; in FIXTURE() local
218 self->cfd = accept(sfd, &addr, &len); in FIXTURE_SETUP()
219 ASSERT_GE(self->cfd, 0); in FIXTURE_SETUP()
222 ret = setsockopt(self->cfd, IPPROTO_TCP, TCP_ULP, "tls", in FIXTURE_SETUP()
[all …]
/tools/testing/selftests/gpio/
Dgpio-mockup-cdev.c21 static int request_line_v2(int cfd, unsigned int offset, in request_line_v2() argument
39 ret = ioctl(cfd, GPIO_V2_GET_LINE_IOCTL, &req); in request_line_v2()
59 static int request_line_v1(int cfd, unsigned int offset, in request_line_v1() argument
73 ret = ioctl(cfd, GPIO_GET_LINEHANDLE_IOCTL, &req); in request_line_v1()
119 int opt, ret, cfd, lfd; in main() local
168 cfd = open(chip, 0); in main()
169 if (cfd == -1) { in main()
175 lfd = request_line_v1(cfd, offset, flags_v1, val); in main()
177 lfd = request_line_v2(cfd, offset, flags_v2, val); in main()
179 close(cfd); in main()
/tools/cgroup/
Dcgroup_event_listener.c25 int cfd = -1; in main() local
34 cfd = open(argv[1], O_RDONLY); in main()
35 if (cfd == -1) in main()
51 ret = snprintf(line, LINE_MAX, "%d %d %s", efd, cfd, argv[2]); in main()
/tools/testing/selftests/net/af_unix/
Dtest_unix_oob.c118 int cfd; in producer() local
123 cfd = socket(AF_UNIX, SOCK_STREAM, 0); in producer()
126 if (connect(cfd, (struct sockaddr *)consumer_addr, in producer()
138 send(cfd, buf, sizeof(buf), MSG_OOB); in producer()
145 send(cfd, buf, sizeof(buf), MSG_OOB); in producer()
149 send(cfd, buf, sizeof(buf), MSG_OOB); in producer()
156 send(cfd, buf, sizeof(buf), MSG_OOB); in producer()
160 send(cfd, buf, sizeof(buf), MSG_OOB); in producer()
163 send(cfd, buf, sizeof(buf), 0); in producer()
170 send(cfd, buf, 1, MSG_OOB); in producer()
/tools/testing/selftests/bpf/
Dcgroup_helpers.c58 int fd, cfd; in enable_all_controllers() local
82 cfd = open(path, O_RDWR); in enable_all_controllers()
83 if (cfd < 0) { in enable_all_controllers()
89 if (dprintf(cfd, "+%s\n", c) <= 0) { in enable_all_controllers()
91 close(cfd); in enable_all_controllers()
95 close(cfd); in enable_all_controllers()
/tools/gpio/
Dgpio-event-mon.c36 int cfd, lfd; in monitor_device() local
44 cfd = open(chrdev_name, 0); in monitor_device()
45 if (cfd == -1) { in monitor_device()
135 if (close(cfd) == -1) in monitor_device()
/tools/accounting/
Dgetdelays.c283 int cfd = 0; in main() local
434 cfd = open(containerpath, O_RDONLY); in main()
435 if (cfd < 0) { in main()
440 CGROUPSTATS_CMD_ATTR_FD, &cfd, sizeof(__u32)); in main()
554 if (cfd) in main()
555 close(cfd); in main()