diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-12-12 17:55:06 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-12-12 18:05:10 -0800 |
commit | a1ba7ec6b0cd830be362a1f8b7d37214011a16ad (patch) | |
tree | 0455852cddf0fcfb41c633e30b63bb9d4ea8b194 /ext/File-DosGlob | |
parent | 1b304fad87be018601a74e9cdc28a71a58992b90 (diff) | |
download | perl-a1ba7ec6b0cd830be362a1f8b7d37214011a16ad.tar.gz |
Fix occasional failures in svleak.t and DosGlob.t
If the random number of ops happens to be 0 the first time, then we
end up with a false positive, as evaluating '$x+<*>' after '<*>' will
vivify the *x glob.
Diffstat (limited to 'ext/File-DosGlob')
-rw-r--r-- | ext/File-DosGlob/t/DosGlob.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/File-DosGlob/t/DosGlob.t b/ext/File-DosGlob/t/DosGlob.t index b3302b8390..edae75243a 100644 --- a/ext/File-DosGlob/t/DosGlob.t +++ b/ext/File-DosGlob/t/DosGlob.t @@ -147,9 +147,9 @@ SKIP: { # Use a random number of ops, so that the glob op does not reuse the # same address each time, giving us false passes. my($count,$count2); - eval '$x+'x(rand() * 100) . '<*>'; + eval '$x+'x(1+rand() * 100) . '<*>'; $count = sv_count(); - eval '$x+'x(rand() * 100) . '<*>'; + eval '$x+'x(1+rand() * 100) . '<*>'; $count2 = sv_count(); is $count2, $count, 'no leak when partly iterated caller is freed'; } |