tools: tests: accept the new gpio-sim label format in test cases
PATCH 1/1 tools: tests: accept the new gpio-sim label format in test cases
From: Bartosz Golaszewski <[email protected]>
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.
--- tools/gpio-tools-test.bash | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
tools/gpio-tools-test.bash +10 -10
@@ -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 }
Signature · 1 line
2.40.1
Quoted 8 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
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.
Cheers,
Kent.
Bartosz Golaszewski
AppliedFrom: Bartosz Golaszewski <[email protected]>
Quoted 8 lines · Bartosz Golaszewski
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,
Signature · 1 line
Bartosz Golaszewski <[email protected]>