diff options
Diffstat (limited to 'fluent-bit/lib/librdkafka-2.1.0/tests/parse-refcnt.sh')
-rwxr-xr-x | fluent-bit/lib/librdkafka-2.1.0/tests/parse-refcnt.sh | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/fluent-bit/lib/librdkafka-2.1.0/tests/parse-refcnt.sh b/fluent-bit/lib/librdkafka-2.1.0/tests/parse-refcnt.sh deleted file mode 100755 index f77b2a12..00000000 --- a/fluent-bit/lib/librdkafka-2.1.0/tests/parse-refcnt.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# -# - -set -e - -# Parse a log with --enable-refcnt output enabled. - -log="$1" - -if [[ ! -f $log ]]; then - echo "Usage: $0 <log-file>" - exit 1 -fi - - -# Create a file with all refcnt creations -cfile=$(mktemp) -grep 'REFCNT.* 0 +1:' $log | awk '{print $6}' | sort > $cfile - -# .. and one file with all refcnt destructions -dfile=$(mktemp) -grep 'REFCNT.* 1 -1:' $log | awk '{print $6}' | sort > $dfile - -# For each refcnt that was never destructed (never reached 0), find it -# in the input log. - -seen= -for p in $(grep -v -f $dfile $cfile) ; do - echo "=== REFCNT $p never reached 0 ===" - grep -nH "$p" $log - echo "" - seen=yes -done - -rm -f "$cfile" "$dfile" - -if [[ -z $seen ]]; then - echo "No refcount leaks found" - exit 0 -fi - -exit 2 |