AMDGPU: Mark test as XFAIL in expensive_checks builds
[llvm-project.git] / llvm / utils / lit / tests / shtest-external-shell-kill.py
blob2de9766aa2fa2faa780b411c34c4bb6cf9d68de0
1 # This test exercises an external shell use case that, at least at one time,
2 # appeared in the following tests:
4 # compiler-rt/test/fuzzer/fork-sigusr.test
5 # compiler-rt/test/fuzzer/merge-sigusr.test
6 # compiler-rt/test/fuzzer/sigint.test
7 # compiler-rt/test/fuzzer/sigusr.test
9 # That is, a RUN line can be:
11 # cmd & PID=$!
13 # It is important that '&' only puts 'cmd' in the background and not the
14 # debugging commands that lit inserts before 'cmd'. Otherwise:
16 # - The debugging commands might execute later than they are supposed to.
17 # - A later 'kill $PID' can kill more than just 'cmd'. We've seen it even
18 # manage to terminate the shell running lit.
20 # The last FileCheck directive below checks that the debugging commands for the
21 # above RUN line are not killed and do execute at the right time.
23 # RUN: %{lit} -a %{inputs}/shtest-external-shell-kill | %{filter-lit} | FileCheck %s
24 # END.
26 # CHECK: Command Output (stdout):
27 # CHECK-NEXT: --
28 # CHECK-NEXT: start
29 # CHECK-NEXT: end
30 # CHECK-EMPTY:
31 # CHECK-NEXT: --
32 # CHECK-NEXT: Command Output (stderr):
33 # CHECK-NEXT: --
34 # CHECK-NEXT: RUN: at line 1: echo start
35 # CHECK-NEXT: echo start
36 # CHECK-NEXT: RUN: at line 2: sleep [[#]] & PID=$!