[CRIU] [PATCH 2/2] fix error in tests when /bin/sh is not bash
Tycho Andersen
tycho.andersen at canonical.com
Thu Mar 19 09:56:46 PDT 2015
Hi Chris,
On Thu, Mar 19, 2015 at 12:40:26PM -0400, Christopher Covington wrote:
> Hi Tycho,
>
> On 03/19/2015 10:50 AM, Tycho Andersen wrote:
> > == is a bashism, we should use = for /bin/sh; this prevents output like:
>
> It might be helpful to be more explicit about which non-Bash shell can't
> handle "==". Busybox for example is fine with it.
Ubuntu's default /bin/sh (dash) can't:
/tmp$ ls -al /bin/sh
lrwxrwxrwx 1 root root 4 Feb 19 2014 /bin/sh -> dash*
/tmp$ cat tester.sh
#!/bin/sh
[ "foo" == "bar" ]
/tmp$ ./tester.sh
./tester.sh: 3: [: foo: unexpected operator
Tycho
> Chris
>
> --
> Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
More information about the CRIU
mailing list