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

[PATCH 2/2] t7502-commit: Skip SIGTERM test on Windows

From
Johannes Sixt <j6t@kdbg.org>
Date
Mar 25, 2009, 20:33 UTC
Message-ID
<200903252133.46594.j6t@kdbg.org>
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
Previous: Johannes Sixt
Message 2 of 2 in “t7005-editor: Use $SHELL_PATH in the editor scripts”
  1. 1/2 t7005-editor: Use $SHELL_PATH in the editor scriptsJohannes Sixt, Mar 25, 2009
  2. 2/2 t7502-commit: Skip SIGTERM test on WindowsJohannes Sixt, Mar 25, 2009

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.