Page MenuHomeFreeBSD

libc: Add a wide version of snprintf_test.
ClosedPublic

Authored by des on Sep 5 2023, 8:14 AM.
Tags
None
Referenced Files
F108433314: D41726.id126873.diff
Fri, Jan 24, 5:48 PM
F108429091: D41726.id.diff
Fri, Jan 24, 5:15 PM
Unknown Object (File)
Mon, Jan 20, 5:56 AM
Unknown Object (File)
Nov 28 2024, 9:12 AM
Unknown Object (File)
Nov 20 2024, 3:40 PM
Unknown Object (File)
Nov 20 2024, 3:18 PM
Unknown Object (File)
Nov 20 2024, 1:29 PM
Unknown Object (File)
Nov 18 2024, 12:46 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Sep 5 2023, 8:14 AM
This revision is now accepted and ready to land.Sep 6 2023, 5:37 PM
emaste added a subscriber: emaste.
emaste added inline comments.
lib/libc/tests/stdio/snprintf_test.c
19–26

This (block) change is not necessarily required, but for diff reduction between the two versions?

Awesome new tests!

lib/libc/tests/stdio/snprintf_test.c
15–20

Is there a reason why this needs to be defined here (it's available in sys/param.h)?

24

Just in case someone adds a no-argument test.

lib/libc/tests/stdio/swprintf_test.c
17–20

Same comment as the previous one.

134
  1. This should be done in a setup fixture.
  2. An assertion ensuring the call succeeds should be added in the setup fixture.

This helps ensure that the preconditions for the test are being handled/checked properly and that if the locale does not exist, the test program doesn't crash on collection (that's what would happen if the assertion was placed in ATF_TP_ADD_TCS).

140

Whitespace.

des marked 5 inline comments as done.Sep 6 2023, 8:24 PM
des added inline comments.
lib/libc/tests/stdio/snprintf_test.c
15–20

I didn't want to pull it in just for that one trivial macro.

19–26

correct

lib/libc/tests/stdio/swprintf_test.c
134

There are precisely zero mentions of setup fixtures in the ATF documentation and zero occurrences of the word “setup” in the ATF C API headers.

140

matter of taste

This revision was automatically updated to reflect the committed changes.
des marked 3 inline comments as done.