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
Paths
| Differential D86497
[lldb] Add reproducer verifier ClosedPublic Authored by JDevlieghere on Aug 24 2020, 5:11 PM.
Details
Summary 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. kastiglione added inline comments.
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.
This revision now requires changes to proceed.Aug 26 2020, 9:45 AM Comment Actions
Comment Actions One nit about naming and another small thing, but otherwise this LGTM.
This revision is now accepted and ready to land.Aug 31 2020, 9:57 AM JDevlieghere added inline comments.
Closed by commit rG297f69afac58: [lldb] Add reproducer verifier (authored by JDevlieghere). · Explain WhyAug 31 2020, 3:14 PM This revision was automatically updated to reflect the committed changes. JDevlieghere marked an inline comment as done. 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 teemperor added a reverting change: rG7c80f2da812e: Revert "[lldb] Add reproducer verifier".Sep 1 2020, 3:22 AM Comment Actions Don't see an obvious fix, so I reverted for Jonas in 7c80f2da812e45bbdfa3c8f9ab24440f8ef3362a This revision is now accepted and ready to land.Sep 1 2020, 3:22 AM 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. Closed by commit rG3746906193c1: [lldb] Add reproducer verifier (authored by JDevlieghere). · Explain WhySep 2 2020, 10:20 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 289637 lldb/include/lldb/API/SBReproducer.h
lldb/include/lldb/Utility/Reproducer.h
lldb/source/API/SBReproducer.cpp
lldb/source/Commands/CommandObjectReproducer.cpp
lldb/source/Commands/Options.td
lldb/source/Utility/Reproducer.cpp
lldb/source/Utility/ReproducerProvider.cpp
lldb/test/Shell/Reproducer/TestDebugSymbols.test
lldb/test/Shell/Reproducer/TestVerify.test
lldb/tools/driver/Driver.cpp
lldb/tools/driver/Options.td
llvm/include/llvm/Support/VirtualFileSystem.h
llvm/lib/Support/VirtualFileSystem.cpp
|
I kinda like verify = true a bit better than skip_verification = false. 'skip' feels like a negation, so you end up checks like if (!skip_verification) (= "if we should not not verify" instead of just if (verify). Same below.
But that's just personal preference so I won't mind the name if you feel strongly about it (and it kinda fits the command line argument names)