add support for multiprofile
Update crash_sender to scan /home/chronos/u-*/crash/ paths since it's
a shell script and there's no easy way to get the right info via shell
commands. We want to scan all paths in case of different ordering.
For crash_collector, update it to use SessionManager's dbus call to
query the active profiles. We select the first one and use that to
process crashes. This should be fine.
We also need to handle the edge case where no user is logged in (yet a
crash occurs with a program running as chronos uid; e.g. the login).
In the past, we just wrote to /home/chronos/user/crash/ even when there
wasn't a user home dir mounted there. With this change, we formalize
(and document) things a bit more by moving to /home/chronos/crash/. We
want this behavior rather than re-using the system path as our tests
specifically verify system vs user crashes.
TEST=`cros_run_unit_tests --board=x86-alex -p crash-reporter` passes
TEST=logging_UserCrash autotest passes in a vm
Reviewed-by: Mike Frysinger <email@example.com>
Tested-by: Mike Frysinger <firstname.lastname@example.org>
Commit-Queue: Mike Frysinger <email@example.com>
7 files changed