[libvirt] [PATCH] tests: Don't use bash if we don't have to

This tested failed on FreeBSD because it was using bash, that might not be installed. --- tests/int-overflow | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tests/int-overflow b/tests/int-overflow index baf2eef..36e5536 100755 --- a/tests/int-overflow +++ b/tests/int-overflow @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Ensure that an invalid domain ID isn't interpreted as a valid one. # Before, an ID of 2^32+2 would be treated just like an ID of 2. -- 1.7.4.1

On 07/29/2011 06:19 AM, Matthias Bolte wrote:
This tested failed on FreeBSD because it was using bash, that might not be installed. --- tests/int-overflow | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/int-overflow b/tests/int-overflow index baf2eef..36e5536 100755 --- a/tests/int-overflow +++ b/tests/int-overflow @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh
This script sources test-lib.sh, which in turn uses features like $() that are not portable to Solaris /bin/sh. But I didn't see any bash-isms - everything in those two files appears to be safe for use with POSIX sh, so I'm okay with the patch as is: ACK. (If we later want to be portable to Solaris, we should resync test-lib.sh with coreutils and/or gnulib, from where it was originally forked, since the latter now have means of finding and re-execing under a POSIX-like shell if /bin/sh wasn't strong enough.) -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

2011/7/29 Eric Blake <eblake@redhat.com>:
On 07/29/2011 06:19 AM, Matthias Bolte wrote:
This tested failed on FreeBSD because it was using bash, that might not be installed. --- tests/int-overflow | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/int-overflow b/tests/int-overflow index baf2eef..36e5536 100755 --- a/tests/int-overflow +++ b/tests/int-overflow @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh
This script sources test-lib.sh, which in turn uses features like $() that are not portable to Solaris /bin/sh. But I didn't see any bash-isms - everything in those two files appears to be safe for use with POSIX sh, so I'm okay with the patch as is:
ACK.
Thanks, pushed. -- Matthias Bolte http://photron.blogspot.com
participants (2)
-
Eric Blake
-
Matthias Bolte