All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 17/19] mingw: fix git-svn tests that expect chmod to work
Date: Sun, 24 Jan 2016 18:14:27 -0800	[thread overview]
Message-ID: <xmqq1t96be2k.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <9045a31ec16da672a74d9b1e0b65807d21ef277e.1453650173.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Sun, 24 Jan 2016 16:45:47 +0100 (CET)")

Johannes Schindelin <johannes.schindelin@gmx.de> writes:

> From: 마누엘 <nalla@users.noreply.github.com>
>
> Some git-svn tests expect that the executable bit of files can be
> toggled. On Windows, this is not possible because Windows' Access
> Control Lists are much more fine-grained than the POSIX permission
> concept. Let's just not try to flip the executable bit.

Most of the changes are protected by !POSIXPERM but one of them
seems to use MINGW, which looks inconsistent and I suspect was not a
distinction made on purpose.  The above description sounds to me
that the !POSIXPERM prerequisite is the right thing to use.

I am not sure if it is a good idea to sprinkle test-have-prereq and
make the test script test different things on different platforms,
though.



> This lets t9118-git-svn-funky-branch-names.sh and
> t9124-git-svn-dcommit-auto-props.sh pass in Git for Windows' SDK,
> and partially fixes t9100-git-svn-basic.sh.
>
> Signed-off-by: 마누엘 <nalla@users.noreply.github.com>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  t/t9100-git-svn-basic.sh              |  5 ++++-
>  t/t9118-git-svn-funky-branch-names.sh | 12 +++++++++---
>  t/t9124-git-svn-dcommit-auto-props.sh | 20 ++++++++++++++++----
>  3 files changed, 29 insertions(+), 8 deletions(-)
>
> diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
> index dbb440b..bca7ec8 100755
> --- a/t/t9100-git-svn-basic.sh
> +++ b/t/t9100-git-svn-basic.sh
> @@ -38,7 +38,10 @@ test_expect_success \
>  		mkdir bar &&
>  		echo "zzz" >bar/zzz &&
>  		echo "#!/bin/sh" >exec.sh &&
> -		chmod +x exec.sh &&
> +		{
> +			test_have_prereq !POSIXPERM ||
> +			chmod +x exec.sh
> +		} &&
>  		svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
>  	) &&
>  	rm -rf import &&
> diff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh
> index a221915..49775a5 100755
> --- a/t/t9118-git-svn-funky-branch-names.sh
> +++ b/t/t9118-git-svn-funky-branch-names.sh
> @@ -23,8 +23,11 @@ test_expect_success 'setup svnrepo' '
>  	              "$svnrepo/pr ject/branches/$scary_uri" &&
>  	svn_cmd cp -m "leading dot" "$svnrepo/pr ject/trunk" \
>  			"$svnrepo/pr ject/branches/.leading_dot" &&
> -	svn_cmd cp -m "trailing dot" "$svnrepo/pr ject/trunk" \
> -			"$svnrepo/pr ject/branches/trailing_dot." &&
> +	{
> +		test_have_prereq MINGW ||
> +		svn_cmd cp -m "trailing dot" "$svnrepo/pr ject/trunk" \
> +			"$svnrepo/pr ject/branches/trailing_dot."
> +	} &&
>  	svn_cmd cp -m "trailing .lock" "$svnrepo/pr ject/trunk" \
>  			"$svnrepo/pr ject/branches/trailing_dotlock.lock" &&
>  	svn_cmd cp -m "reflog" "$svnrepo/pr ject/trunk" \
> @@ -45,7 +48,10 @@ test_expect_success 'test clone with funky branch names' '
>  		git rev-parse "refs/remotes/origin/more%20fun%20plugin!" &&
>  		git rev-parse "refs/remotes/origin/$scary_ref" &&
>  		git rev-parse "refs/remotes/origin/%2Eleading_dot" &&
> -		git rev-parse "refs/remotes/origin/trailing_dot%2E" &&
> +		{
> +			test_have_prereq MINGW ||
> +			git rev-parse "refs/remotes/origin/trailing_dot%2E"
> +		} &&
>  		git rev-parse "refs/remotes/origin/trailing_dotlock%2Elock" &&
>  		git rev-parse "refs/remotes/origin/$non_reflog"
>  	)
> diff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh
> index aa841e1..c851121 100755
> --- a/t/t9124-git-svn-dcommit-auto-props.sh
> +++ b/t/t9124-git-svn-dcommit-auto-props.sh
> @@ -35,7 +35,10 @@ test_expect_success 'enable auto-props config' '
>  
>  test_expect_success 'add files matcihng auto-props' '
>  	echo "#!$SHELL_PATH" >exec1.sh &&
> -	chmod +x exec1.sh &&
> +	{
> +		test_have_prereq !POSIXPERM ||
> +		chmod +x exec1.sh
> +	} &&
>  	echo "hello" >hello.txt &&
>  	echo bar >bar &&
>  	git add exec1.sh hello.txt bar &&
> @@ -49,7 +52,10 @@ test_expect_success 'disable auto-props config' '
>  
>  test_expect_success 'add files matching disabled auto-props' '
>  	echo "#$SHELL_PATH" >exec2.sh &&
> -	chmod +x exec2.sh &&
> +	{
> +		test_have_prereq !POSIXPERM ||
> +		chmod +x exec2.sh
> +	} &&
>  	echo "world" >world.txt &&
>  	echo zot >zot &&
>  	git add exec2.sh world.txt zot &&
> @@ -65,7 +71,10 @@ test_expect_success 'check resulting svn repository' '
>  	cd svnrepo &&
>  
>  	# Check properties from first commit.
> -	test "x$(svn_cmd propget svn:executable exec1.sh)" = "x*" &&
> +	{
> +		test_have_prereq !POSIXPERM ||
> +		test "x$(svn_cmd propget svn:executable exec1.sh)" = "x*"
> +	} &&
>  	test "x$(svn_cmd propget svn:mime-type exec1.sh)" = \
>  	     "xapplication/x-shellscript" &&
>  	test "x$(svn_cmd propget svn:mime-type hello.txt)" = "xtext/plain" &&
> @@ -73,7 +82,10 @@ test_expect_success 'check resulting svn repository' '
>  	test "x$(svn_cmd propget svn:mime-type bar)" = "x" &&
>  
>  	# Check properties from second commit.
> -	test "x$(svn_cmd propget svn:executable exec2.sh)" = "x*" &&
> +	{
> +		test_have_prereq !POSIXPERM ||
> +		test "x$(svn_cmd propget svn:executable exec2.sh)" = "x*"
> +	} &&
>  	test "x$(svn_cmd propget svn:mime-type exec2.sh)" = "x" &&
>  	test "x$(svn_cmd propget svn:mime-type world.txt)" = "x" &&
>  	test "x$(svn_cmd propget svn:eol-style world.txt)" = "x" &&

  reply	other threads:[~2016-01-25  2:14 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-24 15:43 [PATCH 00/19] Let Git's tests pass on Windows Johannes Schindelin
2016-01-24 15:43 ` [PATCH 01/19] mingw: let's use gettext with MSYS2 Johannes Schindelin
2016-01-25  1:42   ` Junio C Hamano
2016-01-25 16:16     ` Johannes Schindelin
2016-01-25 18:53       ` Junio C Hamano
2016-01-24 15:43 ` [PATCH 02/19] mingw: do not trust MSYS2's MinGW gettext.sh Johannes Schindelin
2016-01-24 15:43 ` [PATCH 03/19] Git.pm: stop assuming that absolute paths start with a slash Johannes Schindelin
2016-01-24 15:43 ` [PATCH 04/19] mingw: factor out Windows specific environment setup Johannes Schindelin
2016-01-24 15:43 ` [PATCH 05/19] mingw: prepare the TMPDIR environment variable for shell scripts Johannes Schindelin
2016-01-25  2:11   ` Eric Sunshine
2016-01-26  8:38     ` Johannes Schindelin
2016-01-24 15:44 ` [PATCH 06/19] mingw: try to delete target directory before renaming Johannes Schindelin
2016-01-24 17:42   ` Philip Oakley
2016-01-25  6:59     ` Johannes Schindelin
2016-01-25 18:55       ` Junio C Hamano
2016-01-26  8:14         ` Johannes Schindelin
2016-01-24 15:44 ` [PATCH 07/19] mingw: let lstat() fail with errno == ENOTDIR when appropriate Johannes Schindelin
2016-01-24 15:44 ` [PATCH 08/19] mingw: fix t5601-clone.sh Johannes Schindelin
2016-01-24 15:44 ` [PATCH 09/19] mingw: accomodate t0060-path-utils for MSYS2 Johannes Schindelin
2016-01-24 19:51   ` Johannes Sixt
2016-01-25 15:39     ` Johannes Schindelin
2016-01-24 15:44 ` [PATCH 10/19] mingw: disable mkfifo-based tests Johannes Schindelin
2016-01-24 15:44 ` [PATCH 11/19] tests: turn off git-daemon tests if FIFOs are not available Johannes Schindelin
2016-01-24 15:45 ` [PATCH 12/19] mingw: do not use symlinks with SVN in t9100 Johannes Schindelin
2016-01-25  1:51   ` Junio C Hamano
2016-01-25 16:53     ` Johannes Schindelin
2016-01-24 15:45 ` [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508 Johannes Schindelin
2016-01-25  2:03   ` Junio C Hamano
2016-01-25  6:22     ` Eric Sunshine
2016-01-25 18:50       ` Junio C Hamano
2016-01-26  6:53         ` Johannes Schindelin
2016-01-25 16:30     ` Johannes Schindelin
2016-01-25 17:04       ` Johannes Schindelin
2016-01-24 15:45 ` [PATCH 14/19] mingw: fix t9700's assumption about directory separators Johannes Schindelin
2016-01-24 15:45 ` [PATCH 15/19] mingw: work around pwd issues in the tests Johannes Schindelin
2016-01-24 15:45 ` [PATCH 16/19] mingw: avoid absolute path in t0008 Johannes Schindelin
2016-01-25  2:11   ` Junio C Hamano
2016-01-25 16:48     ` Johannes Schindelin
2016-01-25 19:31       ` Ray Donnelly
2016-01-25 22:20       ` Junio C Hamano
2016-01-26  8:00         ` Johannes Schindelin
2016-01-24 15:45 ` [PATCH 17/19] mingw: fix git-svn tests that expect chmod to work Johannes Schindelin
2016-01-25  2:14   ` Junio C Hamano [this message]
2016-01-26  6:31     ` Johannes Schindelin
2016-01-26 17:42       ` Junio C Hamano
2016-01-24 15:45 ` [PATCH 18/19] mingw: skip a couple of git-svn tests that cannot pass on Windows Johannes Schindelin
2016-01-25  2:16   ` Junio C Hamano
2016-01-26  6:45     ` Johannes Schindelin
2016-01-24 15:45 ` [PATCH 19/19] mingw: do not bother to test funny file names Johannes Schindelin
2016-01-25  1:34 ` [PATCH 00/19] Let Git's tests pass on Windows Junio C Hamano
2016-01-25 15:45   ` Johannes Schindelin
2016-01-26 14:34 ` [PATCH v2 " Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 01/19] mingw: let's use gettext with MSYS2 Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 02/19] mingw: do not trust MSYS2's MinGW gettext.sh Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 03/19] Git.pm: stop assuming that absolute paths start with a slash Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 04/19] mingw: factor out Windows specific environment setup Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 05/19] mingw: prepare the TMPDIR environment variable for shell scripts Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 06/19] mingw: try to delete target directory before renaming Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 07/19] mingw: let lstat() fail with errno == ENOTDIR when appropriate Johannes Schindelin
2016-01-26 14:34   ` [PATCH v2 08/19] mingw: fix t5601-clone.sh Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 09/19] mingw: accomodate t0060-path-utils for MSYS2 Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 10/19] mingw: disable mkfifo-based tests Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 11/19] tests: turn off git-daemon tests if FIFOs are not available Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 12/19] mingw: skip test in t1508 that fails due to path conversion Johannes Schindelin
2016-01-26 22:02     ` Junio C Hamano
2016-01-27  8:50       ` Johannes Schindelin
2016-01-27 20:23         ` Junio C Hamano
2016-01-28  7:58           ` Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 13/19] mingw: fix t9700's assumption about directory separators Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 14/19] mingw: work around pwd issues in the tests Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 15/19] Avoid absolute path in t0008 Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 16/19] mingw: mark t9100's test cases with appropriate prereqs Johannes Schindelin
2016-01-26 21:50     ` Junio C Hamano
2016-01-27 16:02       ` Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 17/19] mingw: avoid illegal filename in t9118 Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 18/19] mingw: handle the missing POSIXPERM prereq in t9124 Johannes Schindelin
2016-01-26 22:05     ` Junio C Hamano
2016-01-27  9:20       ` Johannes Schindelin
2016-01-26 14:35   ` [PATCH v2 19/19] mingw: do not bother to test funny file names Johannes Schindelin
2016-01-26 20:03     ` Eric Sunshine
2016-01-26 20:24       ` Junio C Hamano
2016-01-27  8:33       ` Johannes Schindelin
2016-01-26 22:12   ` [PATCH v2 00/19] Let Git's tests pass on Windows Junio C Hamano
2016-01-27  8:38     ` Johannes Schindelin
2016-01-27 20:24       ` Junio C Hamano
2016-01-27 16:19   ` [PATCH v3 00/20] " Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 01/20] mingw: let's use gettext with MSYS2 Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 02/20] mingw: do not trust MSYS2's MinGW gettext.sh Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 03/20] Git.pm: stop assuming that absolute paths start with a slash Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 04/20] mingw: factor out Windows specific environment setup Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 05/20] mingw: prepare the TMPDIR environment variable for shell scripts Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 06/20] mingw: try to delete target directory before renaming Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 07/20] mingw: let lstat() fail with errno == ENOTDIR when appropriate Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 08/20] mingw: fix t5601-clone.sh Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 09/20] mingw: accomodate t0060-path-utils for MSYS2 Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 10/20] mingw: disable mkfifo-based tests Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 11/20] tests: turn off git-daemon tests if FIFOs are not available Johannes Schindelin
2016-01-28  8:21       ` Eric Sunshine
2016-01-28  8:40         ` Johannes Schindelin
2016-01-28 21:35           ` Junio C Hamano
2016-01-27 16:19     ` [PATCH v3 12/20] mingw: skip test in t1508 that fails due to path conversion Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 13/20] mingw: fix t9700's assumption about directory separators Johannes Schindelin
2016-01-27 16:19     ` [PATCH v3 14/20] mingw: work around pwd issues in the tests Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 15/20] Avoid absolute path in t0008 Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 16/20] mingw: mark t9100's test cases with appropriate prereqs Johannes Schindelin
2016-01-27 16:33       ` Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 17/20] mingw: avoid illegal filename in t9118 Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 18/20] mingw: handle the missing POSIXPERM prereq in t9124 Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 19/20] mingw: skip a test in t9130 that cannot pass on Windows Johannes Schindelin
2016-01-27 16:20     ` [PATCH v3 20/20] mingw: do not bother to test funny file names Johannes Schindelin
2016-01-28  8:42     ` [PATCH v3 00/20] Let Git's tests pass on Windows Eric Sunshine
2016-01-28  8:57       ` Johannes Schindelin
2016-01-28 21:37         ` Junio C Hamano

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=xmqq1t96be2k.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.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 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.