git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] test-lib: group system specific FIFO tests by system

From
Michael J Gruber <git@grubix.eu>
Date
Sep 14, 2017, 14:52 UTC
Message-ID
<4482ae18370f3e759bf98f71e15eaab19fdd009a.1505400392.git.git@grubix.eu>
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
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 5 of 11 in “test-lib: don't use ulimit in test prerequisites on cygwin”
  1. test-lib: don't use ulimit in test prerequisites on cygwinRamsay Jones, Sep 13, 2017
  2. Jonathan NiederSep 13, 2017
  3. Michael J GruberSep 14, 2017
  4. Johannes SchindelinSep 14, 2017
  5. 1/2 test-lib: group system specific FIFO tests by systemMichael J Gruber, Sep 14, 2017
  6. Johannes SchindelinSep 14, 2017
  7. Michael J GruberSep 15, 2017
  8. Ramsay JonesSep 15, 2017
  9. Johannes SchindelinSep 15, 2017
  10. 2/2 test-lib: ulimit does not limit on CYGWIN and MINGWMichael J Gruber, Sep 14, 2017
  11. Ramsay JonesSep 14, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.