git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] test-lib.sh - cygwin does not have usable FIFOs
@ 2013-07-04 22:04 Mark Levedahl
  2013-07-07  0:55 ` Jonathan Nieder
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Levedahl @ 2013-07-04 22:04 UTC (permalink / raw)
  To: git; +Cc: Mark Levedahl

Do not use FIFOs on cygwin, they do not work. Cygwin includes
coreutils, so has mkfifo, and that command does something. However,
the resultant named pipe is known (on the Cygwin mailing list at
least) to not work correctly.

This disables PIPE for Cygwin, allowing t0008.sh to complete (all other
tests in that file work correctly).

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
---
 t/test-lib.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/t/test-lib.sh b/t/test-lib.sh
index 9753641..2d63307 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -885,7 +885,14 @@ test_i18ngrep () {
 
 test_lazy_prereq PIPE '
 	# test whether the filesystem supports FIFOs
-	rm -f testfifo && mkfifo testfifo
+	case $(uname -s) in
+	CYGWIN*)
+		false
+		;;
+	*)
+		rm -f testfifo && mkfifo testfifo
+		;;
+	esac
 '
 
 test_lazy_prereq SYMLINKS '
-- 
1.8.3.2.0.13

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs
  2013-07-04 22:04 [PATCH] test-lib.sh - cygwin does not have usable FIFOs Mark Levedahl
@ 2013-07-07  0:55 ` Jonathan Nieder
  2013-07-07  9:14   ` Torsten Bögershausen
  2013-07-08 22:18   ` Mark Levedahl
  0 siblings, 2 replies; 7+ messages in thread
From: Jonathan Nieder @ 2013-07-07  0:55 UTC (permalink / raw)
  To: Mark Levedahl; +Cc: git

Mark Levedahl wrote:

> Do not use FIFOs on cygwin, they do not work. Cygwin includes
> coreutils, so has mkfifo, and that command does something. However,
> the resultant named pipe is known (on the Cygwin mailing list at
> least) to not work correctly.

Hm.  How would you recommend going about writing a script that takes
output from a command, transforms it, and then feeds it back into
that command's input?  Are sockets a more reliable way to do this kind
of IPC on Cygwin?

See reinit_git and try_dump from t9010-svn-fe.sh for context.

Thanks,
Jonathan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs
  2013-07-07  0:55 ` Jonathan Nieder
@ 2013-07-07  9:14   ` Torsten Bögershausen
  2013-07-14  0:59     ` Jonathan Nieder
  2013-07-08 22:18   ` Mark Levedahl
  1 sibling, 1 reply; 7+ messages in thread
From: Torsten Bögershausen @ 2013-07-07  9:14 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Mark Levedahl, git

On 2013-07-07 02.55, Jonathan Nieder wrote:
> Mark Levedahl wrote:
> 
>> Do not use FIFOs on cygwin, they do not work. Cygwin includes
>> coreutils, so has mkfifo, and that command does something. However,
>> the resultant named pipe is known (on the Cygwin mailing list at
>> least) to not work correctly.
> 
> Hm.  How would you recommend going about writing a script that takes
> output from a command, transforms it, and then feeds it back into
> that command's input?  Are sockets a more reliable way to do this kind
> of IPC on Cygwin?
> 
> See reinit_git and try_dump from t9010-svn-fe.sh for context.
> 
> Thanks,
> Jonathan

t9010 needs PIPE in most test cases as a prerequisite.
And if PIPE isn't available, the tests can not be run.

Are you suggesting to replace the named pipes with a TCP socket?

Disabling PIPE under cygwin seems to be the right thing to do,
or do I miss something ?

/Torsten

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs
  2013-07-07  0:55 ` Jonathan Nieder
  2013-07-07  9:14   ` Torsten Bögershausen
@ 2013-07-08 22:18   ` Mark Levedahl
  2013-07-14  0:57     ` Jonathan Nieder
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Levedahl @ 2013-07-08 22:18 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git

On 07/06/2013 08:55 PM, Jonathan Nieder wrote:
> Mark Levedahl wrote:
>
>> Do not use FIFOs on cygwin, they do not work. Cygwin includes
>> coreutils, so has mkfifo, and that command does something. However,
>> the resultant named pipe is known (on the Cygwin mailing list at
>> least) to not work correctly.
> Hm.  How would you recommend going about writing a script that takes
> output from a command, transforms it, and then feeds it back into
> that command's input?  Are sockets a more reliable way to do this kind
> of IPC on Cygwin?
>
> See reinit_git and try_dump from t9010-svn-fe.sh for context.
>
> Thanks,
> Jonathan
>

On the one hand, sockets work fine on cygwin so that path would probably 
work.

However, I don't understand why git would need to consume its own output 
- If named pipes are really needed to use git-svn because git-svn 
depends upon git feeding the same git process, then that package should 
not be available on cygwin or any other platform that does not support 
fifos. If not, then I don't think the test suite should require fifos or 
any other construct with the same git process feeding itself either, it 
just blurs the line about what is actually being tested.

Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs
  2013-07-08 22:18   ` Mark Levedahl
@ 2013-07-14  0:57     ` Jonathan Nieder
  2013-07-14 15:38       ` Mark Levedahl
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Nieder @ 2013-07-14  0:57 UTC (permalink / raw)
  To: Mark Levedahl; +Cc: git

Mark Levedahl wrote:

> However, I don't understand why git would need to consume its own
> output - If named pipes are really needed to use git-svn because
> git-svn depends upon git feeding the same git process, then that
> package should not be available on cygwin or any other platform that
> does not support fifos.

This isn't about git-svn but about the svn remote helper.  The same
considerations would apply to any other foreign repository importer
that uses "git fast-import --cat-blob-fd".  So I would like to make
sure it is at least possible to support such a thing in the Cygwin
and mingw ports.

>                          If not, then I don't think the test suite
> should require fifos or any other construct with the same git
> process feeding itself either, it just blurs the line about what is
> actually being tested.

I'm not sure I follow.  Are you saying Windows users would never want
to access Subversion repositories?

Thanks,
Jonathan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs
  2013-07-07  9:14   ` Torsten Bögershausen
@ 2013-07-14  0:59     ` Jonathan Nieder
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Nieder @ 2013-07-14  0:59 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: Mark Levedahl, git

Torsten Bögershausen wrote:

> Disabling PIPE under cygwin seems to be the right thing to do,
> or do I miss something ?

If fifos don't work on Cygwin, disabling that test prerequisite
is defintely the right thing to do.  I was taking the opportunity to
find out whether and how git could be tweaked to avoid needing fifos
when setting pipes up in scripts.

Jonathan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs
  2013-07-14  0:57     ` Jonathan Nieder
@ 2013-07-14 15:38       ` Mark Levedahl
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Levedahl @ 2013-07-14 15:38 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git

On 07/13/2013 08:57 PM, Jonathan Nieder wrote:
> I'm not sure I follow. Are you saying Windows users would never want 
> to access Subversion repositories? Thanks, Jonathan 
Quite the contrary. SVN and git both work on Windows without having 
POSIX FIFOs  - Windows does have FIFOS, but the semantics are different 
than POSIX and this is why Cygwin's do not work as needed. There is no 
problem having a subprocess with stdin and stdout redirected via 
anonymous pipes to the parent: this is how git runs sub commands and 
works fine. I'm just questioning why this same construct cannot be used 
for the test harness.

Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-14 15:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-04 22:04 [PATCH] test-lib.sh - cygwin does not have usable FIFOs Mark Levedahl
2013-07-07  0:55 ` Jonathan Nieder
2013-07-07  9:14   ` Torsten Bögershausen
2013-07-14  0:59     ` Jonathan Nieder
2013-07-08 22:18   ` Mark Levedahl
2013-07-14  0:57     ` Jonathan Nieder
2013-07-14 15:38       ` Mark Levedahl

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).