From: worley@alum.mit.edu (Dale R. Worley)
To: git@vger.kernel.org
Subject: [PATCH] git_mkstemps: improve test suite test
Date: Fri, 2 Aug 2013 20:27:23 -0400 [thread overview]
Message-ID: <201308030027.r730RNWS022924@freeze.ariadne.com> (raw)
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 <worley@ariadne.com>
---
> From: Junio C Hamano <gitster@pobox.com>
> Date: Fri, 19 Jul 2013 07:29:47 -0700
>
> The change itself looks good; care to write it up as a proper patch
> with a proposed log message?
My apologies for the delay; I've had to do some yak-shaving to learn
how to construct patches properly. (I've written some clarifications
for Document/SubmittingPatches, which I will submit separately.)
Someone has gone ahead and made the code change, so all that remains
is to update the testsuite test by replacing the helper program
'test-close-fd-0' with the Posix shell redirection '<&-'.
Dale
Makefile | 1 -
test-close-fd-0.c | 14 --------------
2 files changed, 0 insertions(+), 15 deletions(-)
delete mode 100644 test-close-fd-0.c
diff --git a/Makefile b/Makefile
index 8ad40d4..3588ca1 100644
--- a/Makefile
+++ b/Makefile
@@ -557,7 +557,6 @@ X =
PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
TEST_PROGRAMS_NEED_X += test-chmtime
-TEST_PROGRAMS_NEED_X += test-close-fd-0
TEST_PROGRAMS_NEED_X += test-ctype
TEST_PROGRAMS_NEED_X += test-date
TEST_PROGRAMS_NEED_X += test-delta
diff --git a/test-close-fd-0.c b/test-close-fd-0.c
deleted file mode 100644
index 3745c34..0000000
--- a/test-close-fd-0.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <unistd.h>
-
-/* Close file descriptor 0 (which is standard-input), then execute the
- * remainder of the command line as a command. */
-
-int main(int argc, char **argv)
-{
- /* Close fd 0. */
- close(0);
- /* Execute the requested command. */
- execvp(argv[1], &argv[1]);
- /* If execve() failed, return an error. */
- return 1;
-}
--
1.7.7.6
next reply other threads:[~2013-08-03 0:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-03 0:27 Dale R. Worley [this message]
2013-08-03 0:36 ` [PATCH] git_mkstemps: improve test suite test Jonathan Nieder
2013-08-05 16:21 ` Junio C Hamano
2013-08-05 17:32 ` Junio C Hamano
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=201308030027.r730RNWS022924@freeze.ariadne.com \
--to=worley@alum.mit.edu \
--cc=git@vger.kernel.org \
/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).