Re: [MAINTAINER SUMMIT] User-space requirements for accelerator drivers

Mauro Carvalho Chehab
2021-09-11T23:22:22Z

Em Sat, 11 Sep 2021 10:20:07 -0400
Steven Rostedt <rostedt@goodmis.org> escreveu:

> I would like not only documentation, but also an open source test suite
> that simply tests the interface. Honestly, I believe that all new
> interfaces to the kernel (open or not) should have full documentation
> and a test suite interface before it gets accepted

Btw, I've been working on an improvement for scripts/get_abi.pl, in order
to allow it to check for missing API documentation:

https://lore.kernel.org/lkml/cover.1631112725.git.mchehab+huawei@kernel.org/

It basically reads everything under /sys and at Documentation/ABI,
and checks if something was found at sysfs but there's no
documentation for it. It allows to optionally search for an specific
string (actually, it uses regex):

$ ./scripts/get_abi.pl undefined --search-string devices.*cpulistaffinity
/sys/devices/pci0000:00/0000:00:01.0/pci_bus/0000:01/cpulistaffinity not found.
/sys/devices/pci0000:00/0000:00:01.1/pci_bus/0000:02/cpulistaffinity not found.
/sys/devices/pci0000:00/0000:00:01.2/pci_bus/0000:03/cpulistaffinity not found.
/sys/devices/pci0000:00/0000:00:1c.0/pci_bus/0000:04/cpulistaffinity not found.
/sys/devices/pci0000:00/0000:00:1c.1/pci_bus/0000:05/cpulistaffinity not found.
/sys/devices/pci0000:00/0000:00:1c.2/pci_bus/0000:06/cpulistaffinity not found.
/sys/devices/pci0000:00/0000:00:1c.4/pci_bus/0000:07/cpulistaffinity not found.
/sys/devices/pci0000:00/0000:00:1d.0/pci_bus/0000:72/cpulistaffinity not found.
/sys/devices/pci0000:00/0000:00:1d.4/pci_bus/0000:73/cpulistaffinity not found.
/sys/devices/pci0000:00/pci_bus/0000:00/cpulistaffinity not found.

While it won't check the quality of the ABI, it would let someone to
at least double check if a driver is not exposing something undocumented
via sysfs.

If someone wants to test, the newest version is at:

https://github.com/mchehab/linux/commits/get_undefined

Thanks,
Mauro