This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add a test to directly stimulate the RPC interface
ClosedPublic

Authored by jhuber6 on Apr 14 2023, 7:30 AM.

Details

Summary

Currently, the RPC interface with the loader is only tested if the other
tests fail. This test adds a direct test that runs a simple integer
increment over the RPC handshake 10000 times.

Depends on https://reviews.llvm.org/D148288

Diff Detail

Event Timeline

jhuber6 created this revision.Apr 14 2023, 7:30 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 14 2023, 7:30 AM
jhuber6 requested review of this revision.Apr 14 2023, 7:30 AM
lntue added inline comments.Apr 14 2023, 9:28 AM
libc/test/integration/startup/gpu/CMakeLists.txt
20

Can you add a direct dependency to libc.src.__support.RPC.rpc_client instead of relying on its transitive dependency via crt1?

jhuber6 updated this revision to Diff 513632.Apr 14 2023, 9:29 AM

Adding dependency on RPC directly.

lntue added inline comments.Apr 14 2023, 8:02 PM
libc/test/integration/startup/gpu/rpc_test.cpp
20

The first lambda doesn't need to capture-by-reference.

libc/utils/gpu/loader/Server.h
47

This lambda doesn't need capture-by-reference.

51–52

Same with this one.

jhuber6 updated this revision to Diff 513900.Apr 15 2023, 6:46 AM

Addressing comments

jhuber6 marked 3 inline comments as done.Apr 15 2023, 6:47 AM
lntue accepted this revision.Apr 15 2023, 4:45 PM
This revision is now accepted and ready to land.Apr 15 2023, 4:45 PM
jhuber6 updated this revision to Diff 514071.Apr 16 2023, 5:52 PM

Add port.close() after removing buggy RAII.

This revision was landed with ongoing or failed builds.Apr 19 2023, 6:02 PM
This revision was automatically updated to reflect the committed changes.