Blame tests/run-unstrip-test.sh

Packit Service 97d2fb
#! /bin/sh
Packit Service 97d2fb
# Copyright (C) 2007-2010 Red Hat, Inc.
Packit Service 97d2fb
# This file is part of elfutils.
Packit Service 97d2fb
#
Packit Service 97d2fb
# This file is free software; you can redistribute it and/or modify
Packit Service 97d2fb
# it under the terms of the GNU General Public License as published by
Packit Service 97d2fb
# the Free Software Foundation; either version 3 of the License, or
Packit Service 97d2fb
# (at your option) any later version.
Packit Service 97d2fb
#
Packit Service 97d2fb
# elfutils is distributed in the hope that it will be useful, but
Packit Service 97d2fb
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 97d2fb
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 97d2fb
# GNU General Public License for more details.
Packit Service 97d2fb
#
Packit Service 97d2fb
# You should have received a copy of the GNU General Public License
Packit Service 97d2fb
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit Service 97d2fb
Packit Service 97d2fb
. $srcdir/test-subr.sh
Packit Service 97d2fb
Packit Service 97d2fb
original=${original:-testfile12}
Packit Service 97d2fb
stripped=${stripped:-testfile17}
Packit Service 97d2fb
debugfile=${debugfile:-${stripped}.debug}
Packit Service 97d2fb
Packit Service 97d2fb
testfiles $original $stripped $debugfile
Packit Service 97d2fb
tempfiles testfile.unstrip testfile.inplace
Packit Service 97d2fb
Packit Service 97d2fb
# These are old reference output from run-test-strip6.sh, when
Packit Service 97d2fb
# strip left the .debug file with unchanged sh_size in
Packit Service 97d2fb
# stripped sections that shrank in the stripped file.  strip
Packit Service 97d2fb
# no longer does that, but unstrip must still handle it.
Packit Service 97d2fb
Packit Service 97d2fb
testrun ${abs_top_builddir}/src/unstrip -o testfile.unstrip $stripped $debugfile
Packit Service 97d2fb
Packit Service 97d2fb
testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.unstrip
Packit Service 97d2fb
Packit Service 97d2fb
# Also test modifying the file in place.
Packit Service 97d2fb
Packit Service 97d2fb
rm -f testfile.inplace
Packit Service 97d2fb
cp $debugfile testfile.inplace
Packit Service 97d2fb
chmod 644 testfile.inplace
Packit Service 97d2fb
testrun ${abs_top_builddir}/src/unstrip $stripped testfile.inplace
Packit Service 97d2fb
Packit Service 97d2fb
testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.inplace