This was done via the hard-coded list in build/soong.
Bug: 158059172
Test: m
Merged-In: I994c20b87ccdcd9b653bd38e0c7e147ba8ebcc06
Change-Id: I994c20b87ccdcd9b653bd38e0c7e147ba8ebcc06
(cherry picked from commit a75b18de787a9e09f4f248270601213f267f21fa)
lshal_test uses passthrough HAL, which consistently reproduce
the error because the file descriptor is always closed upon
return.
Test: lshal_test
Fixes: 200623090
Change-Id: I35c2dbd39d5f573a889ab19df1f0a2ffd88a5e4a
If there is a pending close request on the pipe,
but there's still data in the pipe, exhaust it.
Test: com.google.android.power.pts.PowerTest#power2RockBottomCheckTest
Bug: 200623090
Change-Id: Iaaa4ba0c3af480671d7d63f9b2dbf682277a3430
- Use android::base helpers
- Use std::thread instead of utils/Thread
- Use poll() instead of select()
- Use a separate fd trigger instead of an atomic_bool
so that poll() finishes sooner.
- Also removes useless READ_TIMEOUT and error message
for select() timeout and ~PipeRelay.
Test: lshal_test
Test: manually run lshal debug repeatedly to see if it
is stuck or output is not complete
Bug: 182306776
Change-Id: Ie623bf1b979654a30b360819c9a787c88fd8d91d
Some IMs floating about this recently. For now, lshal is still HIDL
specific and binder-facing tools work with AIDL HALs.
It remains to be seen if lshal will be re-adapted for AIDL in the
future, or if some of the ideas here will be transfered to dumpsys and
this binary ultimately deprecated.
Bug: N/A
Test: lshal/lshal --help
Change-Id: I39be9533b44c085a0688eb39171a0a40f88067b2
Allows lshal and dumpsys to share the code to get Binder PID info.
Test: atest libbinderdebug_test lshal_test
Test: diff output of lshal before and after this CL
Bug: 140639610
Change-Id: I04dbe2509673502502ac849ef4ae74147404fc43
When metaversion of libvintf updates, --init-vintf option
always uses the highest metaversion, breaking tests. These
tests should work with any metaversion of libvintf. The HAL
sections should be focused on.
Test: lshal_test
Change-Id: Ie5471ddd6dea7b8098d0be3385cfd1cc6c29824d
If any error comes up when invoking debug, write fqname and the error
message to the error output stream.
Test: manual. Add addPostCommandTask to a HAL that keeps writing to the
fd after debug() finishes. lshal debug terminates with fqname and
the error message `timeout reading from pipe, output may be truncated.`
Fixes: 169247570
Change-Id: Idf8944e3cde08dc86766b144c4a3037cbcf6b3dc
Also clang-format.
When --all is specified, put "clients" at the end because it is usually
the longest.
Test: lshal --all
Test: lshal --all --cmdline
Test: lshal --types=all
Test: adb bugreport
Bug: 163060248
Change-Id: If95a18cff50d3b6ef3f70b300f16105b41ca28ed
Instead, print a short message that contains the information
on the row that it should look up.
Test: lshal --debug
Test: lshal debug -E android.hardware.health@2.0::IHealth/default
Test: lshal_test
Fixes: 160745145
Change-Id: I7d5ab9fba097c0fb0b080ec52682084c65ba9f50
These aren't really needed here, and they are costing 20Kib memory/user.
Bug: 148177595
Test: boot/lshal
Change-Id: Id0d311319c47553fac5d1d208409cef83073fddf
If binderfs is mounted, lshal should read binder stats
from /dev/binderfs/binder_logs instead of debugfs.
Test: atest lshal_test, adb shell lshal
Change-Id: Id585cdcd71c0ab4346045a099c2e3d0ddffcecc0
forEachInstanceOfVersion now requires a HalFormat arg now.
Right now, lshal only works on HIDL hals. We will re-visit
this code when we need lshal for staidl hals as well.
Bug: 140832836
Test: lshal_test
Change-Id: I721dff82ec6aeb4473236c5c78694d366893eb30
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Iec1802ce9226570d3a02cc5242f7ca72e1370635
Waits for an interface to start (e.g. for scripting certain tests).
Fixes: 135956088
Test: the following
$ adb shell lshal wait android.hardware.nfc@1.0::INfc/foo
Service not found (missing permissions or not in VINTF manifest?).
$ echo $?
128
$ adb shell lshal wait android.hardware.nfc@1.0::INfc/default
$ echo $?
0
Test: lshal_test
Change-Id: I355fc33f9e46bac573a38425205e8db81f19a36e
- reduce number of files on device
- allow testing lshal w/o flashing
- no need for dynamic linking (static lib will be more compact)
Bug: N/A
Test: lshal, lshal_test
Change-Id: I9b41e78f7e6a469505cd530eb578df6855f45a1f
* Add explicit to conversion constructors/operators
* Use NOLINT or NOLINTNEXTLINE to suppress warnings on intended converters
Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I67a59b0051b5550ea135a91664bf03995e94eb75
A HAL can't be retrieved unless it is in the VINTF manifest. This
design decision was made so that people add HALs to the manifest as
early as possible (this makes sure that the manifest is accurate on
a change by change basis).
A common problem people face is seeing a HAL in lshal, but because
of the above, it can't be retreived. Currently, in order to see
manifest information, you either have to dig into the lshal settings
or dig into the filesystem. Since one of the most common debugging
steps for a HAL is to check lshal for the HAL, having the information
right here will help. Even though it doesn't explicitly say what the
implications of 'FM' or 'DM' are, reading the lshal help gives a
reasonable idea of this, and when a snippet of lshal is shown (either
in a bugreport/email etc), it will contain the information required
to diagnose the issue.
This CL also fixes a couple bits of documentation in lshal and adjusts
the formatting of the output slightly to break up table descriptions
from the output.
Change-Id: I2bdc08a8b48b8b78a4b143cc4a7cfdfbef62622d
Fixes: 120871371
Test: lshal (manual)
Start timing when debug() has returned. When the specific
timeout has reached (currently 1s) and the relay thread
has not finish, tell the relay thread to stop.
Test: while true; do date; lshal debug android.hardware.health.storage@1.0::IStorage/default; done
Test: lshal_test
Bug: 111997867
Change-Id: Ib9235d3bd2fc3a54eb316da8d8b59d987988b134
This reverts commit b9d19c87ab.
Reason of revert: will sometimes cause `lshal debug` to produce
no output at all.
Bug: 111997867
Test: while true; do date; lshal debug android.hardware.health.storage@1.0::IStorage/default; done
Change-Id: I31062b479ea8a9f1c5b94a1ad0969bc5e2e92cd3
In ~PipeRelay, since the data is no longer needed,
just close the fd before joining the thread.
In previous code, 'lshal debug' can hang:
- lshal read() waiting for data in RelayThread
- lshal send fd to service in main thread
- service close the fd
- service returns in debug() call
- lshal calls ~PipeRelay
- lshal read() is still blocking because it does not
receive the signal
But, since the service has already end the debug()
call, the fds can be closed to bail out from blocking read().
Test: 'while true; do lshal debug ...; done' does not hang
Fixes: 111997867
Change-Id: I90db486b0a6598bd9998ed904dc0c757dfa57e0e
Add a new section to lshal that shows HALs in the manifest
- as hwbinder HALs but not registered
- as passthrough HALs but no impl found
Fixes: 71555570
Test: lshal_test
Test: lshal --types=z
Change-Id: I6947d9e7e08991fa2497f40c81005f885d408931
- Added "Status" column that has following values:
- alive: running hwbinder service
- registered;dead: registered, but service cannot accept calls
- declared: only in VINTF, not in hwservicemanager
- N/A: passthrough HALs
- Added a "Manifest HALs" section that lists all
HALs (hwbinder or passthrough) in device / framework manifest
Test: lshal_test
Bug: 71555570
Change-Id: I202b562ee73bcd49506bb43cc9af27b86f32651c