tools: tests: fix the gpiomon test case with --active-low switch
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 7 Aug 2019 07:46:41 +0000 (09:46 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 7 Aug 2019 08:00:58 +0000 (10:00 +0200)
commit47c6c4b1ab73ca6ffea8880e72360275033b90aa
treeaa1d36e9aee6d5865436adce8f9e8dcaa672d473
parent1cb08c0b23d2b220ceaa104683568d07eade4140
tools: tests: fix the gpiomon test case with --active-low switch

Kernel commit 223ecaf140b1 ("gpiolib: fix incorrect IRQ requesting of
an active-low lineevent") fixed an issue with line events not being
inverted with the GPIOHANDLE_REQUEST_ACTIVE_LOW flag. This change has
now been released in linux v5.2.7 and the relevant test case for
gpiomon needs to be adjusted.

Since the line going down will now be interpreted as a rising edge
event, set the pull to 1 before running gpiomon and then set it to 0
after starting it to trigger a rising edge event.

The minimum kernel version to run tests must be set to v5.2.7.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
tools/gpio-tools-test
tools/gpio-tools-test.bats