summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test
blob: 609c83929292729772d009e45f1fa1a9fa7437b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# UNSUPPORTED: system-windows, system-freebsd

# This tests the replaying of GDB remote packets.
#
# We issue the same commands and ensure the output is identical to the original
# process. To ensure we're not actually running the original binary we check
# that the string "testing" is not printed.

# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out

# Test reproducer generate command.
# RUN: rm -rf %t.repro
# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
# RUN: env FOO=BAR %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY

# Test crash reproducer.
# RUN: rm -rf %t.repro
# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCrashCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY

# CHECK: Breakpoint 1
# CHECK: Process {{.*}} stopped
# CHECK: Process {{.*}} launched
# CHECK: thread {{.*}} stop reason = breakpoint
# CHECK: frame {{.*}} simple.c

# CAPTURE: testing
# REPLAY-NOT: testing

# CHECK: Process {{.*}} resuming
# CHECK: Process {{.*}} exited

# CAPTURE: Reproducer is in capture mode.
# CAPTURE: Reproducer written
OpenPOWER on IntegriCloud