Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Steadmon <steadmon@google.com>2019-10-05 01:08:21 +0300
committerJunio C Hamano <gitster@pobox.com>2019-10-05 11:53:51 +0300
commit87db61a4363ad9f42cf7b0d90ad13763dc01e3af (patch)
treee36e7c4db2607543164f8e543bb9e90e12c7aeb6 /t/t0212-trace2-event.sh
parent83e57b04e6ae3bc4c714812768f61bc41b1d56ad (diff)
trace2: write discard message to sentinel files
Add a new "discard" event type for trace2 event destinations. When the trace2 file count check creates a sentinel file, it will include the normal trace2 output in the sentinel, along with this new discard event. Writing this message into the sentinel file is useful for tracking how often the file count check triggers in practice. Bump up the event format version since we've added a new event type. Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0212-trace2-event.sh')
-rwxr-xr-xt/t0212-trace2-event.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t0212-trace2-event.sh b/t/t0212-trace2-event.sh
index bf75e06e30..7065a1b937 100755
--- a/t/t0212-trace2-event.sh
+++ b/t/t0212-trace2-event.sh
@@ -279,7 +279,9 @@ test_expect_success 'discard traces when there are too many files' '
) &&
echo git-trace2-discard >>expected_filenames.txt &&
ls trace_target_dir >ls_output.txt &&
- test_cmp expected_filenames.txt ls_output.txt
+ test_cmp expected_filenames.txt ls_output.txt &&
+ head -n1 trace_target_dir/git-trace2-discard | grep \"event\":\"version\" &&
+ head -n2 trace_target_dir/git-trace2-discard | tail -n1 | grep \"event\":\"too_many_files\"
'
test_done