Commit Graph

19192 Commits

Author SHA1 Message Date
Josh Gao dda68c0fcf Merge "adb: sysdeps: add support for joining threads." 2016-02-11 01:10:12 +00:00
Yabin Cui c30c065373 Merge "libbacktrace: support building static libraries on target." 2016-02-11 00:42:02 +00:00
Alex Deymo c7f65d2859 Merge "Fix UploadService unittests." 2016-02-11 00:09:37 +00:00
Yabin Cui 9946a8f755 libbacktrace: support building static libraries on target.
Bug: 27125711

Change-Id: I28a49e3e128fa4291815a54cf942452bd1f9f756
2016-02-10 15:20:44 -08:00
Josh Gao 3b3e10d046 adb: sysdeps: add support for joining threads.
Bug: http://b/27105824
Change-Id: I44e4edbb2a59565c35f1f3e6a6394ac258591f95
2016-02-10 14:22:58 -08:00
Josh Gao 76d3308dd2 Merge "adb: allow wine's output for sysdeps_win32 strerror test." 2016-02-10 21:39:31 +00:00
Josh Gao 22554c9167 adb: allow wine's output for sysdeps_win32 strerror test.
Change-Id: Ia5d04a2347df1bcd8c7efcc1da9cec9725007a58
2016-02-10 13:38:32 -08:00
Alex Deymo de4497ef3d Fix UploadService unittests.
The unittest was creating a brillo::Daemon in a smart pointer and then
resetting it to a newly created different brillo::Daemon instance. This
creates two brillo::Daemon instances for a short period of time, which
both setup global context (the default message loop).

This patch fixes this situation by deleting the service before creating
a new one.

Bug: 27121855
TEST=`/data/nativetest/metricsd_tests/metricsd_tests` on edison-eng

Change-Id: I3b60cbfcdba77febbfa6104aa0ecad60a29afec5
2016-02-10 11:57:55 -08:00
David Pursell c7f43c6ae1 Merge "fastboot: add UDP protocol." 2016-02-10 19:05:08 +00:00
Mark Salyzyn ac02db3bda Merge "liblog: add gTests for logging with leading newline" 2016-02-10 18:32:11 +00:00
Mark Salyzyn d18a6d4764 Merge "logd: use ro.debuggable instead of ro.build.type" 2016-02-10 18:26:42 +00:00
Mark Salyzyn d1f41d606b logd: use ro.debuggable instead of ro.build.type
Change-Id: Ic644f1f78e68094f700834675f4acc63386a6b92
2016-02-10 10:23:03 -08:00
David Pursell 4601c978ca fastboot: add UDP protocol.
Implements a UDP protocol for fastboot, documented in
fastboot_protocol.txt.

This version of the protocol does not include multi-packet windowing,
which will likely be needed to achieve reasonable speeds over WiFi.
Since we don't have any WiFi use cases yet, we'd like to get this in
now and update the protocol later if it becomes necessary.

Usage:
  fastboot -s udp:<hostname>[:port] <command>

Bug: http://b/26154914
Change-Id: Ia5bbae6bcd6405671f594d7120b3994746d234d3
2016-02-10 10:21:30 -08:00
Mark Salyzyn 3f94122ced liblog: add gTests for logging with leading newline
Bug: 27091726
Change-Id: Idff0e4e7c025426002c6381c3afb00e12d9fc1b5
2016-02-10 09:52:13 -08:00
Yabin Cui 250f5956d6 Merge "adb: setsid() for adb host server." 2016-02-10 04:34:53 +00:00
James Hawkins 5cb07147e4 Merge "bootstat: Add support for logging the boot_reason metric." 2016-02-10 00:25:43 +00:00
Yabin Cui 6bf323b97a adb: setsid() for adb host server.
To create a daemon for adb host server, we should call setsid()
for the daemon process. However, previously we call setsid() for
the adb client process, which results in nothing but EPERM error.

Bug: 26982628
Change-Id: I2763ae3d5a243706927d7ef6af5095138c0ce2d8
2016-02-09 16:15:56 -08:00
James Hawkins a4a1a4ac85 bootstat: Add support for logging the boot_reason metric.
This value is read from the ro.boot.bootreason system property.

Bug: 21724738
Change-Id: I43bef3d85ba9c8d87669a91da1aa675d9a86e348
2016-02-09 15:32:38 -08:00
Elliott Hughes dc5bd3a1b9 Merge "Fix generation of event labels for getevent." 2016-02-09 19:17:38 +00:00
Mark Salyzyn 37adf180c7 Merge "logd: add internal prdebug function" 2016-02-09 16:01:24 +00:00
Mark Salyzyn d048f113a3 logd: add internal prdebug function
Usage: android::prdebug(const char *fmt, ...) __printflike(1, 2);

Will add logd prefix tag, log as debug priority in kernel logs,
and will suffix a newline if one is not supplied. To be used to
aid debugging of the logger only.

Change-Id: I217326ef34dc4eb0ea076bacb7a7a8b564c931c3
2016-02-09 07:46:39 -08:00
Josh Gao b2803b5060 Merge "adb: make ctrl-c when spawning a daemon not kill the daemon." 2016-02-09 01:05:18 +00:00
Josh Gao 1a34944cde Merge "adb: fix mkdirs test." 2016-02-09 01:02:22 +00:00
Josh Gao b72b3f8c92 adb: make ctrl-c when spawning a daemon not kill the daemon.
Previously, using ctrl-c in a command that needs to spawn a daemon
because one isn't already available would kill the daemon along with the
foreground process.

Bug: http://b/26982628
Change-Id: I7fefc531c3e4895423e7b466322b5426d01dc9ef
2016-02-08 16:59:10 -08:00
Yabin Cui b958d22310 Merge "libziparchive: port unit tests to darwin and windows." 2016-02-09 00:56:43 +00:00
Yabin Cui 8e6f722764 libziparchive: port unit tests to darwin and windows.
Also use ReadFully to replace read, because read can
return reading bytes less than requested. And use
WriteFully to replace write.

Bug: 26962895
Change-Id: Iff0b2bc6d925619a537f7fef682c2a7ad89a2dc2
2016-02-08 16:52:55 -08:00
Dan Willemsen 3f68ba4dc6 Merge "Fix windows 64-bit builds" 2016-02-08 23:40:48 +00:00
Elliott Hughes bd02a47b22 Fix generation of event labels for getevent.
The recent uapi header update moved all the interesting constants
out into another file. Track that, and add the missing makefile
dependency.

Bug: http://b/27073568
Change-Id: I8ac1dd1122865479f69a76cbf427d4aacdf7b790
2016-02-08 14:56:03 -08:00
Josh Gao 1172b2ec71 adb: fix mkdirs test.
The behavior of mkdirs was changed a while ago, without updating the
test.

Change-Id: I2aaa73818933b281e911c42a14e3c843d8bd972a
2016-02-08 11:22:50 -08:00
David Pursell d4ac11a57d Merge "fastboot: add Socket timeout detection." 2016-02-08 16:13:39 +00:00
Christopher Ferris 45c8586dad Merge "Fix use of uninitialized memory." 2016-02-06 03:46:28 +00:00
Dan Willemsen 86cf941c48 Fix windows 64-bit builds
pid_t is 64-bit in 64-bit mingw, but the windows process/thread
functions return a DWORD(uint32_t). Instead of promoting to a pid_t and
fixing the format strings, just use a uint32_t to store the values.

android_thread_id also cannot be a 64-bit pointer, so for windows just
force it to be a uint32_t.

libutils/ProcessCallStack only works under Linux, since it makes heavy
use of /proc. Don't compile it under Windows or Darwin.

Bug: 26957718
Change-Id: I4e43e7cf18a96f22b3a9a08dbab8c3e960c12930
2016-02-05 16:10:10 -08:00
Christopher Ferris d4c884330c Fix use of uninitialized memory.
When creating an UnwindMapLocal fails in the Build() function call,
the destructor for UnwindMap is called. Unfortunately, the map_cursor_
member variable has not been initialized, so the call to destroy it
winds up operating on garbage data.

Part of this is a result of a bad class hierarchy, so this refactors
the classes slightly, and properly initializes the map_cursor_ member
variable in the base class.

Bug: 26931578
Change-Id: I885596bf65e4ef63559cee2c56cd41576d5ecc1b
2016-02-05 15:22:34 -08:00
David Pursell c742a7f174 fastboot: add Socket timeout detection.
UDP fastboot will require re-transmission in the case of datagrams
getting lost. This CL adds Socket functionality to easily distinguish
between a normal timeout and a socket failure.

I also found some Windows docs that indicate sockets may become
invalid after a call to recv() times out. This has never occurred in
my testing, but to be safe this switches the timeout implementation
to use select() instead of SO_RCVTIMEO.

Bug: http://b/26154914
Change-Id: Id7b598f8aea5df1a3676d24702b489042d5f9e3a
2016-02-05 13:22:06 -08:00
Elliott Hughes 718625010d Merge "init: fix writepid wrong pid written in file(s)" 2016-02-05 18:41:52 +00:00
Elliott Hughes ead369bdf0 Merge "Fix libbase's logging dependency." 2016-02-05 18:25:43 +00:00
Mark Salyzyn 76f99770d1 Merge "libcutils: abort for invalid fd" 2016-02-05 18:05:24 +00:00
Mark Salyzyn 20a6f0ff3b Merge "init-debug.rc: add runtime mmc max speed property actors" 2016-02-05 15:21:35 +00:00
Anestis Bechtsoudis b702b46f68 init: fix writepid wrong pid written in file(s)
When child (pid==0) executes fork branch 'pid_str'
will always be 0 writting wrong value to file(s).
Fix by utilizing getpid() to obtain correct pid.

Tracker link provides some insight on why use cases
aren't broken.

Bug: https://code.google.com/p/android/issues/detail?id=200392

Change-Id: I29989365a8bac94502c090918fa30e5cc88eb1ea
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-02-05 16:49:28 +02:00
Christopher Ferris 14c06e0769 Merge "Newer kernels added SEGV_BNDERR." 2016-02-05 02:08:27 +00:00
Chih-hung Hsieh cfd44ee74f Merge "Suppress false positive memory leak warnings." 2016-02-05 01:21:14 +00:00
Chih-Hung Hsieh f7e7bd4c3b Suppress false positive memory leak warnings.
Clang static analyzer does not know the transfer of
object ownership to hashmapPut. Use a fake global
pointer variable to trick the analyzer.

BUG: 26955438
Change-Id: Id3ac595fff14e48d28a1147461cd836914857086
2016-02-04 16:38:04 -08:00
Alex Deymo 205cdb8868 Merge "metricsd: Create a brillo::MessageLoop." 2016-02-04 23:38:54 +00:00
Jorge Lucangeli Obes 42a53e0c2a Merge "Unit tests: Compile only on 'eng' builds." 2016-02-04 22:24:46 +00:00
Jorge Lucangeli Obes 1e7592c9d5 Unit tests: Compile only on 'eng' builds.
metrics_collector_tests, metricsd_tests.

Bug: 26967770
Change-Id: I6d7e8fb6d3d98ab747d922bfeef05aa344b2179c
2016-02-04 14:17:46 -08:00
Christopher Ferris 5d56e28537 Newer kernels added SEGV_BNDERR.
Bug: 23789423
Change-Id: I6fdce75715edfce179df8c0e6a7205f26341ebd0
2016-02-04 14:07:23 -08:00
Jorge Lucangeli Obes a7d277796f Merge "crash_reporter_tests: Compile only on 'eng' builds." 2016-02-04 22:00:25 +00:00
Alex Deymo f1bf9e5fc9 metricsd: Create a brillo::MessageLoop.
brillo::BinderWatcher now requires a brillo::MessageLoop, so this patch
creates a brillo::BaseMessageLoop and passes it when creating the
brillo::BinderWatcher.

Bug: 26356682
TEST=Deployed metricsd to edison-eng.

Change-Id: I6a9e592623faf231205ae44e479bec2b873b8898
2016-02-04 13:56:38 -08:00
Jorge Lucangeli Obes 512d677a5e crash_reporter_tests: Compile only on 'eng' builds.
Bug: 26967770
Change-Id: I2bebd3da5f0d845edec24279c160d9cc62577210
2016-02-04 13:56:25 -08:00
Mark Salyzyn 9dead6deec Merge "logcat: build cleanup" 2016-02-04 21:40:16 +00:00