tests: don't hardcode the chip names
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 14 Jun 2017 08:11:27 +0000 (10:11 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 14 Jun 2017 08:11:27 +0000 (10:11 +0200)
commit2fad2a8827479ecc6f65ddd00880339026b6753c
tree026af87e76d298697829745c0c6e28ca112c2166
parent66dc083969ec5177505c30cccc57261165139080
tests: don't hardcode the chip names

Use test_chip_name() to get the name of a chip. Don't hardcode it as
it will make the tests not work if any gpiochips other than the ones
created by gpio-mockup already exist in the system.

This also fixes a couple hidden bugs, where we requested inexistent
chips in tools' command-line arguments.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/tests-gpioget.c
tests/tests-gpioinfo.c
tests/tests-gpioset.c