| 1 |
# This file is licensed under the Apache License v2.0 with LLVM Exceptions. |
| 2 |
# See https://llvm.org/LICENSE.txt for license information. |
| 3 |
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 4 |
|
| 5 |
# Tests for LLVM libc socket.h functions. |
| 6 |
|
| 7 |
load("//libc/test:libc_test_rules.bzl", "libc_test") |
| 8 |
|
| 9 |
package(default_visibility = ["//visibility:public"]) |
| 10 |
|
| 11 |
licenses(["notice"]) |
| 12 |
|
| 13 |
libc_test( |
| 14 |
name = "socket_test", |
| 15 |
srcs = ["linux/socket_test.cpp"], |
| 16 |
deps = [ |
| 17 |
"//libc:close", |
| 18 |
"//libc:socket", |
| 19 |
"//libc/test/UnitTest:errno_test_helpers", |
| 20 |
], |
| 21 |
) |
| 22 |
|
| 23 |
libc_test( |
| 24 |
name = "socketpair_test", |
| 25 |
srcs = ["linux/socketpair_test.cpp"], |
| 26 |
deps = [ |
| 27 |
"//libc:close", |
| 28 |
"//libc:socketpair", |
| 29 |
"//libc/test/UnitTest:errno_test_helpers", |
| 30 |
], |
| 31 |
) |
| 32 |
|
| 33 |
libc_test( |
| 34 |
name = "send_recv_test", |
| 35 |
srcs = ["linux/send_recv_test.cpp"], |
| 36 |
deps = [ |
| 37 |
"//libc:close", |
| 38 |
"//libc:recv", |
| 39 |
"//libc:send", |
| 40 |
"//libc:socketpair", |
| 41 |
"//libc/test/UnitTest:errno_test_helpers", |
| 42 |
], |
| 43 |
) |
| 44 |
|
| 45 |
libc_test( |
| 46 |
name = "sendto_recvfrom_test", |
| 47 |
srcs = ["linux/sendto_recvfrom_test.cpp"], |
| 48 |
deps = [ |
| 49 |
"//libc:close", |
| 50 |
"//libc:recvfrom", |
| 51 |
"//libc:sendto", |
| 52 |
"//libc:socketpair", |
| 53 |
"//libc/test/UnitTest:errno_test_helpers", |
| 54 |
], |
| 55 |
) |
| 56 |
|
| 57 |
libc_test( |
| 58 |
name = "sendmsg_recvmsg_test", |
| 59 |
srcs = ["linux/sendmsg_recvmsg_test.cpp"], |
| 60 |
deps = [ |
| 61 |
"//libc:close", |
| 62 |
"//libc:recvmsg", |
| 63 |
"//libc:sendmsg", |
| 64 |
"//libc:socketpair", |
| 65 |
"//libc/test/UnitTest:errno_test_helpers", |
| 66 |
], |
| 67 |
) |