Re: [PATCH 1/6] git-p4 tests: refactor and cleanup

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

 



Hi Pete, hope you don't mind a couple of minor nits from an outsider ...

> +# Try to pick a unique port: guess a large number, then hope
> +# no more than one of each test is running.
> +#
> +# This does not handle the case where somebody else is running the
> +# same tests and has chosen the same ports.
> +testid=${this_test#t}
> +git_p4_test_start=9800
> +P4DPORT=$((10669 + (testid - git_p4_test_start)))
> +
This won't work with older versions of the Almquist shell (without
prepending `testid' and `git_p4_test_start' with a `$', that is):

  $ ash-0.5.2 -c 'a=4; b=2; echo $(( 1 + (a - b) ))'
  ash-0.5.2: arith: syntax error: " 1 + (a - b) "

Still, it works with all the other POSIX-ish shells that I've tried,
including dash 0.5.5.1 on GNU/Linux, NetBSD 5.1 /bin/sh and /bin/ksh,
and Solaris 10 /bin/ksh and /usr/xpg4/bin/sh, so it might not be worth
worrying about.

Same goes for other similar usages in the rest of the patch, such as
"git config git-p4.detectCopies $((level + 2))"

Regards,
  Stefano
--
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]