git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] mingw: verify that paths are not mistaken for remote nicknames
Date: Tue, 30 May 2017 13:46:52 +0900	[thread overview]
Message-ID: <xmqqpoerc5oj.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <34029b29-9f65-78c0-c2ed-649b179a79ac@kdbg.org> (Johannes Sixt's message of "Mon, 29 May 2017 23:02:15 +0200")

Johannes Sixt <j6t@kdbg.org> writes:

>> Doesn't this need test_i18ngrep?:
>
> Good catch! It would be this one in warn_on_inaccessible:
>
>>      wrapper.c:581:  warning_errno(_("unable to access '%s'"), path);
>
> But actually, I'm more worried about the unholy mix of
> one-test-first-then-skip_all-later that occurs in this test script (I
> do not mean the skip_all that is visible in the context, there are
> others later). I think there was some buzz recently that prove only
> understands a summary line that reads "1..0", but here we would see
> "1..1". What to do? Reorganize the test script? Dscho, any ideas?

For now I've queued this on top of 1/2, so that suggestions are not
lost, and then tweaked 2/2 (as context for the patch to the test
changes).  

Either an ack or a reroll is appreciated (I do not think we'd
terribly mind if this test were added to another script, or if this
test were skipped when UNC path cannot be determined even though it
does not need that prereq.  Also UNC_PATH can become prereq that is
tested by individual test in this script and the new test can be
added without requiring that prereq).

Thanks.

 t/t5580-clone-push-unc.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/t5580-clone-push-unc.sh b/t/t5580-clone-push-unc.sh
index fd719a209e..944730cddc 100755
--- a/t/t5580-clone-push-unc.sh
+++ b/t/t5580-clone-push-unc.sh
@@ -8,12 +8,6 @@ if ! test_have_prereq MINGW; then
 	test_done
 fi
 
-test_expect_failure 'remote nick cannot contain backslashes' '
-	BACKSLASHED="$(pwd | tr / \\\\)" &&
-	git ls-remote "$BACKSLASHED" >out 2>err &&
-	! grep "unable to access" err
-'
-
 UNCPATH="$(pwd)"
 case "$UNCPATH" in
 [A-Z]:*)
@@ -51,4 +45,10 @@ test_expect_success push '
 	test "$rev" = "$(git rev-parse --verify refs/heads/to-push)"
 '
 
+test_expect_failure 'remote nick cannot contain backslashes' '
+	BACKSLASHED="$(pwd | tr / \\\\)" &&
+	git ls-remote "$BACKSLASHED" >out 2>err &&
+	test_i18ngrep ! "unable to access" err
+'
+
 test_done
-- 
2.13.0-493-g9105ebc082


  parent reply	other threads:[~2017-05-30  4:47 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22  6:11 What's cooking in git.git (May 2017, #06; Mon, 22) Junio C Hamano
2017-05-22 17:42 ` Jonathan Nieder
2017-05-23  3:33   ` Junio C Hamano
2017-05-23  5:02     ` Jonathan Nieder
2017-05-23  5:14       ` Junio C Hamano
2017-05-25 12:58 ` Duy Nguyen
2017-05-26  2:56   ` Junio C Hamano
2017-05-26  3:34   ` [PATCH v3 00/13] reporting unexpected errors after (f)open Junio C Hamano
2017-05-26  3:34     ` [PATCH v3 01/13] git_fopen: fix a sparse 'not declared' warning Junio C Hamano
2017-05-26  3:34     ` [PATCH v3 02/13] use xfopen() in more places Junio C Hamano
2017-05-26  3:35     ` [PATCH v3 03/13] clone: use xfopen() instead of fopen() Junio C Hamano
2017-05-26  3:35     ` [PATCH v3 04/13] config.mak.uname: set FREAD_READS_DIRECTORIES for Linux and FreeBSD Junio C Hamano
2017-05-26  3:35     ` [PATCH v3 05/13] config.mak.uname: set FREAD_READS_DIRECTORIES for Darwin, too Junio C Hamano
2017-05-30 18:51       ` Stefan Beller
2017-05-30 23:14         ` Junio C Hamano
2017-05-30 23:32           ` Stefan Beller
2017-05-26  3:35     ` [PATCH v3 06/13] wrapper.c: add and use warn_on_fopen_errors() Junio C Hamano
2017-05-26  3:35     ` [PATCH v3 07/13] wrapper.c: add and use fopen_or_warn() Junio C Hamano
2017-05-26  3:35     ` [PATCH v3 08/13] wrapper.c: make warn_on_inaccessible() static Junio C Hamano
2017-05-26  3:35     ` [PATCH v3 09/13] print errno when reporting a system call error Junio C Hamano
2017-05-26  3:35     ` [PATCH v3 10/13] rerere.c: move error_errno() closer to the source system call Junio C Hamano
2017-05-30 18:58       ` Stefan Beller
2017-05-26  3:35     ` [PATCH v3 11/13] log: fix memory leak in open_next_file() Junio C Hamano
2017-05-26  3:35     ` [PATCH v3 12/13] wrapper: factor out is_missing_file_error() Junio C Hamano
2017-05-30  0:31       ` [PATCH 1/2] compat-util: is_missing_file_error() Junio C Hamano
2017-05-30  0:32         ` [PATCH 2/2] treewide: use is_missing_file_error() where ENOENT and ENOTDIR are checked Junio C Hamano
2017-05-26  3:35     ` [PATCH v3 13/13] is_missing_file_error(): work around EINVAL on Windows Junio C Hamano
2017-05-29 20:25       ` [PATCH 1/2] mingw: verify that paths are not mistaken for remote nicknames Johannes Sixt
2017-05-29 20:27         ` [PATCH 2/2] mingw_fopen: report ENOENT for invalid file names Johannes Sixt
2017-05-29 20:40         ` [PATCH 1/2] mingw: verify that paths are not mistaken for remote nicknames Ævar Arnfjörð Bjarmason
2017-05-29 21:02           ` Johannes Sixt
2017-05-29 21:59             ` Ramsay Jones
2017-05-30  0:03               ` Junio C Hamano
2017-05-30 13:40                 ` Ramsay Jones
2017-05-29 23:53             ` Junio C Hamano
2017-05-30  4:46             ` Junio C Hamano [this message]
2017-05-30 20:35               ` Johannes Sixt
2017-05-30  0:29         ` Junio C Hamano
2017-05-30 19:13       ` [PATCH v3 13/13] is_missing_file_error(): work around EINVAL on Windows Stefan Beller
2017-05-30 23:17         ` Junio C Hamano
2017-05-30 23:32           ` Stefan Beller

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=xmqqpoerc5oj.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=johannes.schindelin@gmx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).