From 782689d5eb24cd73d2dfaef376d4412246ec6cfa Mon Sep 17 00:00:00 2001 From: sebres Date: Wed, 29 Jan 2020 17:02:16 +0000 Subject: small amend (comments only) --- tests/cmdIL.test | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/cmdIL.test b/tests/cmdIL.test index c2b4615..b57f1ac 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -477,7 +477,7 @@ proc test-with-limit args { catch {close $pipe} tcltest::Skip "prlimit: error - [regsub {^\s*([^\n]*).*$} $msg {\1}]" } - # if no error (enough memory), or error by list creation - add it as skipped test: + # execute body, close process and return: catch { chan configure $pipe -buffering line puts $pipe "puts \[$body\]" @@ -493,13 +493,14 @@ proc test-with-limit args { test cmdIL-5.7 {lsort memory exhaustion} -constraints {prlimit} -body { # test it in child process (with limited address space): if {![catch { - # ca. 80MB extra memory on x64 system would be enough to sort the half (2M) items: + # ca. 80MB extra memory on x64 system would be not enough to sort 4M items (the half 2M only): test-with-limit -memory [expr {$tcl_platform(pointerSize)*3 * 2000000 + $tcl_platform(pointerSize)*4000000}] { # create list and get length (avoid too long output in interactive shells): llength [set l [lrepeat 4000000 ""]] # test OOM: llength [lsort $l] } + # if no error (enough memory), or error by list creation - add it as skipped test: } result] || [regexp {^(?:list creation failed|unable to (?:re)?alloc)} $result]} { tcltest::Skip "prlimit: wrong AS-limit, result: $result" } -- cgit v0.12