Re: [PATCH v2] rollback lock files on more signals than just SIGINT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Mike Ralphson" <mike.ralphson@xxxxxxxxx> writes:

> 2008/5/29 Paolo Bonzini <bonzini@xxxxxxx>:
> ...
> This addition to the testsuite breaks it on AIX with the default sh
> (ksh). Replacing the explicit sh -c with $SHELL_PATH -c fixes it for
> me (as I have SHELL_PATH pointing to bash). If that's acceptable I can
> post a patch if necessary.

Like the attached one?

I noticed quite a many "sh" dependencies in other test scripts:

 - t0021: rot13.sh does not begin with "#!$SHELL_PATH" nor any "#!"
 - t6026: custom-merge begins with "#!/bin/sh", not "#!$SHELL_PATH".
 - t6030: test_script.sh begins with "#!/bin/sh", not "#!$SHELL_PATH".
 - t7005: e-<editor>.sh do not begin with "#!$SHELL_PATH" nor any "#!"
 - t7402: fake-editor.sh begins with "#!/bin/sh", not "#!$SHELL_PATH".
 - t7502: you noticed
 - t9100: exec.sh begins with "#!/bin/sh", not "#!$SHELL_PATH".

I presume most of the scripts the above incorrectly feeds to "sh" not to
the shell you specify are plain vanilla scripts that not-quite-POSIX
shells can grok them, so in practice this may not be a problem, but we
should eventually fix them.

 t/t7502-commit.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index a5801df..f43c1b1 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -217,14 +217,14 @@ test_expect_success 'do not fire editor in the presence of conflicts' '
 '
 
 pwd=`pwd`
-cat > .git/FAKE_EDITOR << EOF
-#! /bin/sh
+cat >.git/FAKE_EDITOR <<"EOF"
+#! $SHELL_PATH
 # kill -TERM command added below.
 EOF
 
 test_expect_success 'a SIGTERM should break locks' '
 	echo >>negative &&
-	sh -c '\''
+	"$SHELL_PATH" -c '\''
 	  echo kill -TERM $$ >> .git/FAKE_EDITOR
 	  GIT_EDITOR=.git/FAKE_EDITOR exec git commit -a'\'' && exit 1  # should fail
 	! test -f .git/index.lock
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux