[libc-commits] [PATCH] D151450: [libc][test] Drastically reduce mem test runtime

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu May 25 07:36:56 PDT 2023


gchatelet updated this revision to Diff 525601.
gchatelet added a comment.

- fixed a double increment


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151450

Files:
  libc/test/src/string/bcopy_test.cpp


Index: libc/test/src/string/bcopy_test.cpp
===================================================================
--- libc/test/src/string/bcopy_test.cpp
+++ libc/test/src/string/bcopy_test.cpp
@@ -85,7 +85,7 @@
   LargeBuffer Buffer;
   Randomize(Buffer);
   for (int Size = 0; Size < kMaxSize; ++Size)
-    for (int Overlap = -1; Overlap < Size; ++Overlap) {
+    for (int Overlap = -1; Overlap < Size;) {
       ASSERT_TRUE(CheckMemmove<Adaptor>(Buffer, Size, Overlap));
       // Prevent quadratic behavior by skipping offset above kDenseOverlap.
       if (Overlap > kDenseOverlap)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151450.525601.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230525/029d3c71/attachment.bin>


More information about the libc-commits mailing list