Page MenuHomeFreeBSD

libc/tests: Add test case for bug fixed in r343566
ClosedPublic

Authored by kevans on Jan 30 2019, 3:32 AM.

Details

Summary
  • Module split out
  • Comment added to roughly describe what's going on, cherry-picked from rS343566 for the most part
  • Copyright header massaged a little bit to include the full license text and move the SPDX identifier up to where we've generally placed it (pending @andrew_tao173.riddles.org.uk approval, to be safe, though I picture no objections)
  • The build glue is admittedly...not ideal looking; I was unsure of the most ideal approach, but it's clear the module build must be separate from the test programs.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kevans created this revision.Jan 30 2019, 3:32 AM

Of course I have no objections (moving the license text from LICENSE into the source files is completely compatible with both the intent and the stated terms of the license).

kib added a comment.Jan 30 2019, 6:59 PM

Do you intend to do a pass to make at least some style(9) recommendations not broken ?

kevans updated this revision to Diff 53436.Jan 30 2019, 7:15 PM

Address some of the style(9) concerns (bah =)):

  • Move declarations to the top
  • Blank lines after declarations
  • Parenthesized return expressions
  • Re-style switch to remove excessive bracing and reindent
kib added inline comments.Jan 30 2019, 7:42 PM
lib/libc/tests/stdlib/dynthr_mod/dynthr_mod.c
33 ↗(On Diff #53436)

You need to add $FreeBSD$ tags, otherwise pre-commit hooks would block the commit.

39 ↗(On Diff #53436)

Extra blank line.

43 ↗(On Diff #53436)

Are there macros needed ?

64 ↗(On Diff #53436)

if (rc != 0)

67 ↗(On Diff #53436)

better use break there ?

72 ↗(On Diff #53436)

and there

lib/libc/tests/stdlib/dynthr_test.c
39 ↗(On Diff #53436)

Extra blank line.

80 ↗(On Diff #53436)

if (mod_handle != NULL)

84 ↗(On Diff #53436)

!= NULL.

87 ↗(On Diff #53436)

*)rawfunc

kevans updated this revision to Diff 53439.Jan 30 2019, 7:59 PM
kevans marked 10 inline comments as done.

I was attempting to leave the original case as unmolested as possible (hence also the macros -- shims so we don't print things out in the test), but I don't care enough to object.

Fixed the things pointed out and ripped out the parts that speak since they're likely never going to be used in this context.

kib accepted this revision.Jan 30 2019, 8:15 PM
This revision is now accepted and ready to land.Jan 30 2019, 8:15 PM
This revision was automatically updated to reflect the committed changes.