[PATCH] D112758: [llvm] [Debuginfo] Debuginfod client library.

Noah Shutty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 10:58:40 PST 2021


noajshu marked 3 inline comments as done.
noajshu added inline comments.


================
Comment at: llvm/unittests/Debuginfod/DebuginfodTests.cpp:13
+
+TEST(DebuginfodTests, noDebuginfodUrlsFetchInfoTest) {
+  EXPECT_THAT_EXPECTED(fetchDebuginfo("./", {}, "fakeBuildId",
----------------
noajshu wrote:
> labath wrote:
> > I suppose you could test here that the asset can be retrieved from the cache without hitting the server, but I don't think that's really necessary (if you have such a test in the next patch) -- a lot of library code in llvm is only tested through the relevant tool.
> Currently there is no such test in the next patch. There are only lit tests where the cache is emptied each time and we fetch assets from a server. Is it OK to write to the filesystem in a unit test? If so I would like to add one here per your suggestion. If not, I can add a lit test to make sure local caching works properly.
Thanks for the suggestion! I've added this test below.
How about we divide up the testing responsibility like this:
D112758 -- (this diff) -- Unit test a local cache hit and miss (done)
D112759 -- (llvm-debuginfod-find) -- end-to-end test of local cache and server using Python simple http server
D113717 -- (symbolizer integration) -- end-to-end test of local cache only (just to hit the integration point)

The goal would be to get full coverage (local cache, network, client integration point) without too much overlap across the tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112758/new/

https://reviews.llvm.org/D112758



More information about the llvm-commits mailing list