Page MenuHomeFreeBSD

LinuxKPI: add script to find obsolete dummy files
Needs ReviewPublic

Authored by bz on Jan 29 2023, 5:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 10:47 AM
Unknown Object (File)
Dec 20 2023, 8:32 AM
Unknown Object (File)
Nov 29 2023, 7:31 AM
Unknown Object (File)
Nov 28 2023, 10:59 PM
Unknown Object (File)
Nov 24 2023, 1:26 AM
Unknown Object (File)
Nov 24 2023, 12:50 AM
Unknown Object (File)
May 3 2023, 1:26 AM
Unknown Object (File)
Feb 17 2023, 10:02 PM

Details

Reviewers
emaste
imp
Group Reviewers
linuxkpi
Summary

In order to cleanup local changes this is a quickly hacked-up script
which will check for files in dummy/ if another non-zero-sized file
exists in common/ and if so staged the obsolete file in dummy for removal.

Sponsored by: The FreeBSD Foundation

Test Plan

In theory that script belongs elsewhere in the tree but it is
only ever useful here and for manual runs.

I can move it into sys/tools and make it take a SYSDIR or
something but that kind-of only makes sense if we run it
automatically.

I am open to suggestions.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 49312
Build 46202: arc lint + arc unit

Event Timeline

bz requested review of this revision.Jan 29 2023, 5:58 PM
bz created this revision.

I definitely like the idea of having things like this in the tree, and IMO it makes sense to put them in the specific directory so that they can be found, even if that is a bit "ugly."

That said there has been some talk about running things like make makeman via a CI job to detect missed regen/updates, and that would argue for a more canonical location. Adding some folks who I think might have an interest.

About the location, maybe linuxkpi/tools would be better? Like tools related to the Linuxkpi. There probably will be more of them as time goes by!

I definitely like the idea of having things like this in the tree, and IMO it makes sense to put them in the specific directory so that they can be found, even if that is a bit "ugly."

That said there has been some talk about running things like make makeman via a CI job to detect missed regen/updates, and that would argue for a more canonical location. Adding some folks who I think might have an interest.

I'd favor a more centralized location for sanity tests. Having a CI job that runs all of them would be great.

That suggests, though, that this test might not be quite right for that since it's more of a 'fix it' script since it does the git rm than a testing script...

The script itself is fine if it's a fixit script (and where it is would be fine, but I'm kinda agnostic). If we wanted to use it as a 'test it' script, though, it would need some work...

Can always make the action an optflag so by default it only spits out if there are "duplicates" or is silent.

We tend to put tools in tools/foo rather than in the sys/ tree directly FWIW.