[PATCH] D89020: [lit] Try to remove the flakeyness of `shtest-timeout.py` and `googletest-timeout.py`.

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 17:52:33 PDT 2020


yln accepted this revision.
yln added a comment.
This revision is now accepted and ready to land.

LGTM with nits



================
Comment at: llvm/utils/lit/tests/googletest-timeout.py:18
+# RUN:  --filter=InfiniteLoopSubTest  --param set_timeout=1 \
+# RUN:  > %t.cfgset.out 2> %t.cfgset.err
+# RUN: FileCheck --check-prefix=CHECK-INF < %t.cfgset.out %s
----------------
Possible cleanup: `%t.cfgset.err` seems to be unused


================
Comment at: llvm/utils/lit/tests/googletest-timeout.py:30
+# RUN:   > %t.cmdover.out 2> %t.cmdover.err
+# RUN: FileCheck --check-prefix=CHECK-INF < %t.cmdover.out %s
 # RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-ERR < %t.cmdover.err %s
----------------
Other than checking the debug output on stderr ("Forcing timeout to be 2 seconds") this test actually does not have a reliable way of *really* checking that the timeout was 2 (and not 1).  (without making it flaky as in our original problem)

So we could let this test pass immediately (make it fast!) by setting a large timeout override, checking stderr for that value ("Forcing timeout to be 3600 seconds") and use `QuickSubTest` to pass the test immediately.


================
Comment at: llvm/utils/lit/tests/shtest-timeout.py:65
+###############################################################################
+# Test tests can complete in prescence of a timeout
+#
----------------
prescence -> presence
"Test tests" is difficult to read


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89020/new/

https://reviews.llvm.org/D89020



More information about the llvm-commits mailing list