[all-commits] [llvm/llvm-project] af0b0e: [libc] [UnitTest] Add timeout to death tests

Alex Brachet via All-commits all-commits at lists.llvm.org
Wed Mar 11 20:58:45 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: af0b0e00fba9b13c23dabe19fcabde15672f9dc5
      https://github.com/llvm/llvm-project/commit/af0b0e00fba9b13c23dabe19fcabde15672f9dc5
  Author: Alex Brachet <alexbrachetmialot at gmail.com>
  Date:   2020-03-11 (Wed, 11 Mar 2020)

  Changed paths:
    M libc/utils/UnitTest/Test.cpp
    M libc/utils/testutils/ExecuteFunction.h
    M libc/utils/testutils/ExecuteFunctionUnix.cpp

  Log Message:
  -----------
  [libc] [UnitTest] Add timeout to death tests

Summary:
This patch adds a timeout of 500ms to death tests. As we add multithreaded code and locks, deadlocks become more likely so timeout will be useful.

Additionally:
 - Better error handling in `invokeSubprocess`
 - Makes `ProcessStatus`'s methods const

Reviewers: sivachandra, MaskRay, gchatelet, PaulkaToast

Reviewed By: sivachandra, PaulkaToast

Subscribers: tschuett, libc-commits

Differential Revision: https://reviews.llvm.org/D75651




More information about the All-commits mailing list