]> git.karo-electronics.de Git - karo-tx-linux.git/commit
selftest/gpio: add gpio test case
authorBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Mon, 21 Nov 2016 10:16:11 +0000 (18:16 +0800)
committerShuah Khan <shuahkh@osg.samsung.com>
Tue, 13 Dec 2016 14:26:37 +0000 (07:26 -0700)
commit22f6592b23ef8a0c09283bcb13087340721e1154
treeeec674365b5b31af10032eeeb50ed74615c96cb1
parent981c3db62e2d2dfb0c5725dd55d8c3cf8ed4edd8
selftest/gpio: add gpio test case

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>
tools/testing/selftests/Makefile
tools/testing/selftests/gpio/Makefile [new file with mode: 0644]
tools/testing/selftests/gpio/gpio-mockup-chardev.c [new file with mode: 0644]
tools/testing/selftests/gpio/gpio-mockup-sysfs.sh [new file with mode: 0755]
tools/testing/selftests/gpio/gpio-mockup.sh [new file with mode: 0755]