gpio test creates executables, object files, and include directory
under selftests directory. Enhance clean target to remove all files
it generates.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Add override for lib.mk clean to fix the following warnings from clean
target run.
Makefile:11: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
The gpio test requires to insert the gpio mockup module (CONFIG_GPIO_MOCKUP).
The gpio mockup driver depends on gpiolib (CONFIG_GPIOLIB).
CONFIG_GPIO_SYSFS is selected automatically by the gpio mockup driver.
Tested on x86_64 and arm64 with defconfig and kselftest-merge.
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
This test script try to do whitebox testing for gpio subsystem(based on
gpiolib). It manipulate gpio device through chardev or sysfs and check
the result from debugfs. This script test gpio-mockup through chardev by
default. User could test other gpio chip by passing the module name.
Some of the testcases are turned off by default to avoid the conflicting
with gpiochip in system.
In details, it test the following things:
1. Test direction and output value for valid pin.
2. Test dynamic allocation of gpio base.
3. Add single, multi gpiochip to do overlap check.
Run "tools/testing/selftests/gpio/gpio-mockup.sh -h" for usage.
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>