Skip to content

Commit

Permalink
t7502-commit: Skip SIGTERM test on Windows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Sixt committed Mar 25, 2009
1 parent 80f0e53 commit fb9a2be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion t/t7502-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,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

Expand Down

0 comments on commit fb9a2be

Please sign in to comment.