{"thread":{"id":"34348","subject":"[PATCH] test-lib.sh - cygwin does not have usable FIFOs","startedAt":"2013-07-04T22:04:30Z","lastAt":"2013-07-14T15:38:01Z","messageCount":7,"participants":["Mark Levedahl","Jonathan Nieder","Torsten Bögershausen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"222592","messageId":"1372975470-13573-1-git-send-email-mlevedahl@gmail.com","threadId":"34348","inReplyTo":null,"subject":"[PATCH] test-lib.sh - cygwin does not have usable FIFOs","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-04T22:04:30Z","receivedAt":"2013-07-04T22:04:30Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"Do not use FIFOs on cygwin, they do not work. Cygwin includes\ncoreutils, so has mkfifo, and that command does something. However,\nthe resultant named pipe is known (on the Cygwin mailing list at\nleast) to not work correctly.\n\nThis disables PIPE for Cygwin, allowing t0008.sh to complete (all other\ntests in that file work correctly).\n\nSigned-off-by: Mark Levedahl <mlevedahl@gmail.com>\n---\n t/test-lib.sh | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 9753641..2d63307 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -885,7 +885,14 @@ test_i18ngrep () {\n \n test_lazy_prereq PIPE '\n \t# test whether the filesystem supports FIFOs\n-\trm -f testfifo && mkfifo testfifo\n+\tcase $(uname -s) in\n+\tCYGWIN*)\n+\t\tfalse\n+\t\t;;\n+\t*)\n+\t\trm -f testfifo && mkfifo testfifo\n+\t\t;;\n+\tesac\n '\n \n test_lazy_prereq SYMLINKS '\n-- \n1.8.3.2.0.13\n"},{"id":"222682","messageId":"20130707005558.GI30132@google.com","threadId":"34348","inReplyTo":"1372975470-13573-1-git-send-email-mlevedahl@gmail.com","subject":"Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-07T00:55:58Z","receivedAt":"2013-07-07T00:55:58Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Mark Levedahl wrote:\n\n> Do not use FIFOs on cygwin, they do not work. Cygwin includes\n> coreutils, so has mkfifo, and that command does something. However,\n> the resultant named pipe is known (on the Cygwin mailing list at\n> least) to not work correctly.\n\nHm.  How would you recommend going about writing a script that takes\noutput from a command, transforms it, and then feeds it back into\nthat command's input?  Are sockets a more reliable way to do this kind\nof IPC on Cygwin?\n\nSee reinit_git and try_dump from t9010-svn-fe.sh for context.\n\nThanks,\nJonathan\n"},{"id":"222728","messageId":"51D93164.8030202@web.de","threadId":"34348","inReplyTo":"20130707005558.GI30132@google.com","subject":"Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2013-07-07T09:14:12Z","receivedAt":"2013-07-07T09:14:12Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2013-07-07 02.55, Jonathan Nieder wrote:\n> Mark Levedahl wrote:\n> \n>> Do not use FIFOs on cygwin, they do not work. Cygwin includes\n>> coreutils, so has mkfifo, and that command does something. However,\n>> the resultant named pipe is known (on the Cygwin mailing list at\n>> least) to not work correctly.\n> \n> Hm.  How would you recommend going about writing a script that takes\n> output from a command, transforms it, and then feeds it back into\n> that command's input?  Are sockets a more reliable way to do this kind\n> of IPC on Cygwin?\n> \n> See reinit_git and try_dump from t9010-svn-fe.sh for context.\n> \n> Thanks,\n> Jonathan\n\nt9010 needs PIPE in most test cases as a prerequisite.\nAnd if PIPE isn't available, the tests can not be run.\n\nAre you suggesting to replace the named pipes with a TCP socket?\n\nDisabling PIPE under cygwin seems to be the right thing to do,\nor do I miss something ?\n\n/Torsten\n"},{"id":"222868","messageId":"51DB3A9F.6020504@gmail.com","threadId":"34348","inReplyTo":"20130707005558.GI30132@google.com","subject":"Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-08T22:18:07Z","receivedAt":"2013-07-08T22:18:07Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On 07/06/2013 08:55 PM, Jonathan Nieder wrote:\n> Mark Levedahl wrote:\n>\n>> Do not use FIFOs on cygwin, they do not work. Cygwin includes\n>> coreutils, so has mkfifo, and that command does something. However,\n>> the resultant named pipe is known (on the Cygwin mailing list at\n>> least) to not work correctly.\n> Hm.  How would you recommend going about writing a script that takes\n> output from a command, transforms it, and then feeds it back into\n> that command's input?  Are sockets a more reliable way to do this kind\n> of IPC on Cygwin?\n>\n> See reinit_git and try_dump from t9010-svn-fe.sh for context.\n>\n> Thanks,\n> Jonathan\n>\n\nOn the one hand, sockets work fine on cygwin so that path would probably \nwork.\n\nHowever, I don't understand why git would need to consume its own output \n- If named pipes are really needed to use git-svn because git-svn \ndepends upon git feeding the same git process, then that package should \nnot be available on cygwin or any other platform that does not support \nfifos. If not, then I don't think the test suite should require fifos or \nany other construct with the same git process feeding itself either, it \njust blurs the line about what is actually being tested.\n\nMark\n"},{"id":"223258","messageId":"20130714005730.GA21033@google.com","threadId":"34348","inReplyTo":"51DB3A9F.6020504@gmail.com","subject":"Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-14T00:57:30Z","receivedAt":"2013-07-14T00:57:30Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Mark Levedahl wrote:\n\n> However, I don't understand why git would need to consume its own\n> output - If named pipes are really needed to use git-svn because\n> git-svn depends upon git feeding the same git process, then that\n> package should not be available on cygwin or any other platform that\n> does not support fifos.\n\nThis isn't about git-svn but about the svn remote helper.  The same\nconsiderations would apply to any other foreign repository importer\nthat uses \"git fast-import --cat-blob-fd\".  So I would like to make\nsure it is at least possible to support such a thing in the Cygwin\nand mingw ports.\n\n>                          If not, then I don't think the test suite\n> should require fifos or any other construct with the same git\n> process feeding itself either, it just blurs the line about what is\n> actually being tested.\n\nI'm not sure I follow.  Are you saying Windows users would never want\nto access Subversion repositories?\n\nThanks,\nJonathan\n"},{"id":"223259","messageId":"20130714005912.GB21033@google.com","threadId":"34348","inReplyTo":"51D93164.8030202@web.de","subject":"Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-14T00:59:12Z","receivedAt":"2013-07-14T00:59:12Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Torsten Bögershausen wrote:\n\n> Disabling PIPE under cygwin seems to be the right thing to do,\n> or do I miss something ?\n\nIf fifos don't work on Cygwin, disabling that test prerequisite\nis defintely the right thing to do.  I was taking the opportunity to\nfind out whether and how git could be tweaked to avoid needing fifos\nwhen setting pipes up in scripts.\n\nJonathan\n"},{"id":"223327","messageId":"51E2C5D9.1040405@gmail.com","threadId":"34348","inReplyTo":"20130714005730.GA21033@google.com","subject":"Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-14T15:38:01Z","receivedAt":"2013-07-14T15:38:01Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On 07/13/2013 08:57 PM, Jonathan Nieder wrote:\n> I'm not sure I follow. Are you saying Windows users would never want \n> to access Subversion repositories? Thanks, Jonathan \nQuite the contrary. SVN and git both work on Windows without having \nPOSIX FIFOs  - Windows does have FIFOS, but the semantics are different \nthan POSIX and this is why Cygwin's do not work as needed. There is no \nproblem having a subprocess with stdin and stdout redirected via \nanonymous pipes to the parent: this is how git runs sub commands and \nworks fine. I'm just questioning why this same construct cannot be used \nfor the test harness.\n\nMark\n"}]}