selftests: gpio: gpio-aggregator: add a test case for _sysfs prefix reservation
authorKoichiro Den <koichiro.den@canonical.com>
Sat, 12 Apr 2025 15:01:19 +0000 (00:01 +0900)
committerBartosz Golaszewski <brgl@bgdev.pl>
Mon, 14 Apr 2025 20:30:01 +0000 (22:30 +0200)
commit290ffcfe3042dcd5b701a98edd48d7962d35556b
tree9258b1606a7d80fadb8bd2929566bf5092023d73
parentd945ff52642d98eb6fa191f88a9cfde729129395
selftests: gpio: gpio-aggregator: add a test case for _sysfs prefix reservation

The kernel doc for gpio-aggregator configfs interface, which was recently
added, states that users should not be able to create an aggregator with a
name prefixed by "_sysfs" via configfs. However, it was found that this
guard does not function as expected (thanks to Dan Carpenter for
identifying and fixing the issue).

Add a test case to verify the guard.

Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Link: https://lore.kernel.org/r/20250412150119.1461023-1-koichiro.den@canonical.com
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
tools/testing/selftests/gpio/gpio-aggregator.sh