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

Issue 713756 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Jul 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Convert atrusctl to Chrome OS-style code

Project Member Reported by sque@chromium.org, Apr 20 2017

Issue description

Being more compliant with CrOS code style will make it easier to make changes and to write test coverage.

0. Compile as C++, not C.
1. Use C++ constructs (e.g. strings and vectors) instead of manual allocations.
2. Use libchrome for various idioms, e.g. file reading or ScopedClosureRunner.
  Example of makefile w/ libchrome: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/deps/glbench/src/Makefile
3. Use libchromeos to create a daemon. Not sure if there's an example of this in non-platform2 code. It might make sense to move to platform2 at this stage.
4. Create unit tests.

No rush to get this done quickly. It would make sense to do it if we wanted to convert it into a permanent daemon on CrOS.
 
wrt using platform2, you don't need to actually move the code into platform2.  if you look at ebuilds like shill, they show how to check out the two repos in the ebuild and then build.  so all you need to do is convert the Makefile/common.mk files to a gyp file.
Project Member

Comment 2 by bugdroid1@chromium.org, May 4 2017

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/atrusctl/+/4301f27b8845f073ba4aa03bd8c38d53386915bb

commit 4301f27b8845f073ba4aa03bd8c38d53386915bb
Author: Emil Lundmark <emil@limesaudio.com>
Date: Thu Jun 01 18:06:54 2017

Harden compiler flags

Use more conservative compiler flags more in line with CrOS defaults.

BUG= chromium:713756 
TEST=emerge-guado sys-apps/atrusctl

Change-Id: Iba05dc310f8a0d343525e50f2d2545deffd71ab4
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/496207
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Simon Que <sque@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/4301f27b8845f073ba4aa03bd8c38d53386915bb/src/diagnose.cc
[modify] https://crrev.com/4301f27b8845f073ba4aa03bd8c38d53386915bb/src/daemon.cc
[modify] https://crrev.com/4301f27b8845f073ba4aa03bd8c38d53386915bb/CMakeLists.txt
[modify] https://crrev.com/4301f27b8845f073ba4aa03bd8c38d53386915bb/src/upgrade.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 1 2017

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

commit fd02c204de7962682fd6a4ae95dd1c62861e48fa
Author: Emil Lundmark <emil@limesaudio.com>
Date: Thu Jun 01 23:50:54 2017

Default to daemon and rename atrusctl binary to atrusd

Since the default and only behavior from now in is to daemonize, follow
the convention to append d to the binary name.

BUG= chromium:713756 
TEST=Built successfully
CQ-DEPEND=CL:519245

Change-Id: I09ec8a199ad74108b88e7ff9182e5bdff9194bfb
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/494470
Commit-Ready: Simon Que <sque@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/fd02c204de7962682fd6a4ae95dd1c62861e48fa/conf/udev-atrus.rules
[modify] https://crrev.com/fd02c204de7962682fd6a4ae95dd1c62861e48fa/conf/rsyslog-atrus.conf
[delete] https://crrev.com/4301f27b8845f073ba4aa03bd8c38d53386915bb/src/atrusctl.cc
[rename] https://crrev.com/fd02c204de7962682fd6a4ae95dd1c62861e48fa/src/atrusd.cc
[delete] https://crrev.com/4301f27b8845f073ba4aa03bd8c38d53386915bb/src/daemon.h
[delete] https://crrev.com/4301f27b8845f073ba4aa03bd8c38d53386915bb/src/list.cc
[delete] https://crrev.com/4301f27b8845f073ba4aa03bd8c38d53386915bb/src/list.h
[modify] https://crrev.com/fd02c204de7962682fd6a4ae95dd1c62861e48fa/src/CMakeLists.txt
[modify] https://crrev.com/fd02c204de7962682fd6a4ae95dd1c62861e48fa/README.md

Project Member

Comment 5 by bugdroid1@chromium.org, Jun 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/dd9411824f0ed68423dc1de0ca0a2ca605fb4464

commit dd9411824f0ed68423dc1de0ca0a2ca605fb4464
Author: Emil Lundmark <emil@limesaudio.com>
Date: Thu Jun 01 23:50:54 2017

atrusctl: rename binary to atrusd

BUG= chromium:713756 
TEST=emerge-guado sys-apps/atrusctl
CQ-DEPEND=CL:494470

Change-Id: I6c88feafaa4d9ce794567b62b0318bdd75eecff2
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/519245
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Simon Que <sque@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/dd9411824f0ed68423dc1de0ca0a2ca605fb4464/sys-apps/atrusctl/atrusctl-9999.ebuild

Project Member

Comment 6 by bugdroid1@chromium.org, Jun 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/atrusctl/+/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4

commit 69a85918a1d00d4e390e2cbaa4dc43f7766aecd4
Author: Emil Lundmark <emil@limesaudio.com>
Date: Fri Jun 02 23:59:40 2017

Follow Google C++ style guide

This change was partly generated by running

$ clang-format -i src/*.{cc,h}

With added .clang-format symlinked to platform2/

- Use namespaces and correctly named include guards
- Some changes according to cpplint.py output

BUG= chromium:713756 
TEST=emerge-guado sys-apps/atrusctl
CQ-DEPEND=CL:519245

Change-Id: I40ad3e80d8598ccbf3c8d06f67c9351fb4043dea
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/496208
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/diagnose.cc
[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/diagnose.h
[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/crc32.cc
[delete] https://crrev.com/fd02c204de7962682fd6a4ae95dd1c62861e48fa/.clang-tidy
[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/util.h
[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/device.h
[rewrite] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/.clang-format
[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/crc32.h
[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/atrusd.cc
[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/util.cc
[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/upgrade.cc
[modify] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/upgrade.h

Components: -OS>Hardware
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 5 2017

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

commit 1c4e7c7382a55ca995fec61ada812245e5fbfbf7
Author: Emil Lundmark <emil@limesaudio.com>
Date: Mon Jun 05 20:01:47 2017

Use platform2's build system

Changes the structure to be compatible with platform2.

BUG= chromium:713756 
TEST=emerge-guado chromeos-base/atrusctl
CQ-DEPEND=CL:494586

Change-Id: Ie9cc297a0ea501971d908042d95c7ceb9fecf9aa
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/494471
Commit-Ready: Simon Que <sque@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[add] https://crrev.com/1c4e7c7382a55ca995fec61ada812245e5fbfbf7/atrusctl.gyp
[delete] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/src/CMakeLists.txt
[delete] https://crrev.com/69a85918a1d00d4e390e2cbaa4dc43f7766aecd4/CMakeLists.txt
[modify] https://crrev.com/1c4e7c7382a55ca995fec61ada812245e5fbfbf7/README.md

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/06fb160c9d86667c4e1031c137d4adda7d0175ba

commit 06fb160c9d86667c4e1031c137d4adda7d0175ba
Author: Emil Lundmark <emil@limesaudio.com>
Date: Mon Jun 05 20:01:47 2017

atrusctl: use platform2's build system

This will make it easier to integrate libbrillo etc. in the future.

atrus-firmware: use new atrusctl package

It was renamed from to sys-apps/atrusctl to chromeos-base/atrusctl.

BUG= chromium:713756 
TEST=emerge-guado chromeos-base/atrusctl
CQ-DEPEND=CL:494471

Change-Id: Ic544e33148ee239dff6ebc7d971e26996b8ac8ab
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/494586
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Karl Petersson <karl@limesaudio.com>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/06fb160c9d86667c4e1031c137d4adda7d0175ba/sys-firmware/atrus-firmware/atrus-firmware-0.6.8.ebuild
[delete] https://crrev.com/3e5a7dfa89a76ea9fad2f57374416cd287e02468/sys-apps/atrusctl/atrusctl-0.0.1-r16.ebuild
[rename] https://crrev.com/06fb160c9d86667c4e1031c137d4adda7d0175ba/sys-firmware/atrus-firmware/atrus-firmware-0.6.8-r2.ebuild
[add] https://crrev.com/06fb160c9d86667c4e1031c137d4adda7d0175ba/chromeos-base/atrusctl/atrusctl-9999.ebuild
[delete] https://crrev.com/3e5a7dfa89a76ea9fad2f57374416cd287e02468/sys-apps/atrusctl/atrusctl-9999.ebuild

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/atrusctl/+/9d3c903a73c5389f4969690a43d93fa4be14f998

commit 9d3c903a73c5389f4969690a43d93fa4be14f998
Author: Emil Lundmark <emil@limesaudio.com>
Date: Tue Jun 06 01:33:59 2017

Change vendor to Google

Limes Audio is no longer the owner of the codebase.

BUG= chromium:713756 
TEST=emerge-guado chromeos-base/atrusctl
Q-DEPEND=CL:494588

Change-Id: I00daa12de1c8a1f994840beb635caa5cefba43bd
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/497407
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/src/diagnose.cc
[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/conf/udev-atrus.rules
[add] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/LICENSE
[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/src/diagnose.h
[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/src/device.h
[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/src/util.h
[delete] https://crrev.com/1c4e7c7382a55ca995fec61ada812245e5fbfbf7/PRESUBMIT.cfg
[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/src/crc32.h
[delete] https://crrev.com/1c4e7c7382a55ca995fec61ada812245e5fbfbf7/LICENSE.md
[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/src/atrusd.cc
[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/src/util.cc
[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/src/upgrade.cc
[modify] https://crrev.com/9d3c903a73c5389f4969690a43d93fa4be14f998/src/upgrade.h

Project Member

Comment 11 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/0f9787a9b928b8988707546a2811ccad5ce261b6

commit 0f9787a9b928b8988707546a2811ccad5ce261b6
Author: Emil Lundmark <emil@limesaudio.com>
Date: Tue Jun 06 05:07:26 2017

atrus-firmware: change vendor to Google

Limes Audio is no longer the owner of the firmware.

BUG= chromium:713756 
TEST=emerge-guado sys-firmware/atrus-firmware
CQ-DEPEND=CL:497407

Change-Id: Ie99dd3b504f87419e8785cce3589182e8c093142
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/494588
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Simon Que <sque@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/0f9787a9b928b8988707546a2811ccad5ce261b6/sys-firmware/atrus-firmware/atrus-firmware-0.6.8.ebuild
[delete] https://crrev.com/6888deb244b3cb9687e9b58116584e8c62ae28e7/licenses/copyright-attribution/sys-firmware/atrus-firmware
[rename] https://crrev.com/0f9787a9b928b8988707546a2811ccad5ce261b6/sys-firmware/atrus-firmware/atrus-firmware-0.6.8-r3.ebuild

Project Member

Comment 13 by bugdroid1@chromium.org, Jun 21 2017

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

commit 3edc73c526151052bbade0a32929ec5a5a16122f
Author: Karl Petersson <karl@limesaudio.com>
Date: Wed Jun 21 00:24:19 2017

Refactor diagnostics

This change is a rewrite of the part of atrusd that handles
diagnostics, including hid communication and udev enumeration. The
idea is to move towards being compliant with CrOS and the Google C++
style guide.

- Hide posix system calls behind wrappers
- Use C++ constructs
- Separate functionality into smaller classes for easier testing
- Add wrapper class for udev objects that handle unrefs when they go out
  of scope
- Don't use argp, since we're no longer using sub commands and
  diagnostics cannot be called stand-alone from cl
- Make use of existing functions/classes in libbrillo/libchrome

BUG= chromium:713756 
TEST=Built for guado, ran `atrusd <firmware>` and confirmed that it
logged diagnostics to /var/log/atrus.log

Change-Id: I192686891cb5b93a4ca74f4919025a389674b88f
Reviewed-on: https://chromium-review.googlesource.com/518170
Commit-Ready: Karl Petersson <karl@limesaudio.com>
Tested-by: Karl Petersson <karl@limesaudio.com>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/atrusctl.gyp
[modify] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/diagnose.cc
[add] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/hid_connection.cc
[modify] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/diagnose.h
[add] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/hidraw_device.cc
[add] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/hid_connection.h
[modify] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/atrusd.cc
[add] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/hidraw_device.h
[add] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/hid_message.h
[add] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/hid_message.cc
[add] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/scoped_udev_handle.h

Project Member

Comment 14 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/atrusctl/+/006c5244f7026cc3ff7e988ba0423871dbb79289

commit 006c5244f7026cc3ff7e988ba0423871dbb79289
Author: Karl Petersson <karl@limesaudio.com>
Date: Fri Jun 23 00:03:50 2017

Refactor Daemon to C++

- Migrate to brillo::Daemon
- Remove socket API
- Add atrusd.conf to be installed in /etc/init
- Use udev_monitor to watch for hidraw events. Since atrusd is now
  running contiously, we need to listen to udev events for when an atrus
  is connected/disconnected.

BUG= chromium:713756 
TEST=emerge-guado chromeos-base/atrusctl
CQ-DEPEND=CL:541355

Change-Id: I92375fa11ceda90b488e4287622a703ce3705000
Reviewed-on: https://chromium-review.googlesource.com/519268
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Emil Lundmark <lndmrk@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/atrusctl.gyp
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/conf/udev-atrus.rules
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/udev_device_manager.h
[delete] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/diagnose.h
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/hidraw_device.cc
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/udev_device_manager.cc
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/atrusd.cc
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/init/atrusd.conf
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/hidraw_device.h
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/diagnostics.h
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/scoped_udev_handle.h
[rename] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/diagnostics.cc
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/udev_subsystem_observer.h

Project Member

Comment 15 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/atrusctl/+/006c5244f7026cc3ff7e988ba0423871dbb79289

commit 006c5244f7026cc3ff7e988ba0423871dbb79289
Author: Karl Petersson <karl@limesaudio.com>
Date: Fri Jun 23 00:03:50 2017

Refactor Daemon to C++

- Migrate to brillo::Daemon
- Remove socket API
- Add atrusd.conf to be installed in /etc/init
- Use udev_monitor to watch for hidraw events. Since atrusd is now
  running contiously, we need to listen to udev events for when an atrus
  is connected/disconnected.

BUG= chromium:713756 
TEST=emerge-guado chromeos-base/atrusctl
CQ-DEPEND=CL:541355

Change-Id: I92375fa11ceda90b488e4287622a703ce3705000
Reviewed-on: https://chromium-review.googlesource.com/519268
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Emil Lundmark <lndmrk@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/atrusctl.gyp
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/conf/udev-atrus.rules
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/udev_device_manager.h
[delete] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/diagnose.h
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/hidraw_device.cc
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/udev_device_manager.cc
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/atrusd.cc
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/init/atrusd.conf
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/hidraw_device.h
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/diagnostics.h
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/scoped_udev_handle.h
[rename] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/diagnostics.cc
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/udev_subsystem_observer.h

Project Member

Comment 16 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/atrusctl/+/006c5244f7026cc3ff7e988ba0423871dbb79289

commit 006c5244f7026cc3ff7e988ba0423871dbb79289
Author: Karl Petersson <karl@limesaudio.com>
Date: Fri Jun 23 00:03:50 2017

Refactor Daemon to C++

- Migrate to brillo::Daemon
- Remove socket API
- Add atrusd.conf to be installed in /etc/init
- Use udev_monitor to watch for hidraw events. Since atrusd is now
  running contiously, we need to listen to udev events for when an atrus
  is connected/disconnected.

BUG= chromium:713756 
TEST=emerge-guado chromeos-base/atrusctl
CQ-DEPEND=CL:541355

Change-Id: I92375fa11ceda90b488e4287622a703ce3705000
Reviewed-on: https://chromium-review.googlesource.com/519268
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Emil Lundmark <lndmrk@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/atrusctl.gyp
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/conf/udev-atrus.rules
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/udev_device_manager.h
[delete] https://crrev.com/3edc73c526151052bbade0a32929ec5a5a16122f/src/diagnose.h
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/hidraw_device.cc
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/udev_device_manager.cc
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/atrusd.cc
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/init/atrusd.conf
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/hidraw_device.h
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/diagnostics.h
[modify] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/scoped_udev_handle.h
[rename] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/diagnostics.cc
[add] https://crrev.com/006c5244f7026cc3ff7e988ba0423871dbb79289/src/udev_subsystem_observer.h

Should we consider this done and close?
Cc: lndmrk@chromium.org

Comment 20 by sque@chromium.org, Jul 14 2017

Status: Fixed (was: Untriaged)
Labels: Proj-Bluestreak
Project Member

Comment 22 by bugdroid1@chromium.org, Jul 18 2017

Labels: merge-merged-release-R60-9592.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/atrusctl/+/ca88492afa3d6132d9df6f4ac1ef7b487b25e4f5

commit ca88492afa3d6132d9df6f4ac1ef7b487b25e4f5
Author: Emil Lundmark <emil@limesaudio.com>
Date: Tue Jul 18 16:29:58 2017

Harden compiler flags

Use more conservative compiler flags more in line with CrOS defaults.

BUG= chromium:713756 ,chromium:740079
TEST=emerge-guado sys-apps/atrusctl

Change-Id: Iba05dc310f8a0d343525e50f2d2545deffd71ab4
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/496207
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Simon Que <sque@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
(cherry picked from commit 4301f27b8845f073ba4aa03bd8c38d53386915bb)
Reviewed-on: https://chromium-review.googlesource.com/575694
Commit-Queue: Simon Que <sque@chromium.org>

[modify] https://crrev.com/ca88492afa3d6132d9df6f4ac1ef7b487b25e4f5/src/diagnose.cc
[modify] https://crrev.com/ca88492afa3d6132d9df6f4ac1ef7b487b25e4f5/src/daemon.cc
[modify] https://crrev.com/ca88492afa3d6132d9df6f4ac1ef7b487b25e4f5/CMakeLists.txt
[modify] https://crrev.com/ca88492afa3d6132d9df6f4ac1ef7b487b25e4f5/src/upgrade.cc

Project Member

Comment 23 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/b5edc31b9557210175fbed00ba40d11436c96146

commit b5edc31b9557210175fbed00ba40d11436c96146
Author: Emil Lundmark <emil@limesaudio.com>
Date: Tue Jul 18 17:36:23 2017

atrusctl: rename binary to atrusd

BUG= chromium:713756 ,chromium:740079
TEST=emerge-guado sys-apps/atrusctl
CQ-DEPEND=CL:494470

Change-Id: I6c88feafaa4d9ce794567b62b0318bdd75eecff2
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/519245
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Simon Que <sque@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
(cherry picked from commit dd9411824f0ed68423dc1de0ca0a2ca605fb4464)
Reviewed-on: https://chromium-review.googlesource.com/575815
Commit-Queue: Simon Que <sque@chromium.org>

[modify] https://crrev.com/b5edc31b9557210175fbed00ba40d11436c96146/sys-apps/atrusctl/atrusctl-9999.ebuild

Project Member

Comment 24 by bugdroid1@chromium.org, Jul 18 2017

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

commit bfbb0f7d65050e4bff815d8c08eb7f0c613baa59
Author: Emil Lundmark <emil@limesaudio.com>
Date: Tue Jul 18 18:56:44 2017

Follow Google C++ style guide

This change was partly generated by running

$ clang-format -i src/*.{cc,h}

With added .clang-format symlinked to platform2/

- Use namespaces and correctly named include guards
- Some changes according to cpplint.py output

BUG= chromium:713756 
TEST=emerge-guado sys-apps/atrusctl
CQ-DEPEND=CL:519245

Change-Id: I40ad3e80d8598ccbf3c8d06f67c9351fb4043dea
Signed-off-by: Emil Lundmark <emil@limesaudio.com>
Reviewed-on: https://chromium-review.googlesource.com/496208
Reviewed-by: Simon Que <sque@chromium.org>
(cherry picked from commit 69a85918a1d00d4e390e2cbaa4dc43f7766aecd4)
Reviewed-on: https://chromium-review.googlesource.com/575695
Commit-Queue: Simon Que <sque@chromium.org>
Tested-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/diagnose.cc
[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/diagnose.h
[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/crc32.cc
[delete] https://crrev.com/c4db3702c8c08c3422da5f84a3ad9bcd52459a2f/.clang-tidy
[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/util.h
[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/device.h
[rewrite] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/.clang-format
[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/crc32.h
[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/atrusd.cc
[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/util.cc
[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/upgrade.cc
[modify] https://crrev.com/bfbb0f7d65050e4bff815d8c08eb7f0c613baa59/src/upgrade.h

Comment 25 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment