This is an archive of the discontinued LLVM Phabricator instance.

[TestLldbGdbServer and TestGdbRemoteXXX] Use "ls -l" instead of "readlink"
ClosedPublic

Authored by sivachandra on May 28 2015, 2:56 PM.

Details

Summary

Old Android devices, for example API 16, do not have the "readlink"
command. To take care of such devices, this commit changes to use "ls -l"
instead of "readlink" to get the lldb-server exe path.

The tests fixed with this change for an Android API 16 arm device are:

TestGdbRemoteAttach
TestGdbRemoteAuxvSupport
TestGdbRemoteExpeditedRegisters
TestGdbRemoteKill
TestGdbRemoteProcessInfo
TestGdbRemoteSegFault
TestGdbRemoteThreadsInStopReply
TestGdbRemote_qThreadStopInfo

Further, all tests in TestLldbGdbServer pass (previously erroring out),
except one which times out.

Diff Detail

Event Timeline

sivachandra retitled this revision from to [TestLldbGdbServer and TestGdbRemoteXXX] Work around missing 'readlink'.
sivachandra updated this object.
sivachandra edited the test plan for this revision. (Show Details)
sivachandra added reviewers: ovyalov, vharron.
sivachandra added a subscriber: Unknown Object (MLST).
ovyalov edited edge metadata.May 28 2015, 4:16 PM

Please see my comments.

test/tools/lldb-server/gdbremote_testcase.py
157

Please consider calling strip() on output string here -so, caller won't need to strip at each call site.

169

You may run "ls -l /proc/.../exe" and then take last item from output array separated by spaces - it should contain deferenced link.

sivachandra retitled this revision from [TestLldbGdbServer and TestGdbRemoteXXX] Work around missing 'readlink' to [TestLldbGdbServer and TestGdbRemoteXXX] Use "ls -l" instead of "readlink".May 28 2015, 5:08 PM
sivachandra updated this object.
sivachandra edited edge metadata.

Modify according to comments.

ovyalov accepted this revision.May 28 2015, 5:13 PM
ovyalov edited edge metadata.

LGTM

This revision is now accepted and ready to land.May 28 2015, 5:13 PM

Thanks for the prompt review.

sivachandra closed this revision.May 28 2015, 5:18 PM