[PATCH i-g-t] tools: rename lsfacts into igt_facts

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Feb 18 16:06:30 UTC 2025


Hi Peter,
On 2025-02-18 at 08:32:08 +0100, Peter Senna Tschudin wrote:
> On 17.02.2025 14:32, Kamil Konieczny wrote:
> > This is a follow up to GitLab issue 168 where name 'power' was
> > a little too generic. Similarly, name lsfacts looks also a little
> > too generic, so rename it into igt_facts.
> 
> Would you consider keeping the 'ls' part of the name so that it would
> be called 'igt_lsfacts'? The reason is that the tool simply list facts,
> while the integration with igt_runner report changes instead of listing
> facts.

I would prefer to have a little more generic name as it will have
room for future extensions, also less letters to type. If you want
you could extend it with --help and printf out what it does.

> 
> May I ask why the lsgpu tool did not get a rename too? Would a rename to
> 'igt_lsgpu' help prevent name collisions with system wide tools that have
> similar objectives?
> 

lsgpu is old tool and it was accepted in times when it was
introduced, it's meaning is also self-explanatory and relates
with igt GPU focus.

Regards,
Kamil

> 
> > 
> > Cc: Jordan Justen <jljusten at debian.org>
> > Cc: Jordan Justen <jordan.l.justen at intel.com>
> > Cc: Peter Senna Tschudin <peter.senna at linux.intel.com>
> Acked-by: Peter Senna Tschudin <peter.senna at linux.intel.com>
> Reviewed-by: Peter Senna Tschudin <peter.senna at linux.intel.com>
> > Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> > ---
> >  tools/{lsfacts.c => igt_facts.c} | 12 ++++++------
> >  tools/meson.build                |  2 +-
> >  2 files changed, 7 insertions(+), 7 deletions(-)
> >  rename tools/{lsfacts.c => igt_facts.c} (71%)
> > 
> > diff --git a/tools/lsfacts.c b/tools/igt_facts.c
> > similarity index 71%
> > rename from tools/lsfacts.c
> > rename to tools/igt_facts.c
> > index bbe77717a..af3ea2a61 100644
> > --- a/tools/lsfacts.c
> > +++ b/tools/igt_facts.c
> > @@ -7,12 +7,12 @@
> >  #include "igt_facts.h"
> >  
> >  /**
> > - * SECTION:lsfacts
> > - * @short_description: lsfacts
> > - * @title: lsfacts
> > - * @include: lsfacts.c
> > + * SECTION:igt_facts
> > + * @short_description: igt_facts
> > + * @title: igt_facts
> > + * @include: igt_facts.c
> >   *
> > - * # lsfacts
> > + * # igtfacts
> >   *
> >   * Scan for igt-facts and print them on screen. Indicate if no facts are found.
> >   */
> > @@ -20,7 +20,7 @@ int main(int argc, char *argv[])
> >  {
> >  	igt_facts_lists_init();
> >  
> > -	igt_facts("lsfacts");
> > +	igt_facts("igt_facts");
> >  
> >  	if (igt_facts_are_all_lists_empty())
> >  		igt_info("No facts found...\n");
> > diff --git a/tools/meson.build b/tools/meson.build
> > index f091af380..1dfe1f839 100644
> > --- a/tools/meson.build
> > +++ b/tools/meson.build
> > @@ -12,6 +12,7 @@ foreach prog : tools_progs_noisnt
> >  endforeach
> >  
> >  tools_progs = [
> > +	'igt_facts',
> >  	'igt_power',
> >  	'igt_stats',
> >  	'intel_audio_dump',
> > @@ -43,7 +44,6 @@ tools_progs = [
> >  	'intel_gem_info',
> >  	'intel_gvtg_test',
> >  	'dpcd_reg',
> > -	'lsfacts',
> >  	'lsgpu',
> >  ]
> >  tool_deps = igt_deps
> 


More information about the igt-dev mailing list