From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH 3/3] Shell fixup: Use bash in posix mode Date: Fri, 25 Sep 2015 09:47:54 +0100 Message-ID: <1443170874.25250.54.camel@citrix.com> References: <1443115762-7046-1-git-send-email-ian.jackson@eu.citrix.com> <1443115762-7046-3-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZfOff-0004Ap-8K for xen-devel@lists.xenproject.org; Fri, 25 Sep 2015 08:47:59 +0000 In-Reply-To: <1443115762-7046-3-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-09-24 at 18:29 +0100, Ian Jackson wrote: > I have read through the wheezy > bash(1) manpage and searched for posix, and the following behavioural > differences are described: > > * Differences in interative startup (not relevant to us). > * Minor (irrelevant) differences in which startup files are read > during noninteractive startup. (Eg, BASH_ENV not honoured.) > * Differences to the parsing of invocations of `time' > * `test a == b' may be unsupported (but it's wrong and we say `=') > * -e not inherited by some subshells (this is what I am trying to fix) > * `.' and `source' do not search the cwd. > * `set' with no arguments does not print shell functions etc. I expected this to also disable "[[ expression ]]", "$((maths))", array variables and in particular $PIPESTATUS too, but it looks like I was wrong and it doesn't disable bash _extensions_, just areas where bash differs from what posix specifies. Of those we seem to use $((maths)) and $PIPESTATUS (once in the standalone wrapper), although array variables are tricky to grep for. I also found http://tiswww.case.edu/php/chet/bash/POSIX (referenced from the manpage) handy. > I have done some ad-hoc testing but it seems like much of this is > difficult to test. I suggest we push it at a time when we can keep a > close eye on the behaviour. Agreed. > Signed-off-by: Ian Jackson Acked-by: Ian Campbell