[all-commits] [llvm/llvm-project] 106621: [libc][NFC] Fix printed test time in 32-bit system...

Mikhail R. Gadelha via All-commits all-commits at lists.llvm.org
Mon Jul 15 09:16:23 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 106621b601d7dc7c4929fba293f7e5ffe6b92c58
      https://github.com/llvm/llvm-project/commit/106621b601d7dc7c4929fba293f7e5ffe6b92c58
  Author: Mikhail R. Gadelha <mikhail at igalia.com>
  Date:   2024-07-15 (Mon, 15 Jul 2024)

  Changed paths:
    M libc/test/UnitTest/LibcTest.cpp

  Log Message:
  -----------
  [libc][NFC] Fix printed test time in 32-bit systems (#98922)

clock() returns a clock_t, which is a long and might overflow in 32-bit
systems when the test takes a long time to run. Changing it to uint64_t
fixes this issue. Before:

[ RUN      ] LlvmLibcHashTest.Avalanche
[       OK ] LlvmLibcHashTest.Avalanche (18446744073709551138 ms)

After this patch:

[ RUN      ] LlvmLibcHashTest.Avalanche
[       OK ] LlvmLibcHashTest.Avalanche (4154 ms)



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