summaryrefslogtreecommitdiff
path: root/util/uart_stress_tester.py
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-051-562/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* pylintrc: Copy Chromium OS platform2's configCraig Hesling2021-08-021-0/+4
| | | | | | | | | | | | | | | | | | | | This requests that cros lint (and repo upload hook) use the new Chromium OS 4 space indent policy. Since legacy python scripts still use 2 space, I added pylint ignore statements to the individual files to disable indentation checking. Note: There are still valid pylint errors in some of these legacy scripts. BRANCH=none BUG=none TEST=cros lint util/*.py Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I439f5a87bc50f1f43a4996e574bbc0626922a88e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3064761 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* uart_stress_tester: import logging instead of cros_loggingNamyoon Woo2020-05-081-1/+1
| | | | | | | | | | | | | | | | | This patch makes uart_stress_tester.py import logging instead of cros_logging from chromite.lib. BUG=none BRANCH=none TEST=ran uart_stress_tester.py on local chroot and on labstation. Signed-off-by: Namyoon Woo <namyoon@google.com> Change-Id: I479e2b7a046d6c7b02fb4aca2c7e1fc83334e294 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2190826 Tested-by: Namyoon Woo <namyoon@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Namyoon Woo <namyoon@chromium.org>
* util: revise uart_stress_tester for python3Namyoon Woo2020-01-241-29/+31
| | | | | | | | | | | | | | | | | | | Convert the code for python3, and fixed some pylint errors. BUG=none BRANCH=none TEST=manually ran it on Fleex. 'uart_stress_tester.py -d -t 300 /dev/ttyUSB2' Also ran pylint. 'pylint --rcfile /mnt/host/source/chromite/pylintrc uart_stress_tester.py' Change-Id: Ie983eff06e0757af14ebc16878ca892fc1f629a5 Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2015351 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* util:uart_stress_tester has an option to get output from USB channelNamyoon Woo2020-01-151-15/+31
| | | | | | | | | | | | BUG=chromium:992607 BRANCH=None TEST=ran stress test on fleex. ./util/uart_stress_tester.py /dev/ttyUSB0 /dev/ttyUSB2 \ --time 120 --debug --usb Change-Id: Iebe5e8b18116fcbd5b94bc5796983cac4fb40087 Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1891254
* util: uart_stress_tester raises an error on character lossNamyoon Woo2019-07-181-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch let the tester exit with an error code on test failure. It would make easy the future autotest to detect a failure. BUG=None BRANCH=None TEST=ran on fleex. $ uart_stress_tester.py /dev/ttyUSB1 /dev/ttyUSB2 -t 120 -d [before patch] ... INFO | UartSerial| EC | 14888 char lost / 1382400 (1.1 %) INFO | UartSerial| AP | 0 char lost / 1382400 (0.0 %) ERROR | ChargenTest | FAIL: lost 14888 character(s) from the test ... $ echo $? 0 [after patch] ... INFO | UartSerial| EC | 14888 char lost / 1382400 (1.1 %) INFO | UartSerial| AP | 0 char lost / 1382400 (0.0 %) ERROR | ChargenTest | FAIL: lost 14888 character(s) from the test Error: Test failed for losing 144888 character(s) ... $ echo $? 1 $ ./util/uart_stress_tester.py /dev/ttyUSB1 /dev/ttyUSB2 -t 120 -d Error: /dev/ttyUSB1 does not exist. $ echo $? 1 Change-Id: I210efd4ad7fdb8eb612206624eda6c39c5bb3b1c Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1696115 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* util: uart_stress_tester checks if the given ports existNamyoon Woo2019-07-181-0/+12
| | | | | | | | | | | | | | | | | | | | | During initialization, uart_stress_tester checks each of ports exists, and raises an error if not. BUG=None BRANCH=None TEST=ran on fleex. $ uart_stress_tester.py /dev/ttyUSBX -t 120 Error: [Errno 2] No such file or directory: '/dev/ttyUSBX' $ ./util/uart_stress_tester.py ./util/uart_stress_tester.py -t 120 Error: ./util/uart_stress_tester.py is not a character device. Change-Id: I989a9e767796b04b059861aea2a3412877c1d739 Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1706626 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* util: uart stress tester using 'chargen' commandNamyoon Woo2019-07-101-0/+509
Uart stress tester runs a 'chargen' UART command on EC and/or AP, and checks if any characters are lost from UART output. BUG=b:131340067 BRANCH=None TEST=ran on Bob and Octopus (Fleex) $ ./util/uart_stress_tester.py -h usage: uart_stress_tester.py [-h] [-c] [-d] [-t TIME] [port [port ...]] uart_stress_tester.py repeats sending a uart console command to each UART device for a given time, and check if output has any missing characters. Examples: uart_stress_tester.py /dev/ttyUSB2 --time 3600 uart_stress_tester.py /dev/ttyUSB1 /dev/ttyUSB2 --debug uart_stress_tester.py /dev/ttyUSB1 /dev/ttyUSB2 --cr50 positional arguments: port UART device path to test optional arguments: -h, --help show this help message and exit -c, --cr50 generate TPM workload on cr50 -d, --debug enable debug messages -t TIME, --time TIME Test duration in second $ ./util/uart_stress_tester.py /dev/ttyUSB1 /dev/ttyUSB2 -t 120 INFO | UartSerial| EC | 0 char lost / 1382400 (0.0 %) INFO | UartSerial| AP | 0 char lost / 1382400 (0.0 %) INFO | ChargenTest | PASS: lost 0 character(s) from the test $ ./util/uart_stress_tester.py /dev/ttyUSB1 /dev/ttyUSB2 -t 120 --cr50 INFO | UartSerial| EC | 0 char lost / 1382400 (0.0 %) INFO | UartSerial| AP | 0 char lost / 1382400 (0.0 %) INFO | ChargenTest | PASS: lost 0 character(s) from the test Change-Id: I713fb0180db3ca5904bd7aae0dd26a4633733d2e Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1683011 Reviewed-by: Mary Ruthven <mruthven@chromium.org>