All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Steadmon <steadmon@google.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>, Taylor Blau <me@ttaylorr.com>
Subject: Re: [PATCH v2 2/2] connect, protocol: log negotiated protocol version
Date: Fri, 6 Aug 2021 14:15:58 -0700	[thread overview]
Message-ID: <YQ2mjmwoRYO4jqaH@google.com> (raw)
In-Reply-To: <CAPig+cSqm5cUmAVG6f73oZ+mi9pBJrOg2va2a_Op4=wNFyHfZQ@mail.gmail.com>

On 2021.08.04 18:28, Eric Sunshine wrote:
> On Wed, Aug 4, 2021 at 6:17 PM Josh Steadmon <steadmon@google.com> wrote:
> > It is useful for performance monitoring and debugging purposes to know
> > the wire protocol used for remote operations. This may differ from the
> > version set in local configuration due to differences in version and/or
> > configuration between the server and the client. Therefore, log the
> > negotiated wire protocol version via trace2, for both clients and
> > servers.
> >
> > Signed-off-by: Josh Steadmon <steadmon@google.com>
> > ---
> > diff --git a/t/t5705-session-id-in-capabilities.sh b/t/t5705-session-id-in-capabilities.sh
> > @@ -73,6 +74,17 @@ do
> > +       test_expect_success "client & server log negotiated version (v${PROTO})" '
> > +               test_when_finished "rm -rf local tr2-client-events tr2-server-events" &&
> > +               cp -r "$LOCAL_PRISTINE" local &&
> > +               GIT_TRACE2_EVENT="$(pwd)/tr2-client-events" \
> > +               git -c protocol.version=$PROTO -C local fetch \
> > +                       --upload-pack "GIT_TRACE2_EVENT=\"$(pwd)/tr2-server-events\" git-upload-pack" \
> > +                       origin &&
> > +               test "$(grep \"key\":\"negotiated-version\",\"value\":\"$PROTO\" tr2-client-events)" &&
> > +               test "$(grep \"key\":\"negotiated-version\",\"value\":\"$PROTO\" tr2-server-events)"
> > +       '
> >  done
> 
> What are these `test` commands actually testing? Did you mean `test
> -n`? Or, even better, just plain `grep` (not within a
> command-substitution)?

Yes, sorry about that, just plain grep is best here. This was due to a
quick copy & paste modification, I should have spent a bit more time
thinking about the test case.

Will be fixed in V3.

  reply	other threads:[~2021-08-06 21:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 20:13 [PATCH] connect, protocol: log negotiated protocol version Josh Steadmon
2021-08-03 21:12 ` Taylor Blau
2021-08-04 21:37   ` Josh Steadmon
2021-08-04 21:56     ` Junio C Hamano
2021-08-04 22:17 ` [PATCH v2 0/2] " Josh Steadmon
2021-08-04 22:17   ` [PATCH v2 1/2] protocol: add protocol version formatting function Josh Steadmon
2021-08-04 23:32     ` Ævar Arnfjörð Bjarmason
2021-08-04 22:17   ` [PATCH v2 2/2] connect, protocol: log negotiated protocol version Josh Steadmon
2021-08-04 22:28     ` Eric Sunshine
2021-08-06 21:15       ` Josh Steadmon [this message]
2021-08-04 23:40     ` Ævar Arnfjörð Bjarmason
2021-08-05  1:26       ` Taylor Blau
2021-08-05  2:47         ` Ævar Arnfjörð Bjarmason
2021-08-06 21:22           ` Josh Steadmon
2021-08-10 17:20 ` [PATCH v3] " Josh Steadmon
2021-08-16 18:03   ` Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YQ2mjmwoRYO4jqaH@google.com \
    --to=steadmon@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.