Files
clang-p2996/lldb/test/Shell/Reproducer/TestVerify.test
Jonas Devlieghere 3746906193 [lldb] Add reproducer verifier
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

The verifier is enabled by default during replay, but can be skipped by
passing --reproducer-no-verify.

Differential revision: https://reviews.llvm.org/D86497
2020-09-02 22:00:00 -07:00

28 lines
1.3 KiB
Plaintext

# RUN: rm -rf %t.repro
# RUN: rm -rf %t.repro2
# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out
# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out
# RUN: %lldb --replay %t.repro
# RUN: echo "/bogus/home/dir" > %t.repro/home.txt
# RUN: echo "/bogus/current/working/dir" > %t.repro/cwd.txt
# RUN: not %lldb -b -o 'reproducer verify -f %t.repro' 2>&1 | FileCheck %s
# CHECK: working directory '/bogus/current/working/dir' not in VFS
# CHECK: home directory '/bogus/home/dir' not in VFS
# RUN: rm %t.repro/root/%S/Inputs/GDBRemoteCapture.in
# RUN: echo "CHECK: '%S/Inputs/GDBRemoteCapture.in': No such file or directory" > %t.check
# RUN: not %lldb -b -o 'reproducer verify -f %t.repro' 2>&1 | FileCheck %t.check
# RUN: not %lldb --replay %t.repro 2>&1 | FileCheck %s
# At this point the reproducer is too broken to ignore the verification issues.
# Capture a new reproducer and only change the home directory, which is
# recoverable as far as this test goes.
# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro2 %t.out
# RUN: echo "/bogus/home/dir" > %t.repro2/home.txt
# RUN: %lldb --replay %t.repro2 --reproducer-no-verify 2>&1 | FileCheck %s --check-prefix NO-VERIFY
# NO-VERIFY-NOT: home directory '/bogus/home/dir' not in VFS