Pino Toscano
2016-Dec-14 13:41 UTC
[Libguestfs] [PATCH supermin] tests: fix test-binaries-exist.sh with bash 4.4
bash 4.4 installs the (binary) examples of builtins by default: among them, there is one called 'sync', which segfaults when called standalone. Since this test actually looks for the 'sync' utility from coreutils, filter out the bash-specific paths from the search results. --- tests/test-binaries-exist.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-binaries-exist.sh b/tests/test-binaries-exist.sh index c40ce93..71a0c8c 100755 --- a/tests/test-binaries-exist.sh +++ b/tests/test-binaries-exist.sh @@ -56,7 +56,7 @@ if [ "$(find $d2 -name sync -perm -0555 | wc -l)" -lt 1 ]; then fi # These binaries should be runnable (since they are the same as the host). -`find $d2 -name sync | head` +`find $d2 -name sync ! -path '*/bash/*' | head` # Need to chmod $d2 since rm -r can't remove unwritable directories. chmod -R +w $d2 ||: -- 2.7.4
Richard W.M. Jones
2016-Dec-14 13:52 UTC
Re: [Libguestfs] [PATCH supermin] tests: fix test-binaries-exist.sh with bash 4.4
On Wed, Dec 14, 2016 at 02:41:18PM +0100, Pino Toscano wrote:> bash 4.4 installs the (binary) examples of builtins by default: among > them, there is one called 'sync', which segfaults when called > standalone. Since this test actually looks for the 'sync' utility from > coreutils, filter out the bash-specific paths from the search results. > --- > tests/test-binaries-exist.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/test-binaries-exist.sh b/tests/test-binaries-exist.sh > index c40ce93..71a0c8c 100755 > --- a/tests/test-binaries-exist.sh > +++ b/tests/test-binaries-exist.sh > @@ -56,7 +56,7 @@ if [ "$(find $d2 -name sync -perm -0555 | wc -l)" -lt 1 ]; then > fi > > # These binaries should be runnable (since they are the same as the host). > -`find $d2 -name sync | head` > +`find $d2 -name sync ! -path '*/bash/*' | head` > > # Need to chmod $d2 since rm -r can't remove unwritable directories. > chmod -R +w $d2 ||:ACK, Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Possibly Parallel Threads
- [supermin PATCH] tests: different dirs for formats in test-build-bash.sh
- [supermin 1/2] chroot: Fix corner case introduced with dpkg-divert support
- "hide unwritable" as a requested feature
- Re: supermin in Fedora Rawhide switched (again) to using dnf instead of yum
- [PATCH] Quoting in supermin-split.sh