From f5c955bba2663dc5944ab3288501fa8281bda338 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Wed, 21 Jun 2023 09:23:27 +0200 Subject: [PATCH] tools: tests: add short sleeps between generating edge events 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 --- tools/gpio-tools-test.bats | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/gpio-tools-test.bats b/tools/gpio-tools-test.bats index cc28f1b..1311fc9 100755 --- a/tools/gpio-tools-test.bats +++ b/tools/gpio-tools-test.bats @@ -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 -- 2.30.2