From 016714c2c0cb9f7dc340fc39e6c310153426df95 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Mon, 11 Apr 2016 07:50:31 +1000 Subject: [PATCH] tests/regexp: Remove regexp-22.1 This test is unreliable since the OS may perform additonal caching. Signed-off-by: Steve Bennett --- tests/regexp.test | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/tests/regexp.test b/tests/regexp.test index 50a7772..94107eb 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -653,38 +653,6 @@ test regexp-21.15 {Replace literal backslash} { set value } "\\abc\\def" -test regexp-22.1 {effect of caching} jim { - - set filedata {BEGIN_TABLE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; END_TABLE} - - # Note: use 2 REs because often libc will cache a single regcomp() result - - # t1 should be faster because the compiled re can be cached. - set re1 "END_TABLE" - set re2 "BEGIN_TABLE" - - set t1 [time { - regexp -inline -all $re1 $filedata - regexp -inline -all $re2 $filedata - } 10000] - - # t2 should be slower since the re's need to be recompiled every time - set t2 [time { - set re1 END - append re1 _TABLE - regexp -inline -all $re1 $filedata - set re2 BEGIN - append re2 _TABLE - regexp -inline -all $re2 $filedata - } 10000] - - set t1 [lindex $t1 0] - set t2 [lindex $t2 0] - - # If these two times are within 20% of each other, caching isn't working - expr {$t2 * 1.0 / $t1 < 1.2 && $t1 * 1.0 / $t2 < 1.2} -} {0} - # Tests resulting from bugs reported by users test reg-31.1 {[[:xdigit:]] behaves correctly when followed by [[:space:]]} { set str {2:::DebugWin32} -- 2.11.4.GIT