Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] git_mkstemps: improve test suite test

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:19
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] writes:
worley@alum.mit.edu (Dale R. Worley) writes:
quoted
Commit 52749 fixes a bug regarding testing the return of an open()
call for success/failure.  Improve the testsuite test for that fix by
removing the helper program 'test-close-fd-0' and replacing it with
the shell redirection '<&-'.  (The redirection is Posix, so it should
be portable.)

Signed-off-by: Dale Worley <redacted>
---
Sorry, but I have no idea what commit you are talking about, and as
far as I can see there is no such file test-close-fd-0.c in my tree.

Puzzled...
OK, let's do this on top of a77f106c (run-command: dup_devnull():
guard against syscalls failing, 2013-07-12) which is at the tip of
tr/fd-gotcha-fixes that contains the earlier fix.

-- >8 --
From: "Dale R. Worley" <redacted>
Date: Fri, 2 Aug 2013 20:27:23 -0400
Subject: [PATCH] t0070: test that git_mkstemps correctly checks return value of open()

Signed-off-by: Dale R. Worley <redacted>
Signed-off-by: Junio C Hamano <redacted>
---
 t/t0070-fundamental.sh | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/t/t0070-fundamental.sh b/t/t0070-fundamental.sh
index da2c504..ff3776f 100755
--- a/t/t0070-fundamental.sh
+++ b/t/t0070-fundamental.sh
@@ -25,6 +25,10 @@ test_expect_success POSIXPERM 'mktemp to unwritable directory prints filename' '
 	grep "cannotwrite/test" err
 '
 
+test_expect_success 'git_mkstemps_mode does not fail if fd 0 is not open' '
+	git commit --allow-empty -m message <&-
+'
+
 test_expect_success 'check for a bug in the regex routines' '
 	# if this test fails, re-build git with NO_REGEX=1
 	test-regex
-- 
1.8.4-rc1-129-g1f3472b
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help