* [libgpiod][PATCH] tools: tests: accept the new gpio-sim label format in test cases
@ 2024-05-06 16:25 Bartosz Golaszewski
2024-05-07 1:31 ` Kent Gibson
2024-05-07 9:23 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-05-06 16:25 UTC (permalink / raw)
To: Linus Walleij, Kent Gibson; +Cc: linux-gpio, Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Since kernel commit 840a97e2fbaf ("gpio: sim: delimit the fwnode name
with a ":" when generating labels") the gpio-sim automatic labels are
generated by delimiting the device name and the fwnode name with ':'
instead of '-' for better readability. This will break the tests once
linux v6.9 is out. Act in advance and accept both forms.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
tools/gpio-tools-test.bash | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/tools/gpio-tools-test.bash b/tools/gpio-tools-test.bash
index 5ef4ef6..b55c5eb 100755
--- a/tools/gpio-tools-test.bash
+++ b/tools/gpio-tools-test.bash
@@ -304,9 +304,9 @@ test_gpiodetect_all_chips() {
run_tool gpiodetect
- output_contains_line "$sim0 [${sim0dev}-node0] (4 lines)"
- output_contains_line "$sim1 [${sim1dev}-node0] (8 lines)"
- output_contains_line "$sim2 [${sim2dev}-node0] (16 lines)"
+ output_regex_match "$sim0 \[${sim0dev}[-:]node0\] \(4 lines\)"
+ output_regex_match "$sim1 \[${sim1dev}[-:]node0\] \(8 lines\)"
+ output_regex_match "$sim2 \[${sim2dev}[-:]node0\] \(16 lines\)"
status_is 0
# ignoring symlinks
@@ -334,21 +334,21 @@ test_gpiodetect_a_chip() {
# by name
run_tool gpiodetect $sim0
- output_contains_line "$sim0 [${sim0dev}-node0] (4 lines)"
+ output_regex_match "$sim0 \[${sim0dev}[-:]node0\] \(4 lines\)"
num_lines_is 1
status_is 0
# by path
run_tool gpiodetect ${GPIOSIM_CHIP_PATH[sim1]}
- output_contains_line "$sim1 [${sim1dev}-node0] (8 lines)"
+ output_regex_match "$sim1 \[${sim1dev}[-:]node0\] \(8 lines\)"
num_lines_is 1
status_is 0
# by number
run_tool gpiodetect $(gpiosim_chip_number sim2)
- output_contains_line "$sim2 [${sim2dev}-node0] (16 lines)"
+ output_regex_match "$sim2 \[${sim2dev}[-:]node0\] \(16 lines\)"
num_lines_is 1
status_is 0
@@ -356,7 +356,7 @@ test_gpiodetect_a_chip() {
gpiosim_chip_symlink sim2 .
run_tool gpiodetect $GPIOSIM_CHIP_LINK
- output_contains_line "$sim2 [${sim2dev}-node0] (16 lines)"
+ output_regex_match "$sim2 \[${sim2dev}[-:]node0\] \(16 lines\)"
num_lines_is 1
status_is 0
}
@@ -375,9 +375,9 @@ test_gpiodetect_multiple_chips() {
run_tool gpiodetect $sim0 $sim1 $sim2
- output_contains_line "$sim0 [${sim0dev}-node0] (4 lines)"
- output_contains_line "$sim1 [${sim1dev}-node0] (8 lines)"
- output_contains_line "$sim2 [${sim2dev}-node0] (16 lines)"
+ output_regex_match "$sim0 \[${sim0dev}[-:]node0\] \(4 lines\)"
+ output_regex_match "$sim1 \[${sim1dev}[-:]node0\] \(8 lines\)"
+ output_regex_match "$sim2 \[${sim2dev}[-:]node0\] \(16 lines\)"
num_lines_is 3
status_is 0
}
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [libgpiod][PATCH] tools: tests: accept the new gpio-sim label format in test cases
2024-05-06 16:25 [libgpiod][PATCH] tools: tests: accept the new gpio-sim label format in test cases Bartosz Golaszewski
@ 2024-05-07 1:31 ` Kent Gibson
2024-05-07 9:23 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Kent Gibson @ 2024-05-07 1:31 UTC (permalink / raw)
To: Bartosz Golaszewski; +Cc: Linus Walleij, linux-gpio, Bartosz Golaszewski
On Mon, May 06, 2024 at 06:25:06PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Since kernel commit 840a97e2fbaf ("gpio: sim: delimit the fwnode name
> with a ":" when generating labels") the gpio-sim automatic labels are
> generated by delimiting the device name and the fwnode name with ':'
> instead of '-' for better readability. This will break the tests once
> linux v6.9 is out. Act in advance and accept both forms.
>
Fair enough.
Reviewed-by: Kent Gibson <warthog618@gmail.com>
Cheers,
Kent.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [libgpiod][PATCH] tools: tests: accept the new gpio-sim label format in test cases
2024-05-06 16:25 [libgpiod][PATCH] tools: tests: accept the new gpio-sim label format in test cases Bartosz Golaszewski
2024-05-07 1:31 ` Kent Gibson
@ 2024-05-07 9:23 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-05-07 9:23 UTC (permalink / raw)
To: Linus Walleij, Kent Gibson, Bartosz Golaszewski
Cc: Bartosz Golaszewski, linux-gpio
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Mon, 06 May 2024 18:25:06 +0200, Bartosz Golaszewski wrote:
> Since kernel commit 840a97e2fbaf ("gpio: sim: delimit the fwnode name
> with a ":" when generating labels") the gpio-sim automatic labels are
> generated by delimiting the device name and the fwnode name with ':'
> instead of '-' for better readability. This will break the tests once
> linux v6.9 is out. Act in advance and accept both forms.
>
>
> [...]
Applied, thanks!
[1/1] tools: tests: accept the new gpio-sim label format in test cases
commit: 35003a821ed5c6f72043a54f69ad9bb207976ed1
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-07 9:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-06 16:25 [libgpiod][PATCH] tools: tests: accept the new gpio-sim label format in test cases Bartosz Golaszewski
2024-05-07 1:31 ` Kent Gibson
2024-05-07 9:23 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox