diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-08-02 10:56:41 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-08-02 11:04:13 +0100 |
commit | d7356a2801130907997acd5c7502e8417566e782 (patch) | |
tree | 8f5c8e9eb434d217ef4c26e131bea622eebcb4e5 /regressions | |
parent | 5f9c168d9135fa81ee2f3a15461467fe04c26888 (diff) | |
download | libguestfs-d7356a2801130907997acd5c7502e8417566e782.tar.gz libguestfs-d7356a2801130907997acd5c7502e8417566e782.tar.xz libguestfs-d7356a2801130907997acd5c7502e8417566e782.zip |
Add regression test to catch missing libraries in the appliance.
Related to RHBZ#727178.
Diffstat (limited to 'regressions')
-rwxr-xr-x | regressions/rhbz727178.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/regressions/rhbz727178.sh b/regressions/rhbz727178.sh new file mode 100755 index 00000000..859a60bc --- /dev/null +++ b/regressions/rhbz727178.sh @@ -0,0 +1,49 @@ +#!/bin/bash - +# libguestfs +# Copyright (C) 2011 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# https://bugzilla.redhat.com/show_bug.cgi?id=727178 +# Check that all binaries that we ship in the appliance contain +# corresponding libraries. + +set -e +export LANG=C + +guestfish=../fish/guestfish +output=rhbz727178.output + +rm -f binaries.tmp $output + +eval `$guestfish -a /dev/null --listen` + +$guestfish --remote -- run +$guestfish --remote -- debug binaries "" | + grep -E '^/(bin|sbin|usr/bin|usr/sbin|usr/libexec)/' > binaries.tmp + +while read ex; do + echo ldd $ex + $guestfish --remote -- -debug ldd $ex +done < binaries.tmp > $output + +if grep -E '\bnot found\b|undefined symbol' $output; then + echo "Error: some libraries are missing from the appliance." + echo "See" $(pwd)/$output + echo "for the complete output." + exit 1 +fi + +rm binaries.tmp $output |