git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH 2/2] t7502-commit: Skip SIGTERM test on Windows
Date: Wed, 25 Mar 2009 21:33:46 +0100	[thread overview]
Message-ID: <200903252133.46594.j6t@kdbg.org> (raw)
In-Reply-To: <200903252131.26561.j6t@kdbg.org>

The implementation of exec on Windows is just a rough approximation of the
POSIX behavior. In particular, no real process "overlay" happens (a new
process is spawned instead and the parent process waits until the child
terminates). In particular, the process ID cannot be taken by the exec'd
process. But there is one test in t7502-commit.sh that depends on this.
We have to skip it on Windows.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 t/t7502-commit.sh |    2 +-
 t/test-lib.sh     |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index ad42c78..56cd866 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -234,7 +234,7 @@ cat >.git/FAKE_EDITOR <<EOF
 # kill -TERM command added below.
 EOF
 
-test_expect_success 'a SIGTERM should break locks' '
+test_expect_success EXECKEEPSPID 'a SIGTERM should break locks' '
 	echo >>negative &&
 	! "$SHELL_PATH" -c '\''
 	  echo kill -TERM $$ >> .git/FAKE_EDITOR
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 8de5ee1..2979e8e 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -697,10 +697,12 @@ case $(uname -s) in
 	}
 	# no POSIX permissions
 	# backslashes in pathspec are converted to '/'
+	# exec does not inherit the PID
 	;;
 *)
 	test_set_prereq POSIXPERM
 	test_set_prereq BSLASHPSPEC
+	test_set_prereq EXECKEEPSPID
 	;;
 esac
 
-- 
1.6.2.1.224.g2225f

      reply	other threads:[~2009-03-25 20:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25 20:31 [PATCH 1/2] t7005-editor: Use $SHELL_PATH in the editor scripts Johannes Sixt
2009-03-25 20:33 ` Johannes Sixt [this message]

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=200903252133.46594.j6t@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).