git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@grubix.eu>
To: git@vger.kernel.org
Cc: Adam Dinwoodie <adam@dinwoodie.org>,
	Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Ramsay Jones <ramsay@ramsayjones.plus.com>
Subject: [PATCH 1/2] test-lib: group system specific FIFO tests by system
Date: Thu, 14 Sep 2017 16:52:33 +0200	[thread overview]
Message-ID: <4482ae18370f3e759bf98f71e15eaab19fdd009a.1505400392.git.git@grubix.eu> (raw)
In-Reply-To: <alpine.DEB.2.21.1.1709141440510.4132@virtualbox>

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 <git@grubix.eu>
---
 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


  reply	other threads:[~2017-09-14 14:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 19:00 [PATCH] test-lib: don't use ulimit in test prerequisites on cygwin Ramsay Jones
2017-09-13 19:20 ` Jonathan Nieder
2017-09-14  8:13   ` Michael J Gruber
2017-09-14 12:54 ` Johannes Schindelin
2017-09-14 14:52   ` Michael J Gruber [this message]
2017-09-14 14:52     ` [PATCH 2/2] test-lib: ulimit does not limit on CYGWIN and MINGW Michael J Gruber
2017-09-14 17:31       ` Ramsay Jones
2017-09-14 22:21     ` [PATCH 1/2] test-lib: group system specific FIFO tests by system Johannes Schindelin
2017-09-15 10:31       ` Michael J Gruber
2017-09-15 16:38         ` Ramsay Jones
2017-09-15 19:32         ` Johannes Schindelin

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=4482ae18370f3e759bf98f71e15eaab19fdd009a.1505400392.git.git@grubix.eu \
    --to=git@grubix.eu \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=adam@dinwoodie.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    /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).