-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
367 lines (274 loc) · 29.7 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
Implement build-gcc-x86_64-redhat-linux-glibc-without-many-functions.sh
TODO: retest performance in run_test_binaries.sh to see if nproc --ignore=2 should be tweaked after the change from an if to a while loop
Make it so every test that normally outputs nothing has to print "OK" to be considered to have passed.
Make it so that blocks that would normally use #ifdef instead use a working implementation of given functions (when possible)
Update the .clang-tidy file with the checks from the latest version of clang I guess (also look into configuring each of the individual checks)
Same for new versions of the repos in .pre-commit-config.yaml (see also pre-commit autoupdate)
Try to replace as many includes as possible of compiler-features.h with includes of should-always-be-included.h
Make sure should-always-be-included.h is in fact always included
Use GitHub Actions and/or something similar for CI with all the major libcs I'm already testing (maybe even try to make AArch64 work ? Blink too ?)
Make GCC workaround conditional on a flag for it - compiler problems are kind of an issue the user might want to learn about, too
Setup include-what-you-use (also see if iwyu_tool.py is usable in pre-commit) and try to conform to it
Check man pages for examples (in particular linux man-pages seems to have a bunch of full program examples) - also standards like POSIX or the C standard
Go ask ATF people why they're passing around const atf_error, they really wanting the pointers to be const and not the pointed-to stuff ?
Try to use Bing/Copilot (try the chat version too btw)/ChatGPT/Stampy/etc. to generate some testcases
(note: this includes just not giving it any function to generate tests for - that seems to generate stuff that could be used for testing stuff that involves no libc functions at all)
Version the tests for POSIX functions (i.e. specify which version of POSIX they're from - try to include even very old stuff like XPG)
Perhaps do this for LSB too and all the other standards we can find ?
Move a few directories and files around for clarity, e.g.:
- "include/test-lib" and "include/test-deps" seems quite unclear
- we should probably move `portable-symbols/internal/{}-template.h` to `portable-symbols/internal/templates/{}.h`
Check if nanoprintf's default snprintf behavior conforms to the standard - They seem to screw up truncation by default...
Run other static analyzers than just clang-tidy
Check all of the `#if 0`s in the codebase... some seem dubious
See later if we can get the project working on musl-clang once it doesn't randomly error out anymore (would be nice if it didn't give me 300 warnings before then too - they seem unrelated to the root issue that musl-clang somehow doesn't know about x86intrin.h even though it effectively advertises support for it...)
See later if we can get the project to work with cosmocc's -mclang
Add minimal implementations for all the tested functions when possible just in case they're not present or something (and test them - probably add an extra config where all the relevant functions are "determined" not to be present in the host system, for testing)
Add configuration for sanitizers and valgrind
Perhaps try to fix the setvbuf bug in glibc ? idk (see https://sourceware.org/bugzilla/show_bug.cgi?id=17080)
Replace ad-hoc definitions of constexpr with HEDLEY_CONSTEXPR
Document the shell scripts in internal/devel-scripts to either contain bug report links or explanations for each line where something gets e.g. disabled, probably
Rename tests appropriately to correspond to the renaming I've been doing in other places (w.r.t. abbreviations, etc.)
Add in new tests from glibc:
- stdio-common/tst-printf-oct.c
- update stdio-common/tst-printf-binary-main.c with 2d4728e60621c8844ec679291aa5458c622d8f4f
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/stdio-common/tst-printf-intn-main.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/stdio-common/tst-printf-intn.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/stdio-common/tst-printf-bz25691.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ldbl-compat.c
- stuff from 7ec4d7e3d1c0c6da11dbad1292fd9d94124c57ca, b350a60b6ecd77b7ec30c7969de1df8b73642e55, b3e8a756ad569fd31181b74b3729d29df3eb55f3, 1dc5cdc3da19e10d47e50a5ea2ea3ce62ee2fa82, c683ac8520e8064e7be3a22922d80849271290ac, 0b6379cb98590c28088f017ddcc0edb8ad7d0131, bad554d9b4f10988eb7fdb814fbaa5e89416d781, 349670f8093d920d4d683472c88029f6901f7ae7, fae4eacae75e4f2767998aca703d6efaae2a747f, 6018ba05c01b1e17d77742a123e8c443f8fc713c, ac72dd90905e1693c108c9f36f0c7e79d6ad5501, 11a2169e4066e6b848f1e6e4c31ec4e2210cecd8
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/stdio-common/tst-printf-format-skeleton.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/stdio-common/tst-printf-format-skeleton-double.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/stdio-common/tst-printf-format-skeleton-ldouble.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/stdio-common/tst-printf-bz18872.sh
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/sysdeps/x86/tst-ldbl-nonnormal-printf.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/sysdeps/x86/tst-strlen-rtm.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/sysdeps/x86_64/tst-rsi-strlen.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-c-library/main-repo/sysdeps/x86/tst-strcmp-rtm.c
Add in tests from ArvernOS:
- /home/gravier/src/programs/system/operating-systems/ArvernOS/tests/libc/isdigit.c
- /home/gravier/src/programs/system/operating-systems/ArvernOS/tests/libc/string/strcat.c
- /home/gravier/src/programs/system/operating-systems/ArvernOS/tests/libc/string/strcmp.c
- /home/gravier/src/programs/system/operating-systems/ArvernOS/tests/libc/string/strlen.c
Add in tests from zephyr:
- /home/gravier/src/programs/system/operating-systems/zephyr/tests/unit/cbprintf/main.c
- /home/gravier/src/programs/system/operating-systems/zephyr/tests/lib/cbprintf_fp/src/main.c
- /home/gravier/src/programs/system/operating-systems/zephyr/tests/lib/cbprintf_package/src/main.c
Add in tests from djgpp:
- /home/gravier/src/programs/programming-tools/compilers/djgpp/tests/libc/ansi/stdio/printf.c
- /home/gravier/src/programs/programming-tools/compilers/djgpp/tests/libc/ansi/stdio/printf2.c
- /home/gravier/src/programs/programming-tools/compilers/djgpp/tests/libc/ansi/stdio/printf3.c
- /home/gravier/src/programs/programming-tools/compilers/djgpp/tests/libc/ansi/stdio/printf4.c
- /home/gravier/src/programs/programming-tools/compilers/djgpp/tests/libc/ansi/stdio/printf5.c
- /home/gravier/src/programs/programming-tools/compilers/djgpp/tests/libc/ansi/stdio/printf6.c
Add in tests from managarm:
- /home/gravier/src/programs/system/operating-systems/managarm/testsuites/posix-tests/src/stat.cpp
Add in tests from relibc:
- /home/gravier/src/libraries/standard-libraries/c/implementations/relibc/tests/unistd/stat.c
- /home/gravier/src/libraries/standard-libraries/c/implementations/relibc/tests/stdio/printf.c
- /home/gravier/src/libraries/standard-libraries/c/implementations/relibc/tests/wchar/printf-on-wchars.c
- /home/gravier/src/libraries/standard-libraries/c/implementations/relibc/tests/stdio/printf_space_pad.c
- /home/gravier/src/libraries/standard-libraries/c/implementations/relibc/tests/stdio/printf_neg_pad.c
- /home/gravier/src/libraries/standard-libraries/c/implementations/relibc/tests/string/strcat.c
- /home/gravier/src/libraries/standard-libraries/c/implementations/relibc/tests/string/strlen.c
Add in tests from olibc:
- /home/gravier/src/libraries/standard-libraries/c/implementations/olibc/libc/arch-mips/string/mips_strlen.c
Add in tests from rtems:
- /home/gravier/src/programs/system/operating-systems/rtems/main-repo/testsuites/psxtests/psxstat
- /home/gravier/src/programs/system/operating-systems/rtems/main-repo/testsuites/libtests/POSIX/stat.c
- /home/gravier/src/programs/system/operating-systems/rtems/main-repo/testsuites/psxtests/psxhdrs/stdio/printf.c
- /home/gravier/src/programs/system/operating-systems/rtems/main-repo/testsuites/psxtests/psxhdrs/stdio/putchar.c
- /home/gravier/src/programs/system/operating-systems/rtems/main-repo/testsuites/psxtests/psxhdrs/string/strcat.c
- /home/gravier/src/programs/system/operating-systems/rtems/main-repo/testsuites/psxtests/psxhdrs/string/strcmp.c
- /home/gravier/src/programs/system/operating-systems/rtems/main-repo/testsuites/psxtests/psxhdrs/string/strlen.c
- /home/gravier/src/programs/system/operating-systems/rtems/main-repo/testsuites/psxtests/psxhdrs/ctype/isalpha.c
- /home/gravier/src/programs/system/operating-systems/rtems/main-repo/testsuites/psxtests/psxhdrs/ctype/isdigit.c
Add in tests from bkunix:
- /home/gravier/src/programs/system/operating-systems/unix/bkunix/src/bin/testprintf.c
Add in tests from illumos-gate:
- /home/gravier/src/programs/system/operating-systems/unix/illumos-gate/usr/src/cmd/dtrace/test/tst/common/printf/
- /home/gravier/src/programs/system/operating-systems/unix/illumos-gate/usr/src/cmd/dtrace/test/tst/common/strlen/
- /home/gravier/src/programs/system/operating-systems/unix/illumos-gate/usr/src/test/libc-tests/tests/printf-15294.c
Add in tests from bsd/free:
- /home/gravier/src/programs/system/operating-systems/unix/bsd/free/src/usr.bin/printf/tests/regress.sh
- /home/gravier/src/programs/system/operating-systems/unix/bsd/free/src/bin/sh/tests/builtins/printf*
- /home/gravier/src/programs/system/operating-systems/unix/berkeley-software-distribution-berkeley-standard-distribution-bsd/free/src/lib/libc/tests/string/strcmp_test.c
Add in tests from gecko-dev:
- /home/gravier/src/programs/data/transmission/communications/networking/protocols/layers/application/hypertext-transfer-protocol/clients/browsers/gecko-dev/js/src/jsapi-tests/testPrintf.cpp
- /home/gravier/src/programs/data/transmission/communications/networking/protocols/layers/application/hypertext-transfer-protocol/clients/browsers/gecko-dev/mozglue/tests/TestIntegerPrintfMacros.cpp
- /home/gravier/src/programs/data/transmission/communications/networking/protocols/layers/application/hypertext-transfer-protocol/clients/browsers/gecko-dev/mozglue/tests/TestPrintf.cpp
- /home/gravier/src/programs/data/transmission/communications/networking/protocols/layers/application/hypertext-transfer-protocol/clients/browsers/gecko-dev/mozglue/tests/glibc_printf_tests
Add in tests from libffi:
- /home/gravier/src/libraries/programming/tools/libffi/testsuite/libffi.call/strlen*
Add in tests from old-cvs-gcc-cvsroot:
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/gnu-compiler-collection/old-cvs-gcc-cvsroot/aclocal.m4
Add in tests from GMP:
- /home/gravier/src/libraries/math/gnu-multiple-precision-arbitrary-arithmetic-library/main-repo/tests/misc/t-printf.c
Add in tests from sqlite:
- /home/gravier/src/libraries/data/management/databases/management-systems/relational/sql/sqlite/test/printf.test
- /home/gravier/src/libraries/data/management/databases/management-systems/relational/sql/sqlite/test/printf2.test
Add in/update tests from cosmopolitan:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/cosmopolitan-libc/test/libc/intrin/kprintf_test.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/cosmopolitan-libc/test/libc/calls/stat_test.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/cosmopolitan-libc/test/libc/intrin/strcmp_test.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/cosmopolitan-libc/test/posix/printf_return_test.c
Add in tests from embeddedartistry:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/printf/embeddedartistry/test
Add in tests from gnulib:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-gnulib/m4/printf.m4
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-gnulib/tests/test-printf-gnu*
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-gnulib/tests/test-c32isdigit.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-gnulib/tests/test-c32isalpha.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-gnulib/m4/stat-time.m4
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-gnulib/tests/test-stat-time.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-gnulib/tests/test-stat.c
- also the u32/u16 printf stuff (maybe just look at all the printfs again ?)
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/gnu-gnulib/tests/test-printf-posix*
Add in tests from public-domain-c-library:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/public-domain-c-library/test_support/printf_testcases.h
Add in tests from nanoprintf since 1e254afc4fcb97d5a7cf3ce9d029fdfc3ded7d82
Add in tests from picolibc:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/picolibc/test/printf-tests.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/picolibc/newlib/testsuite/newlib.string/strcmp-1.c
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/picolibc/test/printf_scanf.c
Add in tests from newlib:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/newlib/main-repo/winsup/testsuite/winsup.api/ltp/stat*
Add in tests from LLVM:
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/test/src/stdio/printf_test.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/test/src/sys/stat/stat_test.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/test/src/string/strcmp_test.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/fuzzing/stdio/printf_float_conv_fuzz.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/test/src/string/strlen_test.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/test/src/string/strcat_test.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/fuzzing/stdio/printf_fixed_conv_fuzz.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/test/integration/src/stdio/gpu/printf_test.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/test/src/ctype/isalpha_test.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/test/src/ctype/isdigit_test.cpp
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/low-level-virtual-machine/project/libc/test/src/string/strcmp_test.cpp
Add in tests from GCC:
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/gnu-compiler-collection/main-repo/gcc/testsuite/gcc.target/riscv/rvv/autovec/builtin/strlen-run.c
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/gnu-compiler-collection/main-repo/gcc/testsuite/gcc.target/riscv/rvv/autovec/builtin/strcmp-run.c
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/gnu-compiler-collection/main-repo/gcc/testsuite/c-c++-common/analyzer/strlen-pr113999.c
- /home/gravier/src/programs/programming/languages-implementations/compilers/multi-language/gnu-compiler-collection/main-repo/gcc/testsuite/gcc.c-torture/execute/strcmp-1.c
Add in tests from WINE:
- /home/gravier/src/programs/emulators-simulators-virtualization-and-other-compatibility-layers/computers/windows/wine-is-not-an-emulator/dlls/ucrtbase/tests/printf.c
- /home/gravier/src/programs/emulators-simulators-virtualization-and-other-compatibility-layers/computers/windows/wine-is-not-an-emulator/dlls/msvcrt/tests/printf.c
Add in tests from trio:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/printf/trio/regression.c
Add in tests from c99-snprintf:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/printf/c99-snprintf/snprintf.c
Add in tests from ijs.si-software-snprintf:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/printf/ijs.si-software-snprintf/snprintf_2.2.tar-extracted/snprintf_2.2/test.c
Add in tests from go:
- /home/gravier/src/programs/programming/languages-implementations/compilers/go/go/src/os/stat_test.go
Add in tests from GHC:
- /home/gravier/src/programs/programming/languages-implementations/compilers/haskell/glasgow-haskell-compiler/libraries/base/tests/Text.Printf/T1548.hs
Add in tests from bash:
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf1.sub
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf2.sub
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf3.sub
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf4.sub
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf5.sub
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf6.sub
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf7.sub
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf.right
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf.right.raw
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell/main-repo/tests/printf.tests
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/bourne-again-shell-bash/main-repo/aclocal.m4 (printf)
Add in tests from fish:
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/friendly-interactive-shell-fish/tests/checks/printf.fish
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/friendly-interactive-shell-fish/src/wutil/printf.rs
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/friendly-interactive-shell-fish/printf/src/tests.rs (perhaps check other rust printfs crates ? this one is fish-printf)
Add in tests from ksh:
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/korn-shell-ksh/main-repo/src/cmd/ksh93/tests/printf.sh
Add in tests from yash:
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/shells/unix/yet-another-shell-yash/tests/printf-y.tst
Add in tests from awk:
- /home/gravier/src/programs/programming/languages-implementations/interpreters/domain-specific/scripting/text-oriented/awk/gnu/test/printf-corners.awk
- (also other tests containing "printf" from the same directory)
Add in tests from perl:
- /home/gravier/src/programs/programming/languages-implementations/interpreters/general-purpose/perl/t/win32/stat.t
- /home/gravier/src/programs/programming/languages-implementations/interpreters/general-purpose/perl/dist/Time-HiRes/t/stat.t
- /home/gravier/src/programs/programming/languages-implementations/interpreters/general-purpose/perl/t/op/stat.t
Add in tests from cpython:
- /home/gravier/src/programs/programming/languages-implementations/interpreters/general-purpose/python/cpython/Lib/test/test_stat.py
Add in tests from binutils-gdb, radare2, gnu-poke, gnu-core-utilities-coreutils, gnu-findutils:
- all tests containing "printf" in the name
- (note: perhaps also do stat for coreutils)
Add in tests from fuchsia:
- /home/gravier/src/programs/system/operating-systems/fuchsia/third_party/rust_crates/vendor/nix-0.27.1/test/test_stat.rs (see below)
- /home/gravier/src/programs/system/operating-systems/fuchsia/third_party/rust_crates/vendor/nix-0.29.0/test/test_stat.rs (get it from the original crate) (also there might be other stat tests ? check)
- /home/gravier/src/programs/system/operating-systems/fuchsia/third_party/rust_crates/forks/nix-0.29.0/test/test_stat.rs (get it from the original crate) (also there might be other stat tests ? check)
- /home/gravier/src/programs/system/operating-systems/fuchsia/zircon/kernel/tests/printf_tests.cc
- /home/gravier/src/programs/system/operating-systems/fuchsia/zircon/system/ulib/fbl/test/string_printf_tests.cc
Add in tests from linux kernel:
- /home/gravier/src/programs/system/operating-systems/kernels/unix/linux/kernel/lib/test_printf.c
Add in tests from linux test project:
- /home/gravier/src/programs/system/operating-systems/kernels/unix/linux/linux-test-project-ltp/testcases/kernel/syscalls/stat/stat01.c
- /home/gravier/src/programs/system/operating-systems/kernels/unix/linux/linux-test-project-ltp/testcases/kernel/syscalls/stat/stat04.c
Add in tests from little-kernel:
- /home/gravier/src/programs/system/operating-systems/kernels/little-kernel-embedded-operating-system/lib/libc/test/printf_tests.cpp
- /home/gravier/src/programs/system/operating-systems/kernels/little-kernel-embedded-operating-system/app/tests/printf_tests.c
Add in tests from openbsd:
- /home/gravier/src/programs/system/operating-systems/unix/berkeley-software-distribution-berkeley-standard-distribution-bsd/open/src/regress/lib/libc/sys/t_stat.c
Add in tests from mpfr:
- /home/gravier/src/libraries/math/gnu-multiple-precision-floating-point-reliable-library-mpfr/tests/tprintf.c
Add in tests from netbsd:
- /home/gravier/src/programs/system/operating-systems/unix/berkeley-software-distribution-berkeley-standard-distribution-bsd/net/src/tests/lib/libc/stdio/t_printf.c
Add in tests from ncbi-vdb:
- /home/gravier/src/programs/data/management/databases/by-subject/scientific/biological/genetics/sequence-read-archive/ncbi-vdb/test/klib/printf-test.c
Add in tests from glidix:
- /home/gravier/src/programs/system/operating-systems/unix/glidix/libc/src/ctype/isalpha.c
- /home/gravier/src/programs/system/operating-systems/unix/glidix/libc/src/ctype/isdigit.c
- /home/gravier/src/programs/system/operating-systems/unix/glidix/libc/src/string/strcat.c
- /home/gravier/src/programs/system/operating-systems/unix/glidix/libc/src/string/strcmp.c
- /home/gravier/src/programs/system/operating-systems/unix/glidix/libc/src/string/strlen.c
Add in tests from gvisor:
- /home/gravier/src/programs/system/virtualization/sandboxing/gvisor/test/syscalls/linux/stat.cc
Add in tests from qemu:
- /home/gravier/src/programs/emulators-simulators-virtualization-and-other-compatibility-layers/consoles/microsoft/xbox/xemu/tests/tcg/minilib/printf.c (check if the one in actual qemu is the same and use that instead if it is)
- Look at qemu equivalent of xemu c66c51461c195d5b91626671a9059fc947a7c2a4
Add in tests from nanoprintf-paland-conformance
Add in tests from nanoprintf
Add in tests from wasi-libc:
- /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/wasi-libc/test/src/libc-test/functional/snprintf.c
Add in all the stuff from /home/gravier/src/libraries/programming/languages-implementations/standard-libraries/c/tests/printf
Also check back on ~/src/libraries/programming/languages-implementations/standard-libraries/c/implementations/printf
Add in tests from libgpg-error:
- /home/gravier/src/libraries/security/cryptography/gpg/libgpg-error/tests/t-printf.c
Wtf since when is there a fully public-domain testsuite for POSIX, we absolutely need to get tests from this: https://www.itl.nist.gov/div897/ctg/posix_form.htm
Also Linux Standard Base seems to have freely licensed tests over here: https://www.opengroup.org/infosrv/lsb/ogdeliverables/ (see also stuff in parent directories of that, probably check all starting from https://www.opengroup.org/infosrv/ actually, it seems to be a trove of nice stuff with testsuites like DCEThreads)
Check out https://www.opengroup.org/testing/downloads.html w.r.t. that too
See also https://www.vinc17.net/research/testlibm/index.en.html for a bunch of libm tests
Search GitHub and other code search services for already done functions
Add zig cc, dmd, fatcosmocc and C++ compilers to tested configurations
Change CMakeLists to specify the minimum POSIX version for each of the PSOIX symbols
Also make it so that stuff from SVID found in CMakeLists libc_symbol tests error when not found with appropriate options for this
Deal with loose tests somehow (for example what one can find by doing something like `find -regextype posix-egrep -iregex '.*te?st.*bz.*'` on glibc sources)
Re-enable calls to pledge (conditional on its presence)
Functions to do present in PDP7:
- (list is not complete - anything after stat, I guess)
All the rest of the stuff from PDP7 and anything afterwards
See also https://code.google.com/archive/p/regfuzz when we get to regex
See also http://doolittle.icarus.com/~larry/diet-bessel-test.tar.gz when we get to the bessel functions (the six j0 through yn functions)
See also http://sf.net/projects/schilytools/files/posix/waitid.c when we get to waitid
See also https://www.openwall.com/lists/musl/2024/05/11/3 when we get to strptime
Perhaps add https://inbox.sourceware.org/libc-alpha/20240513130600.1327522-1-hjl.tools@gmail.com/T/#u (this test was scrapped and never actually added to glibc) when we get to fclose
See also https://www.openwall.com/lists/oss-security/2025/02/13/3 when we get to iconv
Get this working on:
- all the BSDs (note: maybe even try 2.11BSD lol - it seems to still be maintained to some degree...)
- more obscure libcs (I should have a bunch in my local src dirs at standard-libraries/c/implementations, programming-tools/compilers and system/operating-systems)
- nolibc
Periodically update the .clang-tidy file with the checks from the latest version of clang whenever it comes out
Same for new versions of anything from .pre-commit-config.yaml (see also pre-commit autoupdate)
Procedure to find functions usage:
- find ~/src -ipath '*funcName*' >list_funcName
<list_funcName grep -iE 'tfuncName|funcNamet|/t/|break|m4|unit|gress|integ|bug|ass|xam|te?st|che?c?k' | grep -viE 'netstat|statvfs|lstat|fstat|setstate|pthread_attr_setdetachstate|initstate|tstat|statt|/t/|break|stat[is]|mbstate_t|state|status|llvm|rstat|gcc|[qawhn2ejc]stat|go|python|debug|statp|trace|qemu|getfsstat|statfs|statx|valg|gb|cons|ver|tex|pstat|bench|base|perf|nfs|[mduo]stat|tmpfile|zfs|bin|dev|unbound' | less #parallel -n100000 -- 'grep --color=always -aiE "tfuncName|funcNamet|/t/|m4|unit|gress|integ|te?st|ch(ec)?k"' | awk 'length < 1000' | less
<list_funcName grep -iE 'funcName.*[0-9]|cat.*funcName|man.*funcName' | less
- rg -uuuuuu -i funcName ~/src >grep_funcName
<grep_funcName cut -d: -f1 | grep -v funcName | grep -iE '(conf|mak)[^/]*$|\.m[4k]' | sort -u | xargs -d'\n' grep -C10 funcName | bat -p -l c
- Look at the POSIX, LSB, SVID and/or C standard stuff for examples - also documentation on various websites like MSDN, cppreference, cplusplus, Wikipedia or even stuff like Oracle documentation
- Search for them on GitHub/SearchCode and other services
- Use Copilot, basing prompts on standards (also, good opportunity for adding any testcases given out by standards)
- Debian/Fedora file search