mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 14:36:08 +00:00

When one tries to minimize timeouts using -minimize_crash=1, minimization immediately fails. The following sequence of events is responsible for this: [parent] SIGALRM occurs [parent] read() returns -EINTR (or -ERESTARTSYS according to strace) [parent] fgets() returns NULL [parent] ExecuteCommand() closes child's stdout and returns [child ] SIGALRM occurs [child ] AlarmCallback() attempts to write "ALARM: ..." to stdout [child ] Dies with SIGPIPE without calling DumpCurrentUnit() [parent] Does not see -exact_artifact_path and exits When minimizing, the timer in parent is not necessary, so fix by not setting it in this case. Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D85359
7 lines
333 B
Plaintext
7 lines
333 B
Plaintext
RUN: %cpp_compiler %S/TimeoutTest.cpp -o %t-TimeoutTest
|
|
RUN: mkdir -p %t.dir
|
|
|
|
RUN: echo 'Hi!?' > %t.dir/not_minimal_timeout
|
|
RUN: %run %t-TimeoutTest -minimize_crash=1 %t.dir/not_minimal_timeout -timeout=1 -max_total_time=3 2>&1 | FileCheck %s
|
|
CHECK: CRASH_MIN: failed to minimize beyond {{.*}}minimized-from{{.*}} (3 bytes), exiting
|