diff options
author | Vincent Ambo <mail@tazj.in> | 2021-09-21T10·03+0300 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2021-09-21T11·29+0300 |
commit | 43b1791ec601732ac31195df96781a848360a9ac (patch) | |
tree | daae8d638343295d2f1f7da955e556ef4c958864 /third_party/git/t/valgrind | |
parent | 2d8e7dc9d9c38127ec4ebd13aee8e8f586a43318 (diff) |
chore(3p/git): Unvendor git and track patches instead r/2903
This was vendored a long time ago under the expectation that keeping it in sync with cgit would be easier this way, but it has proven not to be a big issue. On the other hand, a vendored copy of git is an annoying maintenance burden. It is much easier to rebase the single (dottime) patch that we have. This removes the vendored copy of git and instead passes the git source code to cgit via `pkgs.srcOnly`, which includes the applied patch so that cgit can continue rendering dottime. Change-Id: If31f62dea7ce688fd1b9050204e9378019775f2b
Diffstat (limited to 'third_party/git/t/valgrind')
-rw-r--r-- | third_party/git/t/valgrind/.gitignore | 2 | ||||
-rwxr-xr-x | third_party/git/t/valgrind/analyze.sh | 127 | ||||
-rw-r--r-- | third_party/git/t/valgrind/default.supp | 51 | ||||
-rwxr-xr-x | third_party/git/t/valgrind/valgrind.sh | 40 |
4 files changed, 0 insertions, 220 deletions
diff --git a/third_party/git/t/valgrind/.gitignore b/third_party/git/t/valgrind/.gitignore deleted file mode 100644 index d4ae6676d159..000000000000 --- a/third_party/git/t/valgrind/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin/ -/templates diff --git a/third_party/git/t/valgrind/analyze.sh b/third_party/git/t/valgrind/analyze.sh deleted file mode 100755 index 2ffc80f72105..000000000000 --- a/third_party/git/t/valgrind/analyze.sh +++ /dev/null @@ -1,127 +0,0 @@ -#!/bin/sh - -# Get TEST_OUTPUT_DIRECTORY from GIT-BUILD-OPTIONS if it's there... -. "$(dirname "$0")/../../GIT-BUILD-OPTIONS" -# ... otherwise set it to the default value. -: ${TEST_OUTPUT_DIRECTORY=$(dirname "$0")/..} - -output= -count=0 -total_count=0 -missing_message= -new_line=' -' - -# start outputting the current valgrind error in $out_prefix.++$count, -# and the test case which failed in the corresponding .message file -start_output () { - test -z "$output" || return - - # progress - total_count=$(($total_count+1)) - test -t 2 && printf "\rFound %d errors" $total_count >&2 - - count=$(($count+1)) - output=$out_prefix.$count - : > $output - - echo "*** $1 ***" > $output.message -} - -finish_output () { - test ! -z "$output" || return - output= - - # if a test case has more than one valgrind error, we need to - # copy the last .message file to the previous errors - test -z "$missing_message" || { - while test $missing_message -lt $count - do - cp $out_prefix.$count.message \ - $out_prefix.$missing_message.message - missing_message=$(($missing_message+1)) - done - missing_message= - } -} - -# group the valgrind errors by backtrace -output_all () { - last_line= - j=0 - i=1 - while test $i -le $count - do - # output <number> <backtrace-in-one-line> - echo "$i $(tr '\n' ' ' < $out_prefix.$i)" - i=$(($i+1)) - done | - sort -t ' ' -k 2 | # order by <backtrace-in-one-line> - while read number line - do - # find duplicates, do not output backtrace twice - if test "$line" != "$last_line" - then - last_line=$line - j=$(($j+1)) - printf "\nValgrind error $j:\n\n" - cat $out_prefix.$number - printf "\nfound in:\n" - fi - # print the test case where this came from - printf "\n" - cat $out_prefix.$number.message - done -} - -handle_one () { - OLDIFS=$IFS - IFS="$new_line" - while read line - do - case "$line" in - # backtrace, possibly a new one - ==[0-9]*) - - # Does the current valgrind error have a message yet? - case "$output" in - *.message) - test -z "$missing_message" && - missing_message=$count - output= - esac - - start_output $(basename $1) - echo "$line" | - sed 's/==[0-9]*==/==valgrind==/' >> $output - ;; - # end of backtrace - '}') - test -z "$output" || { - echo "$line" >> $output - test $output = ${output%.message} && - output=$output.message - } - ;; - # end of test case - '') - finish_output - ;; - # normal line; if $output is set, print the line - *) - test -z "$output" || echo "$line" >> $output - ;; - esac - done < $1 - IFS=$OLDIFS - - # just to be safe - finish_output -} - -for test_script in "$TEST_OUTPUT_DIRECTORY"/test-results/*.out -do - handle_one $test_script -done - -output_all diff --git a/third_party/git/t/valgrind/default.supp b/third_party/git/t/valgrind/default.supp deleted file mode 100644 index 0a6724fcc45e..000000000000 --- a/third_party/git/t/valgrind/default.supp +++ /dev/null @@ -1,51 +0,0 @@ -{ - ignore-zlib-errors-cond - Memcheck:Cond - obj:*libz.so* -} - -{ - ignore-zlib-errors-value8 - Memcheck:Value8 - obj:*libz.so* -} - -{ - ignore-zlib-errors-value4 - Memcheck:Value4 - obj:*libz.so* -} - -{ - ignore-ldso-cond - Memcheck:Cond - obj:*ld-*.so -} - -{ - ignore-ldso-addr8 - Memcheck:Addr8 - obj:*ld-*.so -} - -{ - ignore-ldso-addr4 - Memcheck:Addr4 - obj:*ld-*.so -} - -{ - writing-data-from-zlib-triggers-even-more-errors - Memcheck:Param - write(buf) - obj:/lib/ld-*.so - fun:write_in_full - fun:write_buffer - fun:write_loose_object -} - -{ - ignore-sse-strlen-invalid-read-size - Memcheck:Addr4 - fun:copy_ref -} diff --git a/third_party/git/t/valgrind/valgrind.sh b/third_party/git/t/valgrind/valgrind.sh deleted file mode 100755 index 669ebaf68be0..000000000000 --- a/third_party/git/t/valgrind/valgrind.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -base=$(basename "$0") -case "$base" in -test-*) - program="$GIT_VALGRIND/../../t/helper/$base" - ;; -*) - program="$GIT_VALGRIND/../../$base" - ;; -esac - -TOOL_OPTIONS='--leak-check=no' - -test -z "$GIT_VALGRIND_ENABLED" && -exec "$program" "$@" - -case "$GIT_VALGRIND_MODE" in -memcheck-fast) - ;; -memcheck) - VALGRIND_VERSION=$(valgrind --version) - VALGRIND_MAJOR=$(expr "$VALGRIND_VERSION" : '[^0-9]*\([0-9]*\)') - VALGRIND_MINOR=$(expr "$VALGRIND_VERSION" : '[^0-9]*[0-9]*\.\([0-9]*\)') - test 3 -gt "$VALGRIND_MAJOR" || - test 3 -eq "$VALGRIND_MAJOR" -a 4 -gt "$VALGRIND_MINOR" || - TOOL_OPTIONS="$TOOL_OPTIONS --track-origins=yes" - ;; -*) - TOOL_OPTIONS="--tool=$GIT_VALGRIND_MODE" -esac - -exec valgrind -q --error-exitcode=126 \ - --gen-suppressions=all \ - --suppressions="$GIT_VALGRIND/default.supp" \ - $TOOL_OPTIONS \ - --log-fd=4 \ - --input-fd=4 \ - $GIT_VALGRIND_OPTIONS \ - "$program" "$@" |