about summary refs log tree commit homepage
path: root/t/t0005-large-file-response.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-05-28 03:42:15 +0000
committerEric Wong <normalperson@yhbt.net>2010-05-28 03:42:15 +0000
commit49c45c6ea09464862779b09ad7f22c30977a2060 (patch)
treecde57fe90af752582b9894c25b1a6b0dbf341868 /t/t0005-large-file-response.sh
parent86d5209d0ebdd597ffa19bff5f227ca10ba383c6 (diff)
downloadrainbows-49c45c6ea09464862779b09ad7f22c30977a2060.tar.gz
it's hard to make this test reliable, but try to
add a small fudge factor based on the MRI default
GC malloc limit.
Diffstat (limited to 't/t0005-large-file-response.sh')
-rwxr-xr-xt/t0005-large-file-response.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/t0005-large-file-response.sh b/t/t0005-large-file-response.sh
index d25134e..b663e65 100755
--- a/t/t0005-large-file-response.sh
+++ b/t/t0005-large-file-response.sh
@@ -72,8 +72,12 @@ t_begin "shutdown server" && {
 
 t_begin "compare RSS before and after" && {
         diff=$(( $rss_after - $rss_before ))
+
+        # default GC malloc limit in MRI:
+        fudge=$(( 8 * 1024 * 1024 ))
+
         t_info "test diff=$diff < orig=$random_blob_size"
-        test $diff -le $random_blob_size
+        test $diff -le $(( $random_blob_size + $fudge ))
 }
 
 dbgcat r_err