[all-commits] [llvm/llvm-project] 809b4c: [llvm-lit] Error on malformed `.lit_test_times` en...

Jonathan Thackray via All-commits all-commits at lists.llvm.org
Fri Apr 17 11:49:43 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 809b4cfa2b15f1e5699ff00c842266e5362ccd32
      https://github.com/llvm/llvm-project/commit/809b4cfa2b15f1e5699ff00c842266e5362ccd32
  Author: Jonathan Thackray <jonathan.thackray at arm.com>
  Date:   2026-04-17 (Fri, 17 Apr 2026)

  Changed paths:
    M llvm/utils/lit/lit/Test.py
    M llvm/utils/lit/lit/TestTimes.py
    M llvm/utils/lit/lit/discovery.py
    A llvm/utils/lit/tests/Inputs/malformed-test-times/a.txt
    A llvm/utils/lit/tests/Inputs/malformed-test-times/b.txt
    A llvm/utils/lit/tests/Inputs/malformed-test-times/lit.cfg
    A llvm/utils/lit/tests/Inputs/malformed-test-times/lit_test_times
    A llvm/utils/lit/tests/malformed-test-times.py

  Log Message:
  -----------
  [llvm-lit] Error on malformed `.lit_test_times` entries instead of stack trace (#191305)

When running `llvm-lit`, I sometimes hit a traceback, because a
`.lit_test_times.txt` file has got corrupted (not sure how).
However, it's non-obvious what the issue is (you just get a traceback),
so I've fixed this as follows:

`read_test_times()` currently assumes every line in
`.lit_test_times.txt`
contains a floating-point time followed by a test path. If the file
contains a blank line, a line without a path, or a non-numeric time,
`llvm-lit` will now error with: `fatal: found malformed timing data in`
+ filename.

Add test coverage for this too.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list