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

Noah Shutty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 15 11:24:25 PST 2021


noajshu added inline comments.


================
Comment at: llvm/unittests/Debuginfod/DebuginfodTests.cpp:34
+  OF.close();
+  Expected<std::string> PathOrErr = getCachedOrDownloadArtifact(
+      UniqueKey, /*UrlPath=*/"/null", CacheDir,
----------------
estewart08 wrote:
> This eventually returns a path to $HOME via a call to cache_directory. I ran into some permission issues on a CI build. Is it safe to assume that $HOME is always writable?
> 
> Should this test set XDG_CACHE_HOME instead?
> ```
> setenv("XDG_CACHE_HOME", "/tmp", /*replace=*/1);
> ```
Hi @estewart08 thanks for pointing this out. I think you're actually hitting that issue for the next test starting on line 42.


================
Comment at: llvm/unittests/Debuginfod/DebuginfodTests.cpp:44
+  // Ensure there are no urls to guarantee a cache miss.
+  setenv("DEBUGINFOD_URLS", "", /*replace=*/1);
+  HTTPClient::initialize();
----------------
Needs to set `DEBUGINFOD_CACHE_PATH`
Does D115813 LGTY @estewart08 ?


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

https://reviews.llvm.org/D112758



More information about the llvm-commits mailing list