]> granicus.if.org Git - vim/commitdiff
patch 8.1.1058: memory usage test may still fail on some systems v8.1.1058
authorBram Moolenaar <Bram@vim.org>
Wed, 27 Mar 2019 20:41:36 +0000 (21:41 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 27 Mar 2019 20:41:36 +0000 (21:41 +0100)
Problem:    Memory usage test may still fail on some systems.
Solution:   Use 98% of the lower limit. (Christian Brabandt)

src/testdir/test_memory_usage.vim
src/version.c

index 565a1155426ceea337ea17e3aba85c40169e041b..3775552b54fdcab2d6518c56c43fce16f17f4e8d 100644 (file)
@@ -97,9 +97,11 @@ func Test_memory_func_capture_vargs()
   let after = s:monitor_memory_usage(vim.pid)
 
   " Estimate the limit of max usage as 2x initial usage.
-  call assert_inrange(before, 2 * before, after.max)
-  " In this case, garbage collecting is not needed.  The value might fluctuate
-  " a bit, allow for 3% tolerance.
+  " The lower limit can fluctuate a bit, use 98%.
+  call assert_inrange(before * 98 / 100, 2 * before, after.max)
+
+  " In this case, garbage collecting is not needed.
+  " The value might fluctuate a bit, allow for 3% tolerance.
   let lower = after.last * 97 / 100
   let upper = after.last * 103 / 100
   call assert_inrange(lower, upper, after.max)
index 8a9d8b98a4ff9e70413ff791079d011bff6b76b5..541a02f830a9a8dea9861e2f12e0410b3508dd62 100644 (file)
@@ -775,6 +775,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1058,
 /**/
     1057,
 /**/