Re: shell compatibility issues with SunOS 5.10

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

 



Nguyen Thai Ngoc Duy wrote:
> Hi,
> 
> I did "make test" on a SunOS 5.10 and it failed.

> diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
> index b68ab11..61ccdee 100755
> --- a/t/t4200-rerere.sh
> +++ b/t/t4200-rerere.sh
> @@ -57,7 +57,7 @@ test_expect_success 'conflicting merge' '
>  	test_must_fail git merge first
>  '
>  
> -sha1=$(sed -e 's/	.*//' .git/MERGE_RR)
> +sha1=$(cut -f 1 .git/MERGE_RR)

Are you using /bin/sed?  I think it has a problem with tabs.
/usr/xpg4/bin/sed works correctly, but it has a problem with
files that are not newline terminated.  So you will get other
errors.  I have a set of "ugly" patches that I will follow this
email with that allow me to compile on Solaris 10 while skipping
the following tests:

   GIT_SKIP_TESTS='
      t3900.2[23]
      t3901.[67]
      t6030.1[23]
      t8005.*
   '

The t3900 and t3901 are due to iconv failures.

The t6030 issues are due to a flaw in Sun's ksh, i.e. /usr/xpg4/bin/sh
which I use for testing.  This ksh seems to only call a trap that is
set within at most the next outer-layer function.  In other words, if
func1 sets a trap, and calls func2 which calls func3 which exits, then
the trap in func1 will _not_ be called. If instead, func2 exits, then
the trap will be called.  Bisect does such a thing.  You should not
have a problem with other ksh or bash.

I had assumed t8005 was failing because of iconv, but since you have
pointed out the extended RE in grep, some of these should pass.
Converting to egrep allows tests 1, 4 and 5 to pass for me. So my skip
expression can be changed to t8005.[23].

>  rr=.git/rr-cache/$sha1
>  test_expect_success 'recorded preimage' "grep ^=======$ $rr/preimage"

Patches to follow.

-brandon
--
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]