This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Get lldb-server platform's --socket-file working again
ClosedPublic

Authored by teemperor on Aug 13 2020, 3:07 AM.

Details

Summary

lldb-server platform --socket-file /any/path currently always fails to create
the socket file. This stopped working after D67424 which changed the
input variables of writeFileAtomically slightly. We're expected to
pass in a temporary path template (/tmp/foo-%%%%%) and the final
path we want to write. Instead we currently pass in the never set
temp_file_path as the temporary path (which will make this function always
fail) and pass in the temp_file_spec's path as the final path (which is actually
the template path such as /tmp/foo-%%%%%) instead of the actual path
we want to write (e.g. /tmp/foo).

Diff Detail

Event Timeline

teemperor created this revision.Aug 13 2020, 3:07 AM
teemperor requested review of this revision.Aug 13 2020, 3:07 AM

From what I can see TestPlatformProcessConnect should actually test this parameter, but I assume we never run the test since the
breaking revision landed?

labath accepted this revision.Aug 13 2020, 4:52 AM

From what I can see TestPlatformProcessConnect should actually test this parameter, but I assume we never run the test since the
breaking revision landed?

That's quite possible given that it is limited to remote llgs tests (i.e. android) and android testing is very shoddy lately. Neither of the restrictions is really necessary, so I'll try to update the test to work everywhere. I presume this is also going to be used by the upcoming completion tests...

This revision is now accepted and ready to land.Aug 13 2020, 4:52 AM

Yeah this patch is actually just preparation for @MrHate's completion test (that technically tests this too, but having a dedicated test would be nice).

Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2020, 1:29 AM