Re: [PATCH 1/2] test-lib: group system specific FIFO tests by system
Hi Michael, On Fri, 15 Sep 2017, Michael J Gruber wrote: > Johannes Schindelin venit, vidit, dixit 15.09.2017 00:21: > > > > On Thu, 14 Sep 2017, Michael J Gruber wrote: > > > >> test-lib determines whether a file-system supports FIFOs and needs to do > >> special casing for CYGWIN and MINGW. This separates those system > >> specific settings from those at more central place. > >> > >> Set mkfifo() to false in the central system specific place so that the > >> same test works everywhere. > > > > The mkfifo() emulation of Cygwin seems to work, no? I think it works even > > in MSYS2, but not in MINGW. > > > > So maybe this patch should affect only the MINGW arm? > > I only reorganised the code, so in that sense the patch does not affect > any system ;) > > If indeed mkfifo works on CYGWIN than a separate patch should remove the > exclusion of CYGWIN; alas, I can't confirm (I wish MS still had the old > academic alliance programme). You don't need an academic license, as there are free VMs available (they expire after a while, though): https://developer.microsoft.com/en-us/windows/downloads/virtual-machines It seems that the current free VM will expire in 4 days. After that, probably a new one will be available that expires some time later (not sure about the exact time frame of those VMs). Alternatively, you can download VMs meant for web testing at https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ which expire after 90 days. Ciao, Dscho
Re: [PATCH 1/2] test-lib: group system specific FIFO tests by system
On 15/09/17 11:31, Michael J Gruber wrote: > Johannes Schindelin venit, vidit, dixit 15.09.2017 00:21: >> Hi Michael, >> >> On Thu, 14 Sep 2017, Michael J Gruber wrote: >> >>> test-lib determines whether a file-system supports FIFOs and needs to do >>> special casing for CYGWIN and MINGW. This separates those system >>> specific settings from those at more central place. >>> >>> Set mkfifo() to false in the central system specific place so that the >>> same test works everywhere. >> >> The mkfifo() emulation of Cygwin seems to work, no? I think it works even >> in MSYS2, but not in MINGW. >> >> So maybe this patch should affect only the MINGW arm? > > I only reorganised the code, so in that sense the patch does not affect > any system ;) > > If indeed mkfifo works on CYGWIN than a separate patch should remove the > exclusion of CYGWIN; alas, I can't confirm (I wish MS still had the old > academic alliance programme). I haven't tried recently, but back in 2013 Mark Levedahl wrote in his commit message that mkfifo was known not to work on the cygwin mailing list. (see commit 9443605b5d, "test-lib.sh - cygwin does not have usable FIFOs", 04-07-2013) In fact, you can see that this was disabled on cygwin before MinGW! It is possible, of course, that fifos now work on cygwin. (I will put it on my TODO list). In any event, this is indeed a separate issue. ATB, Ramsay Jones
Re: [PATCH 1/2] test-lib: group system specific FIFO tests by system
Johannes Schindelin venit, vidit, dixit 15.09.2017 00:21: > Hi Michael, > > On Thu, 14 Sep 2017, Michael J Gruber wrote: > >> test-lib determines whether a file-system supports FIFOs and needs to do >> special casing for CYGWIN and MINGW. This separates those system >> specific settings from those at more central place. >> >> Set mkfifo() to false in the central system specific place so that the >> same test works everywhere. > > The mkfifo() emulation of Cygwin seems to work, no? I think it works even > in MSYS2, but not in MINGW. > > So maybe this patch should affect only the MINGW arm? I only reorganised the code, so in that sense the patch does not affect any system ;) If indeed mkfifo works on CYGWIN than a separate patch should remove the exclusion of CYGWIN; alas, I can't confirm (I wish MS still had the old academic alliance programme). Michael
Re: [PATCH 1/2] test-lib: group system specific FIFO tests by system
Hi Michael, On Thu, 14 Sep 2017, Michael J Gruber wrote: > test-lib determines whether a file-system supports FIFOs and needs to do > special casing for CYGWIN and MINGW. This separates those system > specific settings from those at more central place. > > Set mkfifo() to false in the central system specific place so that the > same test works everywhere. The mkfifo() emulation of Cygwin seems to work, no? I think it works even in MSYS2, but not in MINGW. So maybe this patch should affect only the MINGW arm? Ciao, Dscho
[PATCH 1/2] test-lib: group system specific FIFO tests by system
test-lib determines whether a file-system supports FIFOs and needs to do special casing for CYGWIN and MINGW. This separates those system specific settings from those at more central place. Set mkfifo() to false in the central system specific place so that the same test works everywhere. Signed-off-by: Michael J Gruber--- t/test-lib.sh | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 5fbd8d4a90..b8a0b05102 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -994,6 +994,10 @@ case $uname_s in pwd () { builtin pwd -W } + # no FIFOs + mkfifo () { + false + } # no POSIX permissions # backslashes in pathspec are converted to '/' # exec does not inherit the PID @@ -1004,6 +1008,10 @@ case $uname_s in GIT_TEST_CMP=mingw_test_cmp ;; *CYGWIN*) + # no FIFOs + mkfifo () { + false + } test_set_prereq POSIXPERM test_set_prereq EXECKEEPSPID test_set_prereq CYGWIN @@ -1062,14 +1070,7 @@ test_i18ngrep () { test_lazy_prereq PIPE ' # test whether the filesystem supports FIFOs - case $(uname -s) in - CYGWIN*|MINGW*) - false - ;; - *) - rm -f testfifo && mkfifo testfifo - ;; - esac + rm -f testfifo && mkfifo testfifo ' test_lazy_prereq SYMLINKS ' -- 2.14.1.712.gda4591c8a2