Add a reproducer verifier that catches:
- Missing or invalid home directory
- Missing or invalid working directory
- Missing or invalid module/symbol paths
- Missing files from the VFS
Differential D86497
[lldb] Add reproducer verifier JDevlieghere on Aug 24 2020, 5:11 PM. Authored by
Details
Add a reproducer verifier that catches:
Diff Detail
Event TimelineComment Actions This will require a test and maybe some code deduplication in CommandObjectReproducer but I already wanted to put the patch up in case I can't get to that today.
Comment Actions
Comment Actions As discussed offline, I think the warnings here seem also useful when just replaying. I guess we should make it clear that things like missing files are fine when replaying a reproducer (e.g., just pointing that out as a 'note' and not warning/error). Beside that this LGTM.
Comment Actions
Comment Actions One nit about naming and another small thing, but otherwise this LGTM.
Comment Actions Hello. I have an auto-bisecting multi-stage bot that has identified this change as breaking release (without assertions) testing on Fedora 33 x86-64. Can we get a quick fix or revert this change for now? FAIL: lldb-shell :: Reproducer/Functionalities/TestImageList.test (68782 of 69683) ******************** TEST 'lldb-shell :: Reproducer/Functionalities/TestImageList.test' FAILED ******************** Script: -- : 'RUN: at line 6'; /tmp/_update_lc/r/bin/clang --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-unknown-linux-gnu -pthread -fmodules-cache-path=/tmp/_update_lc/r/lldb-test-build.noindex/module-cache-clang/lldb-shell /home/dave/ro_s/lp/lldb/test/Shell/Reproducer/Functionalities/Inputs/stepping.c -g -o /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.out : 'RUN: at line 8'; rm -rf /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.txt : 'RUN: at line 10'; echo "CAPTURE" >> /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.txt : 'RUN: at line 11'; /tmp/_update_lc/r/bin/lldb --no-lldbinit -S /tmp/_update_lc/r/tools/lldb/test/Shell/lit-lldb-init -x -b --capture --capture-path /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.repro -o 'run' -o 'image list' -o 'reproducer generate' /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.out >> /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.txt 2>&1 : 'RUN: at line 17'; echo "REPLAY" >> /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.txt : 'RUN: at line 18'; /tmp/_update_lc/r/bin/lldb --no-lldbinit -S /tmp/_update_lc/r/tools/lldb/test/Shell/lit-lldb-init -x -b --replay /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.repro >> /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.txt 2>&1 : 'RUN: at line 20'; cat /tmp/_update_lc/r/tools/lldb/test/Reproducer/Functionalities/Output/TestImageList.test.tmp.txt | /tmp/_update_lc/r/bin/FileCheck /home/dave/ro_s/lp/lldb/test/Shell/Reproducer/Functionalities/TestImageList.test -- Exit Code: 1 Command Output (stderr): -- clang-12: warning: argument unused during compilation: '-fmodules-cache-path=/tmp/_update_lc/r/lldb-test-build.noindex/module-cache-clang/lldb-shell' [-Wunused-command-line-argument] -- ******************** Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. ******************** Failed Tests (1): lldb-shell :: Reproducer/Functionalities/TestImageList.test Testing Time: 125.54s Unsupported : 10774 Passed : 58806 Expectedly Failed: 102 Failed : 1 FAILED: CMakeFiles/check-all Comment Actions Don't see an obvious fix, so I reverted for Jonas in 7c80f2da812e45bbdfa3c8f9ab24440f8ef3362a Comment Actions Hey Dave, I cannot repro this, neither on macOS nor Linux when building in release without assertions. Could you rerun the test manually and copy the output of the different commands? The lit output is really abysmal :( Comment Actions Line 18 fails: %lldb -x -b --replay %t.repro >> %t.txt 2>&1 error: reproducer replay failed: warning: home directory '/home/dave' not in VFS I tried rebuilding in my home directory as opposed to /tmp and the error went away. Did you try building outside of your home directory? Comment Actions And just to be clear, the source directory in my setup is in the home directory. My cron job / "bot" build just builds in /tmp. |
form -> from