1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00
lvm2/unit-tests/mm/check_results
Joe Thornber 52e1564fdd [MM] Make valgrind aware of the pool allocators
./configure with --enable-valgrind-pool to enable this.
2010-08-09 10:56:01 +00:00

32 lines
549 B
Plaintext
Executable File

#!/usr/bin/env ruby1.9
require 'pp'
patterns = [
/Invalid read of size 1/,
/Invalid write of size 1/,
/Invalid read of size 1/,
/still reachable: [0-9,]+ bytes in 3 blocks/
]
lines = STDIN.readlines
pp lines
result = catch(:done) do
patterns.each do |pat|
loop do
throw(:done, false) if lines.size == 0
line = lines.shift
if line =~ pat
STDERR.puts "matched #{pat}"
break;
end
end
end
throw(:done, true)
end
exit(result ? 0 : 1)