tools: tests: fix regex patterns for timestamps in gpiomon test cases
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 14 Apr 2020 12:45:25 +0000 (14:45 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 14 Apr 2020 14:28:13 +0000 (16:28 +0200)
commita27f5c38ab366e0447b30c7a46e4fcc9b4b2d67c
treed39462e64556c2cb1603b7be62fb62c46a8a9131
parentff4f2b965e28c5675f8f849a04e3b8fcfade5366
tools: tests: fix regex patterns for timestamps in gpiomon test cases

Commit f8850206e160 ("gpio: Switch timestamps to ktime_get_ns()") in the
linux kernel (released in v5.7-rc1) changed the clock used to generate
line events from real-time to monotonic. This has the effect of making
the timestamp values much smaller and it uncovered a bug in regex
patterns used to verify gpiomon output: they don't expect there to be
any whitespace characters in the timestamp part of the line.

Fix it by accepting any number of whitespace chars between the opening
'[' and the first digit of the timestamp.

Fixes: 9c5a6f31ebff ("tests: use GLib for library test cases and bats for gpio-tools")
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
tools/gpio-tools-test.bats