Skip to content

Commit 369fbc0

Browse files
authored
[libc][bazel] Fold errno_test_helpers into LibcUnitTest. (#158705)
LibcUnitTest helper library already contains some logic for errno validation (ErrnoSetterMatcher.h), and since errno validation is used so extensively in various unit tests, it makes sense to fold ErrnoCheckingTest.h (which would be required for errno validation soon) there as well for simplicity.
1 parent de8030e commit 369fbc0

File tree

6 files changed

+1
-43
lines changed

6 files changed

+1
-43
lines changed

utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ libc_test_library(
3939
"LibcTestMain.cpp",
4040
],
4141
hdrs = [
42+
"ErrnoCheckingTest.h",
4243
"ErrnoSetterMatcher.h",
4344
"ExecuteFunction.h",
4445
"LibcTest.h",
@@ -80,19 +81,6 @@ libc_test_library(
8081
alwayslink = True,
8182
)
8283

83-
libc_test_library(
84-
name = "errno_test_helpers",
85-
hdrs = [
86-
"ErrnoCheckingTest.h",
87-
],
88-
deps = [
89-
":LibcUnitTest",
90-
"//libc:__support_libc_errno",
91-
"//libc:__support_macros_config",
92-
"//libc:errno",
93-
],
94-
)
95-
9684
libc_test_library(
9785
name = "fp_test_helpers",
9886
srcs = [
@@ -108,7 +96,6 @@ libc_test_library(
10896
],
10997
deps = [
11098
":LibcUnitTest",
111-
":errno_test_helpers",
11299
":string_utils",
113100
":test_logger",
114101
"//libc:__support_cpp_array",

utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ libc_test(
122122
"//libc:mkdirat",
123123
"//libc:open",
124124
"//libc:remove",
125-
"//libc/test/UnitTest:errno_test_helpers",
126125
],
127126
)
128127

utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ libc_test(
107107
deps = [
108108
"//libc:__support_fputil_fp_bits",
109109
"//libc:atof",
110-
"//libc/test/UnitTest:errno_test_helpers",
111110
],
112111
)
113112

@@ -208,7 +207,6 @@ libc_test_library(
208207
"//libc:__support_macros_properties_architectures",
209208
"//libc:errno",
210209
"//libc/test/UnitTest:LibcUnitTest",
211-
"//libc/test/UnitTest:errno_test_helpers",
212210
],
213211
)
214212

@@ -254,7 +252,6 @@ libc_test(
254252
deps = [
255253
"//libc:__support_fputil_fp_bits",
256254
"//libc:strtof",
257-
"//libc/test/UnitTest:errno_test_helpers",
258255
"//libc/test/UnitTest:fp_test_helpers",
259256
],
260257
)
@@ -265,7 +262,6 @@ libc_test(
265262
deps = [
266263
"//libc:__support_fputil_fp_bits",
267264
"//libc:strtod",
268-
"//libc/test/UnitTest:errno_test_helpers",
269265
"//libc/test/UnitTest:fp_test_helpers",
270266
],
271267
)
@@ -277,6 +273,5 @@ libc_test(
277273
"//libc:__support_fputil_fp_bits",
278274
"//libc:__support_uint128",
279275
"//libc:strtold",
280-
"//libc/test/UnitTest:errno_test_helpers",
281276
],
282277
)

utils/bazel/llvm-project-overlay/libc/test/src/sys/epoll/BUILD.bazel

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ libc_test(
1616
deps = [
1717
"//libc:close",
1818
"//libc:epoll_create",
19-
"//libc/test/UnitTest:errno_test_helpers",
2019
],
2120
)
2221

@@ -27,7 +26,6 @@ libc_test(
2726
"//libc:close",
2827
"//libc:epoll_create1",
2928
"//libc:hdr_sys_epoll_macros",
30-
"//libc/test/UnitTest:errno_test_helpers",
3129
],
3230
)
3331

@@ -41,7 +39,6 @@ libc_test(
4139
"//libc:hdr_sys_epoll_macros",
4240
"//libc:pipe",
4341
"//libc:types_struct_epoll_event",
44-
"//libc/test/UnitTest:errno_test_helpers",
4542
],
4643
)
4744

@@ -56,7 +53,6 @@ libc_test(
5653
"//libc:hdr_sys_epoll_macros",
5754
"//libc:pipe",
5855
"//libc:types_struct_epoll_event",
59-
"//libc/test/UnitTest:errno_test_helpers",
6056
],
6157
)
6258

@@ -71,7 +67,6 @@ libc_test(
7167
"//libc:hdr_sys_epoll_macros",
7268
"//libc:pipe",
7369
"//libc:types_struct_epoll_event",
74-
"//libc/test/UnitTest:errno_test_helpers",
7570
],
7671
)
7772

@@ -87,6 +82,5 @@ libc_test(
8782
"//libc:pipe",
8883
"//libc:types_struct_epoll_event",
8984
"//libc:types_struct_timespec",
90-
"//libc/test/UnitTest:errno_test_helpers",
9185
],
9286
)

utils/bazel/llvm-project-overlay/libc/test/src/sys/socket/BUILD.bazel

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ libc_test(
1616
deps = [
1717
"//libc:close",
1818
"//libc:socket",
19-
"//libc/test/UnitTest:errno_test_helpers",
2019
],
2120
)
2221

@@ -26,7 +25,6 @@ libc_test(
2625
deps = [
2726
"//libc:close",
2827
"//libc:socketpair",
29-
"//libc/test/UnitTest:errno_test_helpers",
3028
],
3129
)
3230

@@ -38,7 +36,6 @@ libc_test(
3836
"//libc:recv",
3937
"//libc:send",
4038
"//libc:socketpair",
41-
"//libc/test/UnitTest:errno_test_helpers",
4239
],
4340
)
4441

@@ -50,7 +47,6 @@ libc_test(
5047
"//libc:recvfrom",
5148
"//libc:sendto",
5249
"//libc:socketpair",
53-
"//libc/test/UnitTest:errno_test_helpers",
5450
],
5551
)
5652

@@ -62,6 +58,5 @@ libc_test(
6258
"//libc:recvmsg",
6359
"//libc:sendmsg",
6460
"//libc:socketpair",
65-
"//libc/test/UnitTest:errno_test_helpers",
6661
],
6762
)

utils/bazel/llvm-project-overlay/libc/test/src/unistd/BUILD.bazel

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ libc_test(
1818
"//libc:close",
1919
"//libc:open",
2020
"//libc:unlink",
21-
"//libc/test/UnitTest:errno_test_helpers",
2221
],
2322
)
2423

@@ -32,7 +31,6 @@ libc_test(
3231
"//libc:read",
3332
"//libc:unlink",
3433
"//libc:write",
35-
"//libc/test/UnitTest:errno_test_helpers",
3634
],
3735
)
3836

@@ -46,7 +44,6 @@ libc_test(
4644
"//libc:read",
4745
"//libc:unlink",
4846
"//libc:write",
49-
"//libc/test/UnitTest:errno_test_helpers",
5047
],
5148
)
5249

@@ -60,7 +57,6 @@ libc_test(
6057
"//libc:read",
6158
"//libc:unlink",
6259
"//libc:write",
63-
"//libc/test/UnitTest:errno_test_helpers",
6460
],
6561
)
6662

@@ -75,7 +71,6 @@ libc_test(
7571
"//libc:read",
7672
"//libc:unlink",
7773
"//libc:write",
78-
"//libc/test/UnitTest:errno_test_helpers",
7974
],
8075
)
8176

@@ -90,7 +85,6 @@ libc_test(
9085
"//libc:pwrite",
9186
"//libc:unlink",
9287
"//libc:write",
93-
"//libc/test/UnitTest:errno_test_helpers",
9488
],
9589
)
9690

@@ -104,7 +98,6 @@ libc_test(
10498
"//libc:read",
10599
"//libc:remove",
106100
"//libc:write",
107-
"//libc/test/UnitTest:errno_test_helpers",
108101
],
109102
)
110103

@@ -116,7 +109,6 @@ libc_test(
116109
"//libc:link",
117110
"//libc:open",
118111
"//libc:unlink",
119-
"//libc/test/UnitTest:errno_test_helpers",
120112
],
121113
)
122114

@@ -137,7 +129,6 @@ libc_test(
137129
"//libc:open",
138130
"//libc:symlink",
139131
"//libc:unlink",
140-
"//libc/test/UnitTest:errno_test_helpers",
141132
],
142133
)
143134

@@ -152,7 +143,6 @@ libc_test(
152143
"//libc:truncate",
153144
"//libc:unlink",
154145
"//libc:write",
155-
"//libc/test/UnitTest:errno_test_helpers",
156146
],
157147
)
158148

@@ -163,7 +153,6 @@ libc_test(
163153
"//libc:close",
164154
"//libc:open",
165155
"//libc:unlink",
166-
"//libc/test/UnitTest:errno_test_helpers",
167156
],
168157
)
169158

@@ -190,7 +179,6 @@ libc_test(
190179
"//libc:close",
191180
"//libc:isatty",
192181
"//libc:open",
193-
"//libc/test/UnitTest:errno_test_helpers",
194182
],
195183
)
196184

0 commit comments

Comments
 (0)