tools: tests: add short sleeps between generating edge events
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 21 Jun 2023 07:23:27 +0000 (09:23 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 22 Jun 2023 07:15:05 +0000 (09:15 +0200)
Toggling the gpio-sim pull too fast can lead to losing events by gpiomon.
Add short sleeps between the calls to gpiosim_set_pull.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
tools/gpio-tools-test.bats

index cc28f1ba31bf705b77007e1cece352b0ccb425a7..1311fc9334ffdde7ef83d2bb4076d76e4e1f2e90 100755 (executable)
@@ -2072,9 +2072,13 @@ request_release_line() {
        dut_run_redirect gpiomon --num-events=4 --chip $sim0 4
 
        gpiosim_set_pull sim0 4 pull-up
+       sleep 0.01
        gpiosim_set_pull sim0 4 pull-down
+       sleep 0.01
        gpiosim_set_pull sim0 4 pull-up
+       sleep 0.01
        gpiosim_set_pull sim0 4 pull-down
+       sleep 0.01
 
        dut_wait
        status_is 0