New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 841121 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug


Sign in to add a comment

servod: refresh architecture project

Project Member Reported by coconutruben@chromium.org, May 9 2018

Issue description

This is tracker bug for the changes described in go/servoarch
 
Blockedon: 869335
Blockedon: 877759
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/a16374bcb880a1119b3cfbb63134d6e58480b0ce

commit a16374bcb880a1119b3cfbb63134d6e58480b0ce
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Wed Aug 29 18:14:44 2018

servod: build clean turn-down logic.

This CL makes edits to the interfaces to allow for a graceful turn-down
if a servod instance is closed explicitly.

BUG=chromium:841121
TEST=None

Change-Id: Ib95a8586f433e8aa430aa7fb60e5d9fafe3a3d0b
Reviewed-on: https://chromium-review.googlesource.com/1117747
Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>

[modify] https://crrev.com/a16374bcb880a1119b3cfbb63134d6e58480b0ce/servo/stm32uart.py
[modify] https://crrev.com/a16374bcb880a1119b3cfbb63134d6e58480b0ce/servo/servo_server.py
[modify] https://crrev.com/a16374bcb880a1119b3cfbb63134d6e58480b0ce/servo/stm32gpio.py
[modify] https://crrev.com/a16374bcb880a1119b3cfbb63134d6e58480b0ce/servo/uart.py
[modify] https://crrev.com/a16374bcb880a1119b3cfbb63134d6e58480b0ce/servo/stm32i2c.py
[modify] https://crrev.com/a16374bcb880a1119b3cfbb63134d6e58480b0ce/servo/ec3po_interface.py

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/1dac87b4354898cb75af3af9ec780757091e10cd

commit 1dac87b4354898cb75af3af9ec780757091e10cd
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Wed Aug 29 18:14:45 2018

servod: prepare servod.py to become a class

This a preparatory CL to make subsequent diff easier to review
This simply moves two functions up that in the next CL will not be part
of the class

BUG=chromium:841121
TEST=None

Change-Id: Ibaedff72fc913544e38ab1e482b0efb1759854f3
Reviewed-on: https://chromium-review.googlesource.com/1184646
Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>

[modify] https://crrev.com/1dac87b4354898cb75af3af9ec780757091e10cd/servo/servod.py

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/b03cb8f466138df7a39f1d38ad2df97217edcfad

commit b03cb8f466138df7a39f1d38ad2df97217edcfad
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Wed Aug 29 18:14:45 2018

servod: turn servod invocation into a naive class

This is a step-stone CL in order to make servod invocation premptible
and easier to manage. This CL converts the current invocation logic
naively into a class by
- sharing the logger internally
- turning all related methods into class methods

BUG=chromium:841121
TEST=servo v2/v4 invocation still works the same
sudo servod -b soraka -c poppy_r3.xml

Change-Id: I14ca0e3852a3a8ae58e7d30a2ab569b4356e5c62
Reviewed-on: https://chromium-review.googlesource.com/1184651
Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>

[modify] https://crrev.com/b03cb8f466138df7a39f1d38ad2df97217edcfad/servo/servod.py

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/c33a90d57d26121bc29dce29ee72170c51aeec11

commit c33a90d57d26121bc29dce29ee72170c51aeec11
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Wed Aug 29 18:14:46 2018

servod: start leveraging class structure in servod.py

This starts to leverage the class structure by creating a meaningful
__init__ method that prepares everything so that serve() can just
start the server.

BUG=chromium:841121
TEST=manual testing, servod still starts up the same

Change-Id: I6f131c53573409c2f21f112af74d47ba50ce40bc
Reviewed-on: https://chromium-review.googlesource.com/1184728
Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>

[modify] https://crrev.com/c33a90d57d26121bc29dce29ee72170c51aeec11/servo/servod.py

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/72ac3811f275c56dedfa59806f8584dd1e214960

commit 72ac3811f275c56dedfa59806f8584dd1e214960
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Wed Aug 29 18:14:46 2018

servod: introduce servod_pid control

dut-control servod_pid
> xxxx

Gets the pid of the main servo process running.

BUG=chromium:841121
TEST=manual testing, pid same as ps reports it

Change-Id: I73e553b35ae6d1128f087be96a280c876b7d5c4f
Reviewed-on: https://chromium-review.googlesource.com/1188722
Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>

[modify] https://crrev.com/72ac3811f275c56dedfa59806f8584dd1e214960/servo/drv/servo_metadata.py
[modify] https://crrev.com/72ac3811f275c56dedfa59806f8584dd1e214960/servo/data/common.xml

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/89b44260dc763f59e7fee82680a1372cb25ef72c

commit 89b44260dc763f59e7fee82680a1372cb25ef72c
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Fri Aug 31 18:21:02 2018

servod: introduce servodutil to manage servod instances easier.

This change introduces servodutil.py. The main function it provides is a
tool to leave behind breadcrumbs when starting a servod instance that
make it possible to
(1) gently turn down a servod instance
(2) get an overview of the servod instances running on a workstation

Usage examples (assume a servod instance being served on port 9999)
$ servodutil show -p 9999
port: 9999
serials = ['someserial']
pid: xxxx
$ sudo servodutil stop -p 9999
SIGTERM sent to servod instance associated with '9999'.
$ servodutil show-all
No entries found.

BUG=chromium:841121
TEST=manual testing, and py.test -v servodutil_test.py

Change-Id: Ia9b74d3b3b19254b2145b523315e6c9101791a05
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1117748

[modify] https://crrev.com/89b44260dc763f59e7fee82680a1372cb25ef72c/servo/servod.py
[modify] https://crrev.com/89b44260dc763f59e7fee82680a1372cb25ef72c/setup.py
[add] https://crrev.com/89b44260dc763f59e7fee82680a1372cb25ef72c/servo/servodutil_test.py
[modify] https://crrev.com/89b44260dc763f59e7fee82680a1372cb25ef72c/servo/servodutil.py

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/142a9c11b7b34cb1735670833d145d7171aa889b

commit 142a9c11b7b34cb1735670833d145d7171aa889b
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Wed Sep 05 16:15:24 2018

servod: ServodStarter ignore multiple turn-down signals

Turning down a servod instance takes a bit of time. Multiple signals -
either programatically or by repeated, impatient Ctrl-C can be
triggered. This can cause issues as turn-down methods get called on
potentially already deleted objects.
This change mitigates this issue by setting a flag after the first turn
down signal handler gets called, so that subsequent ones get ignored.

BUG=chromium:841121
TEST=manual testing
sudo servod -b soraka
Ctrl-C, Ctrl-C
(observe only once, not twice)
servod - INFO - Received signal: 2. Attempting to turn off

Change-Id: I6fea00aa19c091880f7857c611d79f5672e1e230
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1198802
Reviewed-by: Todd Broch <tbroch@chromium.org>

[modify] https://crrev.com/142a9c11b7b34cb1735670833d145d7171aa889b/servo/servod.py

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/4578e87151cbcbc335f7d0aac63a64cf2a034539

commit 4578e87151cbcbc335f7d0aac63a64cf2a034539
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Sun Sep 09 17:33:52 2018

servod: Ensure that ServodScratch sanitizes the scratch on init.

A stale servoscratch entry right now blocks servod invocation. This
shouldn't happen as ServoScratch class should sanitize the scratch
before invoking a new servod instance. This CL fixes this by moving
the ServoScratch invocation in servod early enough to be able to
sanitize before decisions are made.

BUG=chromium:841121
TEST=manual testing
sudo servod -b soraka &
servodutil show -p 9999
sudo kill -9 <PID>
(this produces a stale entry)
sudo servod -b soraka &
- ServoScratch - WARNING - servodutil.py:440:_Sanitize - Port '9999'
still registered but not bound to a servod instance. Removing entry.
(no errors)

Change-Id: I08b7c7775808764f6492b98bc97020b4dd494fb0
Reviewed-on: https://chromium-review.googlesource.com/1206153
Commit-Ready: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-by: Mengqi Guo <mqg@chromium.org>

[modify] https://crrev.com/4578e87151cbcbc335f7d0aac63a64cf2a034539/servo/servod.py

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/3afd30713005b6c8ac4002c733e419314f6706b0

commit 3afd30713005b6c8ac4002c733e419314f6706b0
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Fri Sep 14 01:59:12 2018

servod: update README & FAQ for servodutil/watchdog

This adds a section each for servodutil and the servod watchdog to the
README files.

BUG=chromium:841121
TEST=visual inspection in gitiles

Change-Id: I53b7607e2baadd7c10fdca917c68824a9e3d9fd9
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1215105
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Mengqi Guo <mqg@chromium.org>

[modify] https://crrev.com/3afd30713005b6c8ac4002c733e419314f6706b0/servo/FAQ.md
[modify] https://crrev.com/3afd30713005b6c8ac4002c733e419314f6706b0/servo/README.md

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/63e38601448bc2fbd165a775dcc48777269f1e3e

commit 63e38601448bc2fbd165a775dcc48777269f1e3e
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Wed Sep 26 17:33:12 2018

servod: unify all cmdline tools around BaseServodParser & argparse

This is the first in a 3 part series to simplify & modularize
parsing in servod.
This change introduces a BaseServodParser that handles the common
options for all cmdline tools:
- debug
- port
- host
Using argparse this change allows us to leverage mutually exclusive
groups to reduce code-size. There's now also a cleaner way to add/remove
examples to cmdline tools, and a unified formatting for the help & usage
strings.
A big motivation also is consistency across the servo(d) world, where
the same concept has the same flag across all cmdline tools be it -v for
verbose, or -s for serialname.

To make this possible the following cmdline arguments had to change:
-v, -p options were removed for --vendor, --product in servod
> this is due to -v clashing with -v/--verbose and -p clashing with
-p/--port arguments.
-s, --server in dut-control/dut-power was replaced with --host
> this is due to -s clashing with -s/--serialname arguments, and also it
the same argument being --host for servod invocation.
-v, --verbose were changed to -d, --debug in dut-power
> this is because previously -v/--verbose really was just printing debug
messages

BUG=chromium:841121
TEST=manual testing
dut-control:
- normal works
- with port works
- with debug works
- with name & SERVOD_NAME works
dut-power:
- normal works
- with port works
servod:
- SERVOD_NAME works
- rcfile invocation works
- normal invocation works

Change-Id: Ib5616c64437bbbdfb70de6354406210d76935e88
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1233135
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Todd Broch <tbroch@chromium.org>

[modify] https://crrev.com/63e38601448bc2fbd165a775dcc48777269f1e3e/servo/dut_power.py
[delete] https://crrev.com/165ff6d6abd6344a9a02687b5cf62c386552ee76/servo/multiservo.py
[modify] https://crrev.com/63e38601448bc2fbd165a775dcc48777269f1e3e/servo/dut_control.py
[modify] https://crrev.com/63e38601448bc2fbd165a775dcc48777269f1e3e/servo/servod.py
[add] https://crrev.com/63e38601448bc2fbd165a775dcc48777269f1e3e/servo/servo_parsing.py

Blockedon: 891359
Project Member

Comment 14 by bugdroid1@chromium.org, Oct 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/0902f0937b8db3173fe2b78eb5114cd5baacb742

commit 0902f0937b8db3173fe2b78eb5114cd5baacb742
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Wed Oct 03 20:59:04 2018

servod: gpylint parsing efforts

This is a small style change to make all the involved files
- dut_power
- dut_control
- servo_parsing
- servod
pass gpylint after the parsing restructuring and before making more
changes

BUG=chromium:841121
TEST=manual
dut-control --help
dut-power --help
servod --help
all still work

Change-Id: I8288aa188e1e5de7aaf42106a07a2dabaefd0a3b
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1232797
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Nick Sanders <nsanders@chromium.org>

[modify] https://crrev.com/0902f0937b8db3173fe2b78eb5114cd5baacb742/servo/servo_parsing.py
[modify] https://crrev.com/0902f0937b8db3173fe2b78eb5114cd5baacb742/servo/dut_control.py
[modify] https://crrev.com/0902f0937b8db3173fe2b78eb5114cd5baacb742/servo/servod.py

Blockedon: 893389
Cc: matth...@chromium.org
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/8a699ca0fc83f65ab84ed9cc32b1a99e08718690

commit 8a699ca0fc83f65ab84ed9cc32b1a99e08718690
Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Date: Thu Oct 18 21:54:32 2018

servod: fix issues on UsbHierarchy

This change fixes two issues:
- calling .get() on a default-dict does not return the dict's default,
but rather the default supplied to get. This was causing an unexpected
error on UsbHierarchy usage if the usb device was somehow not found.

- originally UsbHierarchy was only used for v4 - so all devices it cared
about were on a hub. Now, its used for ServodevWatchdog as well, we want
to support the use-case where a servo device can hang on a usb roothub
itself i.e. it's /sys/bus/usb path can be x-x without a '.'.

BUG=chromium:841121
TEST=manual testing
> servo on /sys/bus/usb/1-1 is detected correctly
> v4 + micro boots fine
> v4 + ccd boots fine

Change-Id: I93d5c79c00ffc4fef755c6f518eeec8386eeb195
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1258726
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Todd Broch <tbroch@chromium.org>

[modify] https://crrev.com/8a699ca0fc83f65ab84ed9cc32b1a99e08718690/servo/servodutil.py

Components: Tools>ChromeOSDebugBoards
Blockedon: 915590
Blockedon: 915615
Blockedon: 917764
Blocking: 917766
Blockedon: 919471

Sign in to add a comment