All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>,
	git@vger.kernel.org, "Eric Sunshine" <sunshine@sunshineco.com>
Subject: Re: [PATCH 1/4] test-lib-functions: introduce test_line_count_cmd
Date: Mon, 14 Jun 2021 12:01:57 +0900	[thread overview]
Message-ID: <xmqqtum1ywre.fsf@gitster.g> (raw)
In-Reply-To: <878s3d286c.fsf@evledraar.gmail.com> (=?utf-8?B?IsOGdmFyIEFy?= =?utf-8?B?bmZqw7Zyw7A=?= Bjarmason"'s message of "Sun, 13 Jun 2021 15:36:11 +0200")

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> More generally speaking we have a bunch of helpers that have this
> potential issue/bug, in practice it's not a big deal.  A test that's
> being overly specific and doing a test_cmp on unbounded "find" output or
> whatever is likely buggy anyway.

Unless we are testing ".gitignore", "ls-files -o", or "git status".
Carving out $TRASH_DIRECTORY/.git/trash/ directory to store these
throwaway files would be less error prone from that point of view.

>> +		case "$1" in
>> +		--out)
>> +			outop="$2"
>> +			outval="$3"
>> +			;;
>> +		--err)
>> +			errop="$2"
>> +			errval="$3"
>> +			;;
>
> It looks like the end-state of the series leaves us with no user of the
> --err option; Maybe it's good to have it anyway for completeness, or
> just skip it? ...

I'd rather not to see --out added if we have not yet any use for the
other one.  When the time comes that we want to validate the error
stream, we may find that we want to check _both_, and we'd have to
discard dead code and replace with what we want, instead of just
adding what we want to a working code without dead code.

  reply	other threads:[~2021-06-14  3:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12  4:27 [PATCH 0/4] t: new helper test_line_count_cmd Đoàn Trần Công Danh
2021-06-12  4:27 ` [PATCH 1/4] test-lib-functions: introduce test_line_count_cmd Đoàn Trần Công Danh
2021-06-13  3:10   ` Eric Sunshine
2021-06-13  7:36     ` Đoàn Trần Công Danh
2021-06-13 13:28   ` Ævar Arnfjörð Bjarmason
2021-06-13 16:37     ` Đoàn Trần Công Danh
2021-06-13 18:18     ` Phillip Wood
2021-06-13 21:42       ` Felipe Contreras
2021-06-13 23:43       ` Eric Sunshine
2021-06-14  2:56         ` Junio C Hamano
2021-06-24 23:19         ` Ævar Arnfjörð Bjarmason
2021-06-13 13:36   ` Ævar Arnfjörð Bjarmason
2021-06-14  3:01     ` Junio C Hamano [this message]
2021-06-15 15:40     ` Đoàn Trần Công Danh
2021-06-12  4:27 ` [PATCH 2/4] t6402: use find(1) builtin to filter instead of grep Đoàn Trần Công Danh
2021-06-12  4:27 ` [PATCH 3/4] t6400: use test_line_count_cmd to count # of lines in stdout Đoàn Trần Công Danh
2021-06-12  4:33   ` Bagas Sanjaya
2021-06-13  7:39     ` Đoàn Trần Công Danh
2021-06-13  3:39   ` Eric Sunshine
2021-06-13  7:42     ` Đoàn Trần Công Danh
2021-06-12  4:27 ` [PATCH 4/4] t6402: " Đoàn Trần Công Danh
2021-06-13  3:43   ` Eric Sunshine

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=xmqqtum1ywre.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --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.