Page MenuHomeFreeBSD

libc: tests: fix luacheck warnings in the fortification test generator
ClosedPublic

Authored by kevans on Mar 5 2025, 1:34 AM.
Tags
None
Referenced Files
F114071557: D49235.diff
Mon, Apr 7, 3:14 PM
Unknown Object (File)
Wed, Apr 2, 5:22 AM
Unknown Object (File)
Tue, Apr 1, 3:09 AM
Unknown Object (File)
Sun, Mar 23, 6:25 PM
Unknown Object (File)
Thu, Mar 20, 8:43 AM
Unknown Object (File)
Tue, Mar 11, 3:48 AM
Unknown Object (File)
Mar 7 2025, 2:08 PM
Unknown Object (File)
Mar 7 2025, 1:35 PM
Subscribers

Details

Summary

All of these are simple shadowing that don't need to happen; we're
passing the shadowed value through in every case anyways, just use it
in the closure in a more lua-natural fashion.

While we're here, lint the generator every time we generate tests to
ensure that we don't regress without having to remember to manually
run luacheck.

Diff Detail

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

Event Timeline

kevans requested review of this revision.Mar 5 2025, 1:34 AM
This revision is now accepted and ready to land.Mar 5 2025, 2:45 AM
lib/libc/tests/secure/Makefile
24

Should it be an error to not have luacheck installed? In general I'd rather be consistent rather than silently disabling some checks depending on the environment.

kevans added inline comments.
lib/libc/tests/secure/Makefile
24

Turning it into an error pre-commit... the generator is still a manual process, I don't see any harm in forcing luacheck to be installed for running it.