Add test to verify probe of devices from discoverable buses
v4 cover Add test to verify probe of devices from discoverable buses
This is part of an effort to improve detection of regressions impacting device probe on all platforms. The recently merged DT kselftest [3] detects probe issues for all devices described statically in the DT. That leaves out devices discovered at run-time from discoverable buses.
This is where this test comes in. All of the devices that are connected through discoverable buses (ie USB and PCI), and which are internal and therefore always present, can be described based on their position in the system topology in a per-platform YAML file so they can be checked for. The test will check that the device has been instantiated and bound to a driver.
Patch 1 introduces the test. Patch 2 and 3 add the device definitions for the google,spherion machine (Acer Chromebook 514) and XPS 13 as examples.
This is the output from the test running on Spherion:
TAP version 13
Using board file: boards/google,spherion.yaml 1..8
ok 1 /usb2-controller@11200000/1.4.1/camera.device ok 2 /usb2-controller@11200000/1.4.1/camera.0.driver ok 3 /usb2-controller@11200000/1.4.1/camera.1.driver ok 4 /usb2-controller@11200000/1.4.2/bluetooth.device ok 5 /usb2-controller@11200000/1.4.2/bluetooth.0.driver ok 6 /usb2-controller@11200000/1.4.2/bluetooth.1.driver ok 7 /pci-controller@11230000/0.0/0.0/wifi.device ok 8 /pci-controller@11230000/0.0/0.0/wifi.driver
Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0
[3] https://lore.kernel.org/all/[email protected]/
Changes in v4:
- Dropped RFC tag
- Fixed 'busses' misspelling
- Link to v3: https://lore.kernel.org/all/[email protected]
Changes in v3:
- Reverted approach of encoding stable device reference in test file
from device match fields (from modalias) back to HW topology (from v1)
- Changed board file description to YAML
- Rewrote test script in python to handle YAML and support x86 platforms
- Link to v2: https://lore.kernel.org/all/[email protected]
Changes in v2:
- Changed approach of encoding stable device reference in test file from
HW topology to device match fields (the ones from modalias)
- Better documented test format
- Link to v1: https://lore.kernel.org/all/[email protected]
---
Nícolas F. R. A. Prado (3):
kselftest: Add test to verify probe of devices from discoverable buses
kselftest: devices: Add sample board file for google,spherion
kselftest: devices: Add sample board file for XPS 13 9300
tools/testing/selftests/Makefile | 1 + tools/testing/selftests/devices/Makefile | 4 + .../devices/boards/Dell Inc.,XPS 13 9300.yaml | 40 +++ .../selftests/devices/boards/google,spherion.yaml | 50 ++++ tools/testing/selftests/devices/ksft.py | 90 ++++++ .../selftests/devices/test_discoverable_devices.py | 318 +++++++++++++++++++++ 6 files changed, 503 insertions(+)
---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20240122-discoverable-devs-ksft-9d501e312688
Best regards,
Signature · 1 line
Nícolas F. R. A. Prado <[email protected]>
PATCH v4 1/3 kselftest: Add test to verify probe of devices from discoverable buses
Add a new test to verify that a list of expected devices from discoverable buses (ie USB, PCI) have been successfully instantiated and probed by a driver.
The per-platform list of expected devices is selected from the ones under the boards/ directory based on the DT compatible or the DMI IDs.
--- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/devices/Makefile | 4 + tools/testing/selftests/devices/ksft.py | 90 ++++++ .../selftests/devices/test_discoverable_devices.py | 318 +++++++++++++++++++++ 4 files changed, 413 insertions(+)
tools/testing/selftests/Makefile +1 -0
@@ -13,6 +13,7 @@ TARGETS += core TARGETS += cpufreq TARGETS += cpu-hotplug TARGETS += damon +TARGETS += devices TARGETS += dmabuf-heaps TARGETS += drivers/dma-buf TARGETS += drivers/s390x/uvdevice
tools/testing/selftests/devices/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +TEST_PROGS := test_discoverable_devices.py +TEST_FILES := boards ksft.py + +include ../lib.mk
tools/testing/selftests/devices/ksft.py new file +90 -0
90 lines not on this page · raw message
tools/testing/selftests/devices/test_discoverable_devices.py new file +318 -0
318 lines not on this page · raw message
Signature · 1 line
2.43.0
Re: [PATCH v4 1/3] kselftest: Add test to verify probe of devices from discoverable buses
Quoted 7 lines · Nícolas F. R. A. Prado
Add a new test to verify that a list of expected devices from discoverable buses (ie USB, PCI) have been successfully instantiated and probed by a driver.
The per-platform list of expected devices is selected from the ones under the boards/ directory based on the DT compatible or the DMI IDs.
Quoted 6 lines
Signed-off-by Nícolas F. R. A. Prado <[email protected]>--- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/devices/Makefile | 4 +tools/testing/selftests/devices/ksft.py | 90 ++++++
This seems to be a copy of tools/testing/selftests/kselftest/ksft.py. Instead of copying the file, try to use it from the standard location.
Quoted 2 lines
.../selftests/devices/test_discoverable_devices.py | 318 +++++++++++++++++++++ 4 files changed, 413 insertions(+)
(...)
Re: [PATCH v4 1/3] kselftest: Add test to verify probe of devices from discoverable buses
Quoted 16 lines · Thomas Weißschuh
Quoted 13 lines · Nícolas F. R. A. Prado
Add a new test to verify that a list of expected devices from discoverable buses (ie USB, PCI) have been successfully instantiated and
probed by a driver.The per-platform list of expected devices is selected from the ones under the boards/ directory based on the DT compatible or the DMI IDs.
Signed-off-by Nícolas F. R. A. Prado <[email protected]>---
tools/testing/selftests/Makefile | 1 + tools/testing/selftests/devices/Makefile | 4 +
Quoted 5 lines
Quoted 1 line
tools/testing/selftests/devices/ksft.py | 90 ++++++
This seems to be a copy of
tools/testing/selftests/kselftest/ksft.py. Instead of copying the file, try to use it from the standard location.
This series is almost 1 year old and has long ago been merged :)
Signature · 3 lines
Thanks, Nícolas
PATCH v4 2/3 kselftest: devices: Add sample board file for google,spherion
In reply to Nícolas F. R. A. PradoAdd a sample board file describing the file's format and with the list of devices expected to be probed on the google,spherion machine as an example.
Test output:
TAP version 13
Using board file: boards/google,spherion.yaml 1..8
ok 1 /usb2-controller@11200000/1.4.1/camera.device ok 2 /usb2-controller@11200000/1.4.1/camera.0.driver ok 3 /usb2-controller@11200000/1.4.1/camera.1.driver ok 4 /usb2-controller@11200000/1.4.2/bluetooth.device ok 5 /usb2-controller@11200000/1.4.2/bluetooth.0.driver ok 6 /usb2-controller@11200000/1.4.2/bluetooth.1.driver ok 7 /pci-controller@11230000/0.0/0.0/wifi.device ok 8 /pci-controller@11230000/0.0/0.0/wifi.driver
Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0
--- .../selftests/devices/boards/google,spherion.yaml | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+)
tools/testing/selftests/devices/boards/google,spherion.yaml new file +50 -0
@@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# This is the device definition for the Google Spherion Chromebook. +# The filename "google,spherion" comes from the Devicetree compatible, so this +# file will be automatically used when the test is run on that machine. +# +# The top-level is a list of controllers, either for USB or PCI(e). +# Every controller needs to have a 'type' key set to either 'usb-controller' or +# 'pci-controller'. +# Every controller needs to be uniquely identified on the platform. To achieve +# this, several optional keys can be used: +# - dt-mmio: identify the MMIO address of the controller as defined in the +# Devicetree. +# - usb-version: for USB controllers to differentiate between USB3 and USB2 +# buses sharing the same controller. +# - acpi-uid: _UID property of the controller as supplied by the ACPI. Useful to +# distinguish between multiple PCI host controllers. +# +# The 'devices' key defines a list of devices that are accessible under that +# controller. A device might be a leaf device or another controller (see +# 'Dell Inc.,XPS 13 9300.yaml'). +# +# The 'path' key is needed for every child device (that is, not top-level) to +# define how to reach this device from the parent controller. For USB devices it +# follows the format \d(.\d)* and denotes the port in the hub at each level in +# the USB topology. For PCI devices it follows the format \d.\d(/\d.\d)* +# denoting the device (identified by device-function pair) at each level in the +# PCI topology. +# +# The 'name' key is used in the leaf devices to name the device for clarity in +# the test output. +# +# For USB leaf devices, the 'interfaces' key should contain a list of the +# interfaces in that device that should be bound to a driver. +# +- type: usb-controller + dt-mmio: 11200000 + usb-version: 2 + devices: + - path: 1.4.1 + interfaces: [0, 1] + name: camera + - path: 1.4.2 + interfaces: [0, 1] + name: bluetooth +- type: pci-controller + dt-mmio: 11230000 + devices: + - path: 0.0/0.0 + name: wifi
Signature · 1 line
2.43.0
PATCH v4 3/3 kselftest: devices: Add sample board file for XPS 13 9300
In reply to Nícolas F. R. A. PradoAdd a sample board file describing the file's format and with the list of devices expected to be probed on the XPS 13 9300 machine as an example x86 platform.
Test output:
TAP version 13
Using board file: boards/Dell Inc.,XPS 13 9300.yaml 1..22
ok 1 /pci-controller/14.0/usb2-controller/9/camera.device ok 2 /pci-controller/14.0/usb2-controller/9/camera.0.driver ok 3 /pci-controller/14.0/usb2-controller/9/camera.1.driver ok 4 /pci-controller/14.0/usb2-controller/9/camera.2.driver ok 5 /pci-controller/14.0/usb2-controller/9/camera.3.driver ok 6 /pci-controller/14.0/usb2-controller/10/bluetooth.device ok 7 /pci-controller/14.0/usb2-controller/10/bluetooth.0.driver ok 8 /pci-controller/14.0/usb2-controller/10/bluetooth.1.driver ok 9 /pci-controller/2.0/gpu.device
ok 10 /pci-controller/2.0/gpu.driver
ok 11 /pci-controller/4.0/thermal.device
ok 12 /pci-controller/4.0/thermal.driver
ok 13 /pci-controller/12.0/sensors.device
ok 14 /pci-controller/12.0/sensors.driver
ok 15 /pci-controller/14.3/wifi.device
ok 16 /pci-controller/14.3/wifi.driver
ok 17 /pci-controller/1d.0/0.0/ssd.device
ok 18 /pci-controller/1d.0/0.0/ssd.driver
ok 19 /pci-controller/1d.7/0.0/sdcard-reader.device ok 20 /pci-controller/1d.7/0.0/sdcard-reader.driver ok 21 /pci-controller/1f.3/audio.device
ok 22 /pci-controller/1f.3/audio.driver
Totals: pass:22 fail:0 xfail:0 xpass:0 skip:0 error:0
--- .../devices/boards/Dell Inc.,XPS 13 9300.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+)
tools/testing/selftests/devices/boards/Dell Inc.,XPS 13 9300.yaml new file +40 -0
@@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# This is the device definition for the XPS 13 9300. +# The filename "Dell Inc.,XPS 13 9300" was chosen following the format +# "Vendor,Product", where Vendor comes from +# /sys/devices/virtual/dmi/id/sys_vendor, and Product comes from +# /sys/devices/virtual/dmi/id/product_name. +# +# See google,spherion.yaml for more information. +# +- type: pci-controller + # This machine has a single PCI host controller so it's valid to not have any + # key to identify the controller. If it had more than one controller, the UID + # of the controller from ACPI could be used to distinguish as follows: + #acpi-uid: 0 + devices: + - path: 14.0 + type: usb-controller + usb-version: 2 + devices: + - path: 9 + name: camera + interfaces: [0, 1, 2, 3] + - path: 10 + name: bluetooth + interfaces: [0, 1] + - path: 2.0 + name: gpu + - path: 4.0 + name: thermal + - path: 12.0 + name: sensors + - path: 14.3 + name: wifi + - path: 1d.0/0.0 + name: ssd + - path: 1d.7/0.0 + name: sdcard-reader + - path: 1f.3 + name: audio
Signature · 1 line
2.43.0
Re: [PATCH v4 3/3] kselftest: devices: Add sample board file for XPS 13 9300
Il 22/01/24 19:53, Nícolas F. R. A. Prado ha scritto:
Quoted 44 lines
Add a sample board file describing the file's format and with the list of devices expected to be probed on the XPS 13 9300 machine as an example x86 platform.
Test output:
TAP version 13
Using board file: boards/Dell Inc.,XPS 13 9300.yaml 1..22
ok 1 /pci-controller/14.0/usb2-controller/9/camera.device ok 2 /pci-controller/14.0/usb2-controller/9/camera.0.driver ok 3 /pci-controller/14.0/usb2-controller/9/camera.1.driver ok 4 /pci-controller/14.0/usb2-controller/9/camera.2.driver ok 5 /pci-controller/14.0/usb2-controller/9/camera.3.driver ok 6 /pci-controller/14.0/usb2-controller/10/bluetooth.device ok 7 /pci-controller/14.0/usb2-controller/10/bluetooth.0.driver ok 8 /pci-controller/14.0/usb2-controller/10/bluetooth.1.driver ok 9 /pci-controller/2.0/gpu.device
ok 10 /pci-controller/2.0/gpu.driver
ok 11 /pci-controller/4.0/thermal.device
ok 12 /pci-controller/4.0/thermal.driver
ok 13 /pci-controller/12.0/sensors.device
ok 14 /pci-controller/12.0/sensors.driver
ok 15 /pci-controller/14.3/wifi.device
ok 16 /pci-controller/14.3/wifi.driver
ok 17 /pci-controller/1d.0/0.0/ssd.device
ok 18 /pci-controller/1d.0/0.0/ssd.driver
ok 19 /pci-controller/1d.7/0.0/sdcard-reader.device ok 20 /pci-controller/1d.7/0.0/sdcard-reader.driver ok 21 /pci-controller/1f.3/audio.device
ok 22 /pci-controller/1f.3/audio.driver
Totals: pass:22 fail:0 xfail:0 xpass:0 skip:0 error:0Signed-off-by Nícolas F. R. A. Prado <[email protected]>--- .../devices/boards/Dell Inc.,XPS 13 9300.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+)tools/testing/selftests/devices/boards/Dell Inc.,XPS 13 9300.yaml new file +0
-0
tools/testing/selftests/devices/boards/Dell Inc.,XPS 13 9300.yaml line 9
Quoted 9 lines
tools/testing/selftests/devices/boards/Dell Inc.,XPS 13 9300.yaml new file +9
-0@@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# This is the device definition for the XPS 13 9300. +# The filename "Dell Inc.,XPS 13 9300" was chosen following the format +# "Vendor,Product", where Vendor comes from +# /sys/devices/virtual/dmi/id/sys_vendor, and Product comes from +# /sys/devices/virtual/dmi/id/product_name. +# +# See google,spherion.yaml for more information.
What if - instead of taking google,spherion.yaml as an example - you create a new file named something like
"example,device.yaml"
that would be a fantasy device, bringing examples for all .. or most of .. the currently supported types/devices?
You would also move the nice documentation that you wrote in spherion.yaml to the new example,device.yaml and ask to refer to that instead in all of the real device specific definitions.
# SPDX-License-Identifier: GPL-2.0 <--- (GPL-2.0 OR MIT) like device trees perhaps? #
# This is the device definition for the Example Device
# The filename "Example Device" was chosen following the format
# "Vendor,Product", where:
# - Vendor is "Example" and comes from /sys/devices/virtual/dmi/id/sys_vendor # - Product is "Device" and comes from /sys/devices/virtual/dmi/id/product_name #
# ....the rest of the blurb goes here #
- type : .... this that the other
devices:
- the least amount of device descriptions that you can use for documenting how to write this stuff :-)
Anything against that?
Cheers,
Angelo
Quoted 32 lines
tools/testing/selftests/devices/boards/Dell Inc.,XPS 13 9300.yaml new file +31
-0+# +- type: pci-controller + # This machine has a single PCI host controller so it's valid to not have any + # key to identify the controller. If it had more than one controller, the UID + # of the controller from ACPI could be used to distinguish as follows: + #acpi-uid: 0 + devices: + - path: 14.0 + type: usb-controller + usb-version: 2 + devices: + - path: 9 + name: camera + interfaces: [0, 1, 2, 3] + - path: 10 + name: bluetooth + interfaces: [0, 1] + - path: 2.0 + name: gpu + - path: 4.0 + name: thermal + - path: 12.0 + name: sensors + - path: 14.3 + name: wifi + - path: 1d.0/0.0 + name: ssd + - path: 1d.7/0.0 + name: sdcard-reader + - path: 1f.3 + name: audio
Re: [PATCH v4 3/3] kselftest: devices: Add sample board file for XPS 13 9300
Quoted 78 lines · AngeloGioacchino Del Regno
Il 22/01/24 19:53, Nícolas F. R. A. Prado ha scritto:
Quoted 44 lines
Add a sample board file describing the file's format and with the list of devices expected to be probed on the XPS 13 9300 machine as an example x86 platform.
Test output:
TAP version 13
Using board file: boards/Dell Inc.,XPS 13 9300.yaml 1..22
ok 1 /pci-controller/14.0/usb2-controller/9/camera.device ok 2 /pci-controller/14.0/usb2-controller/9/camera.0.driver ok 3 /pci-controller/14.0/usb2-controller/9/camera.1.driver ok 4 /pci-controller/14.0/usb2-controller/9/camera.2.driver ok 5 /pci-controller/14.0/usb2-controller/9/camera.3.driver ok 6 /pci-controller/14.0/usb2-controller/10/bluetooth.device ok 7 /pci-controller/14.0/usb2-controller/10/bluetooth.0.driver ok 8 /pci-controller/14.0/usb2-controller/10/bluetooth.1.driver ok 9 /pci-controller/2.0/gpu.device
ok 10 /pci-controller/2.0/gpu.driver
ok 11 /pci-controller/4.0/thermal.device
ok 12 /pci-controller/4.0/thermal.driver
ok 13 /pci-controller/12.0/sensors.device
ok 14 /pci-controller/12.0/sensors.driver
ok 15 /pci-controller/14.3/wifi.device
ok 16 /pci-controller/14.3/wifi.driver
ok 17 /pci-controller/1d.0/0.0/ssd.device
ok 18 /pci-controller/1d.0/0.0/ssd.driver
ok 19 /pci-controller/1d.7/0.0/sdcard-reader.device ok 20 /pci-controller/1d.7/0.0/sdcard-reader.driver ok 21 /pci-controller/1f.3/audio.device
ok 22 /pci-controller/1f.3/audio.driver
Totals: pass:22 fail:0 xfail:0 xpass:0 skip:0 error:0Signed-off-by Nícolas F. R. A. Prado <[email protected]>--- .../devices/boards/Dell Inc.,XPS 13 9300.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+)tools/testing/selftests/devices/boards/Dell Inc.,XPS 13 9300.yaml new file +0
-0tools/testing/selftests/devices/boards/Dell Inc.,XPS 13 9300.yaml line 9
Quoted 9 lines
tools/testing/selftests/devices/boards/Dell Inc.,XPS 13 9300.yaml new file +9
-0@@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# This is the device definition for the XPS 13 9300. +# The filename "Dell Inc.,XPS 13 9300" was chosen following the format +# "Vendor,Product", where Vendor comes from +# /sys/devices/virtual/dmi/id/sys_vendor, and Product comes from +# /sys/devices/virtual/dmi/id/product_name. +# +# See google,spherion.yaml for more information.What if - instead of taking google,spherion.yaml as an example - you create a new file named something like
"example,device.yaml"
that would be a fantasy device, bringing examples for all .. or most of .. the currently supported types/devices?
You would also move the nice documentation that you wrote in
spherion.yamlto the new example,device.yaml and ask to refer to that instead in all of the real device specific definitions.# SPDX-License-Identifier: GPL-2.0 <--- (GPL-2.0 OR MIT) like device trees perhaps? #
# This is the device definition for the Example Device
# The filename "Example Device" was chosen following the format
# "Vendor,Product", where:
# - Vendor is "Example" and comes from/sys/devices/virtual/dmi/id/sys_vendor# - Product is "Device" and comes from/sys/devices/virtual/dmi/id/product_name## ....the rest of the blurb goes here #
Quoted 6 lines
- type : .... this that the other
devices:
- the least amount of device descriptions that you can use for documenting how to write this stuff :-)Anything against that?
That'd also work. Though I feel like a single example file for both a DT-based and an ACPI-based platform might get unnecessarily confusing (given the different way for identifying the machine - DMI vs DT compatible - and for identifying the root level controller - ACPI UID vs DT MMIO).
I also feel like a real machine example is helpful to have.
In my opinion, your suggestion would make much more sense - and be needed even - if we had several machine files in this directory, so that the documentation stands out among them. However the feedback that I got from Shuah during Plumbers was that maintaining per-machine files in-tree wasn't going to happen. So these two files serve as the documentation, with real-life examples, that other machines could build upon in a separate repository.
Thanks,
Nícolas
Re: [PATCH v4 3/3] kselftest: devices: Add sample board file for XPS 13 9300
In reply to Nícolas F. R. A. Prado"Nícolas F. R. A. Prado" <[email protected]>:
Quoted 3 lines
Add a sample board file describing the file's format and with the list of devices expected to be probed on the XPS 13 9300 machine as an example x86 platform.
And now "Dell Inc.,XPS 13 9300.yaml" became the only file in the repository, which has space in its name:
$ find . -name '* *' ./tools/testing/selftests/devices/probe/boards/Dell Inc.,XPS 13 9300.yaml
I kindly ask you to rename file. New name should not contain space or comma in it.
The file name in its current form breaks tools. For example, it breaks "xargs".
For example, the following will work in "fs" directory:
stable/fs$ find . | xargs chmod -w
But it will not work in root of source tree because of this "Dell Inc.,XPS 13 9300.yaml" file:
stable$ find . | xargs chmod -w
chmod: cannot access './tools/testing/selftests/devices/probe/boards/Dell': No such file or directory
chmod: cannot access 'Inc.,XPS': No such file or directory
chmod: cannot access '13': No such file or directory
chmod: cannot access '9300.yaml': No such file or directory
Signature · 1 line
Askar Safin
Re: [PATCH v4 3/3] kselftest: devices: Add sample board file for XPS 13 9300
Quoted 10 lines · Askar Safin
"Nícolas F. R. A. Prado" <[email protected]>:
Quoted 4 lines
Add a sample board file describing the file's format and with the list
of devices expected to be probed on the XPS 13 9300 machine as an example x86 platform.And now "Dell Inc.,XPS 13 9300.yaml" became the only file in the repository,
which has space in its name:
Quoted 7 lines
$ find . -name '* *' ./tools/testing/selftests/devices/probe/boards/Dell Inc.,XPS 13 9300.yamlI kindly ask you to rename file. New name should not contain space or comma
in it.
While I understand it might be inconvenient that this is the only file with a space in its name, that is exactly the string that is reported by DMI, so it is natural that it would be used for the filename.
Besides, I'm not aware of there being a style guide rule that prohibits space in filenames in the kernel tree, or that could have easily be detected by checkpatch during submission.
Furthermore, not containing a comma is not even feasible, there are tons of dt-binding filenames containing commas in the tree.
Quoted 12 lines
The file name in its current form breaks tools. For example, it breaks
"xargs".For example, the following will work in "fs" directory:
stable/fs$ find . | xargs chmod -w
But it will not work in root of source tree because of this "Dell Inc.,XPS 13 9300.yaml" file:
Quoted 7 lines
stable$ find . | xargs chmod -w
chmod: cannot access './tools/testing/selftests/devices/probe/boards/Dell': No such file or directory
chmod: cannot access 'Inc.,XPS': No such file or directory
chmod: cannot access '13': No such file or directory
chmod: cannot access '9300.yaml': No such file or directory
You can use 'find -print0' and 'xargs -0' instead so the space in the filename is not an issue.
Signature · 3 lines
Thanks, Nícolas
Re: [PATCH v4 3/3] kselftest: devices: Add sample board file for XPS 13 9300
"Nícolas F. R. A. Prado" <[email protected]>:
Quoted 1 line
While I understand it might be inconvenient that this is the only file
As well as I understand, it is intended that more files will be added to tools/testing/selftests/devices/boards with various vendor names and product names.
So I did some further research. I grepped Linux source and found some vendor names and product names with undesirable chars.
Let's go.
/rbt/linux/arch/x86/kernel/apm_32.c:2097: DMI_MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"), /rbt/linux/arch/x86/kernel/reboot.c:396: DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"), /rbt/linux/drivers/platform/x86/samsung-laptop.c:1633: DMI_MATCH(DMI_PRODUCT_NAME, "R40/R41"),
Here we see / chars, which are simply forbidden in Linux filesystems.
I also found a lot of others undesirable chars, such as "(" ")" "'" "&" "#" "*", which surely will break a lot of tools. In particular, "'" is used in bash to quote something verbatim.
Here is extended result of my research:
https://zerobin.net/?d1f2655a979acd3f#oBhwIedQvBL/iB9Src65aRYuyjaye2GQBNL3+6yfvGg=
Unfortunately, I'm not sure which of these names refer to whole "board", and which of them refer to merely some particular device, such as USB device.
BUT for 3 instances of / chars given in the top of this email I'm totally sure that they refer to whole "boards", so we have at least 3 totally legitime cases, where we have / in product name, which simply cannot appear in UNIX filesystem at all.
So, conclusion: if it is indeed intended that further examples of boards will be added to tools/testing/selftests/devices/boards, then they will contain all sorts of undesirable chars and notably "/", which cannot appear in filename at all.
For all these reasons I ask you to change name convention for this directory. For example, use some kind of sanitized vendor/product names.
Quoted 2 lines
there are
tons of dt-binding filenames containing commas in the tree.
Okay, I agree with this point. There already are a lot of files with commas. But I still don't like spaces and all sorts of characters, which are present in DMI vendor names and product names ( "(" ")" "'" "&" "#" "*" "/" ).
Signature · 1 line
Askar Safin