mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-16 09:46:55 +00:00
btrfs-progs: tests: extend scan-results.sh to scan only a given file
Scanning all results is meant for the whole testsuite, we'd like to make it more fine grained to verify them once a test is run via the test running wrappers. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
e0263f2b31
commit
7a7df06f98
@ -1,9 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Look for some frequent error message templates in test logs
|
||||||
|
#
|
||||||
|
# Usage: $0 [test-log.txt]
|
||||||
|
|
||||||
# look for some error messages in all test logs
|
scan_log() {
|
||||||
|
local file="$1"
|
||||||
|
|
||||||
for i in *.txt; do
|
echo "Scanning $file"
|
||||||
echo "Scanning $i"
|
|
||||||
last=
|
last=
|
||||||
while read line; do
|
while read line; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
@ -17,5 +20,16 @@ for i in *.txt; do
|
|||||||
*extent\ buffer\ leak*) echo "EXTENT BUFFER LEAK: $last" ;;
|
*extent\ buffer\ leak*) echo "EXTENT BUFFER LEAK: $last" ;;
|
||||||
*) : ;;
|
*) : ;;
|
||||||
esac
|
esac
|
||||||
done < "$i"
|
done < "$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Scan only the given file
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
scan_log "$1"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Scan all existing test logs
|
||||||
|
for file in *.txt; do
|
||||||
|
scan_log "$file"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user